DEV-282: feat: added configuration of parameters through web portal

master
Ketelsen, Sven 4 years ago
parent 34a88236f3
commit d9d980b009

@ -108,6 +108,3 @@ AWX
tar -xzf k9s_*.tar.gz -C .
ln -s /etc/kubernetes/k9s/k9s /usr/bin/k9s
kubectl taint nodes --all node-role.kubernetes.io/master-
Wordpress Database Dump
ansible-playbook upload-database-dumb.yml -e "cluster_services_str='connect,connect_wordpress' stage='dev' upload_file="smardigo/wordpress_portal.sql.gz""

@ -10,9 +10,10 @@
# stage := the type of the stage (e.g. dev, int, qa, prod)
# tenant_id := (unique key for the tenant, e.g. customer)
# cluster_name := (business name for the cluster, e.g. product, department )
# cluster_size := (WIP node count for the cluster) (Currently max is 2 master/slave)
# cluster_services_str := (services to setup, e.g. 'connect,wordpress')
# custom_backup_name := defines a substring for backup file => {{ stage }}_{{ tenant_id }}_{{ cluster_name }}_{{ cluster_services_str }}__gehtdichnixan.sql
# cluster_size := (WIP node count for the cluster)
# cluster_service := (service to setup, e.g. 'connect', ...)
# cluster_features := (optional features to use, e.g. ['wordpress', 'resubmission', ...])
# custom_backup_name := defines a substring for backup file => {{ stage }}_{{ tenant_id }}_{{ cluster_name }}_{{ cluster_service }}__gehtdichnixan.sql
# smardigo message callback
# scope_id := (scope id of the management process)
# process_instance_id := (process instance id of the management process)
@ -34,11 +35,12 @@
- ansible_version.minor >= 10
msg: "The ansible version has to be at least ({{ ansible_version.full }})"
- name: "Parsing cluster_services_str into cluster_services"
set_fact:
cluster_services: "{{ cluster_services_str | split(',') }}"
tags:
- always
- name: "Add <{{ stage }}-smardigo-management-message> to hosts"
add_host:
name: "{{ stage }}-smardigo-management-message"
groups:
- "stage_{{ stage }}"
changed_when: False
tasks:
- name: "Add postgres servers to hosts if necessary"
@ -48,19 +50,19 @@
- "stage_{{ stage }}"
- "{{ item }}"
changed_when: False
with_items: "{{ cluster_services }}"
when: item in ['connect', 'management_connect', 'keycloak', 'webdav', 'gitea', 'workflow_index', 'workflow_proxy']
with_items: "{{ cluster_features }}"
when: item in ['connect', 'management_connect', 'keycloak', 'webdav', 'gitea', 'workflow_index', 'workflow_proxy', 'pdns']
#############################################################
# create database backup
# Creating database backups for created inventory
#############################################################
- hosts: "stage_{{ stage }}"
- hosts: "stage_{{ stage }}:!{{ stage }}-smardigo-management-message"
serial: "{{ serial_number | default(1) }}"
remote_user: root
vars:
ansible_ssh_host: "{{ stage_server_domain }}"
postgres_backup_state: dump
ansible_ssh_host: "{{ stage_server_domain }}"
roles:
- role: connect-postgres
@ -82,10 +84,10 @@
when: "'workflow_proxy' in group_names"
#############################################################
# Sending smardigo management message to process
# Sending smardigo management message to process
#############################################################
- hosts: "stage_{{ stage }}"
- hosts: "{{ stage }}-smardigo-management-message"
serial: "{{ serial_number | default(1) }}"
gather_facts: false
connection: local

@ -17,8 +17,9 @@
# stage := the type of the stage (e.g. dev, int, qa, prod)
# tenant_id := (unique key for the tenant, e.g. customer)
# cluster_name := (business name for the cluster, e.g. product, department )
# cluster_size := (WIP node count for the cluster) (Currently max is 2 master/slave)
# cluster_services_str := (services to setup, e.g. 'connect,wordpress')
# cluster_size := (WIP node count for the cluster)
# cluster_service := (service to setup, e.g. 'connect', ...)
# cluster_features := (optional features to use, e.g. ['wordpress', 'resubmission', ...])
# smardigo message callback
# scope_id := (scope id of the management process)
# process_instance_id := (process instance id of the management process)
@ -40,35 +41,39 @@
- ansible_version.minor >= 10
msg: "The ansible version has to be at least ({{ ansible_version.full }})"
- set_fact:
cluster_services: "{{ cluster_services_str | split(',') }}"
- name: "Add <{{ stage }}-smardigo-management-message> to hosts"
add_host:
name: "{{ stage }}-smardigo-management-message"
groups:
- "stage_{{ stage }}"
changed_when: False
tasks:
- name: Add postgres servers to hosts if necessary
- name: "Add postgres servers to hosts if necessary"
add_host:
name: "{{ stage }}-postgres-01"
groups:
- "stage_{{ stage }}"
- "{{ item }}"
changed_when: False
with_items: "{{ cluster_services }}"
with_items: "{{ cluster_features }}"
when: item in ['connect', 'management_connect', 'keycloak', 'webdav', 'gitea', 'workflow_index', 'workflow_proxy', 'pdns']
- name: Add maria servers to hosts if necessary
- name: "Add maria servers to hosts if necessary"
add_host:
name: "{{ stage }}-maria-01"
groups:
- "stage_{{ stage }}"
- "{{ item }}"
changed_when: False
with_items: "{{ cluster_services }}"
with_items: "{{ cluster_features }}"
when: item in ['connect_wordpress']
#############################################################
# Setup databases for created inventory
# Creating databases for created inventory
#############################################################
- hosts: "stage_{{ stage }}"
- hosts: "stage_{{ stage }}:!{{ stage }}-smardigo-management-message"
serial: "{{ serial_number | default(1) }}"
remote_user: root
vars:
@ -78,14 +83,10 @@
- name: "Import autodiscover pre-tasks"
include_tasks: tasks/autodiscover_pre_tasks.yml
- name: "Parsing cluster_services_str into cluster_services"
set_fact:
cluster_services: "{{ cluster_services_str | split(',') }}"
roles:
- role: connect-postgres
when: "'connect' in group_names"
- role: pdns-postgres
vars:
initialize: True
@ -93,7 +94,7 @@
- role: pdns-admin-postgres
vars:
initialize: True
initialize: True
when: "'pdns' in group_names"
- role: gitea-postgres
@ -115,10 +116,10 @@
when: "'connect_wordpress' in group_names"
#############################################################
# Sending smardigo management message to process
# Sending smardigo management message to process
#############################################################
- hosts: "stage_{{ stage }}"
- hosts: "{{ stage }}-smardigo-management-message"
serial: "{{ serial_number | default(1) }}"
gather_facts: false
connection: local

