Skip to content

registry config

Tim Burks edited this page Jan 21, 2023 · 1 revision

Configuration

For maximum flexibility and ease of use, you can manage and quickly switch between multiple named configurations in the Registry Tool - each with their own settings and authentication mechanism. This page includes examples of basic setup and manipulation of configurations, but there are more commands and help available in the CLI via the --help mechanism. See:

  • registry config --help
  • registry config configurations --help
  • registry auth --help

Configurations management

registry config configurations manages named sets of configurations.

Create a new configuration

$ registry config configurations create hosted \
    --registry.address=apigeeregistry.googleapis.com:443 \
    --registry.insecure=false \
    --registry.project=hosted-project \
    --registry.location=global
Created "hosted".
Activated "hosted".

$ registry config configurations create local \
    --registry.address=localhost:8080 \
    --registry.insecure=true \
    --registry.project=local-project \
    --registry.location=global
Created "local".
Activated "local".

Notes:

  • Flags are optional
  • Values will be cloned from current active configuration for unspecified flags
  • Configurations are made active when created

List configurations

$ registry config configurations list
NAME       IS_ACTIVE  ADDRESS                               INSECURE
hosted     false      apigeeregistry.googleapis.com:443     false
local      true       localhost:8080                        true

Activate an existing configuration

registry config configurations activate hosted
Activated "hosted".

Active Configuration settings

Enable authentication

$ registry config set token-source 'gcloud auth print-access-token'
Updated property "token-source".

Notes:

  • gcloud must be logged in using gcloud auth login to create tokens
  • token-source can be any shell command (eg. 'echo hello')

Generate authentication

$ registry auth print-token
ya90.a0AeTM1idrIFE8Eo3jHLmIdEJJKsoApcpOukbtqeqojOmPgfw5tfAcuwFtbM_IxT8kRL_RjWbTGQVHyhCCciN_FEqR8VlCmMkYr9YLAIDny7MXPZ23w0f5e-

List active config

$ registry config list
registry.address = apigeeregistry.googleapis.com:443
registry.insecure = false
registry.location = global
registry.project = theganyo-1
token-source = gcloud auth print-access-token

Configurations management

Create a new configuration

$ registry config configurations create hosted \
    --registry.address=apigeeregistry.googleapis.com:443 \
    --registry.insecure=false \
    --registry.project=hosted-project \
    --registry.location=global
Created "hosted".
Activated "hosted".

$ registry config configurations create local \
    --registry.address=localhost:8080 \
    --registry.insecure=true \
    --registry.project=local-project \
    --registry.location=global
Created "local".
Activated "local".

Notes:

  • Flags are optional
  • Values will be cloned from current active configuration for unspecified flags
  • Configurations are activated when created

List configurations

$ registry config configurations list
NAME       IS_ACTIVE  ADDRESS                               INSECURE
hosted     false      apigeeregistry.googleapis.com:443     false
local      true       localhost:8080                        true

Activate an existing configuration

registry config configurations activate hosted
Activated "hosted".

Active Configuration settings

Enable authentication

$ registry config set token-source 'gcloud auth print-access-token'
Updated property "token-source".

Notes:

  • gcloud must be logged in using gcloud auth login to create tokens
  • token-source can be any shell command (eg. 'echo hello')

Generate authentication

$ registry auth print-token
ya90.a0AeTM1idrIFE8Eo3jHLmIdEJJKsoApcpOukbtqeqojOmPgfw5tfAcuwFtbM_IxT8kRL_RjWbTGQVHyhCCciN_FEqR8VlCmMkYr9YLAIDny7MXPZ23w0f5e-

List active config

$ registry config list
registry.address = apigeeregistry.googleapis.com:443
registry.insecure = false
registry.location = global
registry.project = theganyo-1
token-source = gcloud auth print-access-token