iagctl create registry

Create a new dependency management registry.

The iagctl create registry command creates a registry in your gateway’s data store. You can create registries that point to private PyPI and Ansible Galaxy registries for use with your Python and Ansible services.

By default, IAG includes a PyPI registry called default-pypi that points to the public PyPI registry and an Ansible Galaxy registry called default-galaxy that points to the public Ansible Galaxy registry. For more information, see Create an Ansible Galaxy registry.

Syntax

$iagctl create registry <type> <registry-name> [flags]

Handle secret values

Use the --password-name and --token-name flags to reference secret resources that contain password or token values. This approach ensures that IAG doesn’t store the password or token in plain text within the registry.

For example, to create a registry that requires a token:

  1. Configure your IAG secret store with an encryption file.
  2. Create a secret that contains the token value:
$ iagctl create secret my-pypi-token --value 'my-token-value'
  1. Create a registry with the --token-name flag:
$ iagctl create registry pypi my-pypi-registry \
> --url 'http://private-repo-hostname' \
> --token-name my-pypi-token

The registry my-pypi-registry now references the secret my-pypi-token for its token value. IAG decrypts the token at runtime when you run a service that requires the registry.

For more information about creating secret resources, see iagctl create secret.

Examples

Create a PyPI registry

The following example creates a basic PyPI registry called my-pypi-registry:

$iagctl create registry pypi my-pypi-registry \
>--url 'http://repo-hostname:8080/simple'
For more information about PyPI registries, run iagctl create registry pypi --help.

Create an Ansible Galaxy registry

The following example creates a basic Ansible Galaxy registry called my-galaxy-registry:

$iagctl create registry ansible-galaxy my-galaxy-registry \
>--url 'http://repo-hostname:8080'
For more information about Ansible Galaxy registries, run iagctl create registry ansible-galaxy --help.

Options

$ -h, --help Help for registry

Options inherited from parent commands

$ --config string Path to the configuration file
$ --raw Display the result of the command in raw format
$ --verbose Enable verbose output