diff options
author | Leif Johansson <leifj@sunet.se> | 2015-05-26 15:02:56 +0200 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2015-05-26 15:02:56 +0200 |
commit | 0ce7d129528e0f2de9f32eb41404670a14db591a (patch) | |
tree | 088bed520344c3573a6fafc77a919a45b7f7352d /global/overlay/etc/puppet/modules/catlfish/manifests/storage.pp | |
parent | 5557530affa1eab735298d6f27e5cc2684dacf95 (diff) |
re-organizedct-ops-2015-05-26-v04
Diffstat (limited to 'global/overlay/etc/puppet/modules/catlfish/manifests/storage.pp')
-rw-r--r-- | global/overlay/etc/puppet/modules/catlfish/manifests/storage.pp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/global/overlay/etc/puppet/modules/catlfish/manifests/storage.pp b/global/overlay/etc/puppet/modules/catlfish/manifests/storage.pp new file mode 100644 index 0000000..f7b7de5 --- /dev/null +++ b/global/overlay/etc/puppet/modules/catlfish/manifests/storage.pp @@ -0,0 +1,22 @@ +define catlfish::storage( + $logname = undef, + $image = 'docker.sunet.se/ctct/catlfish-dev', + $version = 'latest' +) +{ + $base = '/var/local/db' + $db = "${base}/${logname}" + file {$base: ensure => directory } -> + file {$db: ensure => directory } -> + sunet::docker_run {"${name}_catlfish": + image => $image, + imagetag => $version, + volumes => ["/usr/local/etc/catlfish:/usr/local/etc/catlfish:ro","${db}:/var/local/db/catlfish"], + ports => ["8081:8081"], + command => ["storage ${name} ${logname}"] + } + ufw:allow { "${name}-allow-8081-acl0": + ip => '130.242.125.0/24', + port => 8081 + } +} |