How to install and initialize Database Lab CLI
dblab instance status
Install CLI and connect
- Install Database Lab CLI:
curl -sSL dblab.sh | bash
- (optional) Connect to Database Lab Engine using SSH port forwarding
A Database Lab instance might be running behind firewalls and opening proper ports might be impossible or prohibited. In this case, SSH keys should be on the server with Database Lab Engine in order to use this connection option.
In a separate terminal tab launch SSH port forwarding. Use
http://localhost:2344 as URL in the step 3 below.
ssh -NTML 2344:localhost:2345 ssh://[email protected]:22 -i ~/.ssh/id_rsa
- Initialize configuration. Use URL and verification token of your instance. Instead of using verification token you can generate and use your personal access token. See details here.
dblab init --environment-id=ENV_ID --url=URL --token=TOKEN
--environment-id- an arbitrary environment ID of Database Lab instance's API
--url- URL of Database Lab instance's API
--token- verification token of the Database Lab instance to send API requests
You can also run
dblab configat any time to change your settings or create a new configuration.
- Test your configuration with instance status request
dblab instance status:
"message": "Instance is ready"