deploy eidastest - take 2

This commit is contained in:
Leif Johansson 2019-04-25 19:52:25 +02:00
parent 185f0bb25d
commit 3c15e80c08
3 changed files with 55 additions and 14 deletions

View file

@ -0,0 +1,37 @@
---
eidastest_compose:
version: "3"
services:
selenium-hub:
image: selenium/hub
container_name: selenium-hub
ports:
- "4444:4444"
firefox:
image: selenium/node-firefox
depends_on:
- selenium-hub
environment:
- HUB_PORT_4444_TCP_ADDR=selenium-hub
- HUB_PORT_4444_TCP_PORT=4444
chrome:
image: selenium/node-chrome
depends_on:
- selenium-hub
environment:
- HUB_PORT_4444_TCP_ADDR=selenium-hub
- HUB_PORT_4444_TCP_PORT=4444
eidastest-testid:
image: eidastest-testid:1.0.6
container_name: eidastest-testid
ports:
- "8099:8099"
environment:
- CERTNAME=eidastest-1.qa.sveidas.se
volumes:
- "/etc/ssl:/etc/ssl"
depends_on:
- firefox
- chrome

View file

@ -799,6 +799,4 @@ eidastest-1.qa.sveidas.se:
openstack_dockerhost:
sunet_iaas_cloud:
autoupdate:
eidastest_controller:
version: 1.0.2
hostname: eidastest-1.qa.sveidas.se
eidastest:

View file

@ -381,17 +381,23 @@ class test_my_eid($version="1.0.1",$hostname='localhost',$environment='qa') {
ensure_resource('class','https_server',{})
}
class eidastest_controller($version="1.0.0", $hostname="locahost") {
$_version = safe_hiera('eidastest_controller_version',$version)
$_hostname = safe_hiera('eidastest_controller_hostname',$hostname)
sunet::docker_run {'eidastest':
image => 'docker.sunet.se/eidastest-controller',
imagetag => $_version,
hostname => "${::fqdn}",
ports => ['443:8443'],
volumes => ['/dev/log:/dev/log',
'/etc/ssl:/etc/ssl'],
extra_parameters => ["--log-driver=syslog"]
class eidastest($version="1.0.0", $hostname="locahost") {
$_version = safe_hiera('eidastest_version',$version)
$_hostname = safe_hiera('eidastest_hostname',$hostname)
$home = '/etc/eidastest'
file { "${home}":
ensure => directory,
owner => 'root',
group => 'root',
path => "${home}",
mode => '0755',
}
$compose = hiera("eidastest_compose")
sunet::docker_compose {'eidastest_docker_compose':
service_name => 'eidastest',
description => 'eidastest service',
compose_dir => "${home}",
content => inline_template("<%= @compose.to_yaml %>\n")
}
ensure_resource('class','webserver',{})
ensure_resource('class','https_server',{})