Compare commits

...

2 Commits

Author SHA1 Message Date
Kacper Donat
3656756e57 wipe-stg: Create service 2022-10-28 22:33:37 +02:00
Kacper Donat
80957e4ac7 Allow reusing service templates 2022-10-28 22:32:16 +02:00
5 changed files with 69 additions and 36 deletions

View File

@ -3,7 +3,7 @@ version: '{{ compose_version }}'
services:
site:
image: registry.kadet.net/podlike
command: -logs -ipc=false
command: -logs -ipc=false -pull
networks: ['{{ ingress_network }}']
deploy:
mode: replicated
@ -13,7 +13,7 @@ services:
order: start-first
labels:
- traefik.enable=true
- traefik.http.routers.{{ service }}.rule=Host(`{{ service }}.{{ main_domain }}`)
- traefik.http.routers.{{ service }}.rule=Host(`{{ wipe_host }}`)
- traefik.http.routers.{{ service }}.priority=100
- traefik.http.routers.{{ service }}.tls=true
- traefik.http.routers.{{ service }}.tls.certresolver=lets-encrypt

View File

@ -1,7 +1,31 @@
---
wipe_host: https://wipe.kadet.net
wipe_version: '2022.1.0-dev'
wipe_version: latest
wipe_database:
name: wipe
user: wipe
password: "{{ mysql_user_passwords['wipe'] }}"
wipe_steam_key: !vault |
$ANSIBLE_VAULT;1.1;AES256
39346630373366616136343766616630323439383333653431633462633537326161646234626263
6333363737653234653565313635373966373161346337390a313437616633303632323236623230
36396432356538353565313734376166336534393063613631653861636139366664303332383637
3630326566313239320a653634383431613333636138313330306634626139333830643135373331
37303233613065646638303535643535386162316330316161383537313132626261356465313065
6134633232366434643833333762316462363639653034636438
wipe_mail:
host: smtp.googlemail.com
user: !vault |
$ANSIBLE_VAULT;1.1;AES256
31346166396462643734663735323164343665393930613665643963616538363363346561343531
6538613135353762656434383831386438636565373865650a623730643062643538663235616363
34363938383133633964666130396265343134623939323562363234313664386337636635633035
3939643362333366300a376135393436663765316132643639366466373665663133363761366234
38306230633661653133653961356633376166633761333738633030643765313135
password: !vault |
$ANSIBLE_VAULT;1.1;AES256
31663537613531663362383135343538393663383566383030643339643733326333663133663362
3566303538353239666139363764373166626261366435330a646166623736636566346162366164
33636566393161336362643038353163623264393134353639653339613066343965303434303234
6666613363613731330a643065613838356131633031356233656535363138323366373737393135
38633831306539613634326530383234306361623237633832623662333539626339

View File

@ -1,7 +1,7 @@
---
- name: 'Include vars for "{{ service }}" service'
include_vars: "{{ service_vars_file }}"
with_fileglob: "{{ services_root }}/{{ service }}/vars/*"
with_fileglob: "{{ service_path }}/vars/*"
loop_control:
loop_var: service_vars_file
tags:
@ -28,7 +28,7 @@
- name: 'Load configuration tasks for "{{ service }}"'
include_tasks: "{{ service_task_file }}"
with_fileglob: "{{ services_root }}/{{ service }}/tasks/*"
with_fileglob: "{{ service_path }}/tasks/*"
loop_control:
loop_var: service_task_file
when: service_task_file|basename is not regex('^_')
@ -37,7 +37,7 @@
- name: 'Copy stack file of "{{ service }}" to remote server'
template:
src: "{{ services_root }}/{{ service }}/stack.yml"
src: "{{ service_path }}/stack.yml"
dest: "{{ remote_service_path }}/stack.yml"
tags:
- deploy

View File

@ -10,6 +10,7 @@ mysql_root_password: !vault |
mysql_databases:
- name: gitea
- name: wipe
- name: wipe-stg
- name: keylighter
- name: shitcode
- name: cojedzie-next
@ -46,6 +47,17 @@ mysql_users:
61613137616236303230626639666334326466333931613430613166333161646536313661343738
3732386638376330350a353334383464313866613738646566636665396566623062373564323933
65396634613136306630643964386637653936346236386333323262363430303261
- name: wipe-stg
priv: wipe-stg.*:ALL
host: '172.%'
password: !vault |
$ANSIBLE_VAULT;1.1;AES256
32316135383561636662333363393635373537616138306538616335393032303962333031346137
3861633263343130663037636130346535653330313039310a353634346538383561363338626334
65376538643837303330343437626335636134363761393063313561633539616531613065656436
3435386439313732320a333932626435613733306239346131646564613037373265316234346563
35343734393636633030633233323465613634623733376135656232393235333762646239613361
3863336164663865636633396361353133353238313262313934
- name: wipe
priv: wipe.*:ALL
host: '172.%'

View File

@ -1,8 +1,9 @@
---
services_root: "{{ './services' | realpath }}"
service_path: "{{ services_root }}/{{ service }}"
service_template: "{{ service_config[service].template | default(service) }}"
service_path: "{{ services_root }}/{{ service_template }}"
services: "{{ lookup('pipe', 'ls -1 ' + services_root).split('\n') | list }}"
services: "{{ service_config | keys | list }}"
remote_services_root: /var/services
remote_service_path: "{{ remote_services_root }}/{{ service }}"
@ -64,19 +65,16 @@ service_config:
name: gitea
user: gitea
password: "{{ mysql_user_passwords['gitea'] }}"
legacy:
www_data_users: ["{{ ansible_user }}"]
wipe-stg:
template: wipe
wipe:
wipe_steam_key: !vault |
$ANSIBLE_VAULT;1.1;AES256
39346630373366616136343766616630323439383333653431633462633537326161646234626263
6333363737653234653565313635373966373161346337390a313437616633303632323236623230
36396432356538353565313734376166336534393063613631653861636139366664303332383637
3630326566313239320a653634383431613333636138313330306634626139333830643135373331
37303233613065646638303535643535386162316330316161383537313132626261356465313065
6134633232366434643833333762316462363639653034636438
wipe_host: wipe.stg.kadet.net
wipe_database:
name: wipe-stg
user: wipe-stg
password: "{{ mysql_user_passwords['wipe-stg'] }}"
wipe_app_key: !vault |
$ANSIBLE_VAULT;1.1;AES256
30306566363866333062336664383663643432386536396630363136636464643831633966333839
@ -86,22 +84,22 @@ service_config:
33323335636233376563383331663732303863383761343739393039633662386565613962663165
62643132313336356365313465353263626565616434633963343764653330316566613633633638
623838613832393239343036396439383561
wipe_mail:
host: smtp.googlemail.com
user: !vault |
wipe:
wipe_host: wipe.kadet.net
wipe_version: 2022.1.0-dev
wipe_database:
name: wipe
user: wipe
password: "{{ mysql_user_passwords['wipe'] }}"
wipe_app_key: !vault |
$ANSIBLE_VAULT;1.1;AES256
31346166396462643734663735323164343665393930613665643963616538363363346561343531
6538613135353762656434383831386438636565373865650a623730643062643538663235616363
34363938383133633964666130396265343134623939323562363234313664386337636635633035
3939643362333366300a376135393436663765316132643639366466373665663133363761366234
38306230633661653133653961356633376166633761333738633030643765313135
password: !vault |
$ANSIBLE_VAULT;1.1;AES256
31663537613531663362383135343538393663383566383030643339643733326333663133663362
3566303538353239666139363764373166626261366435330a646166623736636566346162366164
33636566393161336362643038353163623264393134353639653339613066343965303434303234
6666613363613731330a643065613838356131633031356233656535363138323366373737393135
38633831306539613634326530383234306361623237633832623662333539626339
30306566363866333062336664383663643432386536396630363136636464643831633966333839
6538383236363132346639363634366164353231636163320a633136336434386230323962356132
34313763633238333132396264613836646632613438366666393038393836633231663666353635
3164633461356431370a383834626262613838363961346132316330663838366335666565333739
33323335636233376563383331663732303863383761343739393039633662386565613962663165
62643132313336356365313465353263626565616434633963343764653330316566613633633638
623838613832393239343036396439383561
cojedzie:
cojedzie_version: '2022.3.1'
cojedzie_gtm: GTM-TQNX386
@ -109,13 +107,11 @@ service_config:
name: cojedzie
user: cojedzie
password: "{{ mysql_user_passwords['cojedzie'] }}"
cojedzie-next:
cojedzie_database:
name: cojedzie-next
user: cojedzie-next
password: "{{ mysql_user_passwords['cojedzie-next'] }}"
registry:
registry_users:
- "{{ swarm_registry_user }}"
@ -165,6 +161,7 @@ service_config:
region: eu-central-003
regionendpoint: https://s3.eu-central-003.backblazeb2.com
bucket: kadet-docker
portainer: ~
system: ~
www_data_users:
- vagrant