Command line tool: virtualmaster-cli

Take control of your Virtualmaster infrastructure with easy-to-use command-line utility.

It helps you to build better deployment with:

  • full server lifecycle control (create, reboot, start/stop, destroy)
  • instance callbacks to integrate 3rd party services, like DNS provisioning or notifications
  • application stacks support (coming soon)

Installation

Once you signed up for Virtualmaster account you need to install CLI tool. To prepare your workstation for installation you need to install Ruby and RubyGems.

For Linux distribution based on Debian:

# apt-get install ruby rubygems

For Windows use: RubyInstaller

For Mac OS X: Do nothing and relax. Ruby is already installed…

With environment set you can install CLI tool simply by:

# gem install virtualmaster

Before first run you need to configure credentials for API access.

# virtualmaster config
Running virtualmaster for first time

Your API credentials are available from https://www.virtualmaster.cz/en/api#settings

Enter API username:
Enter API password:

Now you should be able to test the configuration by listing available instances.

# virtualmaster list
No instances found

No surprise here. Command-line tool has been able to connect to our API, authenticate and retrieve information about your instances (none so far). To fix it, lauch your first virtual server.

# virtualmaster create myserver
Using image with ID 124
Creating 'micro' instance (512 MB memory/10 GB storage)
Instance launch request accepted. Instance ID 12345

Default password 'NcjL@8fB'

Waiting for instance................
Instance ready.

Try to login using 'ssh root@80.79.29.246'        

Now you have installed VirtualMaster CLI and successfully launched your first server. To find out more information, please, check out virtualmaster-cli [GitHub repo]