conductor-setup/site-prod.yaml

66 lines
1.9 KiB
YAML
Raw Normal View History

2021-02-16 12:26:19 +01:00
---
- hosts: prod_infra
2021-02-16 18:50:05 +01:00
vars_files:
2021-06-11 19:21:01 +02:00
- roles/external-postgres/defaults/vault_main.yaml
2021-03-24 17:26:49 +01:00
- roles/workers/defaults/smtp.yaml
2021-05-18 15:10:08 +02:00
- roles/pep/defaults/pep_credentials.yaml
- roles/conductor/defaults/conductor_ui_secrets.yaml
2021-02-16 12:26:19 +01:00
vars:
2021-05-18 15:10:08 +02:00
infrastructure: "prod"
2021-03-24 17:26:49 +01:00
pymail_password: "{{ smtp_prod_pwd }}"
2021-05-18 15:10:08 +02:00
iam_host: https://accounts.d4science.org
pep: True
pep_credentials: "{{ prod_pep_credentials }}"
ha_network: True
2021-05-18 15:10:08 +02:00
conductor_ui_secret: "{{ prod_conductor_ui_secret }}"
conductor_auth: oauth2
conductor_server_name: conductor.d4science.org
conductor_ui_server_name: conductor-ui.d4science.org
2021-05-20 17:50:45 +02:00
conductor_ui_public_url: "https://{{ conductor_ui_server_name }}"
conductor_replicas: 1
2021-05-18 15:10:08 +02:00
conductor_ui_replicas: 2
2021-02-16 12:26:19 +01:00
roles:
- common
2021-05-18 15:10:08 +02:00
- elasticsearch
- external-postgres
2021-02-16 12:26:19 +01:00
- conductor
- workers
2021-05-18 15:10:08 +02:00
- pep
2021-02-16 12:26:19 +01:00
tasks:
- name: Start es
docker_stack:
2021-02-16 14:48:41 +01:00
name: "conductor-{{ infrastructure }}"
2021-02-16 12:26:19 +01:00
state: present
compose:
- "{{ target_path }}/elasticsearch-swarm.yaml"
when: dry is not defined or not dry|bool
- name: Waiting for databases
pause:
seconds: 5
when: dry is not defined or not dry|bool
- name: Start conductor
docker_stack:
2021-02-16 14:48:41 +01:00
name: "conductor-{{ infrastructure }}"
2021-02-16 12:26:19 +01:00
state: present
compose:
- "{{ target_path }}/conductor-swarm.yaml"
when: dry is not defined or not dry|bool
2021-05-18 15:10:08 +02:00
- name: Start pep
docker_stack:
name: 'conductor-{{ infrastructure }}'
state: present
compose:
- "{{ target_path }}/pep-swarm.yaml"
when: dry is not defined or not dry|bool
2021-02-16 12:26:19 +01:00
- name: Start workers
docker_stack:
2021-02-16 14:48:41 +01:00
name: "conductor-{{ infrastructure }}"
2021-02-16 12:26:19 +01:00
state: present
compose:
- "{{ target_path }}/conductor-workers-swarm.yaml"
when: dry is not defined or not dry|bool