Added an alternative configuration for running on the HP Public Cloud

This commit is contained in:
Tim Kuhlman 2014-06-04 16:35:32 -06:00
parent 37b2116873
commit 274bb9a254
5 changed files with 71 additions and 3 deletions

9
HPCloud/README.md Normal file
View File

@ -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.

24
HPCloud/Vagrantfile vendored Normal file
View File

@ -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

View File

@ -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

15
HPCloud/chef-solo-bootstrap.sh Executable file
View File

@ -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

View File

@ -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.