About
cloudie
is a command-line utility that interacts with various cloud
service providers. It uses libcloud and supports a large number of
providers.
Installation
$ make install
Configuration
[role]
# Optional
default = "name of the role to use if --role isn't specified"
[role.<name>]
# Required options
provider = "service provider (e.g. digitalocean or vultr)"
key = "API key"
# Optional, may be overridden with command-line arguments
image = 1 # ID
location = 2 # ID
size = 3 # ID
ssh-key = "<path to public key>"
user-data = "<path to user-data for cloud-init>"
String values surrounded with $()
are interpreted as commands, e.g.:
[role]
default = "test"
[role.test]
provider = "dummy"
key = "$(gpg --decrypt /path/to/key.gpg)"
Users must permit command substitutions. If approved, the SHA256 message digest of the config file is cached in order to avoid prompting the next time for that particular configuration.
Re-approval is required after every change to a configuration file that contain commands.
Usage
To create a new server
$ cloudie compute create-node \
--role <name of the role> \
--name <name of the node> \
--image <id> \
--location <id> \
--size <id> \
--ssh-key <path> \
--user-data <path>
To delete a server
$ cloudie compute destroy-node \
--role <name of the role> \
--id <id>
create-node
To import a public SSH key for use in $ cloudie compute import-key-pair \
--role <name of the role> \
--name <name of the key> \
--ssh-key <path>
To delete a public SSH key
$ cloudie compute delete-key-pair \
--role <name of the role> \
--id <id>
To list available SSH keys
$ cloudie compute list-key-pairs --role <name of the role>
To list servers
$ cloudie compute list-nodes --role <name of the role>
To list available images
$ cloudie compute list-images --role <name of the role>
To list available sizes
$ cloudie compute list-sizes --role <name of the role>
To list available locations
$ cloudie compute list-locations --role <name of the role>