Vamp CLI EE is a Node.js package. Install it globally and export the host address of your Vamp installation via VAMP_HOST
.
npm install -g vamp-cli-eeexport VAMP_HOST=http://vamp-hostvamp --help
You will need to authenticate and provide the correct namespace to further use the CLI
Before you can use the CLI, you need have an API token and set the correct namespace.
API token: can be set by export VAMP_TOKEN=<token uuid>
or as an CLI argument --token <token uuid>
Namespace: can be set by export VAMP_NAMESPACE=<namespace uuid>
or as an CLI argument --namespace <namespace uuid>
If you do not have the access rights to create a token, your Vamp admin must provide you with one.
Also, you must be provided with the correct namespace UUID.
Logging in will prompt you to request an API token from your admin.
vamp login -u tim -p passwordYou do not have enough rights to create an API token, please request a token from your Vamp admin.Then add the token to your request using the "--token [token]" syntax or export as VAMP_TOKEN
Once you have the token and namespace, you can proceed.
export VAMP_TOKEN=3366ca4397f87f5de6bc9b5863f37efb46f4bc6f4d9626eexport VAMP_NAMESPACE=6d1339c7c7a1ac54246a57320bb1dd15176ce29
Credentials can be passed in a number of ways and evaluated in the following order:
Passed in as part of a command, for example --namespace
Passed in via ENV vars, for example VAMP_NAMESPACE
Passed in via ~/.vamp
file
Admins are a bit different from other users. They can generate their own API access tokens. They can also query the organisation namespace for users, roles, tokens, environments etc.
Logging in when you are an admin sets the admin namespace as default.
vamp login -u admin -p passwordLogin successful
Admin credentials are written unencrypted to~/.vamp
You can now list the organisation's namespaces.
vamp list namespacesNAME UUIDtest 6d1339c7c7a1ac54246a57320bb1dd15176ce29prod 51b1a5465f4ea62adf537b4f72bb23dc096ce6ca
You can list the tokens for the organization.
vamp list tokens
You can list all the users for the organization.
vamp list usersNAME ROLESBob qaAdmin adminTim developerJason developer
You can also list all the user roles for the organization.
vamp list tokens
vamp describe gateway myDeployment/myService/web
vamp update-gateway myDeployment/myService/web \--route myDeployment/myCluster/myService:1.1.0/web--condition "User-Agent == Safari"--strength 100%
vamp update-gateway myDeployment/myService/web \--weights myDeployment/myCluster/myService:1.0.0/web@50%,myDeployment/myCluster/myService:1.1.0/web@50%
Note for Windows users
On Windows, the ‘%’ sign is reserved. The Vamp CLI uses this character when updating the weight on gateways. You need to surround the --weights
command argument with double quotes "
.
vamp update-gateway myDeployment/myService/web \--weights "route1@50%,route2@50%"
vamp list events --tags metrics --per-page 10 --page 1
Namespaces cannot be managed using the CLI
vamp describe user admin
vamp create user -f createUser.json
vamp delete user agnes
vamp describe token mytoken
vamp create token -f createToken.json
vamp delete token mytoken