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/cosmos-site.pp49
1 files changed, 17 insertions, 32 deletions
diff --git a/global/overlay/etc/puppet/manifests/cosmos-site.pp b/global/overlay/etc/puppet/manifests/cosmos-site.pp
index f04fd87..d9ac384 100644
--- a/global/overlay/etc/puppet/manifests/cosmos-site.pp
+++ b/global/overlay/etc/puppet/manifests/cosmos-site.pp
@@ -165,45 +165,25 @@ node 'docker.sunet.se' {
}
}
-class docker_signer {
- docker::image {'docker.samlbits.net/varnish': }
- docker::image {'docker.samlbits.net/pyff': }
- docker::run {'pyff':
+define pyff($dir) {
+ sunet::docker_run {'pyff_${name}':
image => 'docker.samlbits.net/pyff',
- volumes => ['/opt/swamid-metadata:/opt/swamid-metadata'],
- env => ['DATADIR=/opt/swamid-metadata','LOGLEVEL=INFO']
+ volumes => ["${dir}:${dir}"],
+ env => ['DATADIR=${dir}','LOGLEVEL=INFO']
}
- docker::run {'varnish':
+ docker::run {'varnish_${name}':
image => 'docker.samlbits.net/varnish',
- links => ['pyff:backend'],
+ env => ['BACKEND_PORT=tcp://pyff.varnish:80'],
ports => ['80:80']
}
- cron {'update-swamid-metadata':
- command => "cd /opt/swamid-metadata && git pull -q",
- user => root,
- minute => '*/5'
- }
}
-class signer {
- include cosmos::httpsproxy
- class {'varnish':
- domain => 'swamid.se',
- backends => {
- mdx => 'http://localhost:8000/'
- },
- vhosts => {
- mdx => 'mdx.swamid.se'
- }
- }
- class {'pyff':
- load => ["/opt/metadata"],
- port => 8000,
- address => '0.0.0.0',
- validUntil => 'P10D',
- cacheDuration => 'PT5H',
- replace => false
- }
+class swamid_metadata {
+ vcsrepo { '/opt/swamid-metadata':
+ ensure => present
+ provider => git,
+ source => 'git://md-master.swamid.se/swamid-metadata.git'
+ } ->
cron {'update-swamid-metadata':
command => "cd /opt/swamid-metadata && git pull -q",
user => root,
@@ -211,6 +191,11 @@ class signer {
}
}
+class swamid_pyff_signer {
+ class { 'swamid_metadata': }
+ pyff {'swamid': dir => '/opt/swamid-metadata' }
+}
+
node 'md-master.reep.refeds.org' {
#include cosmos::httpsproxy
class {'pyff':