diff --git a/ansible-builder/bindep.txt b/ansible-builder/bindep.txt new file mode 100644 index 0000000..bb24848 --- /dev/null +++ b/ansible-builder/bindep.txt @@ -0,0 +1,5 @@ +python38-devel [platform:rpm compile] +subversion [platform:rpm] +subversion [platform:dpkg] +git-lfs [platform:rpm] + diff --git a/ansible-builder/context/Dockerfile b/ansible-builder/context/Dockerfile new file mode 100644 index 0000000..23e823e --- /dev/null +++ b/ansible-builder/context/Dockerfile @@ -0,0 +1,36 @@ +ARG EE_BASE_IMAGE=quay.io/ansible/ansible-runner:latest +ARG EE_BUILDER_IMAGE=quay.io/ansible/ansible-builder:latest + +FROM $EE_BASE_IMAGE as galaxy +ARG ANSIBLE_GALAXY_CLI_COLLECTION_OPTS= +USER root + +ADD _build /build +WORKDIR /build + +RUN ansible-galaxy role install -r requirements.yml --roles-path /usr/share/ansible/roles +RUN ansible-galaxy collection install $ANSIBLE_GALAXY_CLI_COLLECTION_OPTS -r requirements.yml --collections-path /usr/share/ansible/collections + +FROM $EE_BUILDER_IMAGE as builder + +COPY --from=galaxy /usr/share/ansible /usr/share/ansible + +ADD _build/requirements.txt requirements.txt +ADD _build/bindep.txt bindep.txt +RUN ansible-builder introspect --sanitize --user-pip=requirements.txt --user-bindep=bindep.txt --write-bindep=/tmp/src/bindep.txt --write-pip=/tmp/src/requirements.txt +RUN assemble + +FROM $EE_BASE_IMAGE +USER root + +COPY --from=galaxy /usr/share/ansible /usr/share/ansible + +COPY --from=builder /output/ /output/ +RUN /output/install-from-bindep && rm -rf /output/wheels +RUN alternatives --set python /usr/bin/python3 +COPY --from=quay.io/project-receptor/receptor:0.9.7 /usr/bin/receptor /usr/bin/receptor +RUN mkdir -p /var/run/receptor +ADD run.sh /run.sh +CMD /run.sh +USER 1000 +RUN git lfs install diff --git a/ansible-builder/context/_build/bindep.txt b/ansible-builder/context/_build/bindep.txt new file mode 100644 index 0000000..bb24848 --- /dev/null +++ b/ansible-builder/context/_build/bindep.txt @@ -0,0 +1,5 @@ +python38-devel [platform:rpm compile] +subversion [platform:rpm] +subversion [platform:dpkg] +git-lfs [platform:rpm] + diff --git a/ansible-builder/context/_build/requirements.txt b/ansible-builder/context/_build/requirements.txt new file mode 100644 index 0000000..57ba1cb --- /dev/null +++ b/ansible-builder/context/_build/requirements.txt @@ -0,0 +1,4 @@ +hcloud +urllib3 +jmespath +git+https://github.com/ansible/ansible-builder.git@devel#egg=ansible-builder \ No newline at end of file diff --git a/ansible-builder/context/_build/requirements.yml b/ansible-builder/context/_build/requirements.yml new file mode 100644 index 0000000..72392e5 --- /dev/null +++ b/ansible-builder/context/_build/requirements.yml @@ -0,0 +1,5 @@ +--- +collections: + - ansible.posix + - hetzner.hcloud + - community.general diff --git a/ansible-builder/context/run.sh b/ansible-builder/context/run.sh new file mode 100755 index 0000000..e96b122 --- /dev/null +++ b/ansible-builder/context/run.sh @@ -0,0 +1,2 @@ +#! /bin/bash +ansible-runner worker --private-data-dir=/runner diff --git a/ansible-builder/execution-environment.yml b/ansible-builder/execution-environment.yml new file mode 100644 index 0000000..b72f09d --- /dev/null +++ b/ansible-builder/execution-environment.yml @@ -0,0 +1,18 @@ +--- +version: 1 +dependencies: + galaxy: requirements.yml + python: requirements.txt + system: bindep.txt + + +additional_build_steps: + append: + - RUN alternatives --set python /usr/bin/python3 + - COPY --from=quay.io/project-receptor/receptor:0.9.7 /usr/bin/receptor /usr/bin/receptor + - RUN mkdir -p /var/run/receptor + - ADD run.sh /run.sh + - CMD /run.sh + - USER 1000 + - RUN git lfs install + diff --git a/ansible-builder/requirements.txt b/ansible-builder/requirements.txt new file mode 100644 index 0000000..57ba1cb --- /dev/null +++ b/ansible-builder/requirements.txt @@ -0,0 +1,4 @@ +hcloud +urllib3 +jmespath +git+https://github.com/ansible/ansible-builder.git@devel#egg=ansible-builder \ No newline at end of file diff --git a/ansible-builder/requirements.yml b/ansible-builder/requirements.yml new file mode 100644 index 0000000..72392e5 --- /dev/null +++ b/ansible-builder/requirements.yml @@ -0,0 +1,5 @@ +--- +collections: + - ansible.posix + - hetzner.hcloud + - community.general diff --git a/create-database.yml b/create-database.yml index 3e1bb16..911a06b 100644 --- a/create-database.yml +++ b/create-database.yml @@ -87,3 +87,5 @@ Content-Type: "application/json" Smardigo-User-Token: "{{ smardigo_management_token }}" status_code: [200] + retries: 5 + delay: 5 diff --git a/create-realm.yml b/create-realm.yml index b20fd4c..0745ccf 100644 --- a/create-realm.yml +++ b/create-realm.yml @@ -34,9 +34,13 @@ gather_facts: false become: false + collections: + - hetzner.hcloud + - community.general + pre_tasks: - name: "Gathering current server infos from hetzner" - hcloud_server_info: + hetzner.hcloud.hcloud_server_info: api_token: "{{ hetzner_authentication_token }}" register: hetzner_server_infos delegate_to: 127.0.0.1 @@ -84,3 +88,5 @@ Content-Type: "application/json" Smardigo-User-Token: "{{ smardigo_management_token }}" status_code: [200] + retries: 5 + delay: 5 diff --git a/create-server.yml b/create-server.yml index 11731f0..bd9e984 100644 --- a/create-server.yml +++ b/create-server.yml @@ -158,3 +158,5 @@ Content-Type: "application/json" Smardigo-User-Token: "{{ smardigo_management_token }}" status_code: [200] + retries: 5 + delay: 5 diff --git a/create-service.yml b/create-service.yml index e124231..5d98eaa 100644 --- a/create-service.yml +++ b/create-service.yml @@ -83,3 +83,5 @@ Content-Type: "application/json" Smardigo-User-Token: "{{ smardigo_management_token }}" status_code: [200] + retries: 5 + delay: 5 diff --git a/dynamic-provisioning.yml b/dynamic-provisioning.yml deleted file mode 100644 index 1df36d5..0000000 --- a/dynamic-provisioning.yml +++ /dev/null @@ -1,249 +0,0 @@ ---- - -############################################################# -# create inventory dynamically for given parameters -############################################################# - -- hosts: localhost - connection: local - gather_facts: false - - pre_tasks: - - name: "Check if ansible version is at least 2.10.x" - assert: - that: - - ansible_version.major >= 2 - - ansible_version.minor >= 10 - msg: "The ansible version has to be at least ({{ ansible_version.full }})" - - tasks: - - name: Add hosts - add_host: - name: "{{ stage }}-{{ name }}-{{ '%02d' | format(item|int) }}" - groups: - - "stage_{{ stage }}" - - "{{ service }}" - - "dynamic_{{ service }}" - with_sequence: start=1 end={{ count }} - -############################################################# -# run provisioning against newly created inventory -############################################################# - -- hosts: "stage_{{ stage }}" - serial: "{{ serial_number | default(5) }}" - gather_facts: false - - pre_tasks: - - name: Get all Firewalls from Hetzner - uri: - url: "https://api.hetzner.cloud/v1/firewalls" - headers: - accept: application/json - authorization: Bearer {{ hetzner_authentication_token }} - return_content: yes - register: hetzner_firewalls_response - delegate_to: 127.0.0.1 - tags: - - update_networks - - - name: Save firewall entries as variable (fact) - set_fact: - hetzner_firewalls_response_json: "{{ hetzner_firewalls_response.json }}" - tags: - - update_networks - - - name: Parse firewall entries - set_fact: - firewall_records: "{{ hetzner_firewalls_response_json.firewalls | json_query(jmesquery) }}" - vars: - jmesquery: '[*].{id: id, name: name}' - tags: - - update_networks - - - name: Print firewall entries - debug: - msg: "{{ firewall_records }}" - tags: - - update_networks - - roles: - - role: hcloud - -############################################################# -# -############################################################# - -- hosts: "stage_{{ stage }}" - serial: "{{ serial_number | default(1) }}" - gather_facts: false - - pre_tasks: - - name: "Gather current server infos" - hcloud_server_info: - api_token: "{{ hetzner_authentication_token }}" - register: hetzner_server_infos - delegate_to: 127.0.0.1 - become: false - - - name: "Set current server infos as fact: hetzner_server_infos_json" - set_fact: - hetzner_server_infos_json: "{{ hetzner_server_infos.hcloud_server_info }}" - delegate_to: 127.0.0.1 - become: false - - - name: "Read ip address for {{ inventory_hostname }}" - set_fact: - stage_server_ip: "{{ item.ipv4_address }}" - when: item.name == inventory_hostname - with_items: "{{ hetzner_server_infos_json }}" - delegate_to: 127.0.0.1 - become: false - -# - name: Print the gathered infos -# debug: -# var: stage_server_ip -# delegate_to: 127.0.0.1 - - - name: Remove {{ stage_server_ip }} keys from known_hosts - shell: ssh-keygen -R {{ stage_server_ip }} - delegate_to: 127.0.0.1 - - - name: Add {{ stage_server_ip }} keys from known_hosts - shell: ssh-keyscan -H {{ stage_server_ip }} >> ~/.ssh/known_hosts - delegate_to: 127.0.0.1 - - - name: Remove {{ inventory_hostname }}.{{ domain }} keys from known_hosts - shell: ssh-keygen -R {{ inventory_hostname }}.{{ domain }} - delegate_to: 127.0.0.1 - - - name: Add {{ inventory_hostname }}.{{ domain }} keys from known_hosts - shell: ssh-keyscan -H {{ inventory_hostname }}.{{ domain }} >> ~/.ssh/known_hosts - delegate_to: 127.0.0.1 - -############################################################# -# run server setup against newly created inventory -############################################################# - -- hosts: "stage_{{ stage }}" - serial: "{{ serial_number | default(5) }}" - remote_user: root - - pre_tasks: - - name: Remove outdated dependencies - apt: - name: [ - 'docker', - 'docker-client', - 'docker-client-latest', - 'docker-common', - 'docker-latest', - 'docker-latest-logrotate', - 'docker-logrotate', - 'docker-engine', - 'smartmontools', - ] - state: 'absent' - when: ansible_distribution == "Ubuntu" - - - name: "Gather current server infos" - hcloud_server_info: - api_token: "{{ hetzner_authentication_token }}" - register: hetzner_server_infos - delegate_to: 127.0.0.1 - become: false - - - name: "Set current server infos as fact: hetzner_server_infos_json" - set_fact: - hetzner_server_infos_json: "{{ hetzner_server_infos.hcloud_server_info }}" - delegate_to: 127.0.0.1 - become: false - - - name: "Read ip address for {{ inventory_hostname }}" - set_fact: - stage_server_ip: "{{ item.ipv4_address }}" - when: item.name == inventory_hostname - with_items: "{{ hetzner_server_infos_json }}" - delegate_to: 127.0.0.1 - become: false - -# - name: Print the gathered infos -# debug: -# var: stage_server_ip -# delegate_to: 127.0.0.1 - - roles: - - role: ansible-role-docker - vars: - docker_compose_version: '1.29.1' - docker_compose_path: '/usr/bin/docker-compose' - docker_users: '{{ smardigo_plattform_users }}' - - - role: common - - - role: filebeat - when: filebeat_enabled | default(True) - - - role: node-exporter - when: node_exporter_enabled | default(True) - - - role: traefik - when: traefik_enabled | default(True) - -############################################################# -# run service setup against newly created inventory -############################################################# - -- hosts: "stage_{{ stage }}" - serial: "{{ serial_number | default(5) }}" - remote_user: root - - pre_tasks: - - name: "Gather current server infos" - hcloud_server_info: - api_token: "{{ hetzner_authentication_token }}" - register: hetzner_server_infos - delegate_to: 127.0.0.1 - become: false - tags: - - update_networks - - - name: "Set current server infos as fact: hetzner_server_infos_json" - set_fact: - hetzner_server_infos_json: "{{ hetzner_server_infos.hcloud_server_info }}" - delegate_to: 127.0.0.1 - become: false - tags: - - update_networks - - - name: "Read ip address for {{ inventory_hostname }}" - set_fact: - stage_server_ip: "{{ item.ipv4_address }}" - when: item.name == inventory_hostname - with_items: "{{ hetzner_server_infos_json }}" - delegate_to: 127.0.0.1 - become: false - tags: - - update_networks - -# - name: Print the gathered infos -# debug: -# var: stage_server_ip -# delegate_to: 127.0.0.1 -# become: false -# tags: -# - update_networks - - roles: - - role: connect - when: "'connect' in group_names" - - role: keycloak - when: "'keycloak' in group_names" - - role: postfix - when: "'postfix' in group_names" - - role: harbor - when: "'harbor' in group_names" - - role: elastic - when: "'elastic' in group_names" - - role: prometheus - when: "'prometheus' in group_names" \ No newline at end of file diff --git a/group_vars/all/plain.yml b/group_vars/all/plain.yml index 740897b..efa9cfc 100644 --- a/group_vars/all/plain.yml +++ b/group_vars/all/plain.yml @@ -49,10 +49,11 @@ default_plattform_users: - '{{ admin_user }}' smardigo_plattform_users: + - 'ansible' + - 'daniel.dz' - 'peter.heise' - 'sven.ketelsen' - 'vanphuong.ma' - - 'daniel.dz' docker_owner: "{{ admin_user }}" docker_group: "{{ admin_user }}" @@ -103,6 +104,7 @@ hetzner_server_type: cx11 hetzner_server_image: ubuntu-20.04 hetzner_ssh_keys: + - ansible@smardigo.digital - peter.heise@arxes-tolina.de - sven.ketelsen@arxes-tolina.de - vanphuong.ma@arxes-tolina.de diff --git a/group_vars/stage_dev/plain.yml b/group_vars/stage_dev/plain.yml index 1f9bd91..ae522b5 100644 --- a/group_vars/stage_dev/plain.yml +++ b/group_vars/stage_dev/plain.yml @@ -8,21 +8,50 @@ alertmanager_channel_smardigo: "#monitoring-qa" shared_service_elastic_01: "10.0.0.2" shared_service_elastic_02: "10.0.0.3" shared_service_elastic_03: "10.0.0.4" -shared_service_prometheus_ip: "10.0.0.5" +shared_service_awx_ip: "10.0.0.10" +shared_service_docker_ip: "10.0.0.7" +shared_service_iam_ip: "10.0.0.13" shared_service_keycloak_ip: "10.0.0.6" shared_service_mail_ip: "10.0.0.8" -shared_service_iam_ip: "10.0.0.13" +shared_service_awx_hostname: dev-awx-01.smardigo.digital +shared_service_docker_registry_hostname: dev-docker-registry-01.smardigo.digital shared_service_iam_hostname: "dev-iam-01.smardigo.digital" shared_service_keycloak_hostname: "dev-keycloak-01.smardigo.digital" shared_service_mail_hostname: "dev-mail-01.smardigo.digital" -keycloak_server_url: "https://{{ shared_service_keycloak_hostname }}" +shared_service_hosts: [ + { + ip: "127.0.1.1", + name: "{{ stage_server_hostname }}" + }, + { + ip: "{{ shared_service_awx_ip }}", + name: "{{ shared_service_awx_hostname }}" + }, + { + ip: "{{ shared_service_docker_ip }}", + name: "{{ shared_service_docker_registry_hostname }}" + }, + { + ip: "{{ shared_service_iam_ip }}", + name: "{{ shared_service_iam_hostname }}" + }, + { + ip: "{{ shared_service_keycloak_ip }}", + name: "{{ shared_service_keycloak_hostname }}" + }, + { + ip: "{{ shared_service_mail_ip }}", + name: "{{ shared_service_mail_hostname }}" + } +] -docker_registry: dev-docker-registry-01.smardigo.digital docker_registry_username: "< see vault >" docker_registry_token: "< see vault >" +keycloak_server_url: "https://{{ shared_service_keycloak_hostname }}" + filebeat_certificate: "dev-elastic-stack-filebeat" logstash_certificate: "dev-elastic-stack-logstash" @@ -76,46 +105,46 @@ kibana_extra_hosts: [ ip: "{{ shared_service_elastic_03 }}", }, ] -prometheus_extra_hosts: [ - { - hostname: "{{ shared_service_mail_hostname }}", - ip: "{{ shared_service_mail_ip }}", - } -] -connect_extra_hosts: [ - { - hostname: "{{ shared_service_iam_hostname }}", - ip: "{{ shared_service_iam_ip }}", - }, - { - hostname: "{{ shared_service_keycloak_hostname }}", - ip: "{{ shared_service_keycloak_ip }}", - }, - { - hostname: "{{ shared_service_mail_hostname }}", - ip: "{{ shared_service_mail_ip }}", - } -] -keycloak_extra_hosts: [ - { - hostname: "{{ shared_service_iam_hostname }}", - ip: "{{ shared_service_iam_ip }}", - }, - { - hostname: "{{ shared_service_mail_hostname }}", - ip: "{{ shared_service_mail_ip }}", - } -] -iam_extra_hosts: [ - { - hostname: "{{ shared_service_keycloak_hostname }}", - ip: "{{ shared_service_keycloak_ip }}", - }, - { - hostname: "{{ shared_service_mail_hostname }}", - ip: "{{ shared_service_mail_ip }}", - } -] +#prometheus_extra_hosts: [ +# { +# hostname: "{{ shared_service_mail_hostname }}", +# ip: "{{ shared_service_mail_ip }}", +# } +#] +#connect_extra_hosts: [ +# { +# hostname: "{{ shared_service_iam_hostname }}", +# ip: "{{ shared_service_iam_ip }}", +# }, +# { +# hostname: "{{ shared_service_keycloak_hostname }}", +# ip: "{{ shared_service_keycloak_ip }}", +# }, +# { +# hostname: "{{ shared_service_mail_hostname }}", +# ip: "{{ shared_service_mail_ip }}", +# } +#] +#keycloak_extra_hosts: [ +# { +# hostname: "{{ shared_service_iam_hostname }}", +# ip: "{{ shared_service_iam_ip }}", +# }, +# { +# hostname: "{{ shared_service_mail_hostname }}", +# ip: "{{ shared_service_mail_ip }}", +# } +#] +#iam_extra_hosts: [ +# { +# hostname: "{{ shared_service_keycloak_hostname }}", +# ip: "{{ shared_service_keycloak_ip }}", +# }, +# { +# hostname: "{{ shared_service_mail_hostname }}", +# ip: "{{ shared_service_mail_ip }}", +# } +#] smardigo_management_url: "https://dev-management-smardigo-01.smardigo.digital/api/v1/scopes/{{ scope_id }}/processes/{{ process_instance_id }}/messages" smardigo_management_token: "eyJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiYWxnIjoiZGlyIn0..JgixZcmsSyvovabQvREAjw.Fk7aNYwOjzMhLCqF_9unl5yrWTey26z4scZBeVZjhpE.fnovrqn0MUjM_TA8zVhXdQ" \ No newline at end of file diff --git a/host_vars/dev-awx-01.yml b/host_vars/dev-awx-01.yml new file mode 100644 index 0000000..f742cf5 --- /dev/null +++ b/host_vars/dev-awx-01.yml @@ -0,0 +1,5 @@ +--- + +hetzner_server_labels: "stage={{ stage }} service=awx" + +hetzner_server_type: cpx31 diff --git a/host_vars/dev-docker-registry-01.yml b/host_vars/dev-docker-registry-01.yml index 10a60d8..0e49d25 100644 --- a/host_vars/dev-docker-registry-01.yml +++ b/host_vars/dev-docker-registry-01.yml @@ -1,5 +1,5 @@ --- -hetzner_server_labels: "stage={{ stage }} service=docker" +hetzner_server_labels: "stage={{ stage }} service=harbor" hetzner_server_type: cpx31 diff --git a/host_vars/dev-elastic-stack-01.yml b/host_vars/dev-elastic-stack-01.yml index 61e3733..2d84211 100644 --- a/host_vars/dev-elastic-stack-01.yml +++ b/host_vars/dev-elastic-stack-01.yml @@ -5,6 +5,7 @@ hetzner_server_labels: "stage={{ stage }} service=elastic" hetzner_server_type: cx31 smardigo_plattform_users: + - 'ansible' - 'elastic' - 'peter.heise' - 'sven.ketelsen' diff --git a/host_vars/dev-elastic-stack-02.yml b/host_vars/dev-elastic-stack-02.yml index 61e3733..2d84211 100644 --- a/host_vars/dev-elastic-stack-02.yml +++ b/host_vars/dev-elastic-stack-02.yml @@ -5,6 +5,7 @@ hetzner_server_labels: "stage={{ stage }} service=elastic" hetzner_server_type: cx31 smardigo_plattform_users: + - 'ansible' - 'elastic' - 'peter.heise' - 'sven.ketelsen' diff --git a/host_vars/dev-elastic-stack-03.yml b/host_vars/dev-elastic-stack-03.yml index 61e3733..2d84211 100644 --- a/host_vars/dev-elastic-stack-03.yml +++ b/host_vars/dev-elastic-stack-03.yml @@ -5,6 +5,7 @@ hetzner_server_labels: "stage={{ stage }} service=elastic" hetzner_server_type: cx31 smardigo_plattform_users: + - 'ansible' - 'elastic' - 'peter.heise' - 'sven.ketelsen' diff --git a/roles/common/configs/docker/config.json.j2 b/roles/common/configs/docker/config.json.j2 index 6c54bf7..bd6463d 100644 --- a/roles/common/configs/docker/config.json.j2 +++ b/roles/common/configs/docker/config.json.j2 @@ -1,6 +1,6 @@ { "auths": { - "{{ docker_registry }}": { + "{{ shared_service_docker_registry_hostname }}": { "auth": "{{ [docker_registry_username, docker_registry_token] | join(":") | string | b64encode }}" } } diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 5af442a..cc2d65a 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -38,13 +38,16 @@ hostname: name: "{{ stage_server_hostname }}" -- name: Add hostname to /etc/hosts file - lineinfile: - dest: /etc/hosts - regexp: '^127\.0\.1\.1' - line: "127.0.1.1 {{ stage_server_hostname }}" +- name: "Setting hosts configuration in /etc/hosts" + blockinfile: + marker: "# {mark} managed by ansible (hosts config for {{ stage_server_hostname }})" + path: "/etc/hosts" state: present - when: ansible_facts['distribution'] == "Ubuntu" + create: yes + block: | + {% for host in shared_service_hosts %} + {{ host.ip }} {{ host.name }} + {% endfor %} - name: "Read current users" shell: "getent passwd | awk -F: '$3 > 999 {print $1}'" @@ -75,7 +78,7 @@ # TODO check usage of key_options "no-agent-forwarding, no-agent-forwarding, no-X11-forwarding" - name: "Set up authorized users" - authorized_key: + ansible.posix.authorized_key: user: '{{ item }}' state: present exclusive: true diff --git a/roles/connect/defaults/main.yml b/roles/connect/defaults/main.yml index 61e9896..f54ddb7 100644 --- a/roles/connect/defaults/main.yml +++ b/roles/connect/defaults/main.yml @@ -2,7 +2,7 @@ connect_service_name: "{{ service_name }}-connect" -connect_image_name: "{{ docker_registry }}/smardigo/connect-whitelabel-app" +connect_image_name: "{{ shared_service_docker_registry_hostname }}/smardigo/connect-whitelabel-app" connect_version: 'latest' connect_admin_username: "connect-admin" diff --git a/roles/hcloud/tasks/_read_server_names.yml b/roles/hcloud/tasks/_read_server_names.yml new file mode 100644 index 0000000..e296101 --- /dev/null +++ b/roles/hcloud/tasks/_read_server_names.yml @@ -0,0 +1,29 @@ +--- + +- name: "Gathering current server infos for group {{ current_server_group.name }} from hetzner" + hcloud_server_info: + api_token: "{{ hetzner_authentication_token }}" + label_selector: "{{ current_server_group.label_selector }}" + register: current_server_infos + delegate_to: 127.0.0.1 + become: false + tags: + - update_config + +- name: "Setting server group as fact: server_group_{{ current_server_group.name }}" + set_fact: + server_group_{{ current_server_group.name }}: "{{ current_server_infos.hcloud_server_info | json_query(querystr) }}" + vars: + querystr: "[*].name" + delegate_to: 127.0.0.1 + become: false + tags: + - update_config + +- name: "Printing server group {{ current_server_group.name }}" + debug: + msg: "{{ lookup('vars', 'server_group_' + current_server_group.name) }}" + delegate_to: 127.0.0.1 + become: false + tags: + - update_config \ No newline at end of file diff --git a/roles/hcloud/tasks/main.yml b/roles/hcloud/tasks/main.yml index 4f738f0..140a8b6 100644 --- a/roles/hcloud/tasks/main.yml +++ b/roles/hcloud/tasks/main.yml @@ -63,11 +63,11 @@ vars: current_firewall_name: '{{ current_firewall }}' with_items: + - 'awx' - 'default' + - 'docker' - 'kibana' - - 'mail' - 'monitoring' - - 'docker' loop_control: loop_var: current_firewall tags: diff --git a/roles/hcloud/templates/firewall-mail.json.j2 b/roles/hcloud/templates/firewall-awx.json.j2 similarity index 66% rename from roles/hcloud/templates/firewall-mail.json.j2 rename to roles/hcloud/templates/firewall-awx.json.j2 index 321ec16..b42e8c7 100644 --- a/roles/hcloud/templates/firewall-mail.json.j2 +++ b/roles/hcloud/templates/firewall-awx.json.j2 @@ -1,14 +1,16 @@ { - "name": "mail", + "name": "awx", "labels": { }, "rules": [ { "direction": "in", "protocol": "tcp", - "port": "25", + "port": "32000", "source_ips": [ "149.233.6.129/32", + "212.121.131.106/32", + "87.150.34.206/32" ], "destination_ips": [ ] diff --git a/roles/hcloud/templates/firewall-docker.json.j2 b/roles/hcloud/templates/firewall-docker.json.j2 index 815af46..9a570f9 100644 --- a/roles/hcloud/templates/firewall-docker.json.j2 +++ b/roles/hcloud/templates/firewall-docker.json.j2 @@ -8,10 +8,9 @@ "protocol": "tcp", "port": "443", "source_ips": [ - "116.203.130.110/32", "157.90.236.71/32", "162.55.54.246/32", - "159.69.46.214/32" + "162.55.63.118/32" ], "destination_ips": [ ] diff --git a/roles/prometheus/tasks/main.yml b/roles/prometheus/tasks/main.yml index f6c56c9..2cdfac0 100644 --- a/roles/prometheus/tasks/main.yml +++ b/roles/prometheus/tasks/main.yml @@ -72,6 +72,37 @@ tags: - update_config +- name: "Reading current server groups from hetzner" + include_role: + name: hcloud + tasks_from: _read_server_names + with_items: [ + { + name: "all", + label_selector: "stage={{ stage }}", + }, + { + name: "harbor", + label_selector: "stage={{ stage }},service=harbor", + }, + { + name: "connect", + label_selector: "stage={{ stage }},service=connect", + }, + { + name: "elastic", + label_selector: "stage={{ stage }},service=elastic", + }, + { + name: "mail", + label_selector: "stage={{ stage }},service=mail", + } + ] + loop_control: + loop_var: current_server_group + tags: + - update_config + - name: "Deploy service templates for {{ service_name }}" include_role: name: _deploy diff --git a/smardigo/provisioning/form/header.json b/smardigo/provisioning/form/header.json index e7e7678..e769b51 100644 --- a/smardigo/provisioning/form/header.json +++ b/smardigo/provisioning/form/header.json @@ -3,7 +3,7 @@ "configKey" : "header", "page" : 0, "components" : [ { - "input" : false, + "input" : false, "tableView" : false, "columns" : [ { "components" : [ { @@ -43,6 +43,7 @@ "selectValues" : "", "disableLimit" : false, "template" : "{{[item.firstName, item.lastName].filter(Boolean).join(' ')}}", + "searchEnabled" : false, "placeholder" : "", "prefix" : "", "customClass" : "", @@ -65,6 +66,7 @@ "dbIndex" : false, "customDefaultValue" : "", "calculateValue" : "", + "allowCalculateOverride" : false, "widget" : null, "refreshOn" : "", "clearOnRefresh" : false, @@ -74,23 +76,32 @@ "when" : null, "eq" : "" }, + "limit" : 100, "filter" : "", - "searchEnabled" : false, "searchField" : "", "minSearch" : 0, + "readOnlyValue" : false, "authenticate" : false, "selectFields" : "", - "id" : "eiwhw5a" + "customSearchCriteria" : "", + "searchThreshold" : 0.3, + "fuseOptions" : { }, + "customOptions" : { }, + "infiniteScroll" : false, + "clearValueIfNotInItems" : false, + "clientSideFilter" : "", + "id" : "evydmbo" } ], "width" : 4, "offset" : 0, "push" : 0, "pull" : 0, "type" : "column", - "input" : true, - "key" : "", + "input" : false, + "key" : "column1", "tableView" : true, "label" : "", + "hideOnChildrenHidden" : false, "placeholder" : "", "prefix" : "", "customClass" : "", @@ -116,6 +127,7 @@ "dbIndex" : false, "customDefaultValue" : "", "calculateValue" : "", + "allowCalculateOverride" : false, "widget" : null, "refreshOn" : "", "clearOnRefresh" : false, @@ -130,7 +142,7 @@ "when" : null, "eq" : "" }, - "id" : "eshoyow" + "id" : "e9u3jbf" }, { "components" : [ { "labelPosition" : "left-right", @@ -151,16 +163,68 @@ "mode" : "single", "enableTime" : true, "noCalendar" : false, - "format" : "dd-MM-yyyy", + "format" : "dd.MM.yyyy", "defaultDate" : "", "hourIncrement" : 1, "minuteIncrement" : 1, "time_24hr" : false, "minDate" : null, - "maxDate" : null + "maxDate" : null, + "icons" : "fontawesome", + "i18n" : { + "lng" : "en", + "resources" : { + "de" : { + "translation" : { + "complete" : "Eingabe vollständig", + "error" : "Bitte beheben Sie vor dem Abschicken folgende Fehler.", + "required" : "{{field}} ist ein Pflichtfeld", + "pattern" : "{{field}} entspricht nicht dem Muster {{pattern}}", + "minLength" : "{{field}} muss länger als {{length}} Zeichen sein.", + "maxLength" : "{{field}} muss kürzer als {{length}} Zeichen sein.", + "min" : "{{field}} darf nicht kleiner als {{min}} sein.", + "max" : "{{field}} darf nicht größer als {{max}} sein.", + "invalid_email" : "{{field}} ist keine valide E-Mail-Adresse.", + "invalid_regex" : "{{field}} entspricht nicht dem Muster {{regex}}.", + "invalid_date" : "{{field}} ist kein valides Datum.", + "mask" : "{{field}} entspricht nicht der Maske.", + "stripe" : "{{stripe}}", + "month" : "Monat", + "day" : "Tag", + "year" : "Jahr", + "january" : "Januar", + "february" : "Februar", + "march" : "März", + "april" : "April", + "may" : "Mai", + "june" : "Juni", + "july" : "Juli", + "august" : "August", + "september" : "September", + "october" : "Oktober", + "november" : "November", + "december" : "Dezember", + "next" : "Weiter", + "previous" : "Zurück", + "cancel" : "Abbrechen", + "submit" : "Vorgang starten", + "dualMultiselect_filterPlaceholder" : "Tippen um zu filtern.", + "dualMultiselect_labelAll" : "Alle Werte", + "dualMultiselect_labelSelected" : "Ausgewählte Werte", + "dualMultiselect_buttonSelectAll" : "Alle auswählen", + "dualMultiselect_buttonDeselectAll" : "Alle abwählen", + "listSelection_buttonSelectAriaLabel" : "Eintrag Auswählen", + "mapView_zoomInButton" : "Vergrößern", + "mapView_zoomOutButton" : "Verkleinern", + "selectComponent_searchPlaceholder" : "Tippe um zu Suchen...", + "selectComponent_noChoicesText" : "Keine Elemente zur Auswahl", + "selectComponent_noResultsText" : "Keine Ergebnisse gefunden" + } + } + } + } }, "defaultValue" : "", - "defaultDate" : "", "placeholder" : "", "prefix" : "", "customClass" : "", @@ -183,6 +247,7 @@ "dbIndex" : false, "customDefaultValue" : "", "calculateValue" : "", + "allowCalculateOverride" : false, "refreshOn" : "", "clearOnRefresh" : false, "validateOn" : "change", @@ -200,6 +265,7 @@ "allowInput" : true, "enableDate" : true, "enableTime" : true, + "defaultDate" : "", "displayInTimezone" : "viewer", "timezone" : "", "datepickerMode" : "day", @@ -222,17 +288,18 @@ "mousewheel" : true, "arrowkeys" : true }, - "id" : "epdpyie" + "id" : "ef2amw" } ], "width" : 4, "offset" : 0, "push" : 0, "pull" : 0, "type" : "column", - "input" : true, - "key" : "", + "input" : false, + "key" : "column2", "tableView" : true, "label" : "", + "hideOnChildrenHidden" : false, "placeholder" : "", "prefix" : "", "customClass" : "", @@ -258,6 +325,7 @@ "dbIndex" : false, "customDefaultValue" : "", "calculateValue" : "", + "allowCalculateOverride" : false, "widget" : null, "refreshOn" : "", "clearOnRefresh" : false, @@ -272,7 +340,7 @@ "when" : null, "eq" : "" }, - "id" : "ezh6tkh" + "id" : "efau92d" }, { "components" : [ { "input" : true, @@ -296,6 +364,7 @@ "labelWidth" : 40, "disabled" : true, "lockKey" : true, + "widget" : null, "placeholder" : "", "prefix" : "", "customClass" : "", @@ -315,7 +384,7 @@ "dbIndex" : false, "customDefaultValue" : "", "calculateValue" : "", - "widget" : null, + "allowCalculateOverride" : false, "refreshOn" : "", "clearOnRefresh" : false, "validateOn" : "change", @@ -332,17 +401,18 @@ "mask" : false, "inputType" : "text", "inputMask" : "", - "id" : "eay7qmt" + "id" : "ea7hs5" } ], "width" : 4, "offset" : 0, "push" : 0, "pull" : 0, "type" : "column", - "input" : true, - "key" : "", + "input" : false, + "key" : "column3", "tableView" : true, "label" : "", + "hideOnChildrenHidden" : false, "placeholder" : "", "prefix" : "", "customClass" : "", @@ -368,6 +438,7 @@ "dbIndex" : false, "customDefaultValue" : "", "calculateValue" : "", + "allowCalculateOverride" : false, "widget" : null, "refreshOn" : "", "clearOnRefresh" : false, @@ -382,7 +453,7 @@ "when" : null, "eq" : "" }, - "id" : "ex6xngr" + "id" : "ez9z05q" } ], "type" : "columns", "tags" : [ ], @@ -395,6 +466,7 @@ "" : "" }, "label" : "Columns", + "key" : "columns", "placeholder" : "", "prefix" : "", "customClass" : "", @@ -420,6 +492,7 @@ "dbIndex" : false, "customDefaultValue" : "", "calculateValue" : "", + "allowCalculateOverride" : false, "widget" : null, "refreshOn" : "", "clearOnRefresh" : false, @@ -430,6 +503,7 @@ "customPrivate" : false }, "autoAdjust" : false, - "id" : "eoi1e6" + "hideOnChildrenHidden" : false, + "id" : "eqtnze" } ] } \ No newline at end of file diff --git a/smardigo/provisioning/form/simple-connect.json b/smardigo/provisioning/form/simple-connect.json index 90ffe6e..347f068 100644 --- a/smardigo/provisioning/form/simple-connect.json +++ b/smardigo/provisioning/form/simple-connect.json @@ -1,653 +1,681 @@ { - "name": "Simple Connect", - "configKey": "simple-connect", - "page": 0, - "components": [ - { - "label": "Cluster", - "mask": false, - "tableView": true, - "alwaysEnabled": false, - "type": "container", - "input": true, - "key": "cluster", - "validate": { - "customMessage": "", - "json": "", - "required": false, - "custom": "", - "customPrivate": false - }, - "conditional": { - "show": "", - "when": "", - "json": "", - "eq": "" - }, - "components": [ - { - "label": "Cluster", - "mask": false, - "tableView": true, - "alwaysEnabled": false, - "type": "well", - "input": false, - "key": "cluster", - "conditional": { - "show": "", - "when": "", - "json": "", - "eq": "" - }, - "components": [ - { - "label": "Stage", - "labelPosition": "left-left", - "allowMultipleMasks": false, - "showWordCount": false, - "showCharCount": false, - "disabled": true, - "tableView": true, - "alwaysEnabled": false, - "type": "textfield", - "input": true, - "key": "stage", - "defaultValue": "", - "validate": { - "customMessage": "", - "json": "", - "required": true, - "minLength": null, - "maxLength": null, - "minWords": null, - "maxWords": null, - "custom": "", - "customPrivate": false, - "pattern": "" - }, - "conditional": { - "show": "", - "when": "", - "json": "", - "eq": "" - }, - "tabs": null, - "inputFormat": "plain", - "encrypted": false, - "properties": { - }, - "tags": [ - ], - "customConditional": "", - "logic": [ - ], - "widget": { - "type": "", - "format": "yyyy-MM-dd hh:mm a", - "dateFormat": "yyyy-MM-dd hh:mm a", - "saveAs": "text" - }, - "reorder": false, - "placeholder": "", - "prefix": "", - "customClass": "", - "suffix": "", - "multiple": false, - "protected": false, - "unique": false, - "persistent": true, - "hidden": false, - "clearOnHide": true, - "dataGridLabel": false, - "labelWidth": 30, - "labelMargin": 3, - "description": "", - "errorLabel": "", - "tooltip": "", - "hideLabel": false, - "tabindex": "", - "autofocus": false, - "dbIndex": false, - "customDefaultValue": "", - "calculateValue": "", - "allowCalculateOverride": false, - "refreshOn": "", - "clearOnRefresh": false, - "validateOn": "change", - "mask": false, - "inputType": "text", - "inputMask": "", - "id": "ew5yzbt" - }, - { - "label": "Name", - "labelPosition": "left-left", - "allowMultipleMasks": false, - "showWordCount": false, - "showCharCount": false, - "tableView": true, - "alwaysEnabled": false, - "type": "textfield", - "input": true, - "key": "name", - "defaultValue": "", - "validate": { - "customMessage": "", - "json": "", - "required": true, - "minLength": null, - "maxLength": null, - "minWords": null, - "maxWords": null, - "custom": "", - "customPrivate": false, - "pattern": "" - }, - "conditional": { - "show": "", - "when": "", - "json": "", - "eq": "" - }, - "tabs": null, - "inputFormat": "plain", - "encrypted": false, - "properties": { - }, - "tags": [ - ], - "customConditional": "", - "logic": [ - ], - "widget": { - "type": "", - "format": "yyyy-MM-dd hh:mm a", - "dateFormat": "yyyy-MM-dd hh:mm a", - "saveAs": "text" - }, - "reorder": false, - "placeholder": "", - "prefix": "", - "customClass": "", - "suffix": "", - "multiple": false, - "protected": false, - "unique": false, - "persistent": true, - "hidden": false, - "clearOnHide": true, - "dataGridLabel": false, - "labelWidth": 30, - "labelMargin": 3, - "description": "", - "errorLabel": "", - "tooltip": "", - "hideLabel": false, - "tabindex": "", - "disabled": false, - "autofocus": false, - "dbIndex": false, - "customDefaultValue": "", - "calculateValue": "", - "allowCalculateOverride": false, - "refreshOn": "", - "clearOnRefresh": false, - "validateOn": "change", - "mask": false, - "inputType": "text", - "inputMask": "", - "id": "egdtruh" - }, - { - "label": "Size", - "labelPosition": "left-left", - "mask": false, - "disabled": true, - "tableView": true, - "alwaysEnabled": false, - "type": "number", - "input": true, - "key": "size", - "validate": { - "customMessage": "", - "json": "", - "required": true, - "min": null, - "max": null, - "custom": "", - "customPrivate": false, - "step": "any", - "integer": "" - }, - "conditional": { - "show": "", - "when": "", - "json": "", - "eq": "" - }, - "tabs": null, - "properties": { - }, - "tags": [ - ], - "delimiter": false, - "requireDecimal": false, - "encrypted": false, - "decimalLimit": null, - "customConditional": "", - "logic": [ - ], - "reorder": false, - "placeholder": "", - "prefix": "", - "customClass": "", - "suffix": "", - "multiple": false, - "defaultValue": null, - "protected": false, - "unique": false, - "persistent": true, - "hidden": false, - "clearOnHide": true, - "dataGridLabel": false, - "labelWidth": 30, - "labelMargin": 3, - "description": "", - "errorLabel": "", - "tooltip": "", - "hideLabel": false, - "tabindex": "", - "autofocus": false, - "dbIndex": false, - "customDefaultValue": "", - "calculateValue": "", - "allowCalculateOverride": false, - "widget": null, - "refreshOn": "", - "clearOnRefresh": false, - "validateOn": "change", - "id": "e33y58" - }, - { - "label": "Service", - "labelPosition": "left-left", - "allowMultipleMasks": false, - "showWordCount": false, - "showCharCount": false, - "disabled": true, - "tableView": true, - "alwaysEnabled": false, - "type": "textfield", - "input": true, - "key": "service", - "defaultValue": "", - "validate": { - "customMessage": "", - "json": "", - "required": true, - "minLength": null, - "maxLength": null, - "minWords": null, - "maxWords": null, - "custom": "", - "customPrivate": false, - "pattern": "" - }, - "conditional": { - "show": "", - "when": "", - "json": "", - "eq": "" - }, - "tabs": null, - "inputFormat": "plain", - "encrypted": false, - "properties": { - }, - "tags": [ - ], - "customConditional": "", - "logic": [ - ], - "widget": { - "type": "", - "format": "yyyy-MM-dd hh:mm a", - "dateFormat": "yyyy-MM-dd hh:mm a", - "saveAs": "text" - }, - "reorder": false, - "placeholder": "", - "prefix": "", - "customClass": "", - "suffix": "", - "multiple": false, - "protected": false, - "unique": false, - "persistent": true, - "hidden": false, - "clearOnHide": true, - "dataGridLabel": false, - "labelWidth": 30, - "labelMargin": 3, - "description": "", - "errorLabel": "", - "tooltip": "", - "hideLabel": false, - "tabindex": "", - "autofocus": false, - "dbIndex": false, - "customDefaultValue": "", - "calculateValue": "", - "allowCalculateOverride": false, - "refreshOn": "", - "clearOnRefresh": false, - "validateOn": "change", - "mask": false, - "inputType": "text", - "inputMask": "", - "id": "eu0zrp9" - } - ], - "tabs": null, - "reorder": false, - "properties": { - }, - "tags": null, - "customConditional": "", - "logic": [ - ], - "placeholder": "", - "prefix": "", - "customClass": "", - "suffix": "", - "multiple": false, - "defaultValue": null, - "protected": false, - "unique": false, - "persistent": false, - "hidden": false, - "clearOnHide": true, - "dataGridLabel": false, - "labelPosition": "top", - "labelWidth": 30, - "labelMargin": 3, - "description": "", - "errorLabel": "", - "tooltip": "", - "hideLabel": false, - "tabindex": "", - "disabled": false, - "autofocus": false, - "dbIndex": false, - "customDefaultValue": "", - "calculateValue": "", - "allowCalculateOverride": false, - "widget": null, - "refreshOn": "", - "clearOnRefresh": false, - "validateOn": "change", - "validate": { - "required": false, - "custom": "", - "customPrivate": false - }, - "id": "e60dk9" - } - ], - "tabs": null, - "encrypted": false, - "properties": { - }, - "tags": [ - ], - "customConditional": "", - "logic": [ - ], - "reorder": false, - "placeholder": "", - "prefix": "", - "customClass": "", - "suffix": "", - "multiple": false, - "defaultValue": null, - "protected": false, - "unique": false, - "persistent": true, - "hidden": false, - "clearOnHide": true, - "dataGridLabel": false, - "labelPosition": "top", - "labelWidth": 30, - "labelMargin": 3, - "description": "", - "errorLabel": "", - "tooltip": "", - "hideLabel": false, - "tabindex": "", - "disabled": false, - "autofocus": false, - "dbIndex": false, - "customDefaultValue": "", - "calculateValue": "", - "allowCalculateOverride": false, - "widget": null, - "refreshOn": "", - "clearOnRefresh": false, - "validateOn": "change", - "tree": true, - "id": "eu5stp" + "name" : "Simple Connect", + "configKey" : "simple-connect", + "page" : 0, + "components" : [ { + "label" : "Cluster", + "mask" : false, + "tableView" : true, + "alwaysEnabled" : false, + "type" : "container", + "input" : true, + "key" : "cluster", + "validate" : { + "customMessage" : "", + "json" : "", + "required" : false, + "custom" : "", + "customPrivate" : false }, - { - "label": "progress_current", - "labelPosition": "left-left", - "hidden": true, - "mask": false, - "tableView": true, - "alwaysEnabled": false, - "type": "number", - "input": true, - "key": "progress_current", - "validate": { - "customMessage": "", - "json": "", - "required": false, - "custom": "", - "customPrivate": false, - "min": "", - "max": "", - "step": "any", - "integer": "" - }, - "conditional": { - "show": "", - "when": "", - "json": "", - "eq": "" - }, - "tabs": null, - "delimiter": false, - "requireDecimal": false, - "encrypted": false, - "properties": { - }, - "tags": [ - ], - "decimalLimit": null, - "customConditional": "", - "logic": [ - ], - "reorder": false, - "placeholder": "", - "prefix": "", - "customClass": "", - "suffix": "", - "multiple": false, - "defaultValue": null, - "protected": false, - "unique": false, - "persistent": true, - "clearOnHide": true, - "dataGridLabel": false, - "labelWidth": 30, - "labelMargin": 3, - "description": "", - "errorLabel": "", - "tooltip": "", - "hideLabel": false, - "tabindex": "", - "disabled": false, - "autofocus": false, - "dbIndex": false, - "customDefaultValue": "", - "calculateValue": "", - "allowCalculateOverride": false, - "widget": null, - "refreshOn": "", - "clearOnRefresh": false, - "validateOn": "change", - "id": "exepewd" + "conditional" : { + "show" : "", + "when" : "", + "json" : "", + "eq" : "" }, - { - "label": "progress_max", - "labelPosition": "left-left", - "hidden": true, - "mask": false, - "tableView": true, - "alwaysEnabled": false, - "type": "number", - "input": true, - "key": "progress_max", - "validate": { - "customMessage": "", - "json": "", - "required": false, - "custom": "", - "customPrivate": false, - "min": "", - "max": "", - "step": "any", - "integer": "" - }, - "conditional": { - "show": "", - "when": "", - "json": "", - "eq": "" + "components" : [ { + "label" : "Cluster", + "mask" : false, + "tableView" : true, + "alwaysEnabled" : false, + "type" : "well", + "input" : false, + "key" : "cluster", + "conditional" : { + "show" : "", + "when" : "", + "json" : "", + "eq" : "" }, - "tabs": null, - "delimiter": false, - "requireDecimal": false, - "encrypted": false, - "decimalLimit": null, - "properties": { + "components" : [ { + "label" : "Stage", + "labelPosition" : "left-left", + "allowMultipleMasks" : false, + "showWordCount" : false, + "showCharCount" : false, + "disabled" : true, + "tableView" : true, + "alwaysEnabled" : false, + "type" : "textfield", + "input" : true, + "key" : "stage", + "defaultValue" : "", + "validate" : { + "customMessage" : "", + "json" : "", + "required" : true, + "minLength" : null, + "maxLength" : null, + "minWords" : null, + "maxWords" : null, + "custom" : "", + "customPrivate" : false, + "pattern" : "" + }, + "conditional" : { + "show" : "", + "when" : "", + "json" : "", + "eq" : "" + }, + "tabs" : null, + "inputFormat" : "plain", + "encrypted" : false, + "properties" : { }, + "tags" : [ ], + "customConditional" : "", + "logic" : [ ], + "widget" : { + "type" : "", + "format" : "yyyy-MM-dd hh:mm a", + "dateFormat" : "yyyy-MM-dd hh:mm a", + "saveAs" : "text" + }, + "reorder" : false, + "placeholder" : "", + "prefix" : "", + "customClass" : "", + "suffix" : "", + "multiple" : false, + "protected" : false, + "unique" : false, + "persistent" : true, + "hidden" : false, + "clearOnHide" : true, + "dataGridLabel" : false, + "labelWidth" : 30, + "labelMargin" : 3, + "description" : "", + "errorLabel" : "", + "tooltip" : "", + "hideLabel" : false, + "tabindex" : "", + "autofocus" : false, + "dbIndex" : false, + "customDefaultValue" : "", + "calculateValue" : "", + "allowCalculateOverride" : false, + "refreshOn" : "", + "clearOnRefresh" : false, + "validateOn" : "change", + "mask" : false, + "inputType" : "text", + "inputMask" : "", + "id" : "eigbtac" + }, { + "label" : "Name", + "labelPosition" : "left-left", + "allowMultipleMasks" : false, + "showWordCount" : false, + "showCharCount" : false, + "tableView" : true, + "alwaysEnabled" : false, + "type" : "textfield", + "input" : true, + "key" : "name", + "defaultValue" : "", + "validate" : { + "customMessage" : "", + "json" : "", + "required" : true, + "minLength" : null, + "maxLength" : null, + "minWords" : null, + "maxWords" : null, + "custom" : "", + "customPrivate" : false, + "pattern" : "" + }, + "conditional" : { + "show" : "", + "when" : "", + "json" : "", + "eq" : "" + }, + "tabs" : null, + "inputFormat" : "plain", + "encrypted" : false, + "properties" : { }, + "tags" : [ ], + "customConditional" : "", + "logic" : [ ], + "widget" : { + "type" : "", + "format" : "yyyy-MM-dd hh:mm a", + "dateFormat" : "yyyy-MM-dd hh:mm a", + "saveAs" : "text" + }, + "reorder" : false, + "placeholder" : "", + "prefix" : "", + "customClass" : "", + "suffix" : "", + "multiple" : false, + "protected" : false, + "unique" : false, + "persistent" : true, + "hidden" : false, + "clearOnHide" : true, + "dataGridLabel" : false, + "labelWidth" : 30, + "labelMargin" : 3, + "description" : "", + "errorLabel" : "", + "tooltip" : "", + "hideLabel" : false, + "tabindex" : "", + "disabled" : false, + "autofocus" : false, + "dbIndex" : false, + "customDefaultValue" : "", + "calculateValue" : "", + "allowCalculateOverride" : false, + "refreshOn" : "", + "clearOnRefresh" : false, + "validateOn" : "change", + "mask" : false, + "inputType" : "text", + "inputMask" : "", + "id" : "e4a12rg" + }, { + "label" : "Size", + "labelPosition" : "left-left", + "mask" : false, + "disabled" : true, + "tableView" : true, + "alwaysEnabled" : false, + "type" : "number", + "input" : true, + "key" : "size", + "validate" : { + "customMessage" : "", + "json" : "", + "required" : true, + "min" : null, + "max" : null, + "custom" : "", + "customPrivate" : false, + "step" : "any", + "integer" : "" + }, + "conditional" : { + "show" : "", + "when" : "", + "json" : "", + "eq" : "" + }, + "tabs" : null, + "properties" : { }, + "tags" : [ ], + "delimiter" : false, + "requireDecimal" : false, + "encrypted" : false, + "decimalLimit" : null, + "customConditional" : "", + "logic" : [ ], + "reorder" : false, + "placeholder" : "", + "prefix" : "", + "customClass" : "", + "suffix" : "", + "multiple" : false, + "defaultValue" : null, + "protected" : false, + "unique" : false, + "persistent" : true, + "hidden" : false, + "clearOnHide" : true, + "dataGridLabel" : false, + "labelWidth" : 30, + "labelMargin" : 3, + "description" : "", + "errorLabel" : "", + "tooltip" : "", + "hideLabel" : false, + "tabindex" : "", + "autofocus" : false, + "dbIndex" : false, + "customDefaultValue" : "", + "calculateValue" : "", + "allowCalculateOverride" : false, + "widget" : null, + "refreshOn" : "", + "clearOnRefresh" : false, + "validateOn" : "change", + "id" : "er1boyl" + }, { + "label" : "Service", + "labelPosition" : "left-left", + "allowMultipleMasks" : false, + "showWordCount" : false, + "showCharCount" : false, + "disabled" : true, + "tableView" : true, + "alwaysEnabled" : false, + "type" : "textfield", + "input" : true, + "key" : "service", + "defaultValue" : "", + "validate" : { + "customMessage" : "", + "json" : "", + "required" : true, + "minLength" : null, + "maxLength" : null, + "minWords" : null, + "maxWords" : null, + "custom" : "", + "customPrivate" : false, + "pattern" : "" + }, + "conditional" : { + "show" : "", + "when" : "", + "json" : "", + "eq" : "" + }, + "tabs" : null, + "inputFormat" : "plain", + "encrypted" : false, + "properties" : { }, + "tags" : [ ], + "customConditional" : "", + "logic" : [ ], + "widget" : { + "type" : "", + "format" : "yyyy-MM-dd hh:mm a", + "dateFormat" : "yyyy-MM-dd hh:mm a", + "saveAs" : "text" + }, + "reorder" : false, + "placeholder" : "", + "prefix" : "", + "customClass" : "", + "suffix" : "", + "multiple" : false, + "protected" : false, + "unique" : false, + "persistent" : true, + "hidden" : false, + "clearOnHide" : true, + "dataGridLabel" : false, + "labelWidth" : 30, + "labelMargin" : 3, + "description" : "", + "errorLabel" : "", + "tooltip" : "", + "hideLabel" : false, + "tabindex" : "", + "autofocus" : false, + "dbIndex" : false, + "customDefaultValue" : "", + "calculateValue" : "", + "allowCalculateOverride" : false, + "refreshOn" : "", + "clearOnRefresh" : false, + "validateOn" : "change", + "mask" : false, + "inputType" : "text", + "inputMask" : "", + "id" : "exyw29" + } ], + "tabs" : null, + "reorder" : false, + "properties" : { }, + "tags" : null, + "customConditional" : "", + "logic" : [ ], + "placeholder" : "", + "prefix" : "", + "customClass" : "", + "suffix" : "", + "multiple" : false, + "defaultValue" : null, + "protected" : false, + "unique" : false, + "persistent" : false, + "hidden" : false, + "clearOnHide" : true, + "dataGridLabel" : false, + "labelPosition" : "top", + "labelWidth" : 30, + "labelMargin" : 3, + "description" : "", + "errorLabel" : "", + "tooltip" : "", + "hideLabel" : false, + "tabindex" : "", + "disabled" : false, + "autofocus" : false, + "dbIndex" : false, + "customDefaultValue" : "", + "calculateValue" : "", + "allowCalculateOverride" : false, + "widget" : null, + "refreshOn" : "", + "clearOnRefresh" : false, + "validateOn" : "change", + "validate" : { + "required" : false, + "custom" : "", + "customPrivate" : false }, - "tags": [ - ], - "customConditional": "", - "logic": [ - ], - "reorder": false, - "placeholder": "", - "prefix": "", - "customClass": "", - "suffix": "", - "multiple": false, - "defaultValue": null, - "protected": false, - "unique": false, - "persistent": true, - "clearOnHide": true, - "dataGridLabel": false, - "labelWidth": 30, - "labelMargin": 3, - "description": "", - "errorLabel": "", - "tooltip": "", - "hideLabel": false, - "tabindex": "", - "disabled": false, - "autofocus": false, - "dbIndex": false, - "customDefaultValue": "", - "calculateValue": "", - "allowCalculateOverride": false, - "widget": null, - "refreshOn": "", - "clearOnRefresh": false, - "validateOn": "change", - "id": "eyaf4fl" + "id" : "e6x001" + } ], + "tabs" : null, + "encrypted" : false, + "properties" : { }, + "tags" : [ ], + "customConditional" : "", + "logic" : [ ], + "reorder" : false, + "placeholder" : "", + "prefix" : "", + "customClass" : "", + "suffix" : "", + "multiple" : false, + "defaultValue" : null, + "protected" : false, + "unique" : false, + "persistent" : true, + "hidden" : false, + "clearOnHide" : true, + "dataGridLabel" : false, + "labelPosition" : "top", + "labelWidth" : 30, + "labelMargin" : 3, + "description" : "", + "errorLabel" : "", + "tooltip" : "", + "hideLabel" : false, + "tabindex" : "", + "disabled" : false, + "autofocus" : false, + "dbIndex" : false, + "customDefaultValue" : "", + "calculateValue" : "", + "allowCalculateOverride" : false, + "widget" : null, + "refreshOn" : "", + "clearOnRefresh" : false, + "validateOn" : "change", + "tree" : true, + "id" : "eon3nm" + }, { + "label" : "progress_current", + "labelPosition" : "left-left", + "hidden" : true, + "mask" : false, + "tableView" : true, + "alwaysEnabled" : false, + "type" : "number", + "input" : true, + "key" : "progress_current", + "validate" : { + "customMessage" : "", + "json" : "", + "required" : false, + "custom" : "", + "customPrivate" : false, + "min" : "", + "max" : "", + "step" : "any", + "integer" : "" }, - { - "label": "HTML", - "labelPosition": "left-left", - "className": "", - "attrs": [ - { - "attr": "", - "value": "" - } - ], - "content": "
\n
\n
", - "refreshOnChange": true, - "mask": false, - "tableView": true, - "alwaysEnabled": false, - "type": "htmlelement", - "input": false, - "key": "html", - "validate": { - "customMessage": "", - "json": "", - "required": false, - "custom": "", - "customPrivate": false - }, - "conditional": { - "show": "", - "when": "", - "json": "", - "eq": "" - }, - "tabs": null, - "encrypted": false, - "properties": { - }, - "tags": null, - "customConditional": "", - "logic": [ - ], - "refreshOn": "data", - "reorder": false, - "placeholder": "", - "prefix": "", - "customClass": "", - "suffix": "", - "multiple": false, - "defaultValue": null, - "protected": false, - "unique": false, - "persistent": false, - "hidden": false, - "clearOnHide": true, - "dataGridLabel": false, - "labelWidth": 30, - "labelMargin": 3, - "description": "", - "errorLabel": "", - "tooltip": "", - "hideLabel": false, - "tabindex": "", - "disabled": false, - "autofocus": false, - "dbIndex": false, - "customDefaultValue": "", - "calculateValue": "", - "allowCalculateOverride": false, - "widget": null, - "clearOnRefresh": false, - "validateOn": "change", - "tag": "p", - "id": "e8dfoz" - } - ] -} + "conditional" : { + "show" : "", + "when" : "", + "json" : "", + "eq" : "" + }, + "tabs" : null, + "delimiter" : false, + "requireDecimal" : false, + "encrypted" : false, + "properties" : { }, + "tags" : [ ], + "decimalLimit" : null, + "customConditional" : "", + "logic" : [ ], + "reorder" : false, + "placeholder" : "", + "prefix" : "", + "customClass" : "", + "suffix" : "", + "multiple" : false, + "defaultValue" : null, + "protected" : false, + "unique" : false, + "persistent" : true, + "clearOnHide" : true, + "dataGridLabel" : false, + "labelWidth" : 30, + "labelMargin" : 3, + "description" : "", + "errorLabel" : "", + "tooltip" : "", + "hideLabel" : false, + "tabindex" : "", + "disabled" : false, + "autofocus" : false, + "dbIndex" : false, + "customDefaultValue" : "", + "calculateValue" : "", + "allowCalculateOverride" : false, + "widget" : null, + "refreshOn" : "", + "clearOnRefresh" : false, + "validateOn" : "change", + "id" : "ek7v2m" + }, { + "label" : "progress_max", + "labelPosition" : "left-left", + "hidden" : true, + "mask" : false, + "tableView" : true, + "alwaysEnabled" : false, + "type" : "number", + "input" : true, + "key" : "progress_max", + "validate" : { + "customMessage" : "", + "json" : "", + "required" : false, + "custom" : "", + "customPrivate" : false, + "min" : "", + "max" : "", + "step" : "any", + "integer" : "" + }, + "conditional" : { + "show" : "", + "when" : "", + "json" : "", + "eq" : "" + }, + "tabs" : null, + "delimiter" : false, + "requireDecimal" : false, + "encrypted" : false, + "decimalLimit" : null, + "properties" : { }, + "tags" : [ ], + "customConditional" : "", + "logic" : [ ], + "reorder" : false, + "placeholder" : "", + "prefix" : "", + "customClass" : "", + "suffix" : "", + "multiple" : false, + "defaultValue" : null, + "protected" : false, + "unique" : false, + "persistent" : true, + "clearOnHide" : true, + "dataGridLabel" : false, + "labelWidth" : 30, + "labelMargin" : 3, + "description" : "", + "errorLabel" : "", + "tooltip" : "", + "hideLabel" : false, + "tabindex" : "", + "disabled" : false, + "autofocus" : false, + "dbIndex" : false, + "customDefaultValue" : "", + "calculateValue" : "", + "allowCalculateOverride" : false, + "widget" : null, + "refreshOn" : "", + "clearOnRefresh" : false, + "validateOn" : "change", + "id" : "ern7sil" + }, { + "label" : "HTML", + "labelPosition" : "left-left", + "className" : "", + "attrs" : [ { + "attr" : "", + "value" : "" + } ], + "content" : "
\n \n
\n", + "refreshOnChange" : true, + "mask" : false, + "tableView" : true, + "alwaysEnabled" : false, + "type" : "htmlelement", + "input" : false, + "key" : "html", + "validate" : { + "customMessage" : "", + "json" : "", + "required" : false, + "custom" : "", + "customPrivate" : false + }, + "conditional" : { + "show" : "", + "when" : "", + "json" : "", + "eq" : "" + }, + "tabs" : null, + "encrypted" : false, + "properties" : { }, + "tags" : null, + "customConditional" : "", + "logic" : [ ], + "refreshOn" : "data", + "reorder" : false, + "placeholder" : "", + "prefix" : "", + "customClass" : "", + "suffix" : "", + "multiple" : false, + "defaultValue" : null, + "protected" : false, + "unique" : false, + "persistent" : false, + "hidden" : false, + "clearOnHide" : true, + "dataGridLabel" : false, + "labelWidth" : 30, + "labelMargin" : 3, + "description" : "", + "errorLabel" : "", + "tooltip" : "", + "hideLabel" : false, + "tabindex" : "", + "disabled" : false, + "autofocus" : false, + "dbIndex" : false, + "customDefaultValue" : "", + "calculateValue" : "", + "allowCalculateOverride" : false, + "widget" : null, + "clearOnRefresh" : false, + "validateOn" : "change", + "tag" : "p", + "id" : "eismamu" + }, { + "label" : "HTML", + "labelPosition" : "left-left", + "className" : "", + "attrs" : [ { + "attr" : "", + "value" : "" + } ], + "content" : "
\n \n {{ 'https://' + (!!(data.cluster)?data.cluster.stage:'cluster.stage') + '-' + (!!(data.tenant)?data.tenant.key:'tenant.key') + '-' + (!!(data.cluster)?data.cluster.name:'cluster.name') + '-01.smardigo.digital' }}\n \n
", + "refreshOnChange" : true, + "mask" : false, + "tableView" : true, + "alwaysEnabled" : false, + "type" : "htmlelement", + "input" : false, + "key" : "html2", + "validate" : { + "customMessage" : "", + "json" : "", + "required" : false, + "custom" : "", + "customPrivate" : false + }, + "conditional" : { + "show" : "", + "when" : "", + "json" : "", + "eq" : "" + }, + "tabs" : null, + "encrypted" : false, + "properties" : { }, + "tags" : null, + "customConditional" : "", + "logic" : [ ], + "refreshOn" : "data", + "reorder" : false, + "placeholder" : "", + "prefix" : "", + "customClass" : "", + "suffix" : "", + "multiple" : false, + "defaultValue" : null, + "protected" : false, + "unique" : false, + "persistent" : false, + "hidden" : false, + "clearOnHide" : true, + "dataGridLabel" : false, + "labelWidth" : 30, + "labelMargin" : 3, + "description" : "", + "errorLabel" : "", + "tooltip" : "", + "hideLabel" : false, + "tabindex" : "", + "disabled" : false, + "autofocus" : false, + "dbIndex" : false, + "customDefaultValue" : "", + "calculateValue" : "", + "allowCalculateOverride" : false, + "widget" : null, + "clearOnRefresh" : false, + "validateOn" : "change", + "tag" : "p", + "id" : "e6jdzxn" + } ] +} \ No newline at end of file diff --git a/smardigo/provisioning/form/tenant.json b/smardigo/provisioning/form/tenant.json index 6d33c69..be04508 100644 --- a/smardigo/provisioning/form/tenant.json +++ b/smardigo/provisioning/form/tenant.json @@ -12,9 +12,9 @@ "key" : "tenant", "defaultValue" : { "tenant" : { - "account_id" : "", "id" : "", - "name" : "" + "name" : "", + "key" : "" } }, "validate" : { @@ -145,7 +145,7 @@ "mask" : false, "inputType" : "text", "inputMask" : "", - "id" : "e96sc1h" + "id" : "ehjc0fj" }, { "label" : "Name", "labelPosition" : "left-left", @@ -220,7 +220,7 @@ "mask" : false, "inputType" : "text", "inputMask" : "", - "id" : "eyvg1sy" + "id" : "ep46nvg" }, { "label" : "Key", "labelPosition" : "left-left", @@ -295,7 +295,7 @@ "mask" : false, "inputType" : "text", "inputMask" : "", - "id" : "erag6o" + "id" : "esggboj" } ], "tabs" : null, "properties" : { }, @@ -338,7 +338,7 @@ "custom" : "", "customPrivate" : false }, - "id" : "ethzgw6" + "id" : "exeapht" } ], "tabs" : null, "properties" : { }, @@ -377,7 +377,7 @@ "clearOnRefresh" : false, "validateOn" : "change", "tree" : true, - "id" : "eqqtn1v" + "id" : "embfag" } ], "tabs" : null, "properties" : { }, @@ -418,6 +418,6 @@ "validateOn" : "change", "dataSrc" : "url", "tree" : true, - "id" : "er4h7mh" + "id" : "esiqho" } ] } \ No newline at end of file diff --git a/smardigo/provisioning/layout/simple-connect.json b/smardigo/provisioning/layout/simple-connect.json index f790299..6123878 100644 --- a/smardigo/provisioning/layout/simple-connect.json +++ b/smardigo/provisioning/layout/simple-connect.json @@ -1,7 +1,7 @@ { "name" : "simple-connect", "configKey" : "simple-connect", - "tabExpression" : "{{ data.cluster.stage }}-{{ data.tenant.name }}-{{ data.cluster.name }}", + "tabExpression" : "{{ data.cluster.stage }}-{{ data.tenant.key }}-{{ data.cluster.name }}", "readonlyExpression" : "data.vorgang_status > 10", "components" : [ { "type" : "columns", diff --git a/smardigo/provisioning/process-search/simple-connect.json b/smardigo/provisioning/process-search/simple-connect.json index 23b7ca4..7d7429f 100644 --- a/smardigo/provisioning/process-search/simple-connect.json +++ b/smardigo/provisioning/process-search/simple-connect.json @@ -1,68 +1,60 @@ { - "name": "Simple Connect", - "configKey": "simple-connect", - "processDefinitionKey": "simple-connect", - "columns": [ - { - "key": "id", - "name": "ID", - "width": 50, - "hidden": true - }, - { - "key": "process_definition_key", - "name": "Prozess", - "width": 100, - "hidden": true - }, - { - "key": "creation_date", - "name": "Erstelldatum", - "width": 100 - }, - { - "key": "tenant.name", - "name": "Mandant Name", - "width": 100 - }, - { - "key": "tenant.key", - "name": "Mandant Schlüssel", - "width": 100 - }, - { - "key": "creation_user_id", - "name": "Ersteller", - "width": 150 - }, - { - "key": "vorgang_status_text", - "name": "Status", - "width": 100 - }, - { - "key": "candidateGroups", - "name": "Gruppen", - "width": 100, - "hidden": true + "name" : "Simple Connect", + "configKey" : "simple-connect", + "processDefinitionKey" : "simple-connect", + "columns" : [ { + "key" : "id", + "name" : "ID", + "width" : 50, + "hidden" : true + }, { + "key" : "process_definition_key", + "name" : "Prozess", + "width" : 100, + "hidden" : true + }, { + "key" : "creation_date", + "name" : "Erstelldatum", + "width" : 100 + }, { + "key" : "tenant.name", + "name" : "Mandant Name", + "width" : 100 + }, { + "key" : "tenant.key", + "name" : "Mandant Schlüssel", + "width" : 100 + }, { + "key" : "cluster.name", + "name" : "Cluster Name", + "width" : "100" + }, { + "key" : "creation_user_id", + "name" : "Ersteller", + "width" : 150 + }, { + "key" : "vorgang_status_text", + "name" : "Status", + "width" : 100 + }, { + "key" : "candidateGroups", + "name" : "Gruppen", + "width" : 100, + "hidden" : true + } ], + "filters" : [ { + "name" : "Creation User", + "key" : "creation_user_id", + "defaultOption" : { + "key" : "default", + "name" : "All" } - ], - "filters": [ - { - "name": "Creation User", - "key": "creation_user_id", - "defaultOption": { - "key": "default", - "name": "All" - } - }, - { - "name": "State", - "key": "process_state_text", - "defaultOption": { - "key": "default", - "name": "All" - } + }, { + "name" : "State", + "key" : "process_state_text", + "defaultOption" : { + "key" : "default", + "name" : "All" } - ] -} + } ] +} \ No newline at end of file diff --git a/smardigo/provisioning/process-variable-declaration/simple-connect.json b/smardigo/provisioning/process-variable-declaration/simple-connect.json index ba9c893..15156c4 100644 --- a/smardigo/provisioning/process-variable-declaration/simple-connect.json +++ b/smardigo/provisioning/process-variable-declaration/simple-connect.json @@ -31,6 +31,10 @@ "type" : "long", "classification" : "PRIVATE" }, + "service" : { + "type" : "string", + "classification" : "PRIVATE" + }, "tenant" : { "type" : "object", "classification" : "PRIVATE" diff --git a/smardigo/provisioning/process/simple-connect.bpmn b/smardigo/provisioning/process/simple-connect.bpmn index a3052d2..b317631 100644 --- a/smardigo/provisioning/process/simple-connect.bpmn +++ b/smardigo/provisioning/process/simple-connect.bpmn @@ -74,7 +74,7 @@ Flow_0ex5zxa Flow_0zcb7z2 Flow_0ki8zi3 - Flow_19if6oq + Flow_1qghkm9 @@ -217,6 +217,7 @@ Variables.userId(authenticatedUserId) ${5} + Flow_1f0iyrk Flow_11k5c1y @@ -270,6 +271,7 @@ Variables.userId(authenticatedUserId) ${2} + Flow_11ki58f Flow_1eku1o4 @@ -283,6 +285,7 @@ Variables.userId(authenticatedUserId) ${3} + Flow_1eku1o4 Flow_0pvr263 @@ -296,6 +299,7 @@ Variables.userId(authenticatedUserId) ${4} + Flow_0pvr263 Flow_1f0iyrk @@ -336,7 +340,6 @@ Variables.userId(authenticatedUserId) Flow_0bzl5jh - Flow_0ki8zi3 @@ -362,7 +365,7 @@ Variables.userId(authenticatedUserId) - Flow_19if6oq + Flow_1qghkm9 Flow_0lrfzsu @@ -399,6 +402,7 @@ Variables.userId(authenticatedUserId) Flow_0cxiaxt + Service auf Server installieren @@ -448,21 +452,36 @@ Keycloak Realm mit Administrator Account - + + + + + + + + + + + Flow_1ow8whd + + + Flow_1ow8whd + Flow_0qfq760 + Neue Aufgabe - ${ansibleCommand} + ${smardigoManagementAction} https://img.welt.de/img/vermischtes/bilder-des-tages/mobile207066931/1242503207-ci102l-w1024/Coronavirus-USA.jpg - Flow_01qpec5 - Flow_0jp0wmd + Flow_0qfq760 + Flow_1j21m5x @@ -474,8 +493,8 @@ Keycloak Realm mit Administrator Account - Flow_0jp0wmd - Flow_0m4h584 + Flow_1j21m5x + Flow_1d97y1d @@ -491,27 +510,49 @@ Keycloak Realm mit Administrator Account - Flow_0m4h584 - Flow_14vrrra + Flow_1d97y1d + Flow_0jzgu8o + + + + + /api/v2/job_templates/${job_template_id}/launch/ + + + ${contextScopeId} + ${execution.getProcessInstanceId()} + ${smardigoManagementAction} + ${tenant.key}-${cluster.name} + ${cluster.service} + ${cluster.size} + ${cluster.stage} + ${tenant.key} + ${tenant.name} + + + + + Flow_0jzgu8o + Flow_1nqz9ya + + + + + + + ${extra_vars} + + + + + Flow_1nqz9ya + Flow_0rau5wd - - - - - - - Flow_13nom3k - - - Flow_13nom3k - Flow_01qpec5 - - Flow_14vrrra + Flow_0rau5wd Flow_0gcsmj7 - Flow_0gcsmj7 Flow_1ju13h8 @@ -527,6 +568,10 @@ Keycloak Realm mit Administrator Account + + + + @@ -539,10 +584,6 @@ Keycloak Realm mit Administrator Account - - - - @@ -901,62 +942,76 @@ Keycloak Realm mit Administrator Account - + - - - + + + - - - + + + - - - + + + + + + + - - - + + + + + + + - - - + + + - - - + + + - - - + + + + + + + + + - + - + - + - - + + - - + + - + - + - + - + diff --git a/smardigo/provisioning/script/ansible-start.groovy b/smardigo/provisioning/script/ansible-start.groovy index 953e81f..638784c 100644 --- a/smardigo/provisioning/script/ansible-start.groovy +++ b/smardigo/provisioning/script/ansible-start.groovy @@ -19,6 +19,6 @@ ansibleEnvironment+= '\"' ansibleCommand += ansibleEnvironment processes.byId(contextScopeId, contextProcessId).createComment(comment + ' gestartet') -processes.byId(contextScopeId, contextProcessId).createComment(ansibleCommand) +//processes.byId(contextScopeId, contextProcessId).createComment(ansibleCommand) ansibleCommand \ No newline at end of file diff --git a/stage-dev b/stage-dev index 0579b3a..d896ca4 100644 --- a/stage-dev +++ b/stage-dev @@ -1,3 +1,6 @@ +[awx] +dev-awx-02 + [connect] # --- dev-management-smardigo-01 @@ -23,6 +26,7 @@ dev-mail-01 dev-prometheus-01 [stage_dev:children] +awx connect elastic harbor diff --git a/templates/harbor/harbor/docker-compose.yml.j2 b/templates/harbor/harbor/docker-compose.yml.j2 index dc96d85..bbc648d 100644 --- a/templates/harbor/harbor/docker-compose.yml.j2 +++ b/templates/harbor/harbor/docker-compose.yml.j2 @@ -280,7 +280,7 @@ services: - "traefik.http.routers.dev-docker-registry-01-harbor.tls.certresolver=letsencrypt" - "traefik.http.services.dev-docker-registry-01-harbor.loadbalancer.server.port=8080" - "traefik.http.middlewares.dev-docker-registry-01-harbor-monitor.headers.customrequestheaders.X-Forwarded-Proto=https" - - "traefik.http.routers.dev-docker-registry-01-harbor-monitor.service=dev-docker-registry-01-harbor" + - "traefik.http.routers.dev-docker-registry-01-harbor-monitor.service=dev-docker-registry-01-harbor-monitor" - "traefik.http.routers.dev-docker-registry-01-harbor-monitor.rule=Host(`dev-docker-registry-01.smardigo.digital`)" - "traefik.http.routers.dev-docker-registry-01-harbor-monitor.entrypoints=monitoring-harbor" - "traefik.http.routers.dev-docker-registry-01-harbor-monitor.tls=true" diff --git a/templates/prometheus/config/prometheus/prometheus.yml.j2 b/templates/prometheus/config/prometheus/prometheus.yml.j2 index f7c2bf5..90e3d5d 100644 --- a/templates/prometheus/config/prometheus/prometheus.yml.j2 +++ b/templates/prometheus/config/prometheus/prometheus.yml.j2 @@ -49,7 +49,7 @@ scrape_configs: metrics_path: '/metrics' static_configs: - targets: [ -{% for host in groups['all'] | default([]) %} +{% for host in server_group_all | default([]) %} '{{ host }}.{{ domain }}:{{ monitor_port_service }}', {% endfor %} ] @@ -71,7 +71,7 @@ scrape_configs: static_configs: # Scrape metrics from the Harbor exporter component - targets: [ -{% for host in groups['harbor'] | default([]) %} +{% for host in server_group_harbor | default([]) %} '{{ host }}.{{ domain }}:{{ monitor_port_harbor }}', {% endfor %} ] @@ -93,7 +93,7 @@ scrape_configs: comp: ['core'] static_configs: - targets: [ -{% for host in groups['harbor'] | default([]) %} +{% for host in server_group_harbor | default([]) %} '{{ host }}.{{ domain }}:{{ monitor_port_harbor }}', {% endfor %} ] @@ -115,7 +115,7 @@ scrape_configs: comp: ['registry'] static_configs: - targets: [ -{% for host in groups['harbor'] | default([]) %} +{% for host in server_group_harbor | default([]) %} '{{ host }}.{{ domain }}:{{ monitor_port_harbor }}', {% endfor %} ] @@ -136,7 +136,7 @@ scrape_configs: metrics_path: '/management/prometheus' static_configs: - targets: [ -{% for host in groups['connect'] | default([]) %} +{% for host in server_group_connect | default([]) %} '{{ host }}.{{ domain }}:{{ monitor_port_service }}', {% endfor %} ] @@ -159,7 +159,7 @@ scrape_configs: metrics_path: '/metrics' static_configs: - targets: [ -{% for host in groups['stage_dev'] | default([]) %} +{% for host in server_group_all | default([]) %} '{{ host }}.{{ domain }}:{{ monitor_port_system }}', {% endfor %} ] @@ -184,7 +184,7 @@ scrape_configs: metrics_path: '/metrics' static_configs: - targets: [ -{% for host in groups['elastic'] | default([]) %} +{% for host in server_group_elastic | default([]) %} '{{ host }}.{{ domain }}:9083', {% endfor %} ] diff --git a/users/ansible/id_rsa.pub b/users/ansible/id_rsa.pub new file mode 100644 index 0000000..7c42734 --- /dev/null +++ b/users/ansible/id_rsa.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDNLUecch9TFY4feiE+4Scq7at7JLkIPnQIbwFMjUrYEsuHIQlyWuxfiUtCcTYRcS7eDSk0gPyAADPAkDSHpeOtF9CXAISWm4kORu9S3lgIm7113QT2xGdyag19G/Qrm0RHzujaBbAuRh4R7OK93+l2GqxBrL5ryHVDquTPoNxtBBCEfvAsEEoC2wRjyvWKfR6/rl8wTAOD+1Sty8iixUg6IVABOBN6ZjbSZ8WoWIqwgvZ5P55TkfSyQSbXArM8yqLRwHEHsSBZ0lCJmNS+Y6003dkjvY8UDAu4/VPhETH6l7kzvXNty64AjQGqbj569KtvBJINt7GtuwXq3bFzdRf61mSOfx+JAIzmJYCr0VrqOgTUhrnW9QY31FXUxr97nJRCa7s6E6+r4og0QkatLfLqnoCdJ/V+rK/TzUtywDWeTCInzHOEZgd2K/Rin3vnKFGpsPLZasVNS1KR3m/+r4BqCEO2/D/8xoV3Z8fegyBczrxn8cXpuUp7kIro5p2xpZ8= ansible@smardigo.digital \ No newline at end of file diff --git a/users/ansible_ssh_key b/users/ansible_ssh_key new file mode 100644 index 0000000..bd12e4b --- /dev/null +++ b/users/ansible_ssh_key @@ -0,0 +1,136 @@ +$ANSIBLE_VAULT;1.1;AES256 +65643563353264343334636337353563623431343931366266623562303835313466623461643434 +3134313430303831353965613233313537313235316137300a343938643462343163613263363537 +36643265646338643762376639376232646666343661396435396336353134303764313264663661 +6438373531626530610a643863323966633264623463313562643830633336303832393032363737 +65636134613762636234663734636131643631383732663066656363336131353838366230386630 +64316433313733356636303662643939346536323238633664626365633964323039623937313237 +62353632356265346438306435336566313461653431316132356636623631653632616663326632 +38303563653664353165656561363462633662646562386336316234393661333432353832333939 +62633433623264333139613635353336653639653661383036333139633135373135326430303563 +36656237393739643337656566346631343131343532396632316639613131633831363666623237 +63656165653239336663303361396237326463323163323334393732383431633036623834616561 +65623464626662633138666165363165393064396435626533313338306363383235623439393665 +62363630623234383463323232623563303435316432626163616265313664343966666164646239 +64386532333664353366326461343036363732623239343735376636326133653661656565663639 +39353636346133353631373636316433366231613630343837666530343039343531643038663861 +36333539643537383535353065633462383738336265356264333232386235646666373739613237 +66323436613165616331666461653432373037373163303962306434616239663033383331386531 +34386635633564336534643838383465306436323666616464653139396438373266343564353961 +38336136393262356338353964323336653438626336316638353934646230326462346134336438 +32613135653736303730613563383338653936343937366666613562383631363338626537663137 +35623038333232386236303935353933316238643566613732396134383164303162666637663132 +63363062626163353933613131626639363966386166333738373064343864643163373566326164 +61666638643931356430313132636133393163383435653831643664343238633262323133323263 +38623330353135326239626633326330386231363034613830373236643635373732313633323038 +38323662343338633930383161663266663666643731346332333535376435356436393835653861 +33376463616130303330633730323131663537663264383939323930643539653364626534363131 +65336362623162633263653561393761633238383430663163343236623930623463646638316262 +30336166663235306133636461323432393362626637383662343762623439363339353238323835 +62366131313761303866633166346431633539663563363961653437386132656332303066333037 +35383735303862353966623938363462396330336466363831383964366536623630663362663733 +38333035636637643461623734326436653030336663646439313239343966326161663963653764 +30626566653430336232306463313835356333313835353366613332353037336135653334353330 +36333938393938653735626134653634353130353433356465353035313961646232333362396431 +61636637646362343132386233373139656133393930343839393430306338353065613638323062 +63656463303665383939393831343761303061393361396639336565643164353964366366303236 +30306530636434656335303564626237633663626164373663353237613266646661333566316663 +66393739313262333834363263383332346130343733343665626264663463376366633264623465 +66393366363666306262613731303766303933613265386238643161616337376136626339373133 +63383438666265303537396437396231653937613861353636633565353838613038323633343364 +62356137373132333234346635663839336330336364666538623835613632323035633530616432 +37656333666637313831313763643466333237393430623131623037323961636361333939636363 +61623633646235643633376138313631353531376331383438336561393732363866373962316138 +33633432356538303334356631353439316531396331623738386232616261336462333932353064 +65393533643462643039303234646163323663376431373664373866336539643831386664333938 +32373561386630666463613138373637383665643631356365373639346561333832653534613539 +63376266633232636335346439363764653961643862663932303931323430396233623761656164 +65373261336339656164373463626561326666633832386437326632623964653763356236336232 +63316636313138326230396533653131323533343064373465376135373765303262643531646539 +64663162363931373834613734353664303266626636653736333336353663626463396662653763 +32653964656163353864343439393664333835396265656235353531316633313033666465386331 +34646266323034656462396561633638623330313064356333323262383336656165303536616439 +30363761653431363733663030626532393939663633623432636330323030666233646231343061 +31353065633734666332353734646236303131356533356234656161343962313532653935623365 +38666237373439623236313637313461613462653437396535356437626531373833303236323162 +62326438353137306539313565346230313864383264373836333535623764376537303538633839 +38623462643939373664323263326432663362643966663333343131303264366539653539373261 +36353439373865363633653337316433313635383262373330373862626134653235656234626134 +33623934353137373931393036613830396336633734616566363365666564373463313962363364 +66643638613038373634656539373431393466373935663962363436303133323436303365373735 +32633164363338356633623766346231376663613334643231383263653335613765633162643635 +39313431643331323132343965343134373933303339323265333739303538353936363362383839 +63656139376136613732393261653036316261616537643335373965393236356339363432326130 +31646362653031333261323665633437376534333431666365363933663264303039376265616437 +63323535363633623461346663646530613932333137343234346130386335363834313765313962 +35656533336536633636633339653564306366366339363934366663343331393035363236323636 +62353939666435633065303136636466346262666563646631626530653934633132316537376532 +62383465353465623262666231623634303831653334313731343764623036303731336532343866 +39663665386238373338653233306137663333386533333032303433323731346135323566336630 +32313637353930313633653432643730656230333261356461373139333661626362303531656463 +63356664343938343735306365303739386563613964306663623762623631393234633063306564 +33616465363039613936613863303933336132656337383565356338356430663762663236346263 +31393639386132306133313865373864323433306466343431663033326133623833343339316630 +64396664353030363662616164346134303062663631353465613637613737646434346561626165 +37663063613235326236383966343933366131323133373863326634626561386234646363633435 +31653730636665303266323734393335336463333039323764343436393937313366626437346135 +36643534323532613939333134666336346163393464366565393761393735383530646535346564 +37393731303437303063376235616165656563346165613463653636363338316636633864613032 +37366133636637646165643239303965303232353965383834373865633862363565343431326335 +61306663633663376539613434663561663032386233376566616339653563373830646463396632 +36666338646631313763376337643832656233646637633961336266613964336139336361623461 +32366238636363373531383739396435396134656466343830653638363931323562383338363336 +32393331653333343864613665316334356531663466663331336335366663353934643638386233 +30343634303132396663306162613064646135633136663238336537653764306630626137323264 +34323731353532623534383365633861666334636464356134666536383134643337613566303939 +61656539626532393833663236663865346661333465383330326239363137363033616530393437 +39623130623631643062316232613938366631343864656563356165313938393535616166613664 +34303731396135616135393431636431366336663661656138316161316265393133313136616538 +37363836313934613866363836636430643134323530653933386536343731613963303664636136 +34336436653831363966616536623838343562666632623436306534333138393238383938393733 +34313737316263653935316132346230653439336635636437303465653636656535633262353561 +37343133306363626432336138366461663431656339343238656465633738306634613334306263 +31626336653839616639656232383935383630363766313765323264613030656634383438376432 +62396535313236633237303065333065346362333430336539326633383066353536363162386563 +35353431373063363436373838633139623230373939636365636135343834623433326238383334 +33373335656565346636376239633865306135613336396636383461333737666431633562666136 +34333262393239613835336631626563336333663764356363346235643334336435663963306331 +31633033613061663138633434656166323963633461386463616463316637353630343438376566 +66383261316439333331326136616133613566653539646431616331393262613432343662643730 +33663537666263353565376630313630323265393862313631633461336263656330366230643937 +31343263643765356433373432623038383638353466333539343961336565333033363439623061 +30303166326163663935353935633462343863383737633130653566626532643030356265663736 +32383539626362326563653630386364663565386238366138356661633238333539326132623266 +62323039313332336239363235323536373561373431663033366230353131376666343138663963 +36303064646331643365356635303034306331643362326261363031386533613739333435313734 +32393135653333643336633136353564653534393765376136333863346636663861393364316362 +39636537303761623536376663393539323735663364313936373137386366633461313933383466 +32623863393037353262363065643663383462653661333563653935636233366365376538613233 +39623365323331643535343631353463363436633431643832623534303962633834356532323631 +65663462653736356235666337323135613465333862316437623839393730363935613732393962 +63383666626638616138646261616566386365623636616661363766386336313433373635383937 +31343331316435353033386537643061663165643333396232313531386533393264613235333966 +63626263633132613438303636336637313934373937353264646264313861376166326663383362 +38623231336336376665356161653631306662396163613763303838333166653065623062363666 +35353834623665393762663163613636316663353031653934663336316563626437633066336333 +65313831333934663261356264616438613631316162323936643838386432316235653134326336 +39373266376433653036623662343638393564613734363563633462393964386464373739303963 +61623634393634616239633533393065663333386564326330666564633730656639386439633366 +66666266366630656537636565623965336232653831333932353330633438303432333438356332 +33383664373534316233396566633335386438353237306631386161626565653535396231303736 +61643662336461646538356366623234356531316438333231623162613266396162353438376438 +63643432316531666161373462343033653366343632653232613132366439333233313438333031 +30643738383666626162353739386132353662633136373631393964623064636132373062333036 +34636336623137636538363830666137613237343531333661396663383330313363633238306331 +63666134336666316266326465333930663732666563306333323866653163306162393034343364 +33353731633766646337316538643232333234633465656262643633303930636236353638363064 +34646530626264303338396638343239336137363539353937336265613539303262326566383561 +30313731323034623465396339636264643637643866393734376162633335326163393863376364 +33313165643264643364343963353833653332643964653463373737653331633438363861353733 +36393634343063383934346136316634373564343336636433313862313263633138333663663666 +65353665626533333663396530646662356633383735626365303731653165336534366539376130 +62646536386566323066633432666563623161666666343931313635313561663261633164343366 +62363064363334326637346564323766363462353838363733326130616438353364646631333531 +66613235333532376231356564316338393939653030386162373435666437323263303462333061 +33393966346661663964623736663732303439313765636233623136316634623535663639656538 +393732353362383861623636626530393266