This is a Vagrant plugin that adds a Cisco CloudCenter provider to Vagrant. It allows Vagrant to communicate with CloudCenter and have it control and provision machines in a number of public and private clouds.
This plugin is currently a Proof of Concept and has been developed and tested against Cisco CloudCenter 4.8.0 and Vagrant 1.9.5
Created by gh-md-toc
- Boot instances through CloudCenter
- SSH into the instances
- Provision the instances with any built-in Vagrant provisioner
- Minimal synced folder support via
rsync
After installing the plugin, add the CloudCenter sample box, and then use vagrant up --provider=cloudcenter
to launch the instance
$ vagrant plugin install vagrant-cloudcenter
...
$ vagrant box add dummy https://github.com/conmurphy/vagrant-cloudcenter/raw/master/example_box/cloudcenter.box
...
$ vagrant up --provider=cloudcenter
...
The following additional plugin commands have been provided:
vagrant cloudcenter init
- Create a template Vagrantfile and populate with your own configurationvagrant cloudcenter catalog
- Return a list of the current available catalogvagrant cloudcenter jobs
- Return a list of service requests and their current status
You can either manually create a Vagrantfile that looks like the following, filling in
your information where necessary, or run the vagrant cloudcenter init
command to have an empty Vagrantfile created for you.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = 'cloudcenter'
config.ssh.private_key_path = ['/Users/MYUSERNAME/.ssh/id_rsa','/Users/MYUSERNAME/.vagrant.d/insecure_private_key']
config.ssh.insert_key = false
config.vm.provider :cloudcenter do |cloudcenter|
cloudcenter.username = 'my_username'
cloudcenter.access_key = 'my_access_key'
cloudcenter.host = 'cloudcenter_host_ip_address'
cloudcenter.deployment_config = 'sample_deployment_config.json'
cloudcenter.use_https = true
cloudcenter.ssl_ca_file = '/Users/MYUSERNAME/MY_SSL_CA_FILE.crt'
end
config.vm.synced_folder '.', '/opt/my_files/', type: 'rsync'
end
The Vagrant CloudCenter plugin requires a box with configuration as outlined in this document.
- "vagrant" User
- Root Password: "vagrant"
- Password-less Sudo
- SSH Tweaks
This provider exposes quite a few provider-specific configuration options:
access_key
- The access key for accessing the Cisco CloudCenter APIusername
- The username for accessing the CloudCenter APIhost
- The CloudCenter Manager addressdeployment_config
- A JSON file used by CloudCenter to deploy the desired infrastructureuse_https
- Whether or not to use HTTPS when connecting to the CloudCenter API. Default istrue
ssl_ca_file
- Location of your custom SSL CA file to use when connecting to the CloudCenter API. See the following document below for details on how to use your own customer client certificates with CloudCenter. This is not required ifuse_https
is set tofalse
CloudCenter - Certificate Authentication
This is a JSON file used by Cisco CloudCenter to deploy a new application into the environment of your choosing. It can be created by following these steps:
- Access the application from the CCM UI and click Applications
- Search for the required application in the Applications page
- Select
Deploy
- Complete the required fields
- Select
Restful JSON
- Save the JSON output into a new file on your local machine - if sharing a single file amongst multiple people or for multiple projects be sure to change the deployment job name so there is no overlap.
- Use this file in the
cloudcenter.deployment_config
setting
There is minimal support for synced folders. Upon vagrant up
,
vagrant reload
, and vagrant provision
, the CloudCenter provider will use
rsync
(if available) to uni-directionally sync the folder to
the remote machine over SSH.
See Vagrant Synced folders: rsync
- Currently tested with a single tier VM
To work on the CloudCenter plugin, clone this repository then run the following commands to build and install the plugin.
$ gem build vagrant-cloudcenter.gemspec
$ vagrant plugin install ./vagrant-cloudcenter-0.3.0.gem
To uninstall the plugin run vagrant plugin uninstall vagrant-cloudcenter
This project is licensed to you under the terms of the Cisco Sample Code License.