From 8c3b7cbd09142ba653e890ec2bb92f5d885f6bbd Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Thu, 24 Sep 2015 08:15:40 +0200 Subject: new swamid signers --- global/overlay/etc/puppet/cosmos-rules.yaml | 4 ++++ global/overlay/etc/puppet/manifests/cosmos-site.pp | 25 ++++++++++++++++++---- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/global/overlay/etc/puppet/cosmos-rules.yaml b/global/overlay/etc/puppet/cosmos-rules.yaml index 3fda18d..bf75b07 100644 --- a/global/overlay/etc/puppet/cosmos-rules.yaml +++ b/global/overlay/etc/puppet/cosmos-rules.yaml @@ -24,6 +24,10 @@ mdx1.swamid.se: swamid_pyff_signer: mdx2.swamid.se: swamid_pyff_signer: +mds1.swamid.se: + swamid_static_signer: +mds2.swamid.se: + swamid_static_signer: sto-tug-kvm2.swamid.se: webserver: sunet::dockerhost: diff --git a/global/overlay/etc/puppet/manifests/cosmos-site.pp b/global/overlay/etc/puppet/manifests/cosmos-site.pp index 9f152a7..18b0803 100644 --- a/global/overlay/etc/puppet/manifests/cosmos-site.pp +++ b/global/overlay/etc/puppet/manifests/cosmos-site.pp @@ -226,16 +226,33 @@ class 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", + } +} + +class swamid_static_signer { + class { 'swamid_metadata': } -> + file { '/opt/published-metadata': ensure => directory } -> + cron { 'publish-swamid-metadata': + command => "/opt/swamid-metadata/scripts/update.sh", user => root, minute => '*/5' } + ensure_resource('class', 'sunet::dockerhost', {}) + sunet::docker_run {'swamid_mds': + image => 'docker.sunet.se/swamid-mds', + imagetag => 'latest', + volumes => ['/etc/ssl:/etc/ssl','/opt/published-metadata:/opt/published-metadata','/opt/swamid-metadata/xslt:/opt/swamid-metadata/xslt'], + ports => ['80:80','443:443'] + } } class swamid_pyff_signer { - class { 'swamid_metadata': } + class { 'swamid_metadata': } -> + cron {'update-swamid-metadata': + command => "cd /opt/swamid-metadata && git pull -q", + user => root, + minute => '*/5' + } -> pyff {'swamid': dir => '/opt/swamid-metadata' } } -- cgit v1.1