Added mysql running percona xtradb galera cluster

This commit is contained in:
Tim Kuhlman
2014-02-25 11:22:01 -07:00
parent 7bc2132cbb
commit 3d4822f031
5 changed files with 50 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
metadata
cookbook 'hostsfile', '= 1.0.1'
cookbook 'kafka', git: 'https://git.hpcloud.net/mon/cookbooks-kafka'
cookbook 'vertica', git: 'https://git.hpcloud.net/mon/cookbooks-vertica'
cookbook 'zookeeper', git: 'https://git.hpcloud.net/mon/cookbooks-zookeeper'
cookbook 'kafka', git: 'git@git.hpcloud.net:mon/cookbooks-kafka'
cookbook 'percona', git: 'https://github.com/tkuhlman/chef-percona'
cookbook 'vertica', git: 'git@git.hpcloud.net:mon/cookbooks-vertica'
cookbook 'zookeeper', git: 'git@git.hpcloud.net:mon/cookbooks-zookeeper'

View File

@@ -39,5 +39,6 @@ vagrant up
- Your home dir is synced to the vm in /vagrant_home on each vm
- Vms created
- `kafka` at `192.168.10.10`
- `mysql` at `192.168.10.6`
- `vertica` at `192.168.10.8`
- Run `vagrant help` for more info

10
Vagrantfile vendored
View File

@@ -33,6 +33,16 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
end
end
config.vm.define "mysql" do |mysql|
mysql.vm.hostname = 'mysql'
mysql.vm.network :private_network, ip: "192.168.10.6"
mysql.vm.provision :chef_solo do |chef|
chef.roles_path = "roles"
chef.data_bags_path = "data_bags"
chef.add_role "MySQL"
end
end
config.vm.define "vertica" do |vertica|
vertica.vm.hostname = 'vertica'
vertica.vm.network :private_network, ip: "192.168.10.8"

View File

@@ -1,5 +1,8 @@
# Common setup for all vagrant boxes
## Todo - This apt setup is specific to HP Cloud and should be moved to an optional recipe.
# This move the default apt sources which are the standard ubuntu apt ones aside, so we are forced to deal with what hpcloud has mirrored
bash 'move dist sources.list' do
action :run

32
roles/MySQL.json Normal file
View File

@@ -0,0 +1,32 @@
{
"name": "MySQL",
"description": "Sets up MySQL",
"json_class": "Chef::Role",
"default_attributes": {
"percona": {
"backup": {
"password": "password"
},
"cluster": {
"package": "percona-xtradb-cluster-56"
},
"server": {
"debain_password": "password",
"replication": {
"password": "password"
},
"root_password": "password"
},
"use_percona_apt": false
}
},
"override_attributes": {
},
"chef_type": "role",
"run_list": [
"role[Basenode]",
"recipe[percona::cluster]"
],
"env_run_lists": {
}
}