@ -10,8 +10,9 @@
# stage := the type of the stage (e.g. dev, int, qa, prod)
# tenant_id := (unique key for the tenant, e.g. customer)
# cluster_name := (business name for the cluster, e.g. product, department )
# cluster_size := (WIP node count for the cluster) (Currently max is 2 master/slave)
# cluster_services_str := (services to setup, e.g. 'connect,wordpress')
# cluster_size := (WIP node count for the cluster)
# cluster_service := (service to setup, e.g. 'connect', ...)
# cluster_features := (optional features to use, e.g. ['wordpress', 'resubmission', ...])
# smardigo message callback
# scope_id := (scope id of the management process)
# process_instance_id := (process instance id of the management process)
@ -33,22 +34,26 @@
- ansible_version.minor >= 10
msg: "The ansible version has to be at least ({{ ansible_version.full }})"
- set_fact:
cluster_services: "{{ cluster_services_str | split(',') }}"
tasks:
- name: Add kibana server(s) to hosts if necessary
- name: "Add <{{ stage }}-smardigo-management-message> to hosts"
add_host:
name: "{{ stage }}-elastic-stack-kibana-01-kibana"
name: "{{ stage }}-smardigo-management-message"
groups:
- "stage_{{ stage }}"
with_items: "{{ cluster_services }}"
when: item in ['connect']
changed_when: False
tasks:
- name: Add hosts
add_host:
name: "{{ stage }}-{{ tenant_id }}-{{ cluster_name }}-{{ '%02d' | format(item|int) }}"
groups: "{{ ['stage_' + stage ] + [cluster_service] + cluster_features }}"
with_sequence: start=1 end={{ cluster_size | default(1) }}
changed_when: False
#############################################################
# configure elastic search objects
# Creating kibana search objects for created inventory
#############################################################
- hosts: "stage_{{ stage }}"
- hosts: "stage_{{ stage }}:!{{ stage }}-smardigo-management-message"
serial: "{{ serial_number | default(1) }}"
gather_facts: no
remote_user: root
@ -121,8 +126,8 @@
- osquery
- savedObjectsTagging
es_indexpattern_name: '{{ stage }}-{{ tenant_id }}-{{ cluster_name }}-*'
es_search_name: '{{ stage }}-{{ tenant_id }}-{{ cluster_name }}-{{ cluster_services_str }}'
es_dashboard_name: '{{ stage }}-{{ tenant_id }}-{{ cluster_name }}-{{ cluster_services_str }}'
es_search_name: '{{ stage }}-{{ tenant_id }}-{{ cluster_name }}-{{ cluster_service }}'
es_dashboard_name: '{{ stage }}-{{ tenant_id }}-{{ cluster_name }}-{{ cluster_service }}'
tasks:
- name: "Do some stuff in elastic with spaces ... "
@ -184,10 +189,10 @@
- es-importobjects
#############################################################
# Sending smardigo management message to process
# Sending smardigo management message to process
#############################################################
- hosts: "stage_{{ stage }}"
- hosts: "{{ stage }}-smardigo-management-message"
serial: "{{ serial_number | default(1) }}"
gather_facts: false
connection: local

@ -9,7 +9,8 @@
# tenant_id := (unique key for the tenant, e.g. customer)
# cluster_name := (business name for the cluster, e.g. product, department )
# cluster_size := (WIP node count for the cluster)
# cluster_services_str := (services to setup, e.g. 'connect,wordpress')
# cluster_service := (service to setup, e.g. 'connect', ...)
# cluster_features := (optional features to use, e.g. ['wordpress', 'resubmission', ...])
# playbook roles (keycloak / oidc)
# current_realm_name :=
# current_realm_display_name :=
@ -34,22 +35,26 @@
- ansible_version.minor >= 10
msg: "The ansible version has to be at least ({{ ansible_version.full }})"
- set_fact:
cluster_services: "{{ cluster_services_str | split(',') }}"
- name: "Add <{{ stage }}-smardigo-management-message> to hosts"
add_host:
name: "{{ stage }}-smardigo-management-message"
groups:
- "stage_{{ stage }}"
changed_when: False
tasks:
- name: Add hosts
add_host:
name: "{{ stage }}-{{ tenant_id }}-{{ cluster_name }}-{{ '%02d' | format(item|int) }}"
groups: "{{ ['stage_' + stage ] + cluster_services }}"
groups: "{{ ['stage_' + stage ] + [cluster_service] + cluster_features }}"
with_sequence: start=1 end={{ cluster_size | default(1) }}
changed_when: False
#############################################################
# Setup realms for created inventory
# Creating realms for created inventory
#############################################################
- hosts: "stage_{{ stage }}"
- hosts: "stage_{{ stage }}:!{{ stage }}-smardigo-management-message"
serial: "{{ serial_number | default(1) }}"
gather_facts: false
@ -61,25 +66,21 @@
- name: "Import autodiscover pre-tasks"
include_tasks: tasks/autodiscover_pre_tasks.yml
- name: "Parsing cluster_services_str into cluster_services"
set_fact:
cluster_services: "{{ cluster_services_str | split(',') }}"
roles:
- role: connect-realm
when: '"connect" in cluster_services'
when: '"connect" in group_names'
- role: gitea-realm
when: '"gitea" in cluster_services'
when: '"gitea" in group_names'
- role: workflow-proxy-realm
when: '"workflow-proxy" in cluster_services'
when: '"workflow-proxy" in group_names'
#############################################################
# Sending smardigo management message to process
# Sending smardigo management message to process
#############################################################
- hosts: "stage_{{ stage }}"
- hosts: "{{ stage }}-smardigo-management-message"
serial: "{{ serial_number | default(1) }}"
gather_facts: false
connection: local

@ -6,7 +6,7 @@
# tenant_id := (unique key for the tenant, e.g. customer)
# cluster_name := (business name for the cluster, e.g. product, department )
# cluster_size := (WIP node count for the cluster)
# cluster_services := (services to setup, e.g. ['connect', 'wordpress', ...])
# cluster_service := (service to setup, e.g. 'connect', ...)
# smardigo message callback
# scope_id := (scope id of the management process)
# process_instance_id := (process instance id of the management process)
@ -28,6 +28,13 @@
- ansible_version.minor >= 10
msg: "The ansible version has to be at least ({{ ansible_version.full }})"
- name: "Add <{{ stage }}-smardigo-management-message> to hosts"
add_host:
name: "{{ stage }}-smardigo-management-message"
groups:
- "stage_{{ stage }}"
changed_when: False
tasks:
- name: Add hosts
add_host:
@ -39,10 +46,10 @@
changed_when: False
#############################################################
# Provisioning servers for created inventory
# Creating servers for created inventory
#############################################################
- hosts: "stage_{{ stage }}"
- hosts: "stage_{{ stage }}:!{{ stage }}-smardigo-management-message"
serial: "{{ serial_number | default(5) }}"
gather_facts: false
@ -83,10 +90,10 @@
- role: hcloud
#############################################################
# Setup servers for created inventory
# Provisioning servers for created inventory
#############################################################
- hosts: "stage_{{ stage }}"
- hosts: "stage_{{ stage }}:!{{ stage }}-smardigo-management-message"
serial: "{{ serial_number | default(1) }}"
remote_user: root
vars:
@ -129,10 +136,10 @@
when: traefik_enabled | default(True)
#############################################################
# Sending smardigo management message to process
# Sending smardigo management message to process
#############################################################
- hosts: "stage_{{ stage }}"
- hosts: "{{ stage }}-smardigo-management-message"
serial: "{{ serial_number | default(1) }}"
gather_facts: false
connection: local

