-
Notifications
You must be signed in to change notification settings - Fork 33
registry config
Tim Burks edited this page Jan 21, 2023
·
1 revision
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
registry config configurations
manages named sets of configurations.
$ 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
$ registry config configurations list
NAME IS_ACTIVE ADDRESS INSECURE
hosted false apigeeregistry.googleapis.com:443 false
local true localhost:8080 true
registry config configurations activate hosted
Activated "hosted".
$ 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')
$ registry auth print-token
ya90.a0AeTM1idrIFE8Eo3jHLmIdEJJKsoApcpOukbtqeqojOmPgfw5tfAcuwFtbM_IxT8kRL_RjWbTGQVHyhCCciN_FEqR8VlCmMkYr9YLAIDny7MXPZ23w0f5e-
$ 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
$ 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
$ registry config configurations list
NAME IS_ACTIVE ADDRESS INSECURE
hosted false apigeeregistry.googleapis.com:443 false
local true localhost:8080 true
registry config configurations activate hosted
Activated "hosted".
$ 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')
$ registry auth print-token
ya90.a0AeTM1idrIFE8Eo3jHLmIdEJJKsoApcpOukbtqeqojOmPgfw5tfAcuwFtbM_IxT8kRL_RjWbTGQVHyhCCciN_FEqR8VlCmMkYr9YLAIDny7MXPZ23w0f5e-
$ 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