summaryrefslogtreecommitdiff
path: root/global/overlay/etc/puppet/manifests/catlfish/storage.pp
diff options
context:
space:
mode:
Diffstat (limited to 'global/overlay/etc/puppet/manifests/catlfish/storage.pp')
-rw-r--r--global/overlay/etc/puppet/manifests/catlfish/storage.pp20
1 files changed, 20 insertions, 0 deletions
diff --git a/global/overlay/etc/puppet/manifests/catlfish/storage.pp b/global/overlay/etc/puppet/manifests/catlfish/storage.pp
new file mode 100644
index 0000000..a98e107
--- /dev/null
+++ b/global/overlay/etc/puppet/manifests/catlfish/storage.pp
@@ -0,0 +1,20 @@
+define catlfish::storage(
+ $image = 'docker.sunet.se/ctct/catlfish-dev',
+ $version = 'latest'
+)
+{
+ $base = '/var/local/db/urd.appendto.org'
+ file {$base: ensure => directory } ->
+ file {"${base}/${name}": ensure => directory } ->
+ sunet::docker_run {'${name}_storage':
+ image => $image,
+ imagetag => $version,
+ volumes => ["/data/${name}/catlfish:/usr/local/etc/catlfish:ro","${base}/${name}:/var/local/db/catlfish"],
+ ports => ["8081:8081"],
+ command => ["storage"]
+ }
+ ufw:allow { "${name}-allow-8081-acl0":
+ ip => '130.242.125.0/24',
+ port => 8081
+ }
+}