@ -6,7 +6,8 @@
# tenant_id := (unique key for the tenant, e.g. customer)
# cluster_name := (business name for the cluster, e.g. product, department )
# cluster_size := (WIP node count for the cluster)
# cluster_services_str := (services to setup, e.g. 'connect,wordpress')
# cluster_service := (service to setup, e.g. 'connect', ...)
# cluster_features := (optional features to use, e.g. ['wordpress', 'resubmission', ...])
# smardigo message callback
# scope_id := (scope id of the management process)
# process_instance_id := (process instance id of the management process)
@ -28,29 +29,26 @@
- ansible_version.minor >= 10
msg: "The ansible version has to be at least ({{ ansible_version.full }})"
- name: "Parsing cluster_services_str into cluster_services"
set_fact:
cluster_services: "{{ cluster_services_str | split(',') }}"
- name: "Add <{{ stage }}-smardigo-management-message> to hosts"
add_host:
name: "{{ stage }}-smardigo-management-message"
groups:
- "stage_{{ stage }}"
changed_when: False
tasks:
- name: Add hosts
add_host:
name: "{{ stage }}-{{ tenant_id }}-{{ cluster_name }}-01"
# name: "{{ stage }}-{{ tenant_id }}-{{ cluster_name }}-{{ '%02d' | format(item|int) }}"
groups:
- "stage_{{ stage }}"
- "{{ cluster_service }}"
- "{{ item }}"
name: "{{ stage }}-{{ tenant_id }}-{{ cluster_name }}-{{ '%02d' | format(item|int) }}"
groups: "{{ ['stage_' + stage ] + [cluster_service] + cluster_features }}"
with_sequence: start=1 end={{ cluster_size | default(1) }}
changed_when: False
# with_sequence: start=1 end={{ cluster_count | default(1) }}
with_items: "{{ cluster_services }}"
when: item in ['connect', 'connect_wordpress']
#############################################################
# Setup services for created inventory
# Creating services for created inventory
#############################################################
- hosts: "stage_{{ stage }}"
- hosts: "stage_{{ stage }}:!{{ stage }}-smardigo-management-message"
serial: "{{ serial_number | default(1) }}"
remote_user: root
vars:
@ -60,10 +58,6 @@
- name: "Import autodiscover pre-tasks"
include_tasks: tasks/autodiscover_pre_tasks.yml
- name: "Parsing cluster_services_str into cluster_services"
set_fact:
cluster_services: "{{ cluster_services_str | split(',') }}"
roles:
- role: connect
when: "'connect' in group_names"
@ -72,10 +66,10 @@
when: "'connect_wordpress' in group_names"
#############################################################
# Sending smardigo management message to process
# Sending smardigo management message to process
#############################################################
- hosts: "stage_{{ stage }}"
- hosts: "{{ stage }}-smardigo-management-message"
serial: "{{ serial_number | default(1) }}"
gather_facts: false
connection: local

@ -0,0 +1,3 @@
---
connect_resubmission_enabled: "true"

@ -14,7 +14,6 @@ spring_profiles_include: "prod,postgres,elastic,swagger"
tenant_id: "{{ management_oidc_realm }}"
cluster_size: "1"
cluster_name: "{{ management_oidc_client_id }}"
cluster_services_str: "connect"
current_realm_name: "management"
current_realm_display_name: "Stage Management"

@ -5,8 +5,9 @@
# stage := the type of the stage (e.g. dev, int, qa, prod)
# tenant_id := (unique key for the tenant, e.g. customer)
# cluster_name := (business name for the cluster, e.g. product, department )
# cluster_size := (WIP node count for the cluster) (Currently max is 2 master/slave)
# cluster_services_str := (services to setup, e.g. 'connect,wordpress')
# cluster_size := (WIP node count for the cluster)
# cluster_service := (service to setup, e.g. 'connect', ...)
# cluster_features := (optional features to use, e.g. ['wordpress', 'resubmission', ...])
# database_backup_file := the dump file to import, has to be on the database server under /tmp (e.g. wordpress_portal.sql)
# target_database := (optional) the database to import into ( see {{ connect_wordpress_maria_database }})
# smardigo message callback
@ -29,26 +30,30 @@
- ansible_version.major >= 2
- ansible_version.minor >= 10
msg: "The ansible version has to be at least ({{ ansible_version.full }})"
- name: "Parsing cluster_services_str into cluster_services"
set_fact:
cluster_services: "{{ cluster_services_str | split(',') }}"
- name: "Add <{{ stage }}-smardigo-management-message> to hosts"
add_host:
name: "{{ stage }}-smardigo-management-message"
groups:
- "stage_{{ stage }}"
changed_when: False
tasks:
- name: Add hosts
- name: Add maria servers to hosts if necessary
add_host:
name: "{{ stage }}-maria-01"
groups:
- "stage_{{ stage }}"
- "{{ item }}"
cluster_service: "{{ item }}"
changed_when: False
with_items: "{{ cluster_services }}"
with_items: "{{ cluster_features }}"
when: item in ['connect_wordpress']
#############################################################
# Setup services for created inventory
# Importing database backups for created inventory
#############################################################
- hosts: "stage_{{ stage }}"
- hosts: "stage_{{ stage }}:!{{ stage }}-smardigo-management-message"
serial: "{{ serial_number | default(1) }}"
remote_user: root
vars:
@ -57,9 +62,6 @@
pre_tasks:
- name: "Import autodiscover pre-tasks"
include_tasks: tasks/autodiscover_pre_tasks.yml
- name: "Parsing cluster_services_str into cluster_services"
set_fact:
cluster_services: "{{ cluster_services_str | split(',') }}"
roles:
- role: import-maria-database
@ -67,6 +69,7 @@
- "'connect_wordpress' in group_names"
- "target_database is defined"
- "database_backup_file is defined"
- role: import-maria-database
vars:
target_database: "{{ connect_wordpress_maria_database }}"
@ -75,10 +78,10 @@
- "database_backup_file is defined"
#############################################################
# Sending smardigo management message to process
# Sending smardigo management message to process
#############################################################
- hosts: "stage_{{ stage }}"
- hosts: "{{ stage }}-smardigo-management-message"
serial: "{{ serial_number | default(1) }}"
gather_facts: false
connection: local

@ -9,8 +9,9 @@
# stage := the type of the stage (e.g. dev, int, qa, prod)
# tenant_id := (unique key for the tenant, e.g. customer)
# cluster_name := (business name for the cluster, e.g. product, department )
# cluster_size := (WIP node count for the cluster) (Currently max is 2 master/slave)
# cluster_services_str := (services to setup, e.g. 'connect,wordpress')
# cluster_size := (WIP node count for the cluster)
# cluster_service := (service to setup, e.g. 'connect', ...)
# cluster_features := (optional features to use, e.g. ['wordpress', 'resubmission', ...])
# smardigo message callback
# scope_id := (scope id of the management process)
# process_instance_id := (process instance id of the management process)
@ -31,8 +32,13 @@
- ansible_version.major >= 2
- ansible_version.minor >= 10
msg: "The ansible version has to be at least ({{ ansible_version.full }})"
- set_fact:
cluster_services: "{{ cluster_services_str | split(',') }}"
- name: "Add <{{ stage }}-smardigo-management-message> to hosts"
add_host:
name: "{{ stage }}-smardigo-management-message"
groups:
- "stage_{{ stage }}"
changed_when: False
tasks:
- name: Add postgres servers to hosts if necessary
@ -42,8 +48,8 @@
- "stage_{{ stage }}"
- "{{ item }}"
changed_when: False
with_items: "{{ cluster_services }}"
when: item in ['connect', 'management_connect', 'keycloak', 'webdav', 'pdns']
with_items: "{{ cluster_features }}"
when: item in ['connect', 'management_connect', 'keycloak', 'webdav', 'gitea', 'workflow_index', 'workflow_proxy', 'pdns']
- name: Add maria servers to hosts if necessary
add_host:
@ -52,30 +58,26 @@
- "stage_{{ stage }}"
- "{{ item }}"
changed_when: False
with_items: "{{ cluster_services }}"
with_items: "{{ cluster_features }}"
when: item in ['connect_wordpress']
#############################################################
# Setup databases for created inventory
# Deleting databases for created inventory
#############################################################
- hosts: "stage_{{ stage }}"
- hosts: "stage_{{ stage }}:!{{ stage }}-smardigo-management-message"
serial: "{{ serial_number | default(1) }}"
remote_user: root
vars:
database_state: absent
ansible_ssh_host: "{{ stage_server_domain }}"
pre_tasks:
- name: "Import autodiscover pre-tasks"
include_tasks: tasks/autodiscover_pre_tasks.yml
- name: "Parsing cluster_services_str into cluster_services"
set_fact:
cluster_services: "{{ cluster_services_str | split(',') }}"
roles:
- role: connect-postgres
vars:
database_state: absent
when: "'connect' in group_names"
- role: pdns-admin-postgres
@ -85,23 +87,19 @@
when: "'pdns' in group_names"
- role: keycloak-postgres
vars:
database_state: absent
when: "'keycloak' in group_names"
- role: webdav-postgres
vars:
database_state: absent
when: "'webdav' in group_names"
- role: connect-wordpress-maria
when: "'connect_wordpress' in group_names"
#############################################################
# Sending smardigo management message to process
# Sending smardigo management message to process
#############################################################
- hosts: "stage_{{ stage }}"
- hosts: "{{ stage }}-smardigo-management-message"
serial: "{{ serial_number | default(1) }}"
gather_facts: false
connection: local

