Skip to content
Permalink
Browse files

Make docker HA data available on all nodes

  • Loading branch information...
FlorianSW committed Aug 26, 2019
1 parent 41bd780 commit bd23c77ac475a7392ec72717e134601f02f23af5
Showing with 39 additions and 0 deletions.
  1. +3 −0 .gitmodules
  2. +2 −0 hieradata/common.yaml
  3. +1 −0 modules/gluster
  4. +33 −0 modules/role/manifests/docker.pp
@@ -98,3 +98,6 @@
[submodule "modules/varnish"]
path = modules/varnish
url = https://github.com/claranet/puppet-varnish.git
[submodule "modules/gluster"]
path = modules/gluster
url = https://github.com/voxpupuli/puppet-gluster.git
@@ -96,3 +96,5 @@ cloudflare::api_key: >
Aa0B9DBcBgkqhkiG9w0BBwEwHQYJYIZIAWUDBAEqBBAX1cgfzVB7ils8jD6n
gAgQgDDRtAM/sZFYUdZ/JKFnBpelnvBLEgvrshkj5OiF0tuFbgejaOHDtvzK
p8A3P9xmXiI=]

gluster::service::service_name: glusterfs-server
Submodule gluster added at d4b3b8
@@ -14,6 +14,39 @@
extra_parameters => ['-g /data/docker']
}

file { [ '/data/ha_volume', '/data/bricks', '/data/bricks/brick1', '/data/bricks/brick2' ]:
ensure => 'directory',
}

class { ::gluster:
repo => false,
client => false,
pool => 'production',
volumes => {
'ha_volume' => {
replica => 2,
bricks => [
'eclair.dwnet:/data/bricks/brick1/brick',
'donut.dwnet:/data/bricks/brick1/brick',
'eclair.dwnet:/data/bricks/brick2/brick',
'donut.dwnet:/data/bricks/brick2/brick',
],
options => [
'server.allow-insecure: on',
'nfs.disable: true',
],
}
}
}

gluster::mount { '/data/ha_volume':
volume => 'localhost:/ha_volume',
transport => 'tcp',
atboot => true,
dump => 0,
pass => 0,
}

firewall { '900 accept outgoing requests to DOCKER':
chain => 'OUTPUT',
proto => 'all',

0 comments on commit bd23c77

Please sign in to comment.
You can’t perform that action at this time.