Skip to content
This repository has been archived by the owner on Aug 4, 2018. It is now read-only.

Commit

Permalink
create individual virtual machines for pgpool cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
ewdurbin committed Nov 23, 2013
1 parent a06e9c0 commit b4ad4e4
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 10 deletions.
22 changes: 22 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,28 @@ Vagrant.configure("2") do |config|
end
end

config.vm.define "pgpool0" do |pgpool0|
pgpool0.vm.network "private_network", ip: "192.168.57.7"
pgpool0.vm.network "private_network", ip: "172.16.57.7"

pgpool0.vm.provision :salt do |s|
s.verbose = true
s.minion_config = "provisioning/salt/minion/pg_cluster-pgpool"
s.run_highstate = true
end
end

config.vm.define "pgpool1" do |pgpool1|
pgpool1.vm.network "private_network", ip: "192.168.57.8"
pgpool1.vm.network "private_network", ip: "172.16.57.8"

pgpool1.vm.provision :salt do |s|
s.verbose = true
s.minion_config = "provisioning/salt/minion/pg_cluster-pgpool"
s.run_highstate = true
end
end

end

end
8 changes: 8 additions & 0 deletions provisioning/salt/minion/pg_cluster-pgpool
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
file_client: local
file_roots:
base:
- /srv/salt
grains:
roles:
- develop
- postgresql_pgpool
8 changes: 0 additions & 8 deletions provisioning/salt/roots/pillar/postgresql/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,9 @@
firewall:
ports:
- 5432
- 9000
- 9694
- 9898
- 9999

postgresql_cluster:
primary_server: 172.16.57.5
standby_servers:
- 172.16.57.6

pgpool_cluster:
nodes:
- 172.16.57.5
- 172.16.57.6
11 changes: 9 additions & 2 deletions provisioning/salt/roots/pillar/postgresql/pgpool.sls
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@

firewall:
- 9999
- 9000
- 9694
- 9898
- 5433
- 9999
- 5432

pgpool_cluster:
nodes:
- 172.16.57.7
- 172.16.57.8
5 changes: 5 additions & 0 deletions provisioning/salt/roots/pillar/top.sls
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ base:
'roles:postgresql_cluster':
- match: grain
- postgresql
- postgresql.pgpool
'roles:postgresql_pgpool':
- match: grain
- postgresql
- postgresql.pgpool
3 changes: 3 additions & 0 deletions provisioning/salt/roots/salt/top.sls
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ base:
- match: grain
- firewall
- postgresql.cluster
'roles:postgresql_pgpool':
- match: grain
- firewall
- postgresql.cluster.pgpool

0 comments on commit b4ad4e4

Please sign in to comment.