Virtualmaster API command-line client
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
lib
spec
.gitignore
Gemfile
Gemfile.lock
README.mdown
Rakefile
virtualmaster.gemspec

README.mdown

Virtualmaster command line interface

Proof of concept of Virtualmaster command line interface distributed as a RubyGem.

# virtualmaster config
Running virtualmaster for first time.
Setting up environment.

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

Enter your API username:
Enter your API password:

Settings stored within ~/.virtualmaster

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

Default password 'AdVc:PBi8&7L'.

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

Try to login using `ssh root@80.79.29.246'

# virtualmaster list
+-------+---------+----------------+--------------+
| name  | state   | ip_address     | zone         |
+-------+---------+----------------+--------------+
| demo1 | RUNNING | 195.140.253.88 | vm-prague-l1 |
+-------+---------+----------------+--------------+

Install

The current version of virtualmaster command line interface should work with Ruby 1.8.7+.

To install you need to have Ruby. The CLI itself is available as RubyGem

gem install virtualmaster

Automatically install SSH keys

Virtualmaster CLI can install your SSH keys to a remote machine automatically using --identity IDENTITY_FILE command-line option.

virtualmaster create demo1 --image ubuntu_lucid --identity ~/.ssh/id_rsa
Using image 'ubuntu_lucid' with ID 124
Creating 'micro' instance (512 MB memory/10 GB storage)
Instance launch request accepted. Instance ID 45387

Default password 'vBK7i!kK'

Waiting for instance............

Instance ready.

Loading identity file /Users/virtualmaster/.ssh/id_rsa

Try to login using `ssh root@195.140.253.130'

Instance provisioning with shell scripts

First steps towards automated infrastructure is provision. Using Virtualmaster CLI shell provisioner you can launch a custom shell script once server is created and automate initial setup.

virtualmaster create demo1 --script ~/setup.sh

Callbacks (like script and identity) can be run at the same time.

Instance size

Default hardware profile for instances are defined in the helpers file. Profiles are stored in configuration file when user runs virtualmaster config.

Provided instance sizes are just guidance and you are free to create your own settings by editing ~/.virtualmaster config file.

More information

Additional topics are available in the wiki.

Changelog

  • v0.1.6 - Fixed default config file generator - images and profiles
  • v0.0.5 - Added support for availability zones and instance levels
  • v0.0.3 - First public release