Last active
December 25, 2015 18:18
-
-
Save DavidWittman/7018993 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "rpcs", | |
"description": "HA Environment for Rackspace Private Cloud (Grizzly)", | |
"cookbook_versions": { | |
}, | |
"json_class": "Chef::Environment", | |
"chef_type": "environment", | |
"default_attributes": { | |
}, | |
"override_attributes": { | |
"vips": { | |
"mysql-db": "10.240.0.252", | |
"rabbitmq-queue": "10.240.0.253", | |
"horizon-dash_ssl": "10.240.0.254", | |
"cinder-api": "10.240.0.254", | |
"nova-api": "10.240.0.254", | |
"nova-ec2-public": "10.240.0.254", | |
"nova-novnc-proxy": "10.240.0.254", | |
"horizon-dash": "10.240.0.254", | |
"nova-xvpvnc-proxy": "10.240.0.254", | |
"keystone-admin-api": "10.240.0.254", | |
"keystone-internal-api": "10.240.0.254", | |
"keystone-service-api": "10.240.0.254", | |
"glance-registry": "10.240.0.254", | |
"glance-api": "10.240.0.254", | |
"quantum-api": "10.240.0.254", | |
"config": { | |
"10.240.0.252": { | |
"vrid": 252, | |
"network": "public" | |
}, | |
"10.240.0.253": { | |
"vrid": 253, | |
"network": "public" | |
}, | |
"10.240.0.254": { | |
"vrid": 254, | |
"network": "public" | |
} | |
} | |
}, | |
"hardware": { | |
"install_oem": true | |
}, | |
"enable_monit": true, | |
"monitoring": { | |
"metric_provider": "collectd", | |
"procmon_provider": "monit" | |
}, | |
"glance": { | |
"images": [ | |
"cirros", | |
"precise" | |
], | |
"image": { | |
"cirros": "https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img", | |
"precise": "http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-amd64-disk1.img" | |
}, | |
"image_upload": false | |
}, | |
"keystone": { | |
"tenants": [ | |
"admin", | |
"service" | |
], | |
"users": { | |
"admin": { | |
"password": "How0pen5tack?", | |
"roles": { | |
"admin": [ | |
"admin" | |
] | |
} | |
} | |
}, | |
"admin_user": "admin" | |
}, | |
"nova": { | |
"libvirt": { | |
"virt_type": "qemu" | |
}, | |
"config": { | |
"ram_allocation_ratio": 1.0, | |
"cpu_allocation_ratio": 4.0, | |
"resume_guests_state_on_host_boot": false, | |
"use_single_default_gateway": false | |
}, | |
"network": { | |
"public_interface": "eth0", | |
"multi_host": true | |
}, | |
"networks": { | |
"public": { | |
"label": "public", | |
"bridge_dev": "eth3", | |
"dns1": "8.8.8.8", | |
"dns2": "8.8.4.4", | |
"num_networks": "1", | |
"ipv4_cidr": "10.241.0.0/24", | |
"network_size": "255", | |
"bridge": "br0" | |
} | |
} | |
}, | |
"mysql": { | |
"allow_remote_root": true, | |
"tunable": { | |
"log_queries_not_using_index": false | |
} | |
}, | |
"osops_networks": { | |
"nova": "10.240.0.0/24", | |
"public": "10.240.0.0/24", | |
"management": "10.240.0.0/24" | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant.configure("2") do |config| | |
config.vm.box = "dummy" | |
config.vm.synced_folder './vagrant', '/vagrant' | |
config.ssh.private_key_path = File.expand_path("~/.ssh/id_rsa") | |
ENV['VAGRANT_DEFAULT_PROVIDER'] = "rackspace" | |
config.vm.provider :rackspace do |rs, override| | |
override.vm.box = 'dummy' | |
override.vm.box_url = 'https://github.com/mitchellh/vagrant-rackspace/raw/master/dummy.box' | |
rs.rackspace_region = ENV.fetch('OS_REGION_NAME', :ord).downcase.to_sym | |
rs.username = ENV['OS_USERNAME'] | |
rs.api_key = ENV['OS_PASSWORD'] | |
rs.public_key_path = File.expand_path("~/.ssh/id_rsa.pub") | |
rs.image = 'Ubuntu 12.04 LTS (Precise Pangolin)' | |
# Management Network (10.240.0.0/24) | |
rs.network 'c5eeb8bd-1d9d-48fa-aafa-42fca49fa2e7' | |
# Fixed Network (10.241.0.0/24) | |
rs.network '4430ff42-7957-476b-ad30-c09761e4503f' | |
end | |
config.vm.define :compute01 do |compute01| | |
compute01.vm.provision :shell, | |
:inline => <<-BASH | |
ip a a 10.240.0.102/24 dev eth2 | |
cat /vagrant/id_rsa.pub >> /root/.ssh/authorized_keys | |
BASH | |
compute01.vm.provider :rackspace do |rs| | |
rs.flavor = /4GB/ | |
end | |
end | |
config.vm.define :compute02 do |compute02| | |
compute02.vm.provision :shell, | |
:inline => <<-BASH | |
ip a a 10.240.0.103/24 dev eth2 | |
cat /vagrant/id_rsa.pub >> /root/.ssh/authorized_keys | |
BASH | |
compute02.vm.provider :rackspace do |rs| | |
rs.flavor = /4GB/ | |
end | |
end | |
config.vm.define :controller02 do |controller02| | |
controller02.vm.provision :shell, | |
:inline => <<-BASH | |
ip a a 10.240.0.101/24 dev eth2 | |
cat /vagrant/id_rsa.pub >> /root/.ssh/authorized_keys | |
BASH | |
controller02.vm.provider :rackspace do |rs| | |
rs.flavor = /8GB/ | |
end | |
end | |
config.vm.define :controller, primary: true do |controller| | |
controller.vm.provision :shell, | |
:inline => <<-BASH | |
bash <(wget -q -O -https://github.com/rsoprivatecloud/openstack-chef-deploy/raw/master/deploy.sh) | |
ip a a 10.240.0.100/24 dev eth2 | |
cat /vagrant/id_rsa.pub >> /root/.ssh/authorized_keys | |
cp /vagrant/id_rsa /root/.ssh/ | |
iptables -I INPUT -p tcp -m multiport --dports 443,4000 -j ACCEPT | |
# NAT public HTTPS traffic to the Horizon VIP | |
iptables -t nat -A PREROUTING -p tcp --dport 443 -j DNAT --to-destination 10.240.0.254:443 | |
knife environment from file /vagrant/grizzly-ha.json | |
knife bootstrap localhost -E rpcs -r 'role[ha-controller1]' | |
knife bootstrap 10.240.0.101 -E rpcs -r 'role[ha-controller2]' --server-url https://10.240.0.100:4000 | |
knife bootstrap 10.240.0.102 -E rpcs -r 'role[single-compute]' --server-url https://10.240.0.100:4000 | |
knife bootstrap 10.240.0.103 -E rpcs -r 'role[single-compute]' --server-url https://10.240.0.100:4000 | |
ip a s eth0 | |
grep "export OS_PASSWORD" /root/openrc | |
BASH | |
controller.vm.provider :rackspace do |rs| | |
rs.flavor = /8GB/ | |
end | |
end | |
end | |
# vim: set ft=ruby ts=2 sw=2: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment