From 416d776e973050b3c05e09c5347922d22116e4fc Mon Sep 17 00:00:00 2001 From: Stefan Haun Date: Thu, 20 Oct 2022 13:08:34 +0200 Subject: [PATCH 1/3] :sparkles: Add redmine DB password to inventory --- inventory.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/inventory.yml b/inventory.yml index 2382932..17c0ed2 100644 --- a/inventory.yml +++ b/inventory.yml @@ -95,6 +95,13 @@ all: 38656238663565386631306263333166633064313762343139373735626439666665356530383363 3134373261386435310a626461376537643937643838636638313033383463356663396464643361 36333766383139376331336633646633396430323663366636616431643134666536 + redmine_database_password: !vault | + $ANSIBLE_VAULT;1.1;AES256 + 31343936363663616665346336616366313761363866353533646464393163363161306331323639 + 3030643563363731646365643362626664633130656265330a623566333734343562393432636336 + 32366339366433626466306634383563343633343736393735336130363462346265646431393839 + 3566326231663663340a383731353935366234643132386438663736313938356266613432303232 + 3165 unicorn.n39.eu: server_admin: "admin+unicorn@netz39.de" platon.n39.eu: From e924da8c3ba7052249599de151d558a8e595c8ba Mon Sep 17 00:00:00 2001 From: Stefan Haun Date: Thu, 20 Oct 2022 13:09:21 +0200 Subject: [PATCH 2/3] :sparkles: Add redmine.n39.eu to ingress config --- holmium.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/holmium.yml b/holmium.yml index fd56750..c75cea8 100644 --- a/holmium.yml +++ b/holmium.yml @@ -19,6 +19,7 @@ - server: pottwal hosts: - name: gitea.n39.eu + - name: redmine.n39.eu - name: uritools.n39.eu - name: uritools-api.n39.eu - name: sl.n39.eu From 208245c4c5644ab8f34a4f21dcad69a07177a042 Mon Sep 17 00:00:00 2001 From: Stefan Haun Date: Thu, 20 Oct 2022 13:09:26 +0200 Subject: [PATCH 3/3] :sparkles: Add redmine setup to pottwal This setup comes from the Antiblau server and mimics the situation there. --- pottwal.yml | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/pottwal.yml b/pottwal.yml index bc784fc..375725c 100644 --- a/pottwal.yml +++ b/pottwal.yml @@ -19,6 +19,11 @@ hedgedoc_host_port: 8084 hedgedoc_image: quay.io/hedgedoc/hedgedoc:1.9.3 + redmine_host_port: 8087 + redmine_image: redmine:4.2.7 + redmine_mysql_image: mysql:5.7 + redmine_database: redmine + roles: - role: docker_setup vars: @@ -38,6 +43,7 @@ alternate_names: - conference.jabber.n39.eu deploy_cert_hook: "docker exec prosody prosodyctl --root cert import ${DOMAIN} /var/lib/dehydrated/certs" + - name: redmine.n39.eu - role: penguineer.dehydrated_cron - role: dd24-dyndns-cron # variables are set in the inventory @@ -253,4 +259,68 @@ proxy_port: "{{ hedgedoc_host_port }}" + # Expected setup for the data directory + # file: configuration.yml + # directory: mysql + # directory: files + # directory: themes + - name: Check if redmine data dir exists + ansible.builtin.stat: + path: "{{ data_dir }}/redmine" + register: redmine_dir + - name: Fail if redmine data dir does not exist + ansible.builtin.fail: + msg: "Redmine data dir is missing, please restore from the backup!" + when: not redmine_dir.stat.exists + + - name: Setup Redmine docker network + docker_network: + name: redminenet + state: present + internal: true + + - name: Setup Redmine MySQL container + docker_container: + name: redminedb + image: "{{ redmine_mysql_image }}" + pull: true + state: started + restart_policy: unless-stopped + detach: yes + env: + MYSQL_ROOT_PASSWORD: "{{ redmine_database_password }}" + MYSQL_DATABASE: "{{redmine_database }}" + volumes: + - "{{ data_dir }}/redmine/mysql:/var/lib/mysql" + networks: + - name: redminenet + + - name: Setup Redmine container + docker_container: + name: redmine + image: "{{ redmine_image }}" + pull: true + state: started + restart_policy: unless-stopped + detach: yes + ports: + - "127.0.0.1:{{ redmine_host_port }}:3000" + env: + REDMINE_DB_MYSQL: redminedb + REDMINE_DB_PASSWORD: "{{ redmine_database_password }}" + volumes: + - "{{ data_dir }}/redmine/configuration.yml:/usr/src/redmine/config/configuration.yml" + - "{{ data_dir }}/redmine/files:/usr/src/redmine/files" + - "{{ data_dir }}/redmine/themes:/usr/src/redmine/public/themes" + networks: + - name: redminenet + + - name: Setup proxy site redmine.n39.eu + include_role: + name: setup-http-site-proxy + vars: + site_name: redmine.n39.eu + proxy_port: "{{ redmine_host_port }}" + + handlers: