add condition for different profiles for test my eid service
This commit is contained in:
parent
1a3a7ebb76
commit
9d78d78544
1 changed files with 39 additions and 16 deletions
|
@ -436,22 +436,45 @@ class test_my_eid($version="1.0.1",$hostname='localhost',$environment='qa') {
|
|||
$_version = safe_hiera('test_my_eid_version',$version)
|
||||
$_hostname = safe_hiera('test_my_eid_hostname',$hostname)
|
||||
file {['/etc/test-my-eid','/var/log/test-my-eid','/etc/ssl']: ensure => directory } ->
|
||||
sunet::docker_run {'test-my-eid':
|
||||
image => 'docker.sunet.se/test-my-eid',
|
||||
imagetag => $_version,
|
||||
hostname => "${::fqdn}",
|
||||
ports => ['443:8443','127.0.0.01:444:8444'],
|
||||
volumes => ['/var/log/test-my-eid:/var/log/test-my-eid',
|
||||
'/etc/test-my-eid:/etc/test-my-eid',
|
||||
'/dev/log:/dev/log',
|
||||
'/etc/ssl:/etc/ssl'],
|
||||
env => ["SERVER_SERVLET_CONTEXT_PATH=/",
|
||||
"SP_ENTITY_ID=https://$_hostname/sp",
|
||||
"SIGN_SP_ENTITY_ID=https://$_hostname/sp-sign",
|
||||
"SPRING_PROFILES_ACTIVE=$environment",
|
||||
"SP_BASE_URI=https://$_hostname",
|
||||
"SP_DISCOVERY_STATIC_IDP_CONFIGURATION=file:/etc/test-my-eid/idp-disco-$environment.properties"],
|
||||
extra_parameters => ["--log-driver=syslog"]
|
||||
if ($environment== 'default') {
|
||||
sunet::docker_run {'test-my-eid':
|
||||
image => 'docker.sunet.se/test-my-eid',
|
||||
imagetag => $_version,
|
||||
hostname => "${::fqdn}",
|
||||
ports => ['443:8443','127.0.0.01:444:8444'],
|
||||
volumes => ['/var/log/test-my-eid:/var/log/test-my-eid',
|
||||
'/etc/test-my-eid:/etc/test-my-eid',
|
||||
'/dev/log:/dev/log',
|
||||
'/etc/ssl:/etc/ssl'],
|
||||
env => ["SERVER_SERVLET_CONTEXT_PATH=/",
|
||||
"SP_ENTITY_ID=https://$_hostname/sp",
|
||||
"SIGN_SP_ENTITY_ID=https://$_hostname/sp-sign",
|
||||
"SPRING_PROFILES_ACTIVE=$environment",
|
||||
"SP_BASE_URI=https://$_hostname",
|
||||
"SP_DISCOVERY_STATIC_IDP_CONFIGURATION=file:/etc/test-my-eid/idp-disco-test.properties",
|
||||
"SP_FEDERATION_METADATA_URL=https://test.md.swedenconnect.se/role/idp.xml",
|
||||
"SP_FEDERATION_METADATA_VALIDATION_CERTIFICATE=file:/etc/test-my-eid/test-metadata-signer.crt",
|
||||
"SP_EIDAS_CONNECTOR_ENTITY_ID=https://test.connector.eidas.swedenconnect.se/eidas"],
|
||||
extra_parameters => ["--log-driver=syslog"]
|
||||
}
|
||||
} else {
|
||||
sunet::docker_run {'test-my-eid':
|
||||
image => 'docker.sunet.se/test-my-eid',
|
||||
imagetag => $_version,
|
||||
hostname => "${::fqdn}",
|
||||
ports => ['443:8443','127.0.0.01:444:8444'],
|
||||
volumes => ['/var/log/test-my-eid:/var/log/test-my-eid',
|
||||
'/etc/test-my-eid:/etc/test-my-eid',
|
||||
'/dev/log:/dev/log',
|
||||
'/etc/ssl:/etc/ssl'],
|
||||
env => ["SERVER_SERVLET_CONTEXT_PATH=/",
|
||||
"SP_ENTITY_ID=https://$_hostname/sp",
|
||||
"SIGN_SP_ENTITY_ID=https://$_hostname/sp-sign",
|
||||
"SPRING_PROFILES_ACTIVE=$environment",
|
||||
"SP_BASE_URI=https://$_hostname",
|
||||
"SP_DISCOVERY_STATIC_IDP_CONFIGURATION=file:/etc/test-my-eid/idp-disco-$environment.properties"],
|
||||
extra_parameters => ["--log-driver=syslog"]
|
||||
}
|
||||
}
|
||||
ensure_resource('class','webserver',{})
|
||||
ensure_resource('class','https_server',{})
|
||||
|
|
Loading…
Add table
Reference in a new issue