diff --git a/HPCloud/README.md b/HPCloud/README.md new file mode 100644 index 0000000..d5d4051 --- /dev/null +++ b/HPCloud/README.md @@ -0,0 +1,9 @@ +# Mini-mon in the cloud +Run vagrant commands from this subdir to have Mini-mon run in the HP Public Cloud rather than as a vm on your machine. + +You must have a valid HPCloud account with a defined security group that allows ssh access and an ssh key pair must be defined. + +To setup: +- Install the plugin `vagrant plugin install vagrant-hp` +- Copy Vagrantfile.hpcloud to ~/.vagrant.d/Vagrantfile then edit and enter your credentials and other access information. + diff --git a/HPCloud/Vagrantfile b/HPCloud/Vagrantfile new file mode 100644 index 0000000..8923775 --- /dev/null +++ b/HPCloud/Vagrantfile @@ -0,0 +1,24 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +VAGRANTFILE_API_VERSION = "2" # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! + +Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| + # Settings for all vms + config.berkshelf.enabled = true + config.berkshelf.berksfile_path = "../Berksfile" + + ENV['VAGRANT_DEFAULT_PROVIDER'] = 'hp' + config.vm.box = "dummy_hp" + config.vm.box_url = "https://github.com/mohitsethi/vagrant-hp/raw/master/dummy_hp.box" + config.vm.hostname = 'mini-mon' + config.vm.synced_folder "..", "/vagrant" # needed to get vertica packages but otherwise unneeded + + config.vm.provision :shell, path: "./chef-solo-bootstrap.sh" + + config.vm.provision :chef_solo do |chef| + chef.roles_path = "../roles" + chef.data_bags_path = "../data_bags" + chef.add_role "Mini-Mon" + end +end diff --git a/HPCloud/Vagrantfile.hpcloud b/HPCloud/Vagrantfile.hpcloud new file mode 100644 index 0000000..1fed0fd --- /dev/null +++ b/HPCloud/Vagrantfile.hpcloud @@ -0,0 +1,19 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +# HP Cloud Settings +# using this provider - https://github.com/mohitsethi/vagrant-hp +Vagrant.configure("2") do |config| + config.vm.provider :hp do |hp| + hp.access_key = "" + hp.secret_key = "" + hp.flavor = "standard.large" + hp.tenant_id = "" + hp.server_name = "mini-mon" + hp.keypair_name = "" + hp.ssh_private_key_path = "~/.ssh/id_rsa" + hp.ssh_username = "ubuntu" + hp.security_groups = ["default"] + hp.image = "Ubuntu Server 12.04.4 LTS (amd64 20140408) - Partner Image" + end +end diff --git a/HPCloud/chef-solo-bootstrap.sh b/HPCloud/chef-solo-bootstrap.sh new file mode 100755 index 0000000..ee61dc2 --- /dev/null +++ b/HPCloud/chef-solo-bootstrap.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +# Bootstrap chef-solo on Ubuntu 12.04 + +# Use the local apt mirrors, much faster +sed -i -e 's,^archive.ubuntu.com/ubuntu,nova.clouds.archive.ubuntu.com/ubuntu,g' /etc/apt/sources.list +apt-get -y update + +# The omnibus installer +if ! [ -e /usr/bin/chef-solo ]; then + curl -L https://www.opscode.com/chef/install.sh | bash +fi + +# An alternative to omnibus is to install ruby via apt and then the chef gem +#apt-get -y install ruby1.9.3 +#gem install --no-ri --no-rdoc chef diff --git a/README.md b/README.md index 71c473b..9823d2d 100644 --- a/README.md +++ b/README.md @@ -94,8 +94,9 @@ vagrant plugin install vagrant-proxyconf # Alternate Vagrant Configurations To run any of these alternate configs, simply run the Vagrant commands from within the subdir, though note the vertica debs must be copied into -the subdir also. +the subdir also. See the README.md in the subdir for more details -- A Vagrant config for running the various monitoring components split into their own vms is available in the split subdir. -- A Vagrant config for testing hLinux is available in the hlinux subdir +- HPCloud subdir - Runs a vm in the HP Public Cloud rather than using virtual box +- split subdir - The various monitoring components split into their own vms. +- hlinux subdir - For testing hLinux, see the - Baremetal - actually not using Vagrant at all, see the baremetal fabric task in the utils directory.