@ -9,7 +9,8 @@
# tenant_id := (unique key for the tenant, e.g. customer)
# cluster_name := (business name for the cluster, e.g. product, department )
# cluster_size := (WIP node count for the cluster)
# cluster_services_str := (services to setup, e.g. 'connect,wordpress')
# cluster_service := (service to setup, e.g. 'connect', ...)
# cluster_features := (optional features to use, e.g. ['wordpress', 'resubmission', ...])
# playbook roles (keycloak / oidc)
# current_realm_name :=
# current_realm_display_name :=
@ -33,22 +34,27 @@
- ansible_version.major >= 2
- ansible_version.minor >= 10
msg: "The ansible version has to be at least ({{ ansible_version.full }})"
- set_fact:
cluster_services: "{{ cluster_services_str | split(',') }}"
- name: "Add <{{ stage }}-smardigo-management-message> to hosts"
add_host:
name: "{{ stage }}-smardigo-management-message"
groups:
- "stage_{{ stage }}"
changed_when: False
tasks:
- name: Add hosts
add_host:
name: "{{ stage }}-{{ tenant_id }}-{{ cluster_name }}-{{ '%02d' | format(item|int) }}"
groups: "{{ ['stage_' + stage ] + cluster_services }}"
groups: "{{ ['stage_' + stage ] + [cluster_service] + cluster_features }}"
with_sequence: start=1 end={{ cluster_size | default(1) }}
changed_when: False
#############################################################
# Setup realms for created inventory
# Deleting client for created inventory
#############################################################
- hosts: "stage_{{ stage }}"
- hosts: "stage_{{ stage }}:!{{ stage }}-smardigo-management-message"
serial: "{{ serial_number | default(1) }}"
gather_facts: false
@ -70,10 +76,10 @@
client_name: "{{ cluster_name }}"
#############################################################
# Sending smardigo management message to process
# Sending smardigo management message to process
#############################################################
- hosts: "stage_{{ stage }}"
- hosts: "{{ stage }}-smardigo-management-message"
serial: "{{ serial_number | default(1) }}"
gather_facts: false
connection: local

@ -6,7 +6,7 @@
# tenant_id := (unique key for the tenant, e.g. customer)
# cluster_name := (business name for the cluster, e.g. product, department )
# cluster_size := (WIP node count for the cluster)
# cluster_services := (services to setup, e.g. ['connect', 'wordpress', ...])
# cluster_service := (service to setup, e.g. 'connect', ...)
# smardigo message callback
# scope_id := (scope id of the management process)
# process_instance_id := (process instance id of the management process)
@ -33,6 +33,13 @@
- ansible_version.minor >= 10
msg: "The ansible version has to be at least ({{ ansible_version.full }})"
- name: "Add <{{ stage }}-smardigo-management-message> to hosts"
add_host:
name: "{{ stage }}-smardigo-management-message"
groups:
- "stage_{{ stage }}"
changed_when: False
tasks:
- name: Add hosts
add_host:
@ -48,7 +55,7 @@
- cluster_service is defined
#############################################################
# Delete and DNS servers for created inventory
# Deleting servers/domains for created inventory
#############################################################
- hosts: "stage_{{ stage }}"
@ -62,6 +69,7 @@
tasks_from: _set_server_state
vars:
- server_state: "absent"
- name: "Delete DNS entry <{{ inventory_hostname }}> for <{{ domain }}>"
include_role:
name: _digitalocean
@ -70,10 +78,10 @@
record_to_remove: '{{ inventory_hostname }}'
#############################################################
# Sending smardigo management message to process
# Sending smardigo management message to process
#############################################################
- hosts: "stage_{{ stage }}"
- hosts: "{{ stage }}-smardigo-management-message"
serial: "{{ serial_number | default(1) }}"
gather_facts: false
connection: local

@ -6,7 +6,8 @@
# tenant_id := (unique key for the tenant, e.g. customer)
# cluster_name := (business name for the cluster, e.g. product, department )
# cluster_size := (WIP node count for the cluster)
# cluster_services_str := (services to setup, e.g. 'connect,wordpress')
# cluster_service := (service to setup, e.g. 'connect', ...)
# cluster_features := (optional features to use, e.g. ['wordpress', 'resubmission', ...])
# smardigo message callback
# scope_id := (scope id of the management process)
# process_instance_id := (process instance id of the management process)
@ -27,34 +28,24 @@
- ansible_version.major >= 2
- ansible_version.minor >= 10
msg: "The ansible version has to be at least ({{ ansible_version.full }})"
- name: "Parsing cluster_services_str into cluster_services"
set_fact:
cluster_services: "{{ cluster_services_str | split(',') }}"
tasks:
- name: Add hosts
- name: "Add <{{ stage }}-smardigo-management-message> to hosts"
add_host:
name: "{{ stage }}-{{ tenant_id }}-{{ cluster_name }}-01"
name: "{{ stage }}-smardigo-management-message"
groups:
- "stage_{{ stage }}"
- "{{ cluster_service }}"
- "{{ item }}"
changed_when: False
with_items: "{{ cluster_services }}"
when: item in ['connect']
tasks:
- name: Add hosts
add_host:
name: "{{ stage }}-{{ tenant_id }}-{{ cluster_name }}-01"
groups:
- "stage_{{ stage }}"
- "{{ cluster_service }}"
- "{{ item }}"
name: "{{ stage }}-{{ tenant_id }}-{{ cluster_name }}-{{ '%02d' | format(item|int) }}"
groups: "{{ ['stage_' + stage ] + [cluster_service] + cluster_features }}"
with_sequence: start=1 end={{ cluster_size | default(1) }}
changed_when: False
with_items: "{{ cluster_services }}"
when: item in ['connect_wordpress']
#############################################################
# Setup services for created inventory
# Removing services for created inventory
#############################################################
- hosts: "stage_{{ stage }}"
@ -83,10 +74,10 @@
when: "'connect_wordpress' in group_names"
#############################################################
# Sending smardigo management message to process
# Sending smardigo management message to process
#############################################################
- hosts: "stage_{{ stage }}"
- hosts: "{{ stage }}-smardigo-management-message"
serial: "{{ serial_number | default(1) }}"
gather_facts: false
connection: local

