Installation is done on the server d-head.
Download the latest MONQ Management Client from our repository:
curl -LO https://downloads.monq.ru/tools/monqctl/`curl -s https://downloads.monq.ru/tools/monqctl/latest.txt`/linux-x64/monqctl.zip
For example, the command to load version v1.1.0 for Linux would be:
curl -LO https://downloads.monq.ru/tools/monqctl/v1.1.0/linux-x64/monqctl.zip
Unzip the downloaded file:
#debian based distribs
sudo apt-get install unzip
#redhat based distribs
sudo yum install unzip
unzip monqctl.zip
Make the monqctl binary executable:
chmod +x ./monqctl
Move binary to a directory defined in the environment variable $PATH
:
sudo mv ./monqctl /usr/local/bin/monqctl
Make sure you have the latest version of monqctl installed:
monqctl --version
Getting started with monqctl requires you to configure the program context for use with a particular instance of Monq.
NOTE
When configuring monqctl you will need a token to access MONQ ReleaseHub. It must be obtained by contacting the Monq support.
Let's assume that your Monq system installation is located at the following address: monq.domain.com
Add an instance of Monq to the context configuration.
monqctl config set instance monq.domain.com --server=http://pl-microservice-registry.api.monq.domain.com
Add permissions to access the Monq instance. Tokens are not used in earlier versions of the microservices registry.
monqctl config set credential monq-user
Add access to MONQ ReleaseHub to receive updates. A token for receiving updates, you can get in your personal account or from a manager.
monqctl config set releasehub monq-release-hub --token=<token>
Configure the context that binds the Monq instance, access permissions, and MONQ ReleaseHub to access updates.
monqctl config set context monq.domain.com --instance=monq.domain.com --credential=monq-user --releasehub=monq-release-hub
Set the current context of the Monq instance to work with.
monqctl config use-context monq.domain.com
monqctl config get instances
`monqctl config get instances sm-monq-en`
`monqctl config get credentials`
`monqctl config get credentials smon-user`
`monqctl config get releasehubs`
`monqctl config get releasehubs monq-cloud`
`monqctl config get contexts`
`monqctl config get contexts smon`
`monqctl config rename instance old-instance new-instance`
`monqctl config rename credential old-user new-user`
`monqctl config rename releasehub old-release-hub new-release-hub`
`monqctl config rename context old-smon new-smon`
`monqctl config delete instance sm-monq-en`
`monqctl config delete credential smon-user`
`monqctl config delete releasehub monq-cloud`
`monqctl config delete context smon`
`monqctl config view`
`monqctl config current-context`
`monqctl config use-context smon`