From d01e9383a3fd9ec546c6317accdf1a34d161c2d6 Mon Sep 17 00:00:00 2001 From: Johan Wassberg Date: Mon, 25 Nov 2024 12:11:10 +0100 Subject: [PATCH] Encourage to use dockerhost2 --- manifests/metadata/mdq_publisher.pp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/manifests/metadata/mdq_publisher.pp b/manifests/metadata/mdq_publisher.pp index 9a4563892..8ce2da0c8 100644 --- a/manifests/metadata/mdq_publisher.pp +++ b/manifests/metadata/mdq_publisher.pp @@ -78,7 +78,6 @@ "PUBLISHER_KEY=${publisher_key}", ] - if $docker_compose { service { 'docker-swamid-mdq-publisher': ensure => 'stopped', @@ -93,6 +92,16 @@ } } else { + $docker_class = $::facts['dockerhost2'] ? { + yes => 'sunet::dockerhost2', + default => 'sunet::dockerhost', + } + + if ($docker_class == 'sunet::dockerhost2') { + notice('Please consider changing to a native docker compose without the shim (created by docker_run) by setting "docker_compose: true"') + } else { + notice('Please consider changing to docker compose for this service by setting "docker_compose: true"') + } sunet::docker_run { 'swamid-mdq-publisher': image => 'docker.sunet.se/swamid/mdq-publisher', imagetag => $imagetag,