@ -10,9 +10,9 @@
# stage := the type of the stage (e.g. dev, int, qa, prod)
# tenant_id := (unique key for the tenant, e.g. customer)
# cluster_name := (business name for the cluster, e.g. product, department )
# cluster_size := (WIP node count for the cluster) (Currently max is 2 master/slave)
# cluster_services_str := (services to setup, e.g. 'connect,wordpress')
# custom_backup_name := defines a substring for backup file => {{ stage }}_{{ tenant_id }}_{{ cluster_name }}_{{ cluster_services_str }}__gehtdichnixan.sql
# cluster_service := (service to setup, e.g. 'connect', ...)
# cluster_features := (optional features to use, e.g. ['wordpress', 'resubmission', ...])
# custom_backup_name := defines a substring for backup file => {{ stage }}_{{ tenant_id }}_{{ cluster_name }}_{{ cluster_service }}__gehtdichnixan.sql
# smardigo message callback
# scope_id := (scope id of the management process)
# process_instance_id := (process instance id of the management process)
@ -34,11 +34,12 @@
- ansible_version.minor >= 10
msg: "The ansible version has to be at least ({{ ansible_version.full }})"
- name: "Parsing cluster_services_str into cluster_services"
set_fact:
cluster_services: "{{ cluster_services_str | split(',') }}"
tags:
- always
- name: "Add <{{ stage }}-smardigo-management-message> to hosts"
add_host:
name: "{{ stage }}-smardigo-management-message"
groups:
- "stage_{{ stage }}"
changed_when: False
tasks:
- name: "Add postgres servers to hosts if necessary"
@ -48,19 +49,19 @@
- "stage_{{ stage }}"
- "{{ item }}"
changed_when: False
with_items: "{{ cluster_services }}"
when: item in ['connect', 'management_connect', 'keycloak', 'webdav', 'gitea', 'workflow_index', 'workflow_proxy']
with_items: "{{ cluster_features }}"
when: item in ['connect', 'management_connect', 'keycloak', 'webdav', 'gitea', 'workflow_index', 'workflow_proxy', 'pdns']
#############################################################
# Setup databases for created inventory
# Restoring databases for created inventory
#############################################################
- hosts: "stage_{{ stage }}"
- hosts: "stage_{{ stage }}:!{{ stage }}-smardigo-management-message"
serial: "{{ serial_number | default(1) }}"
remote_user: root
vars:
ansible_ssh_host: "{{ stage_server_domain }}"
postgres_backup_state: restore
ansible_ssh_host: "{{ stage_server_domain }}"
roles:
- role: connect-postgres
@ -82,10 +83,10 @@
when: "'workflow_proxy' in group_names"
#############################################################
# Sending smardigo management message to process
# Sending smardigo management message to process
#############################################################
- hosts: "stage_{{ stage }}"
- hosts: "{{ stage }}-smardigo-management-message"
serial: "{{ serial_number | default(1) }}"
gather_facts: false
connection: local

@ -68,6 +68,7 @@ connect_environment: [
"ELASTIC_MESSAGE_INDEX: \"{{ connect_elastic_message_index | default('message') }}\"",
"ELASTIC_ANALYSIS_INDEX: \"{{ connect_elastic_analysis_index | default('analysis') }}\"",
"RESUBMISSION_ENABLED: \"{{ connect_resubmission_enabled | default('false') }}\"",
"ELEMENT_TEMPLATE_ENABLED: \"{{ connect_element_template_enabled | default('true') }}\"",
"CONFIG_DELETE_SCOPE_ENABLED: \"{{ connect_config_delete_scope_enabled | default('true') }}\"",
"EXTERNAL_TASK_SCRIPT_WORKER_ENABLED: \"{{ connect_external_task_script_worker_enabled | default('true') }}\"",
@ -85,6 +86,8 @@ connect_environment: [
"SMA_CORS_ALLOWED_HEADERS: \"*\"",
"SMA_CORS_PATH_PATTERN: \"/**\"",
"LOG_LEVEL_CAMUNDA: \"{{ connect_loglevel_camunda | default('OFF') }}\"",
"LOG_LEVEL_JASYPT: \"{{ connect_loglevel_jasypt | default('ERROR') }}\"",
"LOG_LEVEL_MESSAGE_QUEUE: \"{{ connect_loglevel_message_queue | default('INFO') }}\"",
"LOG_LEVEL_DOCUMENT_INDEX: \"{{ connect_loglevel_document_index | default('INFO') }}\"",
"LOG_LEVEL_WORKFLOW_INDEX: \"{{ connect_loglevel_workflow_index | default('INFO') }}\"",

@ -0,0 +1 @@
{"name":"connect-versions","restApi":true,"configKey":"connect-versions","payloadType":"EXCEL","config":[{"name":"file","type":"FILE","value":"connect-versions.xlsx"},{"name":"columnNames","type":"STRING","value":"label,value"},{"name":"sqlStatement","type":"STRING","value":"SELECT * from version"},{"name":"columnNameLineNumber","type":"INT","value":1},{"name":"skipEmptyLines","type":"BOOLEAN","value":false},{"name":"skipEmptyColumns","type":"BOOLEAN","value":false}]}

File diff suppressed because it is too large Load Diff

@ -11,6 +11,10 @@
"type" : "object",
"classification" : "PRIVATE"
},
"connect" : {
"type" : "object",
"classification" : "PRIVATE"
},
"connect-features" : {
"type" : "object",
"classification" : "PRIVATE"

@ -66,8 +66,8 @@
<bpmn2:task id="Activity_1lo3ui2" name="Service Variablen ergänzen">
<bpmn2:extensionElements>
<camunda:inputOutput>
<camunda:outputParameter name="cluster_services">
<camunda:script scriptFormat="groovy">[cluster.service] + execution.getVariable('connect-features')</camunda:script>
<camunda:outputParameter name="cluster_features">
<camunda:script scriptFormat="groovy">['connect'] + execution.getVariable('connect-features')</camunda:script>
</camunda:outputParameter>
</camunda:inputOutput>
</bpmn2:extensionElements>
@ -164,6 +164,7 @@
<bpmn2:incoming>Flow_0ex5zxa</bpmn2:incoming>
<bpmn2:outgoing>Flow_0zcb7z2</bpmn2:outgoing>
<bpmn2:outgoing>Flow_1qghkm9</bpmn2:outgoing>
<bpmn2:outgoing>Flow_0qc2wxt</bpmn2:outgoing>
</bpmn2:parallelGateway>
<bpmn2:intermediateThrowEvent id="Event_1ey3eu7" name="Status &#34;Antrag freigegeben&#34; setzen">
<bpmn2:extensionElements>
@ -758,7 +759,6 @@ Variables.userId(authenticatedUserId)</camunda:script>
<camunda:properties>
<camunda:property name="validate_form" value="false" />
<camunda:property name="sort_order" value="99" />
<camunda:property name="discard_form_changes" value="true" />
</camunda:properties>
</bpmn2:extensionElements>
<bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression">${$action == 'abbrechen'}</bpmn2:conditionExpression>
@ -897,6 +897,28 @@ Variables.userId(authenticatedUserId)</camunda:script>
<bpmn2:outgoing>Flow_1r4otto</bpmn2:outgoing>
</bpmn2:callActivity>
<bpmn2:sequenceFlow id="Flow_1r4otto" sourceRef="Activity_0f5w8ui" targetRef="Activity_05mqkaj" />
<bpmn2:sequenceFlow id="Flow_0qc2wxt" sourceRef="Gateway_17ev5pq" targetRef="Activity_1ndl5xy" />
<bpmn2:userTask id="Activity_1ndl5xy" name="Zugang zu Antrag bis Service gestartet" camunda:candidateGroups="user">
<bpmn2:incoming>Flow_0qc2wxt</bpmn2:incoming>
</bpmn2:userTask>
<bpmn2:endEvent id="Event_12kkngf">
<bpmn2:incoming>Flow_14qlmwl</bpmn2:incoming>
<bpmn2:incoming>Flow_03lhlpu</bpmn2:incoming>
</bpmn2:endEvent>
<bpmn2:boundaryEvent id="Event_0r2r3bz" name="when vorgang_status == 50 (gestartet)" attachedToRef="Activity_1ndl5xy">
<bpmn2:outgoing>Flow_14qlmwl</bpmn2:outgoing>
<bpmn2:conditionalEventDefinition id="ConditionalEventDefinition_03vgqw3" camunda:variableName="vorgang_status" camunda:variableEvents="update">
<bpmn2:condition xsi:type="bpmn2:tFormalExpression">${vorgang_status == 50}</bpmn2:condition>
</bpmn2:conditionalEventDefinition>
</bpmn2:boundaryEvent>
<bpmn2:boundaryEvent id="Event_0uejlqq" name="when vorgang_status == 92 (abgelehnt)" attachedToRef="Activity_1ndl5xy">
<bpmn2:outgoing>Flow_03lhlpu</bpmn2:outgoing>
<bpmn2:conditionalEventDefinition id="ConditionalEventDefinition_1jc3ofm" camunda:variableName="vorgang_status" camunda:variableEvents="update">
<bpmn2:condition xsi:type="bpmn2:tFormalExpression">${vorgang_status == 92}</bpmn2:condition>
</bpmn2:conditionalEventDefinition>
</bpmn2:boundaryEvent>
<bpmn2:sequenceFlow id="Flow_14qlmwl" sourceRef="Event_0r2r3bz" targetRef="Event_12kkngf" />
<bpmn2:sequenceFlow id="Flow_03lhlpu" sourceRef="Event_0uejlqq" targetRef="Event_12kkngf" />
<bpmn2:textAnnotation id="TextAnnotation_0friy7d">
<bpmn2:text>Shared Service
Server bei Hetzner erstellen
@ -1018,21 +1040,8 @@ Server bei Hetzner löschen
<bpmn2:incoming>Flow_1cnt5hf</bpmn2:incoming>
<bpmn2:outgoing>Flow_1nqz9ya</bpmn2:outgoing>
</bpmn2:task>
<bpmn2:serviceTask id="Activity_0wn3csk" name="AWX Provisionierung starten" camunda:delegateExpression="${rest.post(&#39;awx&#39;, awxPath).responseJSONObject(&#39;awxResponse&#39;).bodyJSONMap(awxRequestBody)}">
<bpmn2:extensionElements>
<camunda:inputOutput>
<camunda:inputParameter name="awxRequestBody">
<camunda:map>
<camunda:entry key="extra_vars">${extra_vars}</camunda:entry>
</camunda:map>
</camunda:inputParameter>
</camunda:inputOutput>
</bpmn2:extensionElements>
<bpmn2:incoming>Flow_1nqz9ya</bpmn2:incoming>
<bpmn2:outgoing>Flow_0rau5wd</bpmn2:outgoing>
</bpmn2:serviceTask>
<bpmn2:intermediateCatchEvent id="Event_0tax83l" name="Ausführung der Aktion abwarten">
<bpmn2:incoming>Flow_0rau5wd</bpmn2:incoming>
<bpmn2:incoming>Flow_1kxc9t0</bpmn2:incoming>
<bpmn2:outgoing>Flow_0gcsmj7</bpmn2:outgoing>
<bpmn2:messageEventDefinition id="MessageEventDefinition_193tmaa" messageRef="Message_13oyyv2" />
</bpmn2:intermediateCatchEvent>
@ -1044,7 +1053,6 @@ Server bei Hetzner löschen
<bpmn2:incoming>Flow_1ju13h8</bpmn2:incoming>
<bpmn2:terminateEventDefinition id="TerminateEventDefinition_16l1kke" />
</bpmn2:endEvent>
<bpmn2:sequenceFlow id="Flow_0rau5wd" sourceRef="Activity_0wn3csk" targetRef="Event_0tax83l" />
<bpmn2:sequenceFlow id="Flow_1nqz9ya" sourceRef="Activity_1hwc1va" targetRef="Activity_0wn3csk" />
<bpmn2:sequenceFlow id="Flow_11nxxg5" sourceRef="Activity_1ewqrs7" targetRef="Activity_1igdww7" />
<bpmn2:sequenceFlow id="Flow_1ow8whd" sourceRef="Event_02kqmmg" targetRef="Activity_1olpao9" />
@ -1052,6 +1060,20 @@ Server bei Hetzner löschen
<bpmn2:sequenceFlow id="Flow_0gcsmj7" sourceRef="Event_0tax83l" targetRef="Activity_136brby" />
<bpmn2:sequenceFlow id="Flow_1ju13h8" sourceRef="Activity_136brby" targetRef="Event_0hla739" />
<bpmn2:sequenceFlow id="Flow_1cnt5hf" sourceRef="Activity_1igdww7" targetRef="Activity_1hwc1va" />
<bpmn2:serviceTask id="Activity_0wn3csk" name="AWX Provisionierung starten" camunda:delegateExpression="${rest.post(&#39;awx&#39;, awxPath).responseJSONObject(&#39;awxResponse&#39;).bodyJSONMap(awxRequestBody)}">
<bpmn2:extensionElements>
<camunda:inputOutput>
<camunda:inputParameter name="awxRequestBody">
<camunda:map>
<camunda:entry key="extra_vars">${extra_vars}</camunda:entry>
</camunda:map>
</camunda:inputParameter>
</camunda:inputOutput>
</bpmn2:extensionElements>
<bpmn2:incoming>Flow_1nqz9ya</bpmn2:incoming>
<bpmn2:outgoing>Flow_1kxc9t0</bpmn2:outgoing>
</bpmn2:serviceTask>
<bpmn2:sequenceFlow id="Flow_1kxc9t0" sourceRef="Activity_0wn3csk" targetRef="Event_0tax83l" />
</bpmn2:process>
<bpmn2:message id="Message_13oyyv2" name="action-executed-${execution.getVariable(&#39;smardigoManagementAction&#39;)}" />
<bpmn2:process id="smardigo-management-message" name="Smardigo Management Message" isExecutable="true">
@ -1082,6 +1104,27 @@ Server bei Hetzner löschen
<bpmndi:BPMNShape id="Participant_19lpjee_di" bpmnElement="Participant_19lpjee" isHorizontal="true">
<dc:Bounds x="160" y="490" width="6160" height="3650" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_03lhlpu_di" bpmnElement="Flow_03lhlpu">
<di:waypoint x="728" y="1580" />
<di:waypoint x="810" y="1580" />
<di:waypoint x="810" y="1680" />
<di:waypoint x="778" y="1680" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_14qlmwl_di" bpmnElement="Flow_14qlmwl">
<di:waypoint x="792" y="1580" />
<di:waypoint x="710" y="1580" />
<di:waypoint x="710" y="1680" />
<di:waypoint x="742" y="1680" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0qc2wxt_di" bpmnElement="Flow_0qc2wxt">
<di:waypoint x="995" y="1450" />
<di:waypoint x="760" y="1450" />
<di:waypoint x="760" y="1500" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1r4otto_di" bpmnElement="Flow_1r4otto">
<di:waypoint x="3240" y="2490" />
<di:waypoint x="3360" y="2490" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1hoe8au_di" bpmnElement="Flow_1hoe8au">
<di:waypoint x="4350" y="2490" />
<di:waypoint x="4430" y="2490" />
@ -1273,10 +1316,6 @@ Server bei Hetzner löschen
<di:waypoint x="5670" y="2490" />
<di:waypoint x="5882" y="2490" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1r4otto_di" bpmnElement="Flow_1r4otto">
<di:waypoint x="3240" y="2490" />
<di:waypoint x="3360" y="2490" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="Activity_1hpnorc_di" bpmnElement="Activity_1hpnorc" bioc:stroke="rgb(67, 160, 71)" bioc:fill="rgb(200, 230, 201)">
<dc:Bounds x="2910" y="2450" width="100" height="80" />
</bpmndi:BPMNShape>
@ -1409,21 +1448,6 @@ Server bei Hetzner löschen
<bpmndi:BPMNShape id="Activity_1ie6hli_di" bpmnElement="Activity_1ie6hli" bioc:stroke="#8e24aa" bioc:fill="#e1bee7" color:background-color="#e1bee7" color:border-color="#8e24aa">
<dc:Bounds x="5570" y="2450" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0fvzd86_di" bpmnElement="Event_0fvzd86" bioc:stroke="rgb(67, 160, 71)" bioc:fill="rgb(200, 230, 201)">
<dc:Bounds x="3692" y="2472" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="3669" y="2526" width="83" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_01pow8x_di" bpmnElement="Activity_01pow8x" bioc:stroke="rgb(67, 160, 71)" bioc:fill="rgb(200, 230, 201)">
<dc:Bounds x="3520" y="2450" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_05mqkaj_di" bpmnElement="Activity_05mqkaj" bioc:stroke="rgb(67, 160, 71)" bioc:fill="rgb(200, 230, 201)">
<dc:Bounds x="3360" y="2450" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0f5w8ui_di" bpmnElement="Activity_0f5w8ui" bioc:stroke="#fb8c00" bioc:fill="#ffe0b2" color:background-color="#ffe0b2" color:border-color="#fb8c00">
<dc:Bounds x="3140" y="2450" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1wq2muu_di" bpmnElement="Activity_1wq2muu" isExpanded="true">
<dc:Bounds x="1120" y="1330" width="1040" height="428" />
</bpmndi:BPMNShape>
@ -1768,6 +1792,27 @@ Server bei Hetzner löschen
<bpmndi:BPMNShape id="Event_0si6lsk_di" bpmnElement="Event_0si6lsk">
<dc:Bounds x="6142" y="2972" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0fvzd86_di" bpmnElement="Event_0fvzd86" bioc:stroke="rgb(67, 160, 71)" bioc:fill="rgb(200, 230, 201)">
<dc:Bounds x="3692" y="2472" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="3669" y="2526" width="83" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_01pow8x_di" bpmnElement="Activity_01pow8x" bioc:stroke="rgb(67, 160, 71)" bioc:fill="rgb(200, 230, 201)">
<dc:Bounds x="3520" y="2450" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_05mqkaj_di" bpmnElement="Activity_05mqkaj" bioc:stroke="rgb(67, 160, 71)" bioc:fill="rgb(200, 230, 201)">
<dc:Bounds x="3360" y="2450" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0f5w8ui_di" bpmnElement="Activity_0f5w8ui" bioc:stroke="#fb8c00" bioc:fill="#ffe0b2" color:background-color="#ffe0b2" color:border-color="#fb8c00">
<dc:Bounds x="3140" y="2450" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_1ndl5xy_di" bpmnElement="Activity_1ndl5xy" bioc:stroke="rgb(30, 136, 229)" bioc:fill="rgb(187, 222, 251)">
<dc:Bounds x="710" y="1500" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_12kkngf_di" bpmnElement="Event_12kkngf">
<dc:Bounds x="742" y="1662" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="TextAnnotation_0friy7d_di" bpmnElement="TextAnnotation_0friy7d">
<dc:Bounds x="2200" y="2590" width="220" height="124" />
</bpmndi:BPMNShape>
@ -1792,6 +1837,18 @@ Server bei Hetzner löschen
<bpmndi:BPMNShape id="TextAnnotation_0ycyefe_di" bpmnElement="TextAnnotation_0ycyefe">
<dc:Bounds x="5360" y="2590" width="172" height="82" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_02hanfk_di" bpmnElement="Event_0uejlqq" bioc:stroke="#e53935" bioc:fill="#ffcdd2" color:background-color="#ffcdd2" color:border-color="#e53935">
<dc:Bounds x="692" y="1562" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="586" y="1560" width="87" height="40" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0ndqpww_di" bpmnElement="Event_0r2r3bz" bioc:stroke="#43a047" bioc:fill="#c8e6c9" color:background-color="#c8e6c9" color:border-color="#43a047">
<dc:Bounds x="792" y="1562" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="839" y="1560" width="82" height="40" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0t9szf7_di" bpmnElement="Event_1y8h1sw" bioc:stroke="#8e24aa" bioc:fill="#e1bee7" color:background-color="#e1bee7" color:border-color="#8e24aa">
<dc:Bounds x="6032" y="2972" width="36" height="36" />
<bpmndi:BPMNLabel>
@ -1857,6 +1914,10 @@ Server bei Hetzner löschen
<bpmndi:BPMNShape id="Participant_08rb9rc_di" bpmnElement="Participant_08rb9rc" isHorizontal="true">
<dc:Bounds x="160" y="80" width="1320" height="380" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_1kxc9t0_di" bpmnElement="Flow_1kxc9t0">
<di:waypoint x="1060" y="270" />
<di:waypoint x="1122" y="270" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_1cnt5hf_di" bpmnElement="Flow_1cnt5hf">
<di:waypoint x="740" y="270" />
<di:waypoint x="800" y="270" />
@ -1885,10 +1946,6 @@ Server bei Hetzner löschen
<di:waypoint x="900" y="270" />
<di:waypoint x="960" y="270" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_0rau5wd_di" bpmnElement="Flow_0rau5wd">
<di:waypoint x="1060" y="270" />
<di:waypoint x="1122" y="270" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="Event_02kqmmg_di" bpmnElement="Event_02kqmmg">
<dc:Bounds x="212" y="252" width="36" height="36" />
</bpmndi:BPMNShape>
@ -1904,9 +1961,6 @@ Server bei Hetzner löschen
<bpmndi:BPMNShape id="Activity_1hwc1va_di" bpmnElement="Activity_1hwc1va">
<dc:Bounds x="800" y="230" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0wn3csk_di" bpmnElement="Activity_0wn3csk">
<dc:Bounds x="960" y="230" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Event_0tax83l_di" bpmnElement="Event_0tax83l">
<dc:Bounds x="1122" y="252" width="36" height="36" />
<bpmndi:BPMNLabel>
@ -1919,6 +1973,9 @@ Server bei Hetzner löschen
<bpmndi:BPMNShape id="Event_1u4tx4z_di" bpmnElement="Event_0hla739">
<dc:Bounds x="1382" y="252" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Activity_0wn3csk_di" bpmnElement="Activity_0wn3csk">
<dc:Bounds x="960" y="230" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Participant_0r2nfs7_di" bpmnElement="Participant_0r2nfs7" isHorizontal="true">
<dc:Bounds x="1500" y="80" width="370" height="380" />
</bpmndi:BPMNShape>

@ -1,34 +1,35 @@
def env = [
scope_id: contextScopeId,
process_instance_id: execution.getProcessInstanceId(),
smardigo_management_action: smardigoManagementAction,
cluster_features: cluster_features,
cluster_name: cluster.name,
cluster_service: cluster.service,
cluster_services_str: ([cluster.service] + execution.getVariable('connect-features')).join(','),
cluster_size: cluster.size,
stage: cluster.stage,
connect_image_version: connect.version,
current_realm_name: tenant.key,
current_realm_display_name: tenant.name,
process_instance_id: execution.getProcessInstanceId(),
scope_id: contextScopeId,
smardigo_management_action: smardigoManagementAction,
stage: cluster.stage,
tenant_id: tenant.key
]
if (binding.hasVariable('extraVariables')) {
env << extraVariables
}
def ansibleCommand= 'ansible-playbook ' + smardigoManagementAction + '.yml --vault-password-file ~/vault-pass'
def ansibleEnvironment= ' -e \"'
def filename = 'xvars-' + smardigoManagementAction + '-' + execution.getProcessInstanceId() + '.yml'
def ansibleCommand= 'ansible-playbook ' + smardigoManagementAction + '.yml --vault-password-file ~/vault-pass -e "@' + filename + '"'
def ansibleVariables= 'cat <<EOT >> ' + filename + '\n'
ansibleVariables+= '---\n'
env.each { key, val ->
if (val instanceof List) {
ansibleEnvironment+= key + '=\'' + val.join(',') + '\' '
ansibleVariables+= key + ':\n- \'' + val.join('\'\n- \'') + '\'\n'
} else {
ansibleEnvironment+= key + '=\'' + val + '\' '
ansibleVariables+= key + ': \'' + val + '\'\n'
}
}
ansibleEnvironment = ansibleEnvironment.substring(0, ansibleEnvironment.length() - 1);
ansibleEnvironment+= '\"'
ansibleCommand += ansibleEnvironment
ansibleVariables+= 'EOT'
processes.byId(contextScopeId, contextProcessId).createComment(comment + ' gestartet')
processes.byId(contextScopeId, contextProcessId).createComment(ansibleCommand)
processes.byId(contextScopeId, contextProcessId).createComment(ansibleVariables + '\n' + ansibleCommand)
ansibleCommand

@ -1,14 +1,15 @@
def env = [
scope_id: contextScopeId,
process_instance_id: execution.getProcessInstanceId(),
smardigo_management_action: smardigoManagementAction,
cluster_features: cluster_features,
cluster_name: cluster.name,
cluster_service: cluster.service,
cluster_services_str: ([cluster.service] + execution.getVariable('connect-features')).join(','),
cluster_size: cluster.size,
stage: cluster.stage,
connect_image_version: connect.version,
current_realm_name: tenant.key,
current_realm_display_name: tenant.name,
process_instance_id: execution.getProcessInstanceId(),
scope_id: contextScopeId,
smardigo_management_action: smardigoManagementAction,
stage: cluster.stage,
tenant_id: tenant.key
]
if (binding.hasVariable('extraVariables')) {

@ -164,5 +164,15 @@
become: false
tags:
- always
when:
- debug
# when:
# - debug
- name: "Printing groups for {{ inventory_hostname }}"
debug:
msg: "{{ group_names }}"
delegate_to: 127.0.0.1
become: false
tags:
- always
# when:
# - debug

@ -25,16 +25,19 @@
- ansible_version.major >= 2
- ansible_version.minor >= 10
msg: "The ansible version has to be at least ({{ ansible_version.full }})"
tags:
- always
- name: "Add <{{ stage }}-smardigo-management-message> to hosts"
add_host:
name: "{{ stage }}-smardigo-management-message"
groups:
- "stage_{{ stage }}"
changed_when: False
- name: "Import autodiscover pre-tasks"
include_tasks: tasks/autodiscover_pre_tasks.yml
tags:
- always
tasks:
- name: Add prometheus servers to hosts if necessary
- name: Add all servers to hosts
add_host:
name: "{{ item.name }}"
groups:
@ -43,11 +46,9 @@
stage_server_infos: "{{ stage_server_infos }}"
changed_when: False
with_items: "{{ stage_server_infos }}"
tags:
- always
#############################################################
# update monitoring
# Updating monitoring for all servers
#############################################################
- hosts: "{{ stage }}-prometheus-01"
@ -60,14 +61,12 @@
- include_role:
name: prometheus
tasks_from: _update_config
tags:
- always
#############################################################
# Sending smardigo management message to process
# Sending smardigo management message to process
#############################################################
- hosts: "stage_{{ stage }}"
- hosts: "{{ stage }}-smardigo-management-message"
serial: "{{ serial_number | default(1) }}"
gather_facts: false
connection: local

@ -5,7 +5,7 @@
# stage := the type of the stage (e.g. dev, int, qa, prod)
# tenant_id := (unique key for the tenant, e.g. customer)
# cluster_name := (business name for the cluster, e.g. product, department )
# cluster_services_str := (services to setup, e.g. 'connect,wordpress')
# cluster_services := (services to setup, e.g. ['connect', 'wordpress', ...])
# service_state := the state of the service (e.g. up, down, upgrade)
# smardigo message callback
# scope_id := (scope id of the management process)
@ -28,27 +28,26 @@
- ansible_version.minor >= 10
msg: "The ansible version has to be at least ({{ ansible_version.full }})"
- name: "Parsing cluster_services_str into cluster_services"
set_fact:
cluster_services: "{{ cluster_services_str | split(',') }}"
- name: "Add <{{ stage }}-smardigo-management-message> to hosts"
add_host:
name: "{{ stage }}-smardigo-management-message"
groups:
- "stage_{{ stage }}"
changed_when: False
tasks:
- name: Add hosts
add_host:
name: "{{ stage }}-{{ tenant_id }}-{{ cluster_name }}-01"
groups:
- "stage_{{ stage }}"
- "{{ cluster_service }}"
- "{{ item }}"
name: "{{ stage }}-{{ tenant_id }}-{{ cluster_name }}-{{ '%02d' | format(item|int) }}"
groups: "{{ ['stage_' + stage ] + [cluster_service] + cluster_features }}"
with_sequence: start=1 end={{ cluster_size | default(1) }}
changed_when: False
with_items: "{{ cluster_services }}"
when: item in ['connect', 'connect_wordpress']
#############################################################
# Stop services for created inventory
# Stopping services for created inventory
#############################################################
- hosts: "stage_{{ stage }}"
- hosts: "stage_{{ stage }}:!{{ stage }}-smardigo-management-message"
serial: "{{ serial_number | default(1) }}"
remote_user: root
vars:
@ -71,10 +70,10 @@
when: "'connect_wordpress' in group_names"
#############################################################
# Sending smardigo management message to process
# Sending smardigo management message to process
#############################################################
- hosts: "stage_{{ stage }}"
- hosts: "{{ stage }}-smardigo-management-message"
serial: "{{ serial_number | default(1) }}"
gather_facts: false
connection: local

@ -12,7 +12,7 @@
# stage := the type of the stage (e.g. dev, int, qa, prod)
# tenant_id := (unique key for the tenant, e.g. customer)
# cluster_name := (business name for the cluster, e.g. product, department )
# cluster_size := (WIP node count for the cluster) (Currently max is 2 master/slave)
# cluster_size := (WIP node count for the cluster)
# cluster_services := (services to setup, e.g. ['connect', 'wordpress', ...])
# upload_file := the local file to upload (e.g. dumps/wordpress_portal.sql)
# database_backup_file := the dump file to import (e.g. wordpress_portal.sql)
@ -36,25 +36,20 @@
- ansible_version.major >= 2
- ansible_version.minor >= 10
msg: "The ansible version has to be at least ({{ ansible_version.full }})"
- name: "Parsing cluster_services_str into cluster_services"
set_fact:
cluster_services: "{{ cluster_services_str | split(',') }}"
tags:
- always
tasks:
- name: Add hosts
- name: "Add maria servers to hosts if necessary"
add_host:
name: "{{ stage }}-maria-01"
groups:
- "stage_{{ stage }}"
- "{{ item }}"
changed_when: False
with_items: "{{ cluster_services }}"
with_items: "{{ cluster_features }}"
when: item in ['connect_wordpress']
#############################################################
# Setup services for created inventory
# Uploading database backups for created inventory
#############################################################
- hosts: "stage_{{ stage }}"
@ -66,11 +61,6 @@
pre_tasks:
- name: "Import autodiscover pre-tasks"
include_tasks: tasks/autodiscover_pre_tasks.yml
- name: "Parsing cluster_services_str into cluster_services"
set_fact:
cluster_services: "{{ cluster_services_str | split(',') }}"
tags:
- always
roles:
- role: upload-local-file

Loading…
Cancel
Save