From 6505a8a61afd968cbe06a80bce7e8ad8d959d5b0 Mon Sep 17 00:00:00 2001 From: Antonio Calanducci Date: Wed, 11 Oct 2023 13:12:14 +0200 Subject: [PATCH] Update variable name flattening lower case values --- .../is_registry_devnext/is_registry_devnext.yml | 3 ++- .../is_registry_devsec/is_registry_devsec.yml | 4 +++- inventory/hosts.devnext | 4 ++-- inventory/hosts.devsec | 4 ++-- is-registry/defaults/main.yml | 7 ++++--- is-registry/tasks/main.yml | 6 +++--- is-registry/templates/docker-compose.yml.j2 | 14 +++++++------- 7 files changed, 23 insertions(+), 19 deletions(-) diff --git a/group_vars/is_registry_devnext/is_registry_devnext.yml b/group_vars/is_registry_devnext/is_registry_devnext.yml index fb2d4f3..1a32a16 100644 --- a/group_vars/is_registry_devnext/is_registry_devnext.yml +++ b/group_vars/is_registry_devnext/is_registry_devnext.yml @@ -1,5 +1,6 @@ start_scopes: 'devNext' complete_start_scope: '/gcube/devNext' gcore_host: 'node14-d-d4s.d4science.org' - +is_registry_docker_stack_name: 'gcore-devnext' +is_registry_docker_service_server_name: 'is-registry' diff --git a/group_vars/is_registry_devsec/is_registry_devsec.yml b/group_vars/is_registry_devsec/is_registry_devsec.yml index a4900a9..d7f5c75 100644 --- a/group_vars/is_registry_devsec/is_registry_devsec.yml +++ b/group_vars/is_registry_devsec/is_registry_devsec.yml @@ -1,3 +1,5 @@ start_scopes: 'devsec' complete_start_scope: '/gcube/devsec' -gcore_host: 'node3.d.d4science.research-infrastructures.eu' \ No newline at end of file +gcore_host: 'node3.d.d4science.research-infrastructures.eu' +is_registry_docker_stack_name: 'gcore-devsec' +is_registry_docker_service_server_name: 'is_registry' diff --git a/inventory/hosts.devnext b/inventory/hosts.devnext index 1f2b973..a0bda51 100644 --- a/inventory/hosts.devnext +++ b/inventory/hosts.devnext @@ -1,6 +1,6 @@ [is_registry_devnext] -10.1.28.135 - +#10.1.28.135 +10.1.29.205 diff --git a/inventory/hosts.devsec b/inventory/hosts.devsec index 5c97574..45d5a73 100644 --- a/inventory/hosts.devsec +++ b/inventory/hosts.devsec @@ -1,6 +1,6 @@ [is_registry_devsec] -10.1.28.135 - +#10.1.28.135 +10.1.29.205 diff --git a/is-registry/defaults/main.yml b/is-registry/defaults/main.yml index 20a3321..febdb86 100644 --- a/is-registry/defaults/main.yml +++ b/is-registry/defaults/main.yml @@ -5,9 +5,10 @@ infrastructure: 'gcube' complete_start_scope: '/gcube/devNext' gcore_host: 'node14-d-d4s.d4science.org' config_dir: 'etc/is-registry-service' -is_registry_compose_dir: '/srv/is-registry-stack-{{ start_scopes }}' -is_registry_docker_stack_name: 'is-registry-stack-{{ start_scopes }}' -is_registry_docker_service_server_name: 'is-registry-{{ start_scopes }}' +scope_name: '{{ start_scopes | lower }}' +is_registry_compose_dir: '/srv/is-registry-stack-{{ scope_name }}' +is_registry_docker_stack_name: 'is-registry-stack-{{ scope_name }}' +is_registry_docker_service_server_name: 'is-registry-{{ scope_name }}' is_registry_docker_server_image: 'd4science/gcore-is-registry:latest' is_registry_docker_network: 'is-registry-network' #is_registry_service_port: 8080 diff --git a/is-registry/tasks/main.yml b/is-registry/tasks/main.yml index 1306287..b109e2d 100644 --- a/is-registry/tasks/main.yml +++ b/is-registry/tasks/main.yml @@ -43,19 +43,19 @@ - name: Create the secret for GHNConfig.xml community.docker.docker_secret: - name: ghn-config-{{ start_scopes }} + name: ghn-config-{{ scope_name }} data_src: '{{ is_registry_compose_dir }}/GHNConfig.xml' state: present - name: Create the secret for jndi-config.xml community.docker.docker_secret: - name: jndi-config-{{ start_scopes }} + name: jndi-config-{{ scope_name }} data_src: '{{ is_registry_compose_dir }}/jndi-config.xml' state: present - name: Create the secret for server-config.wsdd community.docker.docker_secret: - name: server-config-{{ start_scopes }} + name: server-config-{{ scope_name }} data_src: '{{ is_registry_compose_dir }}/server-config.wsdd' state: present diff --git a/is-registry/templates/docker-compose.yml.j2 b/is-registry/templates/docker-compose.yml.j2 index 1048684..93c8249 100644 --- a/is-registry/templates/docker-compose.yml.j2 +++ b/is-registry/templates/docker-compose.yml.j2 @@ -3,14 +3,14 @@ version: '3.6' networks: {{ is_registry_docker_network }}: {{ is_registry_haproxy_public_net }}: - # external: true + external: true secrets: - ghn-config-{{ start_scopes }}: + ghn-config-{{ scope_name }}: external: true - jndi-config-{{ start_scopes }}: + jndi-config-{{ scope_name }}: external: true - server-config-{{ start_scopes }}: + server-config-{{ scope_name }}: external: true services: @@ -20,13 +20,13 @@ services: - {{ is_registry_docker_network }} - {{ is_registry_haproxy_public_net }} secrets: - - source: ghn-config-{{ start_scopes }} + - source: ghn-config-{{ scope_name }} target: /home/gcube/gCore/config/GHNConfig.xml mode: 0444 - - source: jndi-config-{{ start_scopes }} + - source: jndi-config-{{ scope_name }} target: /home/gcube/gCore/etc/is-registry-service/jndi-config.xml mode: 0444 - - source: server-config-{{ start_scopes }} + - source: server-config-{{ scope_name }} target: /home/gcube/gCore/etc/globus_wsrf_core/server-config.wsdd mode: 0444 deploy: