summaryrefslogtreecommitdiff
path: root/global/overlay/etc/puppet/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'global/overlay/etc/puppet/manifests')
-rw-r--r--global/overlay/etc/puppet/manifests/catlfish/frontend.pp17
-rw-r--r--global/overlay/etc/puppet/manifests/catlfish/merge.pp7
-rw-r--r--global/overlay/etc/puppet/manifests/catlfish/signing.pp2
-rw-r--r--global/overlay/etc/puppet/manifests/catlfish/storage.pp7
4 files changed, 18 insertions, 15 deletions
diff --git a/global/overlay/etc/puppet/manifests/catlfish/frontend.pp b/global/overlay/etc/puppet/manifests/catlfish/frontend.pp
index 37d455f..df1b932 100644
--- a/global/overlay/etc/puppet/manifests/catlfish/frontend.pp
+++ b/global/overlay/etc/puppet/manifests/catlfish/frontend.pp
@@ -3,37 +3,38 @@ define catlfish::frontend(
$version = 'latest'
)
{
- $base = '/var/local/db/urd.appendto.org'
+ $base = '/var/local/db'
+ $db = ""${base}/${name}"
file {$base: ensure => directory } ->
- file {"${base}/${name}": ensure => directory } ->
+ file {$db: ensure => directory } ->
sunet::docker_run{"${name}_varnish":
image => "docker.sunet.se/varnish",
imagetag => "latest",
env => ["BACKEND_PORT=tcp://${name}_frontend.docker:8080"]
ports => ["80:80"],
- }
+ } ->
sunet::docker_run{"${name}_stud":
image => "docker.sunet.se/stud",
imagetag => "latest",
volumes => ["/etc/ssl:/etc/ssl"],
env => ["BACKEND_PORT=tcp://${name}_varnish.docker:80"],
ports => ["443:443"]
- }
+ } ->
sunet::docker_run {'${name}_frontend':
image => $image,
imagetag => $version,
ports => ["8080:8080","8082:8082"],
- volumes => ["/data/${name}/catlfish:/usr/local/etc/catlfish:ro","${base}/${name}:/var/local/db/catlfish"],
+ volumes => ["/usr/local/etc/catlfish:/usr/local/etc/catlfish:ro","${db}:/var/local/db/catlfish"],
command => ["frontend"]
- }
+ } ->
ufw::allow { "${name}-allow-http":
ip => 'any',
port => 80
- }
+ } ->
ufw::allow { "${name}-allow-https":
ip => 'any',
port => 443
- }
+ } ->
ufw:allow { "${name}-allow-8082-acl0":
ip => '130.242.125.0/24',
port => 8082
diff --git a/global/overlay/etc/puppet/manifests/catlfish/merge.pp b/global/overlay/etc/puppet/manifests/catlfish/merge.pp
index 5be25a3..df69e91 100644
--- a/global/overlay/etc/puppet/manifests/catlfish/merge.pp
+++ b/global/overlay/etc/puppet/manifests/catlfish/merge.pp
@@ -3,14 +3,15 @@ define catlfish::merge(
$version = 'latest'
)
{
- $base = '/var/local/db/urd.appendto.org'
+ $base = '/var/local/db'
+ $db = ""${base}/${name}"
file {$base: ensure => directory } ->
- file {"${base}/${name}": ensure => directory } ->
+ file {$db: ensure => directory } ->
sunet::docker_run {'${name}_merge':
image => $image,
env => ["MERGE_EXTRA_ARGS=--timing"],
imagetag => $version,
- volumes => ["/data/${name}/catlfish:/usr/local/etc/catlfish:ro","${base}/${name}:/var/local/db/catlfish"],
+ volumes => ["/usr/local/etc/catlfish:/usr/local/etc/catlfish:ro","${db}:/var/local/db/catlfish"],
command => ["merge /var/local/db/catlfish"]
}
}
diff --git a/global/overlay/etc/puppet/manifests/catlfish/signing.pp b/global/overlay/etc/puppet/manifests/catlfish/signing.pp
index 2c255df..40b3f9c 100644
--- a/global/overlay/etc/puppet/manifests/catlfish/signing.pp
+++ b/global/overlay/etc/puppet/manifests/catlfish/signing.pp
@@ -6,7 +6,7 @@ define catlfish::signing(
sunet::docker_run {'${name}_signing':
image => $image,
imagetag => $version,
- volumes => ["/data/${name}/catlfish:/usr/local/etc/catlfish:ro"],
+ volumes => ["/usr/local/etc/catlfish:/usr/local/etc/catlfish:ro"],
ports => ["8188:8188"],
command => ["signing"]
}
diff --git a/global/overlay/etc/puppet/manifests/catlfish/storage.pp b/global/overlay/etc/puppet/manifests/catlfish/storage.pp
index a98e107..a325f3e 100644
--- a/global/overlay/etc/puppet/manifests/catlfish/storage.pp
+++ b/global/overlay/etc/puppet/manifests/catlfish/storage.pp
@@ -3,13 +3,14 @@ define catlfish::storage(
$version = 'latest'
)
{
- $base = '/var/local/db/urd.appendto.org'
+ $base = '/var/local/db'
+ $db = "${base}/${name}"
file {$base: ensure => directory } ->
- file {"${base}/${name}": ensure => directory } ->
+ file {$db: 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"],
+ volumes => ["/usr/local/etc/catlfish:/usr/local/etc/catlfish:ro","${db}:/var/local/db/catlfish"],
ports => ["8081:8081"],
command => ["storage"]
}