From ba3d84a1de4d392a22b66d90de21876720391728 Mon Sep 17 00:00:00 2001 From: Quentin Date: Thu, 7 Jan 2021 11:09:29 +0100 Subject: [PATCH 01/17] Upgrade plume --- app/build/docker-compose.yml | 4 ++-- app/build/plume/Dockerfile | 4 +--- app/deployment/plume.hcl | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/build/docker-compose.yml b/app/build/docker-compose.yml index de2c229..ea5deac 100644 --- a/app/build/docker-compose.yml +++ b/app/build/docker-compose.yml @@ -80,8 +80,8 @@ services: build: context: ./plume args: - VERSION: 0cd26dfbf4ab7be467325ed77230cf371147a98e - image: superboum/plume:v1 + VERSION: 0.6.0 + image: superboum/plume:v2 postfix: build: diff --git a/app/build/plume/Dockerfile b/app/build/plume/Dockerfile index 9199e1e..4e05424 100644 --- a/app/build/plume/Dockerfile +++ b/app/build/plume/Dockerfile @@ -19,7 +19,7 @@ RUN apt-get update && \ ARG VERSION WORKDIR /opt -RUN git clone -n https://git.deuxfleurs.fr/Deuxfleurs/plume.git +RUN git clone -n https://git.joinplu.me/Plume/Plume.git plume WORKDIR /opt/plume RUN git checkout ${VERSION} @@ -52,5 +52,3 @@ COPY --from=builder /usr/local/cargo/bin/plume /usr/local/bin/ COPY plm-start /usr/local/bin/ CMD ["plm-start"] - -EXPOSE 7878 diff --git a/app/deployment/plume.hcl b/app/deployment/plume.hcl index 59ec28a..1bdc332 100644 --- a/app/deployment/plume.hcl +++ b/app/deployment/plume.hcl @@ -17,7 +17,7 @@ job "plume" { task "plume" { driver = "docker" config { - image = "superboum/plume:v1" + image = "superboum/plume:v2" network_mode = "host" ports = [ "web_port" ] #command = "cat" From 4456fb56c1531f995429c59f889b0b84df32ba47 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Thu, 7 Jan 2021 21:36:47 +0100 Subject: [PATCH 02/17] Upgrade nomad+consul --- os/config/roles/consul/tasks/main.yml | 2 +- os/config/roles/nomad/tasks/main.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/os/config/roles/consul/tasks/main.yml b/os/config/roles/consul/tasks/main.yml index 761c1f8..994ecd7 100644 --- a/os/config/roles/consul/tasks/main.yml +++ b/os/config/roles/consul/tasks/main.yml @@ -1,6 +1,6 @@ - name: "Set consul version" set_fact: - consul_version: 1.8.4 + consul_version: 1.9.0 - name: "Download and install Consul for x86_64" unarchive: diff --git a/os/config/roles/nomad/tasks/main.yml b/os/config/roles/nomad/tasks/main.yml index c79013e..625d7b7 100644 --- a/os/config/roles/nomad/tasks/main.yml +++ b/os/config/roles/nomad/tasks/main.yml @@ -1,6 +1,6 @@ - name: "Set nomad version" set_fact: - nomad_version: 0.12.9 + nomad_version: 1.0.1 - name: "Download and install Nomad for x86_64" unarchive: From 969ee58b7d20ce9c0ad89289a2f8147bc120c729 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Thu, 7 Jan 2021 21:37:29 +0100 Subject: [PATCH 03/17] WIP nextcloud tests --- app/integration/nextcloud/README.md | 20 +++++++++++++ app/integration/nextcloud/bottin.json | 31 ++++++++++++++++++++ app/integration/nextcloud/docker-compose.yml | 27 +++++++++++++++++ 3 files changed, 78 insertions(+) create mode 100644 app/integration/nextcloud/README.md create mode 100644 app/integration/nextcloud/bottin.json create mode 100644 app/integration/nextcloud/docker-compose.yml diff --git a/app/integration/nextcloud/README.md b/app/integration/nextcloud/README.md new file mode 100644 index 0000000..3d49768 --- /dev/null +++ b/app/integration/nextcloud/README.md @@ -0,0 +1,20 @@ +Install Owncloud CLI: + +php ./occ \ + --no-interaction \ + --verbose \ + maintenance:install \ + --database pgsql \ + --database-name nextcloud \ + --database-host postgres \ + --database-user nextcloud \ + --database-pass nextcloud \ + --admin-user nextcloud \ + --admin-pass nextcloud \ + --admin-email coucou@deuxfleurs.fr + +Official image entrypoint: + +https://github.com/nextcloud/docker/blob/master/20.0/fpm/entrypoint.sh + + diff --git a/app/integration/nextcloud/bottin.json b/app/integration/nextcloud/bottin.json new file mode 100644 index 0000000..a970762 --- /dev/null +++ b/app/integration/nextcloud/bottin.json @@ -0,0 +1,31 @@ +{ + "suffix": "dc=deuxfleurs,dc=fr", + "bind": "0.0.0.0:389", + "consul_host": "http://consul:8500", + "log_level": "debug", + "acl": [ + "*,dc=deuxfleurs,dc=fr::read:*:* !userpassword", + "*::read modify:SELF:*", + "ANONYMOUS::bind:*,ou=users,dc=deuxfleurs,dc=fr:", + "ANONYMOUS::bind:cn=admin,dc=deuxfleurs,dc=fr:", + "*,ou=services,ou=users,dc=deuxfleurs,dc=fr::bind:*,ou=users,dc=deuxfleurs,dc=fr:*", + "*,ou=services,ou=users,dc=deuxfleurs,dc=fr::read:*:*", + + "*:cn=asso_deuxfleurs,ou=groups,dc=deuxfleurs,dc=fr:add:*,ou=invitations,dc=deuxfleurs,dc=fr:*", + "ANONYMOUS::bind:*,ou=invitations,dc=deuxfleurs,dc=fr:", + "*,ou=invitations,dc=deuxfleurs,dc=fr::delete:SELF:*", + + "*:cn=asso_deuxfleurs,ou=groups,dc=deuxfleurs,dc=fr:add:*,ou=users,dc=deuxfleurs,dc=fr:*", + "*,ou=invitations,dc=deuxfleurs,dc=fr::add:*,ou=users,dc=deuxfleurs,dc=fr:*", + + "*:cn=asso_deuxfleurs,ou=groups,dc=deuxfleurs,dc=fr:modifyAdd:cn=email,ou=groups,dc=deuxfleurs,dc=fr:*", + "*,ou=invitations,dc=deuxfleurs,dc=fr::modifyAdd:cn=email,ou=groups,dc=deuxfleurs,dc=fr:*", + "*:cn=asso_deuxfleurs,ou=groups,dc=deuxfleurs,dc=fr:modifyAdd:cn=seafile,ou=groups,dc=deuxfleurs,dc=fr:*", + "*,ou=invitations,dc=deuxfleurs,dc=fr::modifyAdd:cn=seafile,ou=groups,dc=deuxfleurs,dc=fr:*", + "*:cn=asso_deuxfleurs,ou=groups,dc=deuxfleurs,dc=fr:modifyAdd:cn=nextcloud,ou=groups,dc=deuxfleurs,dc=fr:*", + "*,ou=invitations,dc=deuxfleurs,dc=fr::modifyAdd:cn=seafile,ou=nextcloud,dc=deuxfleurs,dc=fr:*", + + "cn=admin,dc=deuxfleurs,dc=fr::read add modify delete:*:*", + "*:cn=admin,ou=groups,dc=deuxfleurs,dc=fr:read add modify delete:*:*" + ] +} diff --git a/app/integration/nextcloud/docker-compose.yml b/app/integration/nextcloud/docker-compose.yml new file mode 100644 index 0000000..7ba090b --- /dev/null +++ b/app/integration/nextcloud/docker-compose.yml @@ -0,0 +1,27 @@ +version: '3.4' +services: + php: + image: lxpz/deuxfleurs_nextcloud_amd64:8 + depends_on: + - bottin + - postgres + ports: + - "80:80" + + postgres: + image: postgres:9.6.19 + environment: + - POSTGRES_DB=nextcloud + - POSTGRES_USER=nextcloud + - POSTGRES_PASSWORD=nextcloud + + bottin: + image: lxpz/bottin_amd64:14 + depends_on: + - consul + volumes: + - ./bottin.json:/config.json + + consul: + image: consul:1.8.4 + From 464b990e19dfc7dec1565f42374bbe8e95a0ce36 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Wed, 13 Jan 2021 14:42:14 +0100 Subject: [PATCH 04/17] Upgrade jitsi --- app/build/docker-compose.yml | 12 ++++++------ app/deployment/jitsi.hcl | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/build/docker-compose.yml b/app/build/docker-compose.yml index ea5deac..d84f880 100644 --- a/app/build/docker-compose.yml +++ b/app/build/docker-compose.yml @@ -48,8 +48,8 @@ services: args: # https://github.com/jitsi/jitsi-meet PREFIXV: stable/jitsi-meet_ - VERSION: 4966 - image: superboum/amd64_jitsi_meet:v2 + VERSION: 5390 + image: superboum/amd64_jitsi_meet:v3 jitsi-conference-focus: build: @@ -57,8 +57,8 @@ services: args: # https://github.com/jitsi/jicofo PREFIXV: stable/jitsi-meet_ - VERSION: 4966 - image: superboum/amd64_jitsi_conference_focus:v5 + VERSION: 5390 + image: superboum/amd64_jitsi_conference_focus:v6 jitsi-videobridge: build: @@ -66,8 +66,8 @@ services: args: # https://github.com/jitsi/jitsi-videobridge PREFIXV: stable/jitsi-meet_ - VERSION: 4966 - image: superboum/amd64_jitsi_videobridge:v15 + VERSION: 5390 + image: superboum/amd64_jitsi_videobridge:v16 jitsi-xmpp: build: diff --git a/app/deployment/jitsi.hcl b/app/deployment/jitsi.hcl index 9c1edd5..04c3f9f 100644 --- a/app/deployment/jitsi.hcl +++ b/app/deployment/jitsi.hcl @@ -94,7 +94,7 @@ job "jitsi" { task "front" { driver = "docker" config { - image = "superboum/amd64_jitsi_meet:v2" + image = "superboum/amd64_jitsi_meet:v3" network_mode = "host" ports = [ "https_port" ] } @@ -148,7 +148,7 @@ job "jitsi" { task "jicofo" { driver = "docker" config { - image = "superboum/amd64_jitsi_conference_focus:v5" + image = "superboum/amd64_jitsi_conference_focus:v6" network_mode = "host" } @@ -178,7 +178,7 @@ job "jitsi" { task "videobridge" { driver = "docker" config { - image = "superboum/amd64_jitsi_videobridge:v15" + image = "superboum/amd64_jitsi_videobridge:v16" network_mode = "host" ports = [ "video1_port", "video2_port" ] ulimit { From 52c141e5fc731ccf8e65320e1d4666c7591ddee5 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Wed, 13 Jan 2021 19:17:28 +0100 Subject: [PATCH 05/17] Update Riot+Matrix --- app/build/docker-compose.yml | 8 ++++---- app/build/riotweb/Dockerfile | 6 +++--- app/deployment/im.hcl | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/build/docker-compose.yml b/app/build/docker-compose.yml index d84f880..f58bf1f 100644 --- a/app/build/docker-compose.yml +++ b/app/build/docker-compose.yml @@ -14,16 +14,16 @@ services: context: ./riotweb args: # https://github.com/vector-im/riot-web/releases - VERSION: 1.7.14 - image: particallydone/amd64_riotweb:v18 + VERSION: 1.7.16 + image: superboum/amd64_riotweb:v19 synapse: build: context: ./matrix-synapse args: # https://github.com/matrix-org/synapse/releases - VERSION: 1.24.0 - image: particallydone/amd64_synapse:v39 + VERSION: 1.25.0 + image: superboum/amd64_synapse:v40 # Email sogo: diff --git a/app/build/riotweb/Dockerfile b/app/build/riotweb/Dockerfile index 862e2e5..c768e87 100644 --- a/app/build/riotweb/Dockerfile +++ b/app/build/riotweb/Dockerfile @@ -5,9 +5,9 @@ WORKDIR /root RUN apt-get update && \ apt-get install -y wget && \ - wget https://github.com/vector-im/riot-web/releases/download/v${VERSION}/riot-v${VERSION}.tar.gz && \ - tar xf riot-v${VERSION}.tar.gz && \ - mv riot-v${VERSION}/ riot/ + wget https://github.com/vector-im/element-web/releases/download/v${VERSION}/element-v${VERSION}.tar.gz && \ + tar xf element-v${VERSION}.tar.gz && \ + mv element-v${VERSION}/ riot/ FROM superboum/amd64_webserver:v3 COPY --from=builder /root/riot /srv/http diff --git a/app/deployment/im.hcl b/app/deployment/im.hcl index cb14144..636f78e 100644 --- a/app/deployment/im.hcl +++ b/app/deployment/im.hcl @@ -15,7 +15,7 @@ job "im" { driver = "docker" config { - image = "particallydone/amd64_synapse:v39" + image = "superboum/amd64_synapse:v40" network_mode = "host" readonly_rootfs = true ports = [ "client_port", "federation_port" ] @@ -220,7 +220,7 @@ job "im" { task "server" { driver = "docker" config { - image = "particallydone/amd64_riotweb:v18" + image = "superboum/amd64_riotweb:v19" ports = [ "web_port" ] volumes = [ "secrets/config.json:/srv/http/config.json" From a6b23f5713cc5d211a95aa1a614b63011f8ca4cc Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 15 Jan 2021 19:34:33 +0100 Subject: [PATCH 06/17] upgrade garage to 0.1.1 --- app/config/configuration/garage/garage.toml | 11 ++++++++++- app/deployment/garage.hcl | 3 ++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/config/configuration/garage/garage.toml b/app/config/configuration/garage/garage.toml index 51ae81f..4d08cf2 100644 --- a/app/config/configuration/garage/garage.toml +++ b/app/config/configuration/garage/garage.toml @@ -8,7 +8,12 @@ rpc_bind_addr = "[::]:3901" consul_host = "consul.service.2.cluster.deuxfleurs.fr:8500" consul_service_name = "garage-rpc" -bootstrap_peers = [ ] +bootstrap_peers = [] + +max_concurrent_rpc_requests = 12 +data_replication_factor = 3 +meta_replication_factor = 3 +meta_epidemic_fanout = 3 [rpc_tls] ca_cert = "/garage/garage-ca.crt" @@ -19,3 +24,7 @@ node_key = "/garage/garage.key" s3_region = "garage" api_bind_addr = "[::]:3900" +[s3_web] +bind_addr = "[::]:3902" +root_domain = ".web.deuxfleurs.fr" +index = "index.html" diff --git a/app/deployment/garage.hcl b/app/deployment/garage.hcl index d4c7c9e..fe0b641 100644 --- a/app/deployment/garage.hcl +++ b/app/deployment/garage.hcl @@ -12,13 +12,14 @@ job "garage" { network { port "s3" { static = 3900 } port "rpc" { static = 3901 } + port "web" { static = 3902 } } task "server" { driver = "docker" config { advertise_ipv6_address = true - image = "lxpz/garage_amd64:4" + image = "lxpz/garage_amd64:v0.1.1" network_mode = "host" volumes = [ "/mnt/storage/garage/data:/garage/data", From 0c4ee40e01c95d7bf73236cbead5cc261f67eb9d Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sat, 16 Jan 2021 16:21:25 +0100 Subject: [PATCH 07/17] Update garage --- app/deployment/garage.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/deployment/garage.hcl b/app/deployment/garage.hcl index fe0b641..20ee3cd 100644 --- a/app/deployment/garage.hcl +++ b/app/deployment/garage.hcl @@ -19,7 +19,7 @@ job "garage" { driver = "docker" config { advertise_ipv6_address = true - image = "lxpz/garage_amd64:v0.1.1" + image = "lxpz/garage_amd64:v0.1.1b" network_mode = "host" volumes = [ "/mnt/storage/garage/data:/garage/data", From c74dc92febd1841c8ea5ff31caab0f941d57527d Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sat, 16 Jan 2021 17:07:01 +0100 Subject: [PATCH 08/17] Proposal: reorganize app/ folder by modules --- app/{config/secrets => }/.gitignore | 4 +-- app/{build => }/README.md | 0 .../build/backup-consul/Dockerfile | 0 .../build/backup-consul/do_backup.sh | 0 app/{deployment => backup/deploy}/backup.hcl | 0 app/build/blog-quentin/.dockerenv | 0 app/build/blog-quentin/Dockerfile | 16 ----------- app/build/blog-quentin/README.md | 1 - app/build/coturn/Dockerfile | 8 ------ app/build/coturn/README.md | 17 ------------ app/build/landing/README.md | 3 -- app/build/static/Dockerfile | 9 ------ app/build/static/README.md | 5 ---- app/build/static/goStatic | 1 - .../secrets/seafile/conf/mykey.peer.sample | 0 app/{deployment => core/deploy}/core.hcl | 0 .../config}/bottin/config.json | 0 .../config}/guichet/config.json.tpl | 0 .../deploy}/directory.hcl | 4 +-- app/{build => }/docker-compose.yml | 22 +++++++-------- app/{ => email}/build/alps/Dockerfile | 0 app/{ => email}/build/alps/skipverify.patch | 0 app/{ => email}/build/dovecot/.gitignore | 0 app/{ => email}/build/dovecot/Dockerfile | 0 app/{ => email}/build/dovecot/README.md | 0 .../build/dovecot/conf/all_before.sieve | 0 .../dovecot/conf/dovecot-ldap.sample.conf | 0 .../build/dovecot/conf/dovecot.conf | 0 .../build/dovecot/conf/report-ham.sieve | 0 .../build/dovecot/conf/report-spam.sieve | 0 app/{ => email}/build/dovecot/entrypoint.sh | 0 app/{ => email}/build/opendkim/Dockerfile | 0 app/{ => email}/build/opendkim/README.md | 0 app/{ => email}/build/opendkim/opendkim.conf | 0 app/{ => email}/build/postfix/Dockerfile | 0 app/{ => email}/build/postfix/README.md | 0 app/{ => email}/build/postfix/entrypoint.sh | 0 app/{ => email}/build/sogo/Dockerfile | 0 app/{ => email}/build/sogo/README.md | 0 app/{ => email}/build/sogo/entrypoint | 0 app/{ => email}/build/sogo/sogo.nginx.conf | 0 .../email => email/config}/dkim/keytable | 0 .../email => email/config}/dkim/signingtable | 0 .../config}/dkim/smtp.private.sample | 0 .../config}/dkim/smtp.txt.sample | 0 .../email => email/config}/dkim/trusted | 0 .../email => email/config}/dovecot/certs.gen | 0 .../config}/dovecot/dovecot-ldap.conf.tpl | 0 .../email => email/config}/postfix/certs.gen | 0 .../config}/postfix/dynamicmaps.cf | 0 .../config}/postfix/header_checks | 0 .../config}/postfix/ldap-account.cf.tpl | 0 .../config}/postfix/ldap-alias.cf.tpl | 0 .../postfix/ldap-virtual-domains.cf.tpl | 0 .../email => email/config}/postfix/main.cf | 0 .../email => email/config}/postfix/master.cf | 0 .../email => email/config}/postfix/transport | 0 .../config}/postfix/transport.db | Bin .../email => email/config}/sogo/sogo.conf.tpl | 0 app/{deployment => email/deploy}/email.hcl | 26 +++++++++--------- .../secrets/email/dkim/smtp.private.sample | 0 .../secrets/email/dovecot/dovecot.crt.sample | 0 .../secrets/email/dovecot/dovecot.key.sample | 0 .../secrets/email/dovecot}/ldap_binddn.sample | 0 .../secrets/email/dovecot/ldap_bindpwd.sample | 0 .../secrets/email/postfix/postfix.crt.sample | 0 .../secrets/email/postfix/postfix.key.sample | 0 .../secrets/email/sogo}/ldap_binddn.sample | 0 .../secrets/email/sogo}/ldap_bindpw.sample | 0 .../secrets/email/sogo/postgre_auth.sample | 0 .../garage => garage/config}/garage.toml | 0 app/{deployment => garage/deploy}/garage.hcl | 2 +- app/{ => im}/build/matrix-synapse/Dockerfile | 0 .../build/matrix-synapse/entrypoint.sh | 0 app/{ => im}/build/riotweb/Dockerfile | 0 .../config}/coturn/turnserver.conf.tpl | 0 .../config}/easybridge/config.json.tpl | 0 .../config}/easybridge/registration.yaml.tpl | 0 .../chat => im/config}/fb2mx/config.yaml | 0 .../config}/fb2mx/registration.yaml | 0 .../chat => im/config}/riot_web/config.json | 0 .../config}/synapse/conf.d/report_stats.yaml | 0 .../config}/synapse/conf.d/server_name.yaml | 0 .../config}/synapse/homeserver.yaml | 0 .../chat => im/config}/synapse/log.yaml | 0 app/{deployment => im/deploy}/im.hcl | 16 +++++------ .../secrets/chat/coturn/static-auth.sample | 0 .../secrets/chat/fb2mx/as_token.sample | 0 .../secrets/chat/fb2mx/db_url.sample | 0 .../secrets/chat/fb2mx/hs_token.sample | 0 .../chat/synapse/homeserver.tls.crt.sample | 0 .../chat/synapse/homeserver.tls.dh.sample | 0 .../chat/synapse/homeserver.tls.key.sample | 0 .../secrets/chat/synapse}/ldap_binddn.sample | 0 .../secrets/chat/synapse}/ldap_bindpw.sample | 0 .../secrets/chat/synapse/postgres_db.sample | 0 .../secrets/chat/synapse/postgres_pwd.sample | 0 .../secrets/chat/synapse/postgres_user.sample | 0 .../synapse/registration_shared_secret.sample | 0 .../build/jitsi-conference-focus/Dockerfile | 0 .../build/jitsi-conference-focus/jicofo | 0 .../sip-communicator.properties | 0 app/{ => jitsi}/build/jitsi-meet/Dockerfile | 0 app/{ => jitsi}/build/jitsi-meet/config.js | 0 .../build/jitsi-meet/entrypoint.sh | 0 .../build/jitsi-videobridge/Dockerfile | 0 .../build/jitsi-videobridge/jvb_run | 0 app/{ => jitsi}/build/jitsi-xmpp/Dockerfile | 0 .../jitsi-xmpp/external_components.cfg.lua | 0 app/{ => jitsi}/build/jitsi-xmpp/xmpp_conf | 0 app/{ => jitsi}/build/jitsi-xmpp/xmpp_gen | 0 app/{ => jitsi}/build/jitsi-xmpp/xmpp_run | 0 .../jitsi => jitsi/config}/global_env.tpl | 0 app/{deployment => jitsi/deploy}/jitsi.hcl | 8 +++--- .../integratio}/01_gen_certs.yml | 0 .../jitsi => jitsi/integratio}/02_run.yml | 0 .../jitsi => jitsi/integratio}/README.md | 0 .../jitsi => jitsi/integratio}/dev.env | 0 .../integratio}/jitsi-certs/.gitignore | 0 .../jitsi/auth.jitsi.deuxfleurs.fr.crt.sample | 0 .../jitsi/auth.jitsi.deuxfleurs.fr.key.sample | 0 .../jitsi/jitsi.deuxfleurs.fr.crt.sample | 0 .../jitsi/jitsi.deuxfleurs.fr.key.sample | 0 .../build/nextcloud/Dockerfile | 0 .../build/nextcloud/container-setup.sh | 0 .../build/nextcloud/entrypoint.sh | 0 .../config}/config.php.tpl | 0 .../deploy}/nextcloud.hcl | 2 +- .../integration}/README.md | 0 .../integration}/bottin.json | 0 .../integration}/docker-compose.yml | 0 app/{deployment => platoo/deploy}/platoo.hcl | 0 .../secrets/platoo/bddpw.sample | 0 app/{ => plume}/build/plume/Dockerfile | 0 app/{ => plume}/build/plume/README.md | 0 app/{ => plume}/build/plume/plm-start | 0 .../plume => plume/config}/app.env | 0 app/{deployment => plume/deploy}/plume.hcl | 2 +- .../plume => plume/integration}/bottin.json | 0 .../integration}/docker-compose.yml | 0 .../plume => plume/integration}/plume.env | 0 .../secrets/plume/pgsql_pw.sh | 0 .../secrets/plume/secret_key.sh | 0 app/{ => postgres}/build/postgres/Dockerfile | 0 app/{ => postgres}/build/postgres/README.md | 0 .../build/postgres/postgresql.conf | 0 app/{ => postgres}/build/postgres/start.sh | 0 .../config}/keeper/env.tpl | 0 .../deploy}/postgres.hcl | 2 +- .../postgres/keeper/pg_repl_pwd.sample | 0 .../postgres/keeper/pg_repl_username.sample | 0 .../secrets/postgres/keeper/pg_su_pwd.sample | 0 .../deploy}/science.hcl | 0 .../build/mariadb/60-disable-dialog.cnf | 0 app/{ => seafile}/build/mariadb/60-ldap.cnf | 0 app/{ => seafile}/build/mariadb/60-remote.cnf | 0 app/{ => seafile}/build/mariadb/Dockerfile | 0 app/{ => seafile}/build/mariadb/README.md | 0 app/{ => seafile}/build/mariadb/entrypoint.sh | 0 app/{ => seafile}/build/mariadb/nsswitch.conf | 0 app/{ => seafile}/build/mariadb/pam-mariadb | 0 app/{ => seafile}/build/seafile/Dockerfile | 0 app/{ => seafile}/build/seafile/README.md | 0 app/{ => seafile}/build/seafile/seadocker | 0 app/{ => seafile}/build/seafile/seaenv | 0 .../config}/ccnet/seafile.ini | 0 .../config}/conf/ccnet.conf.tpl | 0 .../config}/conf/gunicorn.conf | 0 .../config/conf}/mykey.peer.sample | 0 .../config}/conf/seafdav.conf | 0 .../config}/conf/seafile.conf.tpl | 0 .../config}/conf/seahub_settings.py.tpl | 0 .../config}/mariadb/main/env.tpl | 0 .../deploy}/seafile.hcl | 14 +++++----- .../secrets/mariadb/main/ldap_binddn.sample | 0 .../secrets/mariadb/main/ldap_bindpwd.sample | 0 .../secrets/mariadb/main/mysql_pwd.sample | 0 .../secrets}/seafile/conf/mykey.peer.sample | 0 .../traefik => traefik/config}/traefik.toml | 0 .../deploy}/traefik.hcl | 2 +- app/{ => web_static}/build/webpull/.gitignore | 0 .../build/webpull/Dockerfile.nodejs | 0 .../build/webpull/Dockerfile.ruby | 0 app/{ => web_static}/build/webpull/README.md | 0 app/{ => web_static}/build/webpull/main.go | 0 .../deploy}/web_static.hcl | 0 .../secrets/web/home_token.sample | 0 .../web/quentin.dufour.io_token.sample | 0 188 files changed, 52 insertions(+), 112 deletions(-) rename app/{config/secrets => }/.gitignore (82%) rename app/{build => }/README.md (100%) rename app/{ => backup}/build/backup-consul/Dockerfile (100%) rename app/{ => backup}/build/backup-consul/do_backup.sh (100%) rename app/{deployment => backup/deploy}/backup.hcl (100%) delete mode 100755 app/build/blog-quentin/.dockerenv delete mode 100644 app/build/blog-quentin/Dockerfile delete mode 100644 app/build/blog-quentin/README.md delete mode 100644 app/build/coturn/Dockerfile delete mode 100644 app/build/coturn/README.md delete mode 100644 app/build/landing/README.md delete mode 100644 app/build/static/Dockerfile delete mode 100644 app/build/static/README.md delete mode 160000 app/build/static/goStatic delete mode 100644 app/config/secrets/seafile/conf/mykey.peer.sample rename app/{deployment => core/deploy}/core.hcl (100%) rename app/{config/configuration/directory => directory/config}/bottin/config.json (100%) rename app/{config/configuration/directory => directory/config}/guichet/config.json.tpl (100%) rename app/{deployment => directory/deploy}/directory.hcl (93%) rename app/{build => }/docker-compose.yml (79%) rename app/{ => email}/build/alps/Dockerfile (100%) rename app/{ => email}/build/alps/skipverify.patch (100%) rename app/{ => email}/build/dovecot/.gitignore (100%) rename app/{ => email}/build/dovecot/Dockerfile (100%) rename app/{ => email}/build/dovecot/README.md (100%) rename app/{ => email}/build/dovecot/conf/all_before.sieve (100%) rename app/{ => email}/build/dovecot/conf/dovecot-ldap.sample.conf (100%) rename app/{ => email}/build/dovecot/conf/dovecot.conf (100%) rename app/{ => email}/build/dovecot/conf/report-ham.sieve (100%) rename app/{ => email}/build/dovecot/conf/report-spam.sieve (100%) rename app/{ => email}/build/dovecot/entrypoint.sh (100%) rename app/{ => email}/build/opendkim/Dockerfile (100%) rename app/{ => email}/build/opendkim/README.md (100%) rename app/{ => email}/build/opendkim/opendkim.conf (100%) rename app/{ => email}/build/postfix/Dockerfile (100%) rename app/{ => email}/build/postfix/README.md (100%) rename app/{ => email}/build/postfix/entrypoint.sh (100%) rename app/{ => email}/build/sogo/Dockerfile (100%) rename app/{ => email}/build/sogo/README.md (100%) rename app/{ => email}/build/sogo/entrypoint (100%) rename app/{ => email}/build/sogo/sogo.nginx.conf (100%) rename app/{config/configuration/email => email/config}/dkim/keytable (100%) rename app/{config/configuration/email => email/config}/dkim/signingtable (100%) rename app/{config/configuration/email => email/config}/dkim/smtp.private.sample (100%) rename app/{config/configuration/email => email/config}/dkim/smtp.txt.sample (100%) rename app/{config/configuration/email => email/config}/dkim/trusted (100%) rename app/{config/configuration/email => email/config}/dovecot/certs.gen (100%) rename app/{config/configuration/email => email/config}/dovecot/dovecot-ldap.conf.tpl (100%) rename app/{config/configuration/email => email/config}/postfix/certs.gen (100%) rename app/{config/configuration/email => email/config}/postfix/dynamicmaps.cf (100%) rename app/{config/configuration/email => email/config}/postfix/header_checks (100%) rename app/{config/configuration/email => email/config}/postfix/ldap-account.cf.tpl (100%) rename app/{config/configuration/email => email/config}/postfix/ldap-alias.cf.tpl (100%) rename app/{config/configuration/email => email/config}/postfix/ldap-virtual-domains.cf.tpl (100%) rename app/{config/configuration/email => email/config}/postfix/main.cf (100%) rename app/{config/configuration/email => email/config}/postfix/master.cf (100%) rename app/{config/configuration/email => email/config}/postfix/transport (100%) rename app/{config/configuration/email => email/config}/postfix/transport.db (100%) rename app/{config/configuration/email => email/config}/sogo/sogo.conf.tpl (100%) rename app/{deployment => email/deploy}/email.hcl (91%) rename app/{config => email}/secrets/email/dkim/smtp.private.sample (100%) rename app/{config => email}/secrets/email/dovecot/dovecot.crt.sample (100%) rename app/{config => email}/secrets/email/dovecot/dovecot.key.sample (100%) rename app/{config/secrets/chat/synapse => email/secrets/email/dovecot}/ldap_binddn.sample (100%) rename app/{config => email}/secrets/email/dovecot/ldap_bindpwd.sample (100%) rename app/{config => email}/secrets/email/postfix/postfix.crt.sample (100%) rename app/{config => email}/secrets/email/postfix/postfix.key.sample (100%) rename app/{config/secrets/email/dovecot => email/secrets/email/sogo}/ldap_binddn.sample (100%) rename app/{config/secrets/chat/synapse => email/secrets/email/sogo}/ldap_bindpw.sample (100%) rename app/{config => email}/secrets/email/sogo/postgre_auth.sample (100%) rename app/{config/configuration/garage => garage/config}/garage.toml (100%) rename app/{deployment => garage/deploy}/garage.hcl (97%) rename app/{ => im}/build/matrix-synapse/Dockerfile (100%) rename app/{ => im}/build/matrix-synapse/entrypoint.sh (100%) rename app/{ => im}/build/riotweb/Dockerfile (100%) rename app/{config/configuration/chat => im/config}/coturn/turnserver.conf.tpl (100%) rename app/{config/configuration/chat => im/config}/easybridge/config.json.tpl (100%) rename app/{config/configuration/chat => im/config}/easybridge/registration.yaml.tpl (100%) rename app/{config/configuration/chat => im/config}/fb2mx/config.yaml (100%) rename app/{config/configuration/chat => im/config}/fb2mx/registration.yaml (100%) rename app/{config/configuration/chat => im/config}/riot_web/config.json (100%) rename app/{config/configuration/chat => im/config}/synapse/conf.d/report_stats.yaml (100%) rename app/{config/configuration/chat => im/config}/synapse/conf.d/server_name.yaml (100%) rename app/{config/configuration/chat => im/config}/synapse/homeserver.yaml (100%) rename app/{config/configuration/chat => im/config}/synapse/log.yaml (100%) rename app/{deployment => im/deploy}/im.hcl (90%) rename app/{config => im}/secrets/chat/coturn/static-auth.sample (100%) rename app/{config => im}/secrets/chat/fb2mx/as_token.sample (100%) rename app/{config => im}/secrets/chat/fb2mx/db_url.sample (100%) rename app/{config => im}/secrets/chat/fb2mx/hs_token.sample (100%) rename app/{config => im}/secrets/chat/synapse/homeserver.tls.crt.sample (100%) rename app/{config => im}/secrets/chat/synapse/homeserver.tls.dh.sample (100%) rename app/{config => im}/secrets/chat/synapse/homeserver.tls.key.sample (100%) rename app/{config/secrets/email/sogo => im/secrets/chat/synapse}/ldap_binddn.sample (100%) rename app/{config/secrets/email/sogo => im/secrets/chat/synapse}/ldap_bindpw.sample (100%) rename app/{config => im}/secrets/chat/synapse/postgres_db.sample (100%) rename app/{config => im}/secrets/chat/synapse/postgres_pwd.sample (100%) rename app/{config => im}/secrets/chat/synapse/postgres_user.sample (100%) rename app/{config => im}/secrets/chat/synapse/registration_shared_secret.sample (100%) rename app/{ => jitsi}/build/jitsi-conference-focus/Dockerfile (100%) rename app/{ => jitsi}/build/jitsi-conference-focus/jicofo (100%) rename app/{ => jitsi}/build/jitsi-conference-focus/sip-communicator.properties (100%) rename app/{ => jitsi}/build/jitsi-meet/Dockerfile (100%) rename app/{ => jitsi}/build/jitsi-meet/config.js (100%) rename app/{ => jitsi}/build/jitsi-meet/entrypoint.sh (100%) rename app/{ => jitsi}/build/jitsi-videobridge/Dockerfile (100%) rename app/{ => jitsi}/build/jitsi-videobridge/jvb_run (100%) rename app/{ => jitsi}/build/jitsi-xmpp/Dockerfile (100%) rename app/{ => jitsi}/build/jitsi-xmpp/external_components.cfg.lua (100%) rename app/{ => jitsi}/build/jitsi-xmpp/xmpp_conf (100%) rename app/{ => jitsi}/build/jitsi-xmpp/xmpp_gen (100%) rename app/{ => jitsi}/build/jitsi-xmpp/xmpp_run (100%) rename app/{config/configuration/jitsi => jitsi/config}/global_env.tpl (100%) rename app/{deployment => jitsi/deploy}/jitsi.hcl (95%) rename app/{integration/jitsi => jitsi/integratio}/01_gen_certs.yml (100%) rename app/{integration/jitsi => jitsi/integratio}/02_run.yml (100%) rename app/{integration/jitsi => jitsi/integratio}/README.md (100%) rename app/{integration/jitsi => jitsi/integratio}/dev.env (100%) rename app/{integration/jitsi => jitsi/integratio}/jitsi-certs/.gitignore (100%) rename app/{config => jitsi}/secrets/jitsi/auth.jitsi.deuxfleurs.fr.crt.sample (100%) rename app/{config => jitsi}/secrets/jitsi/auth.jitsi.deuxfleurs.fr.key.sample (100%) rename app/{config => jitsi}/secrets/jitsi/jitsi.deuxfleurs.fr.crt.sample (100%) rename app/{config => jitsi}/secrets/jitsi/jitsi.deuxfleurs.fr.key.sample (100%) rename app/{ => nextcloud}/build/nextcloud/Dockerfile (100%) rename app/{ => nextcloud}/build/nextcloud/container-setup.sh (100%) rename app/{ => nextcloud}/build/nextcloud/entrypoint.sh (100%) rename app/{config/configuration/nextcloud => nextcloud/config}/config.php.tpl (100%) rename app/{deployment => nextcloud/deploy}/nextcloud.hcl (94%) rename app/{integration/nextcloud => nextcloud/integration}/README.md (100%) rename app/{integration/nextcloud => nextcloud/integration}/bottin.json (100%) rename app/{integration/nextcloud => nextcloud/integration}/docker-compose.yml (100%) rename app/{deployment => platoo/deploy}/platoo.hcl (100%) rename app/{config => platoo}/secrets/platoo/bddpw.sample (100%) rename app/{ => plume}/build/plume/Dockerfile (100%) rename app/{ => plume}/build/plume/README.md (100%) rename app/{ => plume}/build/plume/plm-start (100%) rename app/{config/configuration/plume => plume/config}/app.env (100%) rename app/{deployment => plume/deploy}/plume.hcl (95%) rename app/{integration/plume => plume/integration}/bottin.json (100%) rename app/{integration/plume => plume/integration}/docker-compose.yml (100%) rename app/{integration/plume => plume/integration}/plume.env (100%) rename app/{config => plume}/secrets/plume/pgsql_pw.sh (100%) rename app/{config => plume}/secrets/plume/secret_key.sh (100%) rename app/{ => postgres}/build/postgres/Dockerfile (100%) rename app/{ => postgres}/build/postgres/README.md (100%) rename app/{ => postgres}/build/postgres/postgresql.conf (100%) rename app/{ => postgres}/build/postgres/start.sh (100%) rename app/{config/configuration/postgres => postgres/config}/keeper/env.tpl (100%) rename app/{deployment => postgres/deploy}/postgres.hcl (97%) rename app/{config => postgres}/secrets/postgres/keeper/pg_repl_pwd.sample (100%) rename app/{config => postgres}/secrets/postgres/keeper/pg_repl_username.sample (100%) rename app/{config => postgres}/secrets/postgres/keeper/pg_su_pwd.sample (100%) rename app/{deployment => science/deploy}/science.hcl (100%) rename app/{ => seafile}/build/mariadb/60-disable-dialog.cnf (100%) rename app/{ => seafile}/build/mariadb/60-ldap.cnf (100%) rename app/{ => seafile}/build/mariadb/60-remote.cnf (100%) rename app/{ => seafile}/build/mariadb/Dockerfile (100%) rename app/{ => seafile}/build/mariadb/README.md (100%) rename app/{ => seafile}/build/mariadb/entrypoint.sh (100%) rename app/{ => seafile}/build/mariadb/nsswitch.conf (100%) rename app/{ => seafile}/build/mariadb/pam-mariadb (100%) rename app/{ => seafile}/build/seafile/Dockerfile (100%) rename app/{ => seafile}/build/seafile/README.md (100%) rename app/{ => seafile}/build/seafile/seadocker (100%) rename app/{ => seafile}/build/seafile/seaenv (100%) rename app/{config/configuration/seafile => seafile/config}/ccnet/seafile.ini (100%) rename app/{config/configuration/seafile => seafile/config}/conf/ccnet.conf.tpl (100%) rename app/{config/configuration/seafile => seafile/config}/conf/gunicorn.conf (100%) rename app/{config/configuration/seafile/ccnet => seafile/config/conf}/mykey.peer.sample (100%) rename app/{config/configuration/seafile => seafile/config}/conf/seafdav.conf (100%) rename app/{config/configuration/seafile => seafile/config}/conf/seafile.conf.tpl (100%) rename app/{config/configuration/seafile => seafile/config}/conf/seahub_settings.py.tpl (100%) rename app/{config/configuration => seafile/config}/mariadb/main/env.tpl (100%) rename app/{deployment => seafile/deploy}/seafile.hcl (90%) rename app/{config => seafile}/secrets/mariadb/main/ldap_binddn.sample (100%) rename app/{config => seafile}/secrets/mariadb/main/ldap_bindpwd.sample (100%) rename app/{config => seafile}/secrets/mariadb/main/mysql_pwd.sample (100%) rename app/{config/configuration => seafile/secrets}/seafile/conf/mykey.peer.sample (100%) rename app/{config/configuration/traefik => traefik/config}/traefik.toml (100%) rename app/{deployment => traefik/deploy}/traefik.hcl (95%) rename app/{ => web_static}/build/webpull/.gitignore (100%) rename app/{ => web_static}/build/webpull/Dockerfile.nodejs (100%) rename app/{ => web_static}/build/webpull/Dockerfile.ruby (100%) rename app/{ => web_static}/build/webpull/README.md (100%) rename app/{ => web_static}/build/webpull/main.go (100%) rename app/{deployment => web_static/deploy}/web_static.hcl (100%) rename app/{config => web_static}/secrets/web/home_token.sample (100%) rename app/{config => web_static}/secrets/web/quentin.dufour.io_token.sample (100%) diff --git a/app/config/secrets/.gitignore b/app/.gitignore similarity index 82% rename from app/config/secrets/.gitignore rename to app/.gitignore index 2ff3cd5..cc6b143 100644 --- a/app/config/secrets/.gitignore +++ b/app/.gitignore @@ -1,6 +1,6 @@ # Blacklist everything cleverly -* -!*/ +*/secrets/* +!*/secrets/*/ # Whitelist some patterns !*.sample diff --git a/app/build/README.md b/app/README.md similarity index 100% rename from app/build/README.md rename to app/README.md diff --git a/app/build/backup-consul/Dockerfile b/app/backup/build/backup-consul/Dockerfile similarity index 100% rename from app/build/backup-consul/Dockerfile rename to app/backup/build/backup-consul/Dockerfile diff --git a/app/build/backup-consul/do_backup.sh b/app/backup/build/backup-consul/do_backup.sh similarity index 100% rename from app/build/backup-consul/do_backup.sh rename to app/backup/build/backup-consul/do_backup.sh diff --git a/app/deployment/backup.hcl b/app/backup/deploy/backup.hcl similarity index 100% rename from app/deployment/backup.hcl rename to app/backup/deploy/backup.hcl diff --git a/app/build/blog-quentin/.dockerenv b/app/build/blog-quentin/.dockerenv deleted file mode 100755 index e69de29..0000000 diff --git a/app/build/blog-quentin/Dockerfile b/app/build/blog-quentin/Dockerfile deleted file mode 100644 index 61f5c40..0000000 --- a/app/build/blog-quentin/Dockerfile +++ /dev/null @@ -1,16 +0,0 @@ -FROM amd64/debian:stretch as builder - -COPY ./quentin.dufour.io/Gemfile /root/quentin.dufour.io/Gemfile - -WORKDIR /root/quentin.dufour.io - -RUN apt-get update && \ - apt-get install -y ruby-dev gem build-essential bundler zlib1g-dev libxml2-dev && \ - bundle install - -COPY ./quentin.dufour.io/ /root/quentin.dufour.io/ -RUN bundle exec jekyll build - -FROM superboum/amd64_webserver:v2 -COPY --from=builder /root/quentin.dufour.io/_site /srv/http - diff --git a/app/build/blog-quentin/README.md b/app/build/blog-quentin/README.md deleted file mode 100644 index 25ac463..0000000 --- a/app/build/blog-quentin/README.md +++ /dev/null @@ -1 +0,0 @@ -sudo docker build -t superboum/amd64_blog:v19 . diff --git a/app/build/coturn/Dockerfile b/app/build/coturn/Dockerfile deleted file mode 100644 index 0d23161..0000000 --- a/app/build/coturn/Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -FROM amd64/debian:buster - -RUN apt-get update && \ - apt-get dist-upgrade -y && \ - apt-get install -y \ - coturn - -CMD ["/usr/bin/turnserver"] diff --git a/app/build/coturn/README.md b/app/build/coturn/README.md deleted file mode 100644 index e882146..0000000 --- a/app/build/coturn/README.md +++ /dev/null @@ -1,17 +0,0 @@ - -## Génère l'image -``` -sudo docker build -t registry.gitlab.com/superboum/ankh-morpork/amd64_coturn:v1 . -``` - -## Run bash dans le container -``` -sudo docker run --rm -t -i registry.gitlab.com/superboum/ankh-morpork/amd64_coturn:v1 bash -sudo docker run --rm -t -i -p 3478:3478/udp -p 3479:3479/udp -p 3478:3478/tcp -p 3479:3479/tcp registry.gitlab.com/superboum/ankh-morpork/amd64_coturn:v1 -``` - -## Used ports -- udp/tcp 3478 3479 - -## Publish -sudo docker push registry.gitlab.com/superboum/ankh-morpork/amd64_coturn:v1 diff --git a/app/build/landing/README.md b/app/build/landing/README.md deleted file mode 100644 index 5d2cb2b..0000000 --- a/app/build/landing/README.md +++ /dev/null @@ -1,3 +0,0 @@ -``` -docker build -t superboum/amd64_landing:v8 . -``` diff --git a/app/build/static/Dockerfile b/app/build/static/Dockerfile deleted file mode 100644 index cdba59a..0000000 --- a/app/build/static/Dockerfile +++ /dev/null @@ -1,9 +0,0 @@ -FROM golang:1.11.1-stretch as builder - -COPY ./goStatic /goStatic -WORKDIR /goStatic -RUN CGO_ENABLED=0 go build -a -o web-server . - -FROM scratch -COPY --from=builder /goStatic/web-server / -ENTRYPOINT ["/web-server"] diff --git a/app/build/static/README.md b/app/build/static/README.md deleted file mode 100644 index d50390c..0000000 --- a/app/build/static/README.md +++ /dev/null @@ -1,5 +0,0 @@ - -``` -sudo docker build -t superboum/amd64_webserver:v3 . -sudo docker push superboum/amd64_webserver:v3 -``` diff --git a/app/build/static/goStatic b/app/build/static/goStatic deleted file mode 160000 index 3f97f57..0000000 --- a/app/build/static/goStatic +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3f97f57aaee09a142afe3ca0f1a5d51acd856436 diff --git a/app/config/secrets/seafile/conf/mykey.peer.sample b/app/config/secrets/seafile/conf/mykey.peer.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/deployment/core.hcl b/app/core/deploy/core.hcl similarity index 100% rename from app/deployment/core.hcl rename to app/core/deploy/core.hcl diff --git a/app/config/configuration/directory/bottin/config.json b/app/directory/config/bottin/config.json similarity index 100% rename from app/config/configuration/directory/bottin/config.json rename to app/directory/config/bottin/config.json diff --git a/app/config/configuration/directory/guichet/config.json.tpl b/app/directory/config/guichet/config.json.tpl similarity index 100% rename from app/config/configuration/directory/guichet/config.json.tpl rename to app/directory/config/guichet/config.json.tpl diff --git a/app/deployment/directory.hcl b/app/directory/deploy/directory.hcl similarity index 93% rename from app/deployment/directory.hcl rename to app/directory/deploy/directory.hcl index 0acc08f..a6eb885 100644 --- a/app/deployment/directory.hcl +++ b/app/directory/deploy/directory.hcl @@ -35,7 +35,7 @@ job "directory" { } template { - data = file("../config/configuration/directory/bottin/config.json") + data = file("../config/bottin/config.json") destination = "secrets/config.json" } @@ -78,7 +78,7 @@ job "directory" { } template { - data = file("../config/configuration/directory/guichet/config.json.tpl") + data = file("../config/guichet/config.json.tpl") destination = "secrets/config.json" } diff --git a/app/build/docker-compose.yml b/app/docker-compose.yml similarity index 79% rename from app/build/docker-compose.yml rename to app/docker-compose.yml index f58bf1f..df7fee4 100644 --- a/app/build/docker-compose.yml +++ b/app/docker-compose.yml @@ -3,7 +3,7 @@ services: mariadb: build: - context: ./mariadb + context: ./seafile/build/mariadb args: VERSION: 4 # fake for now image: superboum/amd64_mariadb:v4 @@ -11,7 +11,7 @@ services: # Instant Messaging riot: build: - context: ./riotweb + context: ./im/build/riotweb args: # https://github.com/vector-im/riot-web/releases VERSION: 1.7.16 @@ -19,7 +19,7 @@ services: synapse: build: - context: ./matrix-synapse + context: ./im/build/matrix-synapse args: # https://github.com/matrix-org/synapse/releases VERSION: 1.25.0 @@ -28,7 +28,7 @@ services: # Email sogo: build: - context: ./sogo + context: ./email/build/sogo args: # fake for now VERSION: 5.0.0 @@ -36,7 +36,7 @@ services: alps: build: - context: ./alps + context: ./email/build/alps args: VERSION: 5cef0aaff2b8b6ee3e00b566123517e241d8cfb8 image: superboum/amd64_alps:v1 @@ -44,7 +44,7 @@ services: # VoIP jitsi-meet: build: - context: ./jitsi-meet + context: ./jitsi/build/jitsi-meet args: # https://github.com/jitsi/jitsi-meet PREFIXV: stable/jitsi-meet_ @@ -53,7 +53,7 @@ services: jitsi-conference-focus: build: - context: ./jitsi-conference-focus + context: ./jitsi/build/jitsi-conference-focus args: # https://github.com/jitsi/jicofo PREFIXV: stable/jitsi-meet_ @@ -62,7 +62,7 @@ services: jitsi-videobridge: build: - context: ./jitsi-videobridge + context: ./jitsi/build/jitsi-videobridge args: # https://github.com/jitsi/jitsi-videobridge PREFIXV: stable/jitsi-meet_ @@ -71,21 +71,21 @@ services: jitsi-xmpp: build: - context: ./jitsi-xmpp + context: ./jitsi/build/jitsi-xmpp args: VERSION: 0.11.2-1 image: superboum/amd64_jitsi_xmpp:v8 plume: build: - context: ./plume + context: ./plume/build/plume args: VERSION: 0.6.0 image: superboum/plume:v2 postfix: build: - context: ./postfix + context: ./email/build/postfix args: # https://packages.debian.org/fr/buster/postfix VERSION: 3.4.14-0+deb10u1 diff --git a/app/build/alps/Dockerfile b/app/email/build/alps/Dockerfile similarity index 100% rename from app/build/alps/Dockerfile rename to app/email/build/alps/Dockerfile diff --git a/app/build/alps/skipverify.patch b/app/email/build/alps/skipverify.patch similarity index 100% rename from app/build/alps/skipverify.patch rename to app/email/build/alps/skipverify.patch diff --git a/app/build/dovecot/.gitignore b/app/email/build/dovecot/.gitignore similarity index 100% rename from app/build/dovecot/.gitignore rename to app/email/build/dovecot/.gitignore diff --git a/app/build/dovecot/Dockerfile b/app/email/build/dovecot/Dockerfile similarity index 100% rename from app/build/dovecot/Dockerfile rename to app/email/build/dovecot/Dockerfile diff --git a/app/build/dovecot/README.md b/app/email/build/dovecot/README.md similarity index 100% rename from app/build/dovecot/README.md rename to app/email/build/dovecot/README.md diff --git a/app/build/dovecot/conf/all_before.sieve b/app/email/build/dovecot/conf/all_before.sieve similarity index 100% rename from app/build/dovecot/conf/all_before.sieve rename to app/email/build/dovecot/conf/all_before.sieve diff --git a/app/build/dovecot/conf/dovecot-ldap.sample.conf b/app/email/build/dovecot/conf/dovecot-ldap.sample.conf similarity index 100% rename from app/build/dovecot/conf/dovecot-ldap.sample.conf rename to app/email/build/dovecot/conf/dovecot-ldap.sample.conf diff --git a/app/build/dovecot/conf/dovecot.conf b/app/email/build/dovecot/conf/dovecot.conf similarity index 100% rename from app/build/dovecot/conf/dovecot.conf rename to app/email/build/dovecot/conf/dovecot.conf diff --git a/app/build/dovecot/conf/report-ham.sieve b/app/email/build/dovecot/conf/report-ham.sieve similarity index 100% rename from app/build/dovecot/conf/report-ham.sieve rename to app/email/build/dovecot/conf/report-ham.sieve diff --git a/app/build/dovecot/conf/report-spam.sieve b/app/email/build/dovecot/conf/report-spam.sieve similarity index 100% rename from app/build/dovecot/conf/report-spam.sieve rename to app/email/build/dovecot/conf/report-spam.sieve diff --git a/app/build/dovecot/entrypoint.sh b/app/email/build/dovecot/entrypoint.sh similarity index 100% rename from app/build/dovecot/entrypoint.sh rename to app/email/build/dovecot/entrypoint.sh diff --git a/app/build/opendkim/Dockerfile b/app/email/build/opendkim/Dockerfile similarity index 100% rename from app/build/opendkim/Dockerfile rename to app/email/build/opendkim/Dockerfile diff --git a/app/build/opendkim/README.md b/app/email/build/opendkim/README.md similarity index 100% rename from app/build/opendkim/README.md rename to app/email/build/opendkim/README.md diff --git a/app/build/opendkim/opendkim.conf b/app/email/build/opendkim/opendkim.conf similarity index 100% rename from app/build/opendkim/opendkim.conf rename to app/email/build/opendkim/opendkim.conf diff --git a/app/build/postfix/Dockerfile b/app/email/build/postfix/Dockerfile similarity index 100% rename from app/build/postfix/Dockerfile rename to app/email/build/postfix/Dockerfile diff --git a/app/build/postfix/README.md b/app/email/build/postfix/README.md similarity index 100% rename from app/build/postfix/README.md rename to app/email/build/postfix/README.md diff --git a/app/build/postfix/entrypoint.sh b/app/email/build/postfix/entrypoint.sh similarity index 100% rename from app/build/postfix/entrypoint.sh rename to app/email/build/postfix/entrypoint.sh diff --git a/app/build/sogo/Dockerfile b/app/email/build/sogo/Dockerfile similarity index 100% rename from app/build/sogo/Dockerfile rename to app/email/build/sogo/Dockerfile diff --git a/app/build/sogo/README.md b/app/email/build/sogo/README.md similarity index 100% rename from app/build/sogo/README.md rename to app/email/build/sogo/README.md diff --git a/app/build/sogo/entrypoint b/app/email/build/sogo/entrypoint similarity index 100% rename from app/build/sogo/entrypoint rename to app/email/build/sogo/entrypoint diff --git a/app/build/sogo/sogo.nginx.conf b/app/email/build/sogo/sogo.nginx.conf similarity index 100% rename from app/build/sogo/sogo.nginx.conf rename to app/email/build/sogo/sogo.nginx.conf diff --git a/app/config/configuration/email/dkim/keytable b/app/email/config/dkim/keytable similarity index 100% rename from app/config/configuration/email/dkim/keytable rename to app/email/config/dkim/keytable diff --git a/app/config/configuration/email/dkim/signingtable b/app/email/config/dkim/signingtable similarity index 100% rename from app/config/configuration/email/dkim/signingtable rename to app/email/config/dkim/signingtable diff --git a/app/config/configuration/email/dkim/smtp.private.sample b/app/email/config/dkim/smtp.private.sample similarity index 100% rename from app/config/configuration/email/dkim/smtp.private.sample rename to app/email/config/dkim/smtp.private.sample diff --git a/app/config/configuration/email/dkim/smtp.txt.sample b/app/email/config/dkim/smtp.txt.sample similarity index 100% rename from app/config/configuration/email/dkim/smtp.txt.sample rename to app/email/config/dkim/smtp.txt.sample diff --git a/app/config/configuration/email/dkim/trusted b/app/email/config/dkim/trusted similarity index 100% rename from app/config/configuration/email/dkim/trusted rename to app/email/config/dkim/trusted diff --git a/app/config/configuration/email/dovecot/certs.gen b/app/email/config/dovecot/certs.gen similarity index 100% rename from app/config/configuration/email/dovecot/certs.gen rename to app/email/config/dovecot/certs.gen diff --git a/app/config/configuration/email/dovecot/dovecot-ldap.conf.tpl b/app/email/config/dovecot/dovecot-ldap.conf.tpl similarity index 100% rename from app/config/configuration/email/dovecot/dovecot-ldap.conf.tpl rename to app/email/config/dovecot/dovecot-ldap.conf.tpl diff --git a/app/config/configuration/email/postfix/certs.gen b/app/email/config/postfix/certs.gen similarity index 100% rename from app/config/configuration/email/postfix/certs.gen rename to app/email/config/postfix/certs.gen diff --git a/app/config/configuration/email/postfix/dynamicmaps.cf b/app/email/config/postfix/dynamicmaps.cf similarity index 100% rename from app/config/configuration/email/postfix/dynamicmaps.cf rename to app/email/config/postfix/dynamicmaps.cf diff --git a/app/config/configuration/email/postfix/header_checks b/app/email/config/postfix/header_checks similarity index 100% rename from app/config/configuration/email/postfix/header_checks rename to app/email/config/postfix/header_checks diff --git a/app/config/configuration/email/postfix/ldap-account.cf.tpl b/app/email/config/postfix/ldap-account.cf.tpl similarity index 100% rename from app/config/configuration/email/postfix/ldap-account.cf.tpl rename to app/email/config/postfix/ldap-account.cf.tpl diff --git a/app/config/configuration/email/postfix/ldap-alias.cf.tpl b/app/email/config/postfix/ldap-alias.cf.tpl similarity index 100% rename from app/config/configuration/email/postfix/ldap-alias.cf.tpl rename to app/email/config/postfix/ldap-alias.cf.tpl diff --git a/app/config/configuration/email/postfix/ldap-virtual-domains.cf.tpl b/app/email/config/postfix/ldap-virtual-domains.cf.tpl similarity index 100% rename from app/config/configuration/email/postfix/ldap-virtual-domains.cf.tpl rename to app/email/config/postfix/ldap-virtual-domains.cf.tpl diff --git a/app/config/configuration/email/postfix/main.cf b/app/email/config/postfix/main.cf similarity index 100% rename from app/config/configuration/email/postfix/main.cf rename to app/email/config/postfix/main.cf diff --git a/app/config/configuration/email/postfix/master.cf b/app/email/config/postfix/master.cf similarity index 100% rename from app/config/configuration/email/postfix/master.cf rename to app/email/config/postfix/master.cf diff --git a/app/config/configuration/email/postfix/transport b/app/email/config/postfix/transport similarity index 100% rename from app/config/configuration/email/postfix/transport rename to app/email/config/postfix/transport diff --git a/app/config/configuration/email/postfix/transport.db b/app/email/config/postfix/transport.db similarity index 100% rename from app/config/configuration/email/postfix/transport.db rename to app/email/config/postfix/transport.db diff --git a/app/config/configuration/email/sogo/sogo.conf.tpl b/app/email/config/sogo/sogo.conf.tpl similarity index 100% rename from app/config/configuration/email/sogo/sogo.conf.tpl rename to app/email/config/sogo/sogo.conf.tpl diff --git a/app/deployment/email.hcl b/app/email/deploy/email.hcl similarity index 91% rename from app/deployment/email.hcl rename to app/email/deploy/email.hcl index 3d9e15b..bef7268 100644 --- a/app/deployment/email.hcl +++ b/app/email/deploy/email.hcl @@ -131,7 +131,7 @@ job "email" { } template { - data = file("../config/configuration/email/dovecot/dovecot-ldap.conf.tpl") + data = file("../config/dovecot/dovecot-ldap.conf.tpl") destination = "secrets/conf/dovecot-ldap.conf" perms = "400" } @@ -200,15 +200,15 @@ job "email" { } template { - data = file("../config/configuration/email/dkim/keytable") + data = file("../config/dkim/keytable") destination = "secrets/dkim/keytable" } template { - data = file("../config/configuration/email/dkim/signingtable") + data = file("../config/dkim/signingtable") destination = "secrets/dkim/signingtable" } template { - data = file("../config/configuration/email/dkim/trusted") + data = file("../config/dkim/trusted") destination = "secrets/dkim/trusted" } @@ -329,42 +329,42 @@ job "email" { } template { - data = file("../config/configuration/email/postfix/ldap-account.cf.tpl") + data = file("../config/postfix/ldap-account.cf.tpl") destination = "secrets/postfix/ldap-account.cf" } template { - data = file("../config/configuration/email/postfix/ldap-alias.cf.tpl") + data = file("../config/postfix/ldap-alias.cf.tpl") destination = "secrets/postfix/ldap-alias.cf" } template { - data = file("../config/configuration/email/postfix/ldap-virtual-domains.cf.tpl") + data = file("../config/postfix/ldap-virtual-domains.cf.tpl") destination = "secrets/postfix/ldap-virtual-domains.cf" } template { - data = file("../config/configuration/email/postfix/dynamicmaps.cf") + data = file("../config/postfix/dynamicmaps.cf") destination = "secrets/postfix/dynamicmaps.cf" } template { - data = file("../config/configuration/email/postfix/header_checks") + data = file("../config/postfix/header_checks") destination = "secrets/postfix/header_checks" } template { - data = file("../config/configuration/email/postfix/main.cf") + data = file("../config/postfix/main.cf") destination = "secrets/postfix/main.cf" } template { - data = file("../config/configuration/email/postfix/master.cf") + data = file("../config/postfix/master.cf") destination = "secrets/postfix/master.cf" } template { - data = file("../config/configuration/email/postfix/transport") + data = file("../config/postfix/transport") destination = "secrets/postfix/transport" } @@ -450,7 +450,7 @@ job "email" { } template { - data = file("../config/configuration/email/sogo/sogo.conf.tpl") + data = file("../config/sogo/sogo.conf.tpl") destination = "secrets/sogo.conf" } diff --git a/app/config/secrets/email/dkim/smtp.private.sample b/app/email/secrets/email/dkim/smtp.private.sample similarity index 100% rename from app/config/secrets/email/dkim/smtp.private.sample rename to app/email/secrets/email/dkim/smtp.private.sample diff --git a/app/config/secrets/email/dovecot/dovecot.crt.sample b/app/email/secrets/email/dovecot/dovecot.crt.sample similarity index 100% rename from app/config/secrets/email/dovecot/dovecot.crt.sample rename to app/email/secrets/email/dovecot/dovecot.crt.sample diff --git a/app/config/secrets/email/dovecot/dovecot.key.sample b/app/email/secrets/email/dovecot/dovecot.key.sample similarity index 100% rename from app/config/secrets/email/dovecot/dovecot.key.sample rename to app/email/secrets/email/dovecot/dovecot.key.sample diff --git a/app/config/secrets/chat/synapse/ldap_binddn.sample b/app/email/secrets/email/dovecot/ldap_binddn.sample similarity index 100% rename from app/config/secrets/chat/synapse/ldap_binddn.sample rename to app/email/secrets/email/dovecot/ldap_binddn.sample diff --git a/app/config/secrets/email/dovecot/ldap_bindpwd.sample b/app/email/secrets/email/dovecot/ldap_bindpwd.sample similarity index 100% rename from app/config/secrets/email/dovecot/ldap_bindpwd.sample rename to app/email/secrets/email/dovecot/ldap_bindpwd.sample diff --git a/app/config/secrets/email/postfix/postfix.crt.sample b/app/email/secrets/email/postfix/postfix.crt.sample similarity index 100% rename from app/config/secrets/email/postfix/postfix.crt.sample rename to app/email/secrets/email/postfix/postfix.crt.sample diff --git a/app/config/secrets/email/postfix/postfix.key.sample b/app/email/secrets/email/postfix/postfix.key.sample similarity index 100% rename from app/config/secrets/email/postfix/postfix.key.sample rename to app/email/secrets/email/postfix/postfix.key.sample diff --git a/app/config/secrets/email/dovecot/ldap_binddn.sample b/app/email/secrets/email/sogo/ldap_binddn.sample similarity index 100% rename from app/config/secrets/email/dovecot/ldap_binddn.sample rename to app/email/secrets/email/sogo/ldap_binddn.sample diff --git a/app/config/secrets/chat/synapse/ldap_bindpw.sample b/app/email/secrets/email/sogo/ldap_bindpw.sample similarity index 100% rename from app/config/secrets/chat/synapse/ldap_bindpw.sample rename to app/email/secrets/email/sogo/ldap_bindpw.sample diff --git a/app/config/secrets/email/sogo/postgre_auth.sample b/app/email/secrets/email/sogo/postgre_auth.sample similarity index 100% rename from app/config/secrets/email/sogo/postgre_auth.sample rename to app/email/secrets/email/sogo/postgre_auth.sample diff --git a/app/config/configuration/garage/garage.toml b/app/garage/config/garage.toml similarity index 100% rename from app/config/configuration/garage/garage.toml rename to app/garage/config/garage.toml diff --git a/app/deployment/garage.hcl b/app/garage/deploy/garage.hcl similarity index 97% rename from app/deployment/garage.hcl rename to app/garage/deploy/garage.hcl index 20ee3cd..1be68aa 100644 --- a/app/deployment/garage.hcl +++ b/app/garage/deploy/garage.hcl @@ -32,7 +32,7 @@ job "garage" { } template { - data = file("../config/configuration/garage/garage.toml") + data = file("../config/garage.toml") destination = "secrets/garage.toml" } diff --git a/app/build/matrix-synapse/Dockerfile b/app/im/build/matrix-synapse/Dockerfile similarity index 100% rename from app/build/matrix-synapse/Dockerfile rename to app/im/build/matrix-synapse/Dockerfile diff --git a/app/build/matrix-synapse/entrypoint.sh b/app/im/build/matrix-synapse/entrypoint.sh similarity index 100% rename from app/build/matrix-synapse/entrypoint.sh rename to app/im/build/matrix-synapse/entrypoint.sh diff --git a/app/build/riotweb/Dockerfile b/app/im/build/riotweb/Dockerfile similarity index 100% rename from app/build/riotweb/Dockerfile rename to app/im/build/riotweb/Dockerfile diff --git a/app/config/configuration/chat/coturn/turnserver.conf.tpl b/app/im/config/coturn/turnserver.conf.tpl similarity index 100% rename from app/config/configuration/chat/coturn/turnserver.conf.tpl rename to app/im/config/coturn/turnserver.conf.tpl diff --git a/app/config/configuration/chat/easybridge/config.json.tpl b/app/im/config/easybridge/config.json.tpl similarity index 100% rename from app/config/configuration/chat/easybridge/config.json.tpl rename to app/im/config/easybridge/config.json.tpl diff --git a/app/config/configuration/chat/easybridge/registration.yaml.tpl b/app/im/config/easybridge/registration.yaml.tpl similarity index 100% rename from app/config/configuration/chat/easybridge/registration.yaml.tpl rename to app/im/config/easybridge/registration.yaml.tpl diff --git a/app/config/configuration/chat/fb2mx/config.yaml b/app/im/config/fb2mx/config.yaml similarity index 100% rename from app/config/configuration/chat/fb2mx/config.yaml rename to app/im/config/fb2mx/config.yaml diff --git a/app/config/configuration/chat/fb2mx/registration.yaml b/app/im/config/fb2mx/registration.yaml similarity index 100% rename from app/config/configuration/chat/fb2mx/registration.yaml rename to app/im/config/fb2mx/registration.yaml diff --git a/app/config/configuration/chat/riot_web/config.json b/app/im/config/riot_web/config.json similarity index 100% rename from app/config/configuration/chat/riot_web/config.json rename to app/im/config/riot_web/config.json diff --git a/app/config/configuration/chat/synapse/conf.d/report_stats.yaml b/app/im/config/synapse/conf.d/report_stats.yaml similarity index 100% rename from app/config/configuration/chat/synapse/conf.d/report_stats.yaml rename to app/im/config/synapse/conf.d/report_stats.yaml diff --git a/app/config/configuration/chat/synapse/conf.d/server_name.yaml b/app/im/config/synapse/conf.d/server_name.yaml similarity index 100% rename from app/config/configuration/chat/synapse/conf.d/server_name.yaml rename to app/im/config/synapse/conf.d/server_name.yaml diff --git a/app/config/configuration/chat/synapse/homeserver.yaml b/app/im/config/synapse/homeserver.yaml similarity index 100% rename from app/config/configuration/chat/synapse/homeserver.yaml rename to app/im/config/synapse/homeserver.yaml diff --git a/app/config/configuration/chat/synapse/log.yaml b/app/im/config/synapse/log.yaml similarity index 100% rename from app/config/configuration/chat/synapse/log.yaml rename to app/im/config/synapse/log.yaml diff --git a/app/deployment/im.hcl b/app/im/deploy/im.hcl similarity index 90% rename from app/deployment/im.hcl rename to app/im/deploy/im.hcl index 636f78e..c9591e6 100644 --- a/app/deployment/im.hcl +++ b/app/im/deploy/im.hcl @@ -35,27 +35,27 @@ job "im" { } template { - data = file("../config/configuration/chat/synapse/homeserver.yaml") + data = file("../config/synapse/homeserver.yaml") destination = "secrets/conf/homeserver.yaml" } template { - data = file("../config/configuration/chat/easybridge/registration.yaml.tpl") + data = file("../config/easybridge/registration.yaml.tpl") destination = "secrets/conf/easybridge_registration.yaml" } template { - data = file("../config/configuration/chat/synapse/log.yaml") + data = file("../config/synapse/log.yaml") destination = "secrets/conf/log.yaml" } template { - data = file("../config/configuration/chat/synapse/conf.d/server_name.yaml") + data = file("../config/synapse/conf.d/server_name.yaml") destination = "secrets/conf/server_name.yaml" } template { - data = file("../config/configuration/chat/synapse/conf.d/report_stats.yaml") + data = file("../config/synapse/conf.d/report_stats.yaml") destination = "secrets/conf/report_stats.yaml" } @@ -152,12 +152,12 @@ job "im" { } template { - data = file("../config/configuration/chat/easybridge/registration.yaml.tpl") + data = file("../config/easybridge/registration.yaml.tpl") destination = "secrets/conf/registration.yaml" } template { - data = file("../config/configuration/chat/easybridge/config.json.tpl") + data = file("../config/easybridge/config.json.tpl") destination = "secrets/conf/config.json" } @@ -228,7 +228,7 @@ job "im" { } template { - data = file("../config/configuration/chat/riot_web/config.json") + data = file("../config/riot_web/config.json") destination = "secrets/config.json" } diff --git a/app/config/secrets/chat/coturn/static-auth.sample b/app/im/secrets/chat/coturn/static-auth.sample similarity index 100% rename from app/config/secrets/chat/coturn/static-auth.sample rename to app/im/secrets/chat/coturn/static-auth.sample diff --git a/app/config/secrets/chat/fb2mx/as_token.sample b/app/im/secrets/chat/fb2mx/as_token.sample similarity index 100% rename from app/config/secrets/chat/fb2mx/as_token.sample rename to app/im/secrets/chat/fb2mx/as_token.sample diff --git a/app/config/secrets/chat/fb2mx/db_url.sample b/app/im/secrets/chat/fb2mx/db_url.sample similarity index 100% rename from app/config/secrets/chat/fb2mx/db_url.sample rename to app/im/secrets/chat/fb2mx/db_url.sample diff --git a/app/config/secrets/chat/fb2mx/hs_token.sample b/app/im/secrets/chat/fb2mx/hs_token.sample similarity index 100% rename from app/config/secrets/chat/fb2mx/hs_token.sample rename to app/im/secrets/chat/fb2mx/hs_token.sample diff --git a/app/config/secrets/chat/synapse/homeserver.tls.crt.sample b/app/im/secrets/chat/synapse/homeserver.tls.crt.sample similarity index 100% rename from app/config/secrets/chat/synapse/homeserver.tls.crt.sample rename to app/im/secrets/chat/synapse/homeserver.tls.crt.sample diff --git a/app/config/secrets/chat/synapse/homeserver.tls.dh.sample b/app/im/secrets/chat/synapse/homeserver.tls.dh.sample similarity index 100% rename from app/config/secrets/chat/synapse/homeserver.tls.dh.sample rename to app/im/secrets/chat/synapse/homeserver.tls.dh.sample diff --git a/app/config/secrets/chat/synapse/homeserver.tls.key.sample b/app/im/secrets/chat/synapse/homeserver.tls.key.sample similarity index 100% rename from app/config/secrets/chat/synapse/homeserver.tls.key.sample rename to app/im/secrets/chat/synapse/homeserver.tls.key.sample diff --git a/app/config/secrets/email/sogo/ldap_binddn.sample b/app/im/secrets/chat/synapse/ldap_binddn.sample similarity index 100% rename from app/config/secrets/email/sogo/ldap_binddn.sample rename to app/im/secrets/chat/synapse/ldap_binddn.sample diff --git a/app/config/secrets/email/sogo/ldap_bindpw.sample b/app/im/secrets/chat/synapse/ldap_bindpw.sample similarity index 100% rename from app/config/secrets/email/sogo/ldap_bindpw.sample rename to app/im/secrets/chat/synapse/ldap_bindpw.sample diff --git a/app/config/secrets/chat/synapse/postgres_db.sample b/app/im/secrets/chat/synapse/postgres_db.sample similarity index 100% rename from app/config/secrets/chat/synapse/postgres_db.sample rename to app/im/secrets/chat/synapse/postgres_db.sample diff --git a/app/config/secrets/chat/synapse/postgres_pwd.sample b/app/im/secrets/chat/synapse/postgres_pwd.sample similarity index 100% rename from app/config/secrets/chat/synapse/postgres_pwd.sample rename to app/im/secrets/chat/synapse/postgres_pwd.sample diff --git a/app/config/secrets/chat/synapse/postgres_user.sample b/app/im/secrets/chat/synapse/postgres_user.sample similarity index 100% rename from app/config/secrets/chat/synapse/postgres_user.sample rename to app/im/secrets/chat/synapse/postgres_user.sample diff --git a/app/config/secrets/chat/synapse/registration_shared_secret.sample b/app/im/secrets/chat/synapse/registration_shared_secret.sample similarity index 100% rename from app/config/secrets/chat/synapse/registration_shared_secret.sample rename to app/im/secrets/chat/synapse/registration_shared_secret.sample diff --git a/app/build/jitsi-conference-focus/Dockerfile b/app/jitsi/build/jitsi-conference-focus/Dockerfile similarity index 100% rename from app/build/jitsi-conference-focus/Dockerfile rename to app/jitsi/build/jitsi-conference-focus/Dockerfile diff --git a/app/build/jitsi-conference-focus/jicofo b/app/jitsi/build/jitsi-conference-focus/jicofo similarity index 100% rename from app/build/jitsi-conference-focus/jicofo rename to app/jitsi/build/jitsi-conference-focus/jicofo diff --git a/app/build/jitsi-conference-focus/sip-communicator.properties b/app/jitsi/build/jitsi-conference-focus/sip-communicator.properties similarity index 100% rename from app/build/jitsi-conference-focus/sip-communicator.properties rename to app/jitsi/build/jitsi-conference-focus/sip-communicator.properties diff --git a/app/build/jitsi-meet/Dockerfile b/app/jitsi/build/jitsi-meet/Dockerfile similarity index 100% rename from app/build/jitsi-meet/Dockerfile rename to app/jitsi/build/jitsi-meet/Dockerfile diff --git a/app/build/jitsi-meet/config.js b/app/jitsi/build/jitsi-meet/config.js similarity index 100% rename from app/build/jitsi-meet/config.js rename to app/jitsi/build/jitsi-meet/config.js diff --git a/app/build/jitsi-meet/entrypoint.sh b/app/jitsi/build/jitsi-meet/entrypoint.sh similarity index 100% rename from app/build/jitsi-meet/entrypoint.sh rename to app/jitsi/build/jitsi-meet/entrypoint.sh diff --git a/app/build/jitsi-videobridge/Dockerfile b/app/jitsi/build/jitsi-videobridge/Dockerfile similarity index 100% rename from app/build/jitsi-videobridge/Dockerfile rename to app/jitsi/build/jitsi-videobridge/Dockerfile diff --git a/app/build/jitsi-videobridge/jvb_run b/app/jitsi/build/jitsi-videobridge/jvb_run similarity index 100% rename from app/build/jitsi-videobridge/jvb_run rename to app/jitsi/build/jitsi-videobridge/jvb_run diff --git a/app/build/jitsi-xmpp/Dockerfile b/app/jitsi/build/jitsi-xmpp/Dockerfile similarity index 100% rename from app/build/jitsi-xmpp/Dockerfile rename to app/jitsi/build/jitsi-xmpp/Dockerfile diff --git a/app/build/jitsi-xmpp/external_components.cfg.lua b/app/jitsi/build/jitsi-xmpp/external_components.cfg.lua similarity index 100% rename from app/build/jitsi-xmpp/external_components.cfg.lua rename to app/jitsi/build/jitsi-xmpp/external_components.cfg.lua diff --git a/app/build/jitsi-xmpp/xmpp_conf b/app/jitsi/build/jitsi-xmpp/xmpp_conf similarity index 100% rename from app/build/jitsi-xmpp/xmpp_conf rename to app/jitsi/build/jitsi-xmpp/xmpp_conf diff --git a/app/build/jitsi-xmpp/xmpp_gen b/app/jitsi/build/jitsi-xmpp/xmpp_gen similarity index 100% rename from app/build/jitsi-xmpp/xmpp_gen rename to app/jitsi/build/jitsi-xmpp/xmpp_gen diff --git a/app/build/jitsi-xmpp/xmpp_run b/app/jitsi/build/jitsi-xmpp/xmpp_run similarity index 100% rename from app/build/jitsi-xmpp/xmpp_run rename to app/jitsi/build/jitsi-xmpp/xmpp_run diff --git a/app/config/configuration/jitsi/global_env.tpl b/app/jitsi/config/global_env.tpl similarity index 100% rename from app/config/configuration/jitsi/global_env.tpl rename to app/jitsi/config/global_env.tpl diff --git a/app/deployment/jitsi.hcl b/app/jitsi/deploy/jitsi.hcl similarity index 95% rename from app/deployment/jitsi.hcl rename to app/jitsi/deploy/jitsi.hcl index 04c3f9f..852e1e6 100644 --- a/app/deployment/jitsi.hcl +++ b/app/jitsi/deploy/jitsi.hcl @@ -27,7 +27,7 @@ job "jitsi" { } template { - data = file("../config/configuration/jitsi/global_env.tpl") + data = file("../config/global_env.tpl") destination = "secrets/global_env" env = true } @@ -100,7 +100,7 @@ job "jitsi" { } template { - data = file("../config/configuration/jitsi/global_env.tpl") + data = file("../config/global_env.tpl") destination = "secrets/global_env" env = true } @@ -153,7 +153,7 @@ job "jitsi" { } template { - data = file("../config/configuration/jitsi/global_env.tpl") + data = file("../config/global_env.tpl") destination = "secrets/global_env" env = true } @@ -194,7 +194,7 @@ job "jitsi" { } template { - data = file("../config/configuration/jitsi/global_env.tpl") + data = file("../config/global_env.tpl") destination = "secrets/global_env" env = true } diff --git a/app/integration/jitsi/01_gen_certs.yml b/app/jitsi/integratio/01_gen_certs.yml similarity index 100% rename from app/integration/jitsi/01_gen_certs.yml rename to app/jitsi/integratio/01_gen_certs.yml diff --git a/app/integration/jitsi/02_run.yml b/app/jitsi/integratio/02_run.yml similarity index 100% rename from app/integration/jitsi/02_run.yml rename to app/jitsi/integratio/02_run.yml diff --git a/app/integration/jitsi/README.md b/app/jitsi/integratio/README.md similarity index 100% rename from app/integration/jitsi/README.md rename to app/jitsi/integratio/README.md diff --git a/app/integration/jitsi/dev.env b/app/jitsi/integratio/dev.env similarity index 100% rename from app/integration/jitsi/dev.env rename to app/jitsi/integratio/dev.env diff --git a/app/integration/jitsi/jitsi-certs/.gitignore b/app/jitsi/integratio/jitsi-certs/.gitignore similarity index 100% rename from app/integration/jitsi/jitsi-certs/.gitignore rename to app/jitsi/integratio/jitsi-certs/.gitignore diff --git a/app/config/secrets/jitsi/auth.jitsi.deuxfleurs.fr.crt.sample b/app/jitsi/secrets/jitsi/auth.jitsi.deuxfleurs.fr.crt.sample similarity index 100% rename from app/config/secrets/jitsi/auth.jitsi.deuxfleurs.fr.crt.sample rename to app/jitsi/secrets/jitsi/auth.jitsi.deuxfleurs.fr.crt.sample diff --git a/app/config/secrets/jitsi/auth.jitsi.deuxfleurs.fr.key.sample b/app/jitsi/secrets/jitsi/auth.jitsi.deuxfleurs.fr.key.sample similarity index 100% rename from app/config/secrets/jitsi/auth.jitsi.deuxfleurs.fr.key.sample rename to app/jitsi/secrets/jitsi/auth.jitsi.deuxfleurs.fr.key.sample diff --git a/app/config/secrets/jitsi/jitsi.deuxfleurs.fr.crt.sample b/app/jitsi/secrets/jitsi/jitsi.deuxfleurs.fr.crt.sample similarity index 100% rename from app/config/secrets/jitsi/jitsi.deuxfleurs.fr.crt.sample rename to app/jitsi/secrets/jitsi/jitsi.deuxfleurs.fr.crt.sample diff --git a/app/config/secrets/jitsi/jitsi.deuxfleurs.fr.key.sample b/app/jitsi/secrets/jitsi/jitsi.deuxfleurs.fr.key.sample similarity index 100% rename from app/config/secrets/jitsi/jitsi.deuxfleurs.fr.key.sample rename to app/jitsi/secrets/jitsi/jitsi.deuxfleurs.fr.key.sample diff --git a/app/build/nextcloud/Dockerfile b/app/nextcloud/build/nextcloud/Dockerfile similarity index 100% rename from app/build/nextcloud/Dockerfile rename to app/nextcloud/build/nextcloud/Dockerfile diff --git a/app/build/nextcloud/container-setup.sh b/app/nextcloud/build/nextcloud/container-setup.sh similarity index 100% rename from app/build/nextcloud/container-setup.sh rename to app/nextcloud/build/nextcloud/container-setup.sh diff --git a/app/build/nextcloud/entrypoint.sh b/app/nextcloud/build/nextcloud/entrypoint.sh similarity index 100% rename from app/build/nextcloud/entrypoint.sh rename to app/nextcloud/build/nextcloud/entrypoint.sh diff --git a/app/config/configuration/nextcloud/config.php.tpl b/app/nextcloud/config/config.php.tpl similarity index 100% rename from app/config/configuration/nextcloud/config.php.tpl rename to app/nextcloud/config/config.php.tpl diff --git a/app/deployment/nextcloud.hcl b/app/nextcloud/deploy/nextcloud.hcl similarity index 94% rename from app/deployment/nextcloud.hcl rename to app/nextcloud/deploy/nextcloud.hcl index 8eed7d9..8852787 100644 --- a/app/deployment/nextcloud.hcl +++ b/app/nextcloud/deploy/nextcloud.hcl @@ -28,7 +28,7 @@ job "nextcloud" { } template { - data = file("../config/configuration/nextcloud/config.php.tpl") + data = file("../config/config.php.tpl") destination = "secrets/config.php" } diff --git a/app/integration/nextcloud/README.md b/app/nextcloud/integration/README.md similarity index 100% rename from app/integration/nextcloud/README.md rename to app/nextcloud/integration/README.md diff --git a/app/integration/nextcloud/bottin.json b/app/nextcloud/integration/bottin.json similarity index 100% rename from app/integration/nextcloud/bottin.json rename to app/nextcloud/integration/bottin.json diff --git a/app/integration/nextcloud/docker-compose.yml b/app/nextcloud/integration/docker-compose.yml similarity index 100% rename from app/integration/nextcloud/docker-compose.yml rename to app/nextcloud/integration/docker-compose.yml diff --git a/app/deployment/platoo.hcl b/app/platoo/deploy/platoo.hcl similarity index 100% rename from app/deployment/platoo.hcl rename to app/platoo/deploy/platoo.hcl diff --git a/app/config/secrets/platoo/bddpw.sample b/app/platoo/secrets/platoo/bddpw.sample similarity index 100% rename from app/config/secrets/platoo/bddpw.sample rename to app/platoo/secrets/platoo/bddpw.sample diff --git a/app/build/plume/Dockerfile b/app/plume/build/plume/Dockerfile similarity index 100% rename from app/build/plume/Dockerfile rename to app/plume/build/plume/Dockerfile diff --git a/app/build/plume/README.md b/app/plume/build/plume/README.md similarity index 100% rename from app/build/plume/README.md rename to app/plume/build/plume/README.md diff --git a/app/build/plume/plm-start b/app/plume/build/plume/plm-start similarity index 100% rename from app/build/plume/plm-start rename to app/plume/build/plume/plm-start diff --git a/app/config/configuration/plume/app.env b/app/plume/config/app.env similarity index 100% rename from app/config/configuration/plume/app.env rename to app/plume/config/app.env diff --git a/app/deployment/plume.hcl b/app/plume/deploy/plume.hcl similarity index 95% rename from app/deployment/plume.hcl rename to app/plume/deploy/plume.hcl index 1bdc332..0a82c57 100644 --- a/app/deployment/plume.hcl +++ b/app/plume/deploy/plume.hcl @@ -29,7 +29,7 @@ job "plume" { } template { - data = file("../config/configuration/plume/app.env") + data = file("../config/app.env") destination = "secrets/app.env" env = true } diff --git a/app/integration/plume/bottin.json b/app/plume/integration/bottin.json similarity index 100% rename from app/integration/plume/bottin.json rename to app/plume/integration/bottin.json diff --git a/app/integration/plume/docker-compose.yml b/app/plume/integration/docker-compose.yml similarity index 100% rename from app/integration/plume/docker-compose.yml rename to app/plume/integration/docker-compose.yml diff --git a/app/integration/plume/plume.env b/app/plume/integration/plume.env similarity index 100% rename from app/integration/plume/plume.env rename to app/plume/integration/plume.env diff --git a/app/config/secrets/plume/pgsql_pw.sh b/app/plume/secrets/plume/pgsql_pw.sh similarity index 100% rename from app/config/secrets/plume/pgsql_pw.sh rename to app/plume/secrets/plume/pgsql_pw.sh diff --git a/app/config/secrets/plume/secret_key.sh b/app/plume/secrets/plume/secret_key.sh similarity index 100% rename from app/config/secrets/plume/secret_key.sh rename to app/plume/secrets/plume/secret_key.sh diff --git a/app/build/postgres/Dockerfile b/app/postgres/build/postgres/Dockerfile similarity index 100% rename from app/build/postgres/Dockerfile rename to app/postgres/build/postgres/Dockerfile diff --git a/app/build/postgres/README.md b/app/postgres/build/postgres/README.md similarity index 100% rename from app/build/postgres/README.md rename to app/postgres/build/postgres/README.md diff --git a/app/build/postgres/postgresql.conf b/app/postgres/build/postgres/postgresql.conf similarity index 100% rename from app/build/postgres/postgresql.conf rename to app/postgres/build/postgres/postgresql.conf diff --git a/app/build/postgres/start.sh b/app/postgres/build/postgres/start.sh similarity index 100% rename from app/build/postgres/start.sh rename to app/postgres/build/postgres/start.sh diff --git a/app/config/configuration/postgres/keeper/env.tpl b/app/postgres/config/keeper/env.tpl similarity index 100% rename from app/config/configuration/postgres/keeper/env.tpl rename to app/postgres/config/keeper/env.tpl diff --git a/app/deployment/postgres.hcl b/app/postgres/deploy/postgres.hcl similarity index 97% rename from app/deployment/postgres.hcl rename to app/postgres/deploy/postgres.hcl index 388c65e..f5eec51 100644 --- a/app/deployment/postgres.hcl +++ b/app/postgres/deploy/postgres.hcl @@ -101,7 +101,7 @@ job "postgres" { } template { - data = file("../config/configuration/postgres/keeper/env.tpl") + data = file("../config/keeper/env.tpl") destination = "secrets/env" env = true } diff --git a/app/config/secrets/postgres/keeper/pg_repl_pwd.sample b/app/postgres/secrets/postgres/keeper/pg_repl_pwd.sample similarity index 100% rename from app/config/secrets/postgres/keeper/pg_repl_pwd.sample rename to app/postgres/secrets/postgres/keeper/pg_repl_pwd.sample diff --git a/app/config/secrets/postgres/keeper/pg_repl_username.sample b/app/postgres/secrets/postgres/keeper/pg_repl_username.sample similarity index 100% rename from app/config/secrets/postgres/keeper/pg_repl_username.sample rename to app/postgres/secrets/postgres/keeper/pg_repl_username.sample diff --git a/app/config/secrets/postgres/keeper/pg_su_pwd.sample b/app/postgres/secrets/postgres/keeper/pg_su_pwd.sample similarity index 100% rename from app/config/secrets/postgres/keeper/pg_su_pwd.sample rename to app/postgres/secrets/postgres/keeper/pg_su_pwd.sample diff --git a/app/deployment/science.hcl b/app/science/deploy/science.hcl similarity index 100% rename from app/deployment/science.hcl rename to app/science/deploy/science.hcl diff --git a/app/build/mariadb/60-disable-dialog.cnf b/app/seafile/build/mariadb/60-disable-dialog.cnf similarity index 100% rename from app/build/mariadb/60-disable-dialog.cnf rename to app/seafile/build/mariadb/60-disable-dialog.cnf diff --git a/app/build/mariadb/60-ldap.cnf b/app/seafile/build/mariadb/60-ldap.cnf similarity index 100% rename from app/build/mariadb/60-ldap.cnf rename to app/seafile/build/mariadb/60-ldap.cnf diff --git a/app/build/mariadb/60-remote.cnf b/app/seafile/build/mariadb/60-remote.cnf similarity index 100% rename from app/build/mariadb/60-remote.cnf rename to app/seafile/build/mariadb/60-remote.cnf diff --git a/app/build/mariadb/Dockerfile b/app/seafile/build/mariadb/Dockerfile similarity index 100% rename from app/build/mariadb/Dockerfile rename to app/seafile/build/mariadb/Dockerfile diff --git a/app/build/mariadb/README.md b/app/seafile/build/mariadb/README.md similarity index 100% rename from app/build/mariadb/README.md rename to app/seafile/build/mariadb/README.md diff --git a/app/build/mariadb/entrypoint.sh b/app/seafile/build/mariadb/entrypoint.sh similarity index 100% rename from app/build/mariadb/entrypoint.sh rename to app/seafile/build/mariadb/entrypoint.sh diff --git a/app/build/mariadb/nsswitch.conf b/app/seafile/build/mariadb/nsswitch.conf similarity index 100% rename from app/build/mariadb/nsswitch.conf rename to app/seafile/build/mariadb/nsswitch.conf diff --git a/app/build/mariadb/pam-mariadb b/app/seafile/build/mariadb/pam-mariadb similarity index 100% rename from app/build/mariadb/pam-mariadb rename to app/seafile/build/mariadb/pam-mariadb diff --git a/app/build/seafile/Dockerfile b/app/seafile/build/seafile/Dockerfile similarity index 100% rename from app/build/seafile/Dockerfile rename to app/seafile/build/seafile/Dockerfile diff --git a/app/build/seafile/README.md b/app/seafile/build/seafile/README.md similarity index 100% rename from app/build/seafile/README.md rename to app/seafile/build/seafile/README.md diff --git a/app/build/seafile/seadocker b/app/seafile/build/seafile/seadocker similarity index 100% rename from app/build/seafile/seadocker rename to app/seafile/build/seafile/seadocker diff --git a/app/build/seafile/seaenv b/app/seafile/build/seafile/seaenv similarity index 100% rename from app/build/seafile/seaenv rename to app/seafile/build/seafile/seaenv diff --git a/app/config/configuration/seafile/ccnet/seafile.ini b/app/seafile/config/ccnet/seafile.ini similarity index 100% rename from app/config/configuration/seafile/ccnet/seafile.ini rename to app/seafile/config/ccnet/seafile.ini diff --git a/app/config/configuration/seafile/conf/ccnet.conf.tpl b/app/seafile/config/conf/ccnet.conf.tpl similarity index 100% rename from app/config/configuration/seafile/conf/ccnet.conf.tpl rename to app/seafile/config/conf/ccnet.conf.tpl diff --git a/app/config/configuration/seafile/conf/gunicorn.conf b/app/seafile/config/conf/gunicorn.conf similarity index 100% rename from app/config/configuration/seafile/conf/gunicorn.conf rename to app/seafile/config/conf/gunicorn.conf diff --git a/app/config/configuration/seafile/ccnet/mykey.peer.sample b/app/seafile/config/conf/mykey.peer.sample similarity index 100% rename from app/config/configuration/seafile/ccnet/mykey.peer.sample rename to app/seafile/config/conf/mykey.peer.sample diff --git a/app/config/configuration/seafile/conf/seafdav.conf b/app/seafile/config/conf/seafdav.conf similarity index 100% rename from app/config/configuration/seafile/conf/seafdav.conf rename to app/seafile/config/conf/seafdav.conf diff --git a/app/config/configuration/seafile/conf/seafile.conf.tpl b/app/seafile/config/conf/seafile.conf.tpl similarity index 100% rename from app/config/configuration/seafile/conf/seafile.conf.tpl rename to app/seafile/config/conf/seafile.conf.tpl diff --git a/app/config/configuration/seafile/conf/seahub_settings.py.tpl b/app/seafile/config/conf/seahub_settings.py.tpl similarity index 100% rename from app/config/configuration/seafile/conf/seahub_settings.py.tpl rename to app/seafile/config/conf/seahub_settings.py.tpl diff --git a/app/config/configuration/mariadb/main/env.tpl b/app/seafile/config/mariadb/main/env.tpl similarity index 100% rename from app/config/configuration/mariadb/main/env.tpl rename to app/seafile/config/mariadb/main/env.tpl diff --git a/app/deployment/seafile.hcl b/app/seafile/deploy/seafile.hcl similarity index 90% rename from app/deployment/seafile.hcl rename to app/seafile/deploy/seafile.hcl index 3af7db3..d8488d2 100644 --- a/app/deployment/seafile.hcl +++ b/app/seafile/deploy/seafile.hcl @@ -35,7 +35,7 @@ job "seafile" { } template { - data = file("../config/configuration/mariadb/main/env.tpl") + data = file("../config/mariadb/main/env.tpl") destination = "secrets/env" env = true } @@ -179,30 +179,30 @@ job "seafile" { } template { - data = file("../config/configuration/seafile/conf/ccnet.conf.tpl") + data = file("../config/conf/ccnet.conf.tpl") destination = "secrets/conf/ccnet.conf" } template { - data = file("../config/configuration/seafile/conf/seafile.conf.tpl") + data = file("../config/conf/seafile.conf.tpl") destination = "secrets/conf/seafile.conf" } template { - data = file("../config/configuration/seafile/conf/seahub_settings.py.tpl") + data = file("../config/conf/seahub_settings.py.tpl") destination = "secrets/conf/seahub_settings.py" } template { - data = file("../config/configuration/seafile/ccnet/seafile.ini") + data = file("../config/ccnet/seafile.ini") destination = "secrets/ccnet/seafile.ini" } template { - data = file("../config/configuration/seafile/conf/seafdav.conf") + data = file("../config/conf/seafdav.conf") destination = "secrets/conf/seafdav.conf" } template { - data = file("../config/configuration/seafile/conf/gunicorn.conf") + data = file("../config/conf/gunicorn.conf") destination = "secrets/conf/gunicorn.conf" } diff --git a/app/config/secrets/mariadb/main/ldap_binddn.sample b/app/seafile/secrets/mariadb/main/ldap_binddn.sample similarity index 100% rename from app/config/secrets/mariadb/main/ldap_binddn.sample rename to app/seafile/secrets/mariadb/main/ldap_binddn.sample diff --git a/app/config/secrets/mariadb/main/ldap_bindpwd.sample b/app/seafile/secrets/mariadb/main/ldap_bindpwd.sample similarity index 100% rename from app/config/secrets/mariadb/main/ldap_bindpwd.sample rename to app/seafile/secrets/mariadb/main/ldap_bindpwd.sample diff --git a/app/config/secrets/mariadb/main/mysql_pwd.sample b/app/seafile/secrets/mariadb/main/mysql_pwd.sample similarity index 100% rename from app/config/secrets/mariadb/main/mysql_pwd.sample rename to app/seafile/secrets/mariadb/main/mysql_pwd.sample diff --git a/app/config/configuration/seafile/conf/mykey.peer.sample b/app/seafile/secrets/seafile/conf/mykey.peer.sample similarity index 100% rename from app/config/configuration/seafile/conf/mykey.peer.sample rename to app/seafile/secrets/seafile/conf/mykey.peer.sample diff --git a/app/config/configuration/traefik/traefik.toml b/app/traefik/config/traefik.toml similarity index 100% rename from app/config/configuration/traefik/traefik.toml rename to app/traefik/config/traefik.toml diff --git a/app/deployment/traefik.hcl b/app/traefik/deploy/traefik.hcl similarity index 95% rename from app/deployment/traefik.hcl rename to app/traefik/deploy/traefik.hcl index d0dc129..bcfa95b 100644 --- a/app/deployment/traefik.hcl +++ b/app/traefik/deploy/traefik.hcl @@ -29,7 +29,7 @@ job "frontend" { } template { - data = file("../config/configuration/traefik/traefik.toml") + data = file("../config/traefik.toml") destination = "secrets/traefik.toml" } diff --git a/app/build/webpull/.gitignore b/app/web_static/build/webpull/.gitignore similarity index 100% rename from app/build/webpull/.gitignore rename to app/web_static/build/webpull/.gitignore diff --git a/app/build/webpull/Dockerfile.nodejs b/app/web_static/build/webpull/Dockerfile.nodejs similarity index 100% rename from app/build/webpull/Dockerfile.nodejs rename to app/web_static/build/webpull/Dockerfile.nodejs diff --git a/app/build/webpull/Dockerfile.ruby b/app/web_static/build/webpull/Dockerfile.ruby similarity index 100% rename from app/build/webpull/Dockerfile.ruby rename to app/web_static/build/webpull/Dockerfile.ruby diff --git a/app/build/webpull/README.md b/app/web_static/build/webpull/README.md similarity index 100% rename from app/build/webpull/README.md rename to app/web_static/build/webpull/README.md diff --git a/app/build/webpull/main.go b/app/web_static/build/webpull/main.go similarity index 100% rename from app/build/webpull/main.go rename to app/web_static/build/webpull/main.go diff --git a/app/deployment/web_static.hcl b/app/web_static/deploy/web_static.hcl similarity index 100% rename from app/deployment/web_static.hcl rename to app/web_static/deploy/web_static.hcl diff --git a/app/config/secrets/web/home_token.sample b/app/web_static/secrets/web/home_token.sample similarity index 100% rename from app/config/secrets/web/home_token.sample rename to app/web_static/secrets/web/home_token.sample diff --git a/app/config/secrets/web/quentin.dufour.io_token.sample b/app/web_static/secrets/web/quentin.dufour.io_token.sample similarity index 100% rename from app/config/secrets/web/quentin.dufour.io_token.sample rename to app/web_static/secrets/web/quentin.dufour.io_token.sample From d4d0b100ad39bf7ae560c2f714b75fdcf47e9a87 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sat, 16 Jan 2021 17:37:34 +0100 Subject: [PATCH 09/17] Document secrets and add stub utility to manage them --- app/.gitignore | 11 ----- app/email/config/dkim/smtp.private.sample | 0 app/email/config/dkim/smtp.txt.sample | 0 app/email/secrets/email/dkim/smtp.private | 1 + .../secrets/email/dkim/smtp.private.sample | 0 app/email/secrets/email/dovecot/dovecot.crt | 1 + .../secrets/email/dovecot/dovecot.crt.sample | 0 app/email/secrets/email/dovecot/dovecot.key | 1 + .../secrets/email/dovecot/dovecot.key.sample | 0 app/email/secrets/email/dovecot/ldap_binddn | 1 + .../secrets/email/dovecot/ldap_binddn.sample | 0 app/email/secrets/email/dovecot/ldap_bindpwd | 1 + .../secrets/email/dovecot/ldap_bindpwd.sample | 0 app/email/secrets/email/postfix/postfix.crt | 1 + .../secrets/email/postfix/postfix.crt.sample | 0 app/email/secrets/email/postfix/postfix.key | 1 + .../secrets/email/postfix/postfix.key.sample | 0 app/email/secrets/email/sogo/ldap_binddn | 1 + .../secrets/email/sogo/ldap_binddn.sample | 0 app/email/secrets/email/sogo/ldap_bindpw | 1 + .../secrets/email/sogo/ldap_bindpw.sample | 0 app/email/secrets/email/sogo/postgre_auth | 1 + .../secrets/email/sogo/postgre_auth.sample | 0 app/im/secrets/chat/coturn/static-auth | 1 + app/im/secrets/chat/coturn/static-auth.sample | 0 app/im/secrets/chat/fb2mx/as_token | 1 + app/im/secrets/chat/fb2mx/as_token.sample | 0 app/im/secrets/chat/fb2mx/db_url | 1 + app/im/secrets/chat/fb2mx/db_url.sample | 1 - app/im/secrets/chat/fb2mx/hs_token | 1 + app/im/secrets/chat/fb2mx/hs_token.sample | 0 .../secrets/chat/synapse/homeserver.tls.crt | 1 + .../chat/synapse/homeserver.tls.crt.sample | 0 app/im/secrets/chat/synapse/homeserver.tls.dh | 1 + .../chat/synapse/homeserver.tls.dh.sample | 0 .../secrets/chat/synapse/homeserver.tls.key | 1 + .../chat/synapse/homeserver.tls.key.sample | 0 app/im/secrets/chat/synapse/ldap_binddn | 1 + .../secrets/chat/synapse/ldap_binddn.sample | 0 app/im/secrets/chat/synapse/ldap_bindpw | 1 + .../secrets/chat/synapse/ldap_bindpw.sample | 0 app/im/secrets/chat/synapse/postgres_db | 1 + .../secrets/chat/synapse/postgres_db.sample | 0 app/im/secrets/chat/synapse/postgres_pwd | 1 + .../secrets/chat/synapse/postgres_pwd.sample | 0 app/im/secrets/chat/synapse/postgres_user | 1 + .../secrets/chat/synapse/postgres_user.sample | 0 .../chat/synapse/registration_shared_secret | 1 + .../synapse/registration_shared_secret.sample | 0 .../jitsi/auth.jitsi.deuxfleurs.fr.crt | 1 + .../jitsi/auth.jitsi.deuxfleurs.fr.crt.sample | 0 .../jitsi/auth.jitsi.deuxfleurs.fr.key | 1 + .../jitsi/auth.jitsi.deuxfleurs.fr.key.sample | 0 .../secrets/jitsi/jitsi.deuxfleurs.fr.crt | 1 + .../jitsi/jitsi.deuxfleurs.fr.crt.sample | 0 .../secrets/jitsi/jitsi.deuxfleurs.fr.key | 1 + .../jitsi/jitsi.deuxfleurs.fr.key.sample | 0 app/platoo/secrets/platoo/bddpw | 1 + app/platoo/secrets/platoo/bddpw.sample | 0 .../secrets/postgres/keeper/pg_repl_pwd | 1 + .../postgres/keeper/pg_repl_pwd.sample | 0 .../secrets/postgres/keeper/pg_repl_username | 1 + .../postgres/keeper/pg_repl_username.sample | 0 .../secrets/postgres/keeper/pg_su_pwd | 1 + .../secrets/postgres/keeper/pg_su_pwd.sample | 0 app/seafile/config/conf/mykey.peer.sample | 0 app/seafile/secrets/mariadb/main/ldap_binddn | 1 + .../secrets/mariadb/main/ldap_binddn.sample | 0 app/seafile/secrets/mariadb/main/ldap_bindpwd | 1 + .../secrets/mariadb/main/ldap_bindpwd.sample | 0 app/seafile/secrets/mariadb/main/mysql_pwd | 1 + .../secrets/mariadb/main/mysql_pwd.sample | 0 app/seafile/secrets/seafile/conf/mykey.peer | 1 + .../secrets/seafile/conf/mykey.peer.sample | 0 app/secrets.py | 44 +++++++++++++++++++ app/web_static/secrets/web/home_token | 1 + app/web_static/secrets/web/home_token.sample | 0 .../secrets/web/quentin.dufour.io_token | 1 + .../web/quentin.dufour.io_token.sample | 0 79 files changed, 81 insertions(+), 12 deletions(-) delete mode 100644 app/.gitignore delete mode 100644 app/email/config/dkim/smtp.private.sample delete mode 100644 app/email/config/dkim/smtp.txt.sample create mode 100644 app/email/secrets/email/dkim/smtp.private delete mode 100644 app/email/secrets/email/dkim/smtp.private.sample create mode 100644 app/email/secrets/email/dovecot/dovecot.crt delete mode 100644 app/email/secrets/email/dovecot/dovecot.crt.sample create mode 100644 app/email/secrets/email/dovecot/dovecot.key delete mode 100644 app/email/secrets/email/dovecot/dovecot.key.sample create mode 100644 app/email/secrets/email/dovecot/ldap_binddn delete mode 100644 app/email/secrets/email/dovecot/ldap_binddn.sample create mode 100644 app/email/secrets/email/dovecot/ldap_bindpwd delete mode 100644 app/email/secrets/email/dovecot/ldap_bindpwd.sample create mode 100644 app/email/secrets/email/postfix/postfix.crt delete mode 100644 app/email/secrets/email/postfix/postfix.crt.sample create mode 100644 app/email/secrets/email/postfix/postfix.key delete mode 100644 app/email/secrets/email/postfix/postfix.key.sample create mode 100644 app/email/secrets/email/sogo/ldap_binddn delete mode 100644 app/email/secrets/email/sogo/ldap_binddn.sample create mode 100644 app/email/secrets/email/sogo/ldap_bindpw delete mode 100644 app/email/secrets/email/sogo/ldap_bindpw.sample create mode 100644 app/email/secrets/email/sogo/postgre_auth delete mode 100644 app/email/secrets/email/sogo/postgre_auth.sample create mode 100644 app/im/secrets/chat/coturn/static-auth delete mode 100644 app/im/secrets/chat/coturn/static-auth.sample create mode 100644 app/im/secrets/chat/fb2mx/as_token delete mode 100644 app/im/secrets/chat/fb2mx/as_token.sample create mode 100644 app/im/secrets/chat/fb2mx/db_url delete mode 100644 app/im/secrets/chat/fb2mx/db_url.sample create mode 100644 app/im/secrets/chat/fb2mx/hs_token delete mode 100644 app/im/secrets/chat/fb2mx/hs_token.sample create mode 100644 app/im/secrets/chat/synapse/homeserver.tls.crt delete mode 100644 app/im/secrets/chat/synapse/homeserver.tls.crt.sample create mode 100644 app/im/secrets/chat/synapse/homeserver.tls.dh delete mode 100644 app/im/secrets/chat/synapse/homeserver.tls.dh.sample create mode 100644 app/im/secrets/chat/synapse/homeserver.tls.key delete mode 100644 app/im/secrets/chat/synapse/homeserver.tls.key.sample create mode 100644 app/im/secrets/chat/synapse/ldap_binddn delete mode 100644 app/im/secrets/chat/synapse/ldap_binddn.sample create mode 100644 app/im/secrets/chat/synapse/ldap_bindpw delete mode 100644 app/im/secrets/chat/synapse/ldap_bindpw.sample create mode 100644 app/im/secrets/chat/synapse/postgres_db delete mode 100644 app/im/secrets/chat/synapse/postgres_db.sample create mode 100644 app/im/secrets/chat/synapse/postgres_pwd delete mode 100644 app/im/secrets/chat/synapse/postgres_pwd.sample create mode 100644 app/im/secrets/chat/synapse/postgres_user delete mode 100644 app/im/secrets/chat/synapse/postgres_user.sample create mode 100644 app/im/secrets/chat/synapse/registration_shared_secret delete mode 100644 app/im/secrets/chat/synapse/registration_shared_secret.sample create mode 100644 app/jitsi/secrets/jitsi/auth.jitsi.deuxfleurs.fr.crt delete mode 100644 app/jitsi/secrets/jitsi/auth.jitsi.deuxfleurs.fr.crt.sample create mode 100644 app/jitsi/secrets/jitsi/auth.jitsi.deuxfleurs.fr.key delete mode 100644 app/jitsi/secrets/jitsi/auth.jitsi.deuxfleurs.fr.key.sample create mode 100644 app/jitsi/secrets/jitsi/jitsi.deuxfleurs.fr.crt delete mode 100644 app/jitsi/secrets/jitsi/jitsi.deuxfleurs.fr.crt.sample create mode 100644 app/jitsi/secrets/jitsi/jitsi.deuxfleurs.fr.key delete mode 100644 app/jitsi/secrets/jitsi/jitsi.deuxfleurs.fr.key.sample create mode 100644 app/platoo/secrets/platoo/bddpw delete mode 100644 app/platoo/secrets/platoo/bddpw.sample create mode 100644 app/postgres/secrets/postgres/keeper/pg_repl_pwd delete mode 100644 app/postgres/secrets/postgres/keeper/pg_repl_pwd.sample create mode 100644 app/postgres/secrets/postgres/keeper/pg_repl_username delete mode 100644 app/postgres/secrets/postgres/keeper/pg_repl_username.sample create mode 100644 app/postgres/secrets/postgres/keeper/pg_su_pwd delete mode 100644 app/postgres/secrets/postgres/keeper/pg_su_pwd.sample delete mode 100644 app/seafile/config/conf/mykey.peer.sample create mode 100644 app/seafile/secrets/mariadb/main/ldap_binddn delete mode 100644 app/seafile/secrets/mariadb/main/ldap_binddn.sample create mode 100644 app/seafile/secrets/mariadb/main/ldap_bindpwd delete mode 100644 app/seafile/secrets/mariadb/main/ldap_bindpwd.sample create mode 100644 app/seafile/secrets/mariadb/main/mysql_pwd delete mode 100644 app/seafile/secrets/mariadb/main/mysql_pwd.sample create mode 100644 app/seafile/secrets/seafile/conf/mykey.peer delete mode 100644 app/seafile/secrets/seafile/conf/mykey.peer.sample create mode 100644 app/secrets.py create mode 100644 app/web_static/secrets/web/home_token delete mode 100644 app/web_static/secrets/web/home_token.sample create mode 100644 app/web_static/secrets/web/quentin.dufour.io_token delete mode 100644 app/web_static/secrets/web/quentin.dufour.io_token.sample diff --git a/app/.gitignore b/app/.gitignore deleted file mode 100644 index cc6b143..0000000 --- a/app/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -# Blacklist everything cleverly -*/secrets/* -!*/secrets/*/ - -# Whitelist some patterns -!*.sample -!*.gen -!*.sh -!.gitignore - -# Whitelist specific files diff --git a/app/email/config/dkim/smtp.private.sample b/app/email/config/dkim/smtp.private.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/email/config/dkim/smtp.txt.sample b/app/email/config/dkim/smtp.txt.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/email/secrets/email/dkim/smtp.private b/app/email/secrets/email/dkim/smtp.private new file mode 100644 index 0000000..3aa3621 --- /dev/null +++ b/app/email/secrets/email/dkim/smtp.private @@ -0,0 +1 @@ +RSA_PRIVATE_KEY dkim diff --git a/app/email/secrets/email/dkim/smtp.private.sample b/app/email/secrets/email/dkim/smtp.private.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/email/secrets/email/dovecot/dovecot.crt b/app/email/secrets/email/dovecot/dovecot.crt new file mode 100644 index 0000000..7229cfc --- /dev/null +++ b/app/email/secrets/email/dovecot/dovecot.crt @@ -0,0 +1 @@ +SSL_CERT dovecot deuxfleurs.fr diff --git a/app/email/secrets/email/dovecot/dovecot.crt.sample b/app/email/secrets/email/dovecot/dovecot.crt.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/email/secrets/email/dovecot/dovecot.key b/app/email/secrets/email/dovecot/dovecot.key new file mode 100644 index 0000000..0d42c79 --- /dev/null +++ b/app/email/secrets/email/dovecot/dovecot.key @@ -0,0 +1 @@ +SSL_KEY dovecot diff --git a/app/email/secrets/email/dovecot/dovecot.key.sample b/app/email/secrets/email/dovecot/dovecot.key.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/email/secrets/email/dovecot/ldap_binddn b/app/email/secrets/email/dovecot/ldap_binddn new file mode 100644 index 0000000..da380f2 --- /dev/null +++ b/app/email/secrets/email/dovecot/ldap_binddn @@ -0,0 +1 @@ +SERVICE_DN dovecot Dovecot IMAP server diff --git a/app/email/secrets/email/dovecot/ldap_binddn.sample b/app/email/secrets/email/dovecot/ldap_binddn.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/email/secrets/email/dovecot/ldap_bindpwd b/app/email/secrets/email/dovecot/ldap_bindpwd new file mode 100644 index 0000000..068f663 --- /dev/null +++ b/app/email/secrets/email/dovecot/ldap_bindpwd @@ -0,0 +1 @@ +SERVICE_PASSWORD dovecot diff --git a/app/email/secrets/email/dovecot/ldap_bindpwd.sample b/app/email/secrets/email/dovecot/ldap_bindpwd.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/email/secrets/email/postfix/postfix.crt b/app/email/secrets/email/postfix/postfix.crt new file mode 100644 index 0000000..f004d67 --- /dev/null +++ b/app/email/secrets/email/postfix/postfix.crt @@ -0,0 +1 @@ +SSL_CERT postfix deuxfleurs.fr diff --git a/app/email/secrets/email/postfix/postfix.crt.sample b/app/email/secrets/email/postfix/postfix.crt.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/email/secrets/email/postfix/postfix.key b/app/email/secrets/email/postfix/postfix.key new file mode 100644 index 0000000..2cf1706 --- /dev/null +++ b/app/email/secrets/email/postfix/postfix.key @@ -0,0 +1 @@ +SSL_KEY postfix diff --git a/app/email/secrets/email/postfix/postfix.key.sample b/app/email/secrets/email/postfix/postfix.key.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/email/secrets/email/sogo/ldap_binddn b/app/email/secrets/email/sogo/ldap_binddn new file mode 100644 index 0000000..df627d3 --- /dev/null +++ b/app/email/secrets/email/sogo/ldap_binddn @@ -0,0 +1 @@ +SERVICE_DN sogo SoGo email frontend diff --git a/app/email/secrets/email/sogo/ldap_binddn.sample b/app/email/secrets/email/sogo/ldap_binddn.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/email/secrets/email/sogo/ldap_bindpw b/app/email/secrets/email/sogo/ldap_bindpw new file mode 100644 index 0000000..8d2f35b --- /dev/null +++ b/app/email/secrets/email/sogo/ldap_bindpw @@ -0,0 +1 @@ +SERVICE_PASSWORD sogo diff --git a/app/email/secrets/email/sogo/ldap_bindpw.sample b/app/email/secrets/email/sogo/ldap_bindpw.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/email/secrets/email/sogo/postgre_auth b/app/email/secrets/email/sogo/postgre_auth new file mode 100644 index 0000000..4f66253 --- /dev/null +++ b/app/email/secrets/email/sogo/postgre_auth @@ -0,0 +1 @@ +USER SoGo postgres auth (format: sogo:) (TODO: replace this with two separate files and change template) diff --git a/app/email/secrets/email/sogo/postgre_auth.sample b/app/email/secrets/email/sogo/postgre_auth.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/im/secrets/chat/coturn/static-auth b/app/im/secrets/chat/coturn/static-auth new file mode 100644 index 0000000..d23be29 --- /dev/null +++ b/app/im/secrets/chat/coturn/static-auth @@ -0,0 +1 @@ +USER cotorn static-auth (what is this?) diff --git a/app/im/secrets/chat/coturn/static-auth.sample b/app/im/secrets/chat/coturn/static-auth.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/im/secrets/chat/fb2mx/as_token b/app/im/secrets/chat/fb2mx/as_token new file mode 100644 index 0000000..20b76d4 --- /dev/null +++ b/app/im/secrets/chat/fb2mx/as_token @@ -0,0 +1 @@ +USER fb2mx API server token diff --git a/app/im/secrets/chat/fb2mx/as_token.sample b/app/im/secrets/chat/fb2mx/as_token.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/im/secrets/chat/fb2mx/db_url b/app/im/secrets/chat/fb2mx/db_url new file mode 100644 index 0000000..f06e265 --- /dev/null +++ b/app/im/secrets/chat/fb2mx/db_url @@ -0,0 +1 @@ +USER fb2mx database URL, format: postgres://username:password@hostname/dbname diff --git a/app/im/secrets/chat/fb2mx/db_url.sample b/app/im/secrets/chat/fb2mx/db_url.sample deleted file mode 100644 index aff4635..0000000 --- a/app/im/secrets/chat/fb2mx/db_url.sample +++ /dev/null @@ -1 +0,0 @@ -postgres://username:password@hostname/dbname diff --git a/app/im/secrets/chat/fb2mx/hs_token b/app/im/secrets/chat/fb2mx/hs_token new file mode 100644 index 0000000..8808f8f --- /dev/null +++ b/app/im/secrets/chat/fb2mx/hs_token @@ -0,0 +1 @@ +USER fb2mx homeserver token diff --git a/app/im/secrets/chat/fb2mx/hs_token.sample b/app/im/secrets/chat/fb2mx/hs_token.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/im/secrets/chat/synapse/homeserver.tls.crt b/app/im/secrets/chat/synapse/homeserver.tls.crt new file mode 100644 index 0000000..b696093 --- /dev/null +++ b/app/im/secrets/chat/synapse/homeserver.tls.crt @@ -0,0 +1 @@ +SSL_CERT synapse im.deuxfleurs.fr diff --git a/app/im/secrets/chat/synapse/homeserver.tls.crt.sample b/app/im/secrets/chat/synapse/homeserver.tls.crt.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/im/secrets/chat/synapse/homeserver.tls.dh b/app/im/secrets/chat/synapse/homeserver.tls.dh new file mode 100644 index 0000000..0231fed --- /dev/null +++ b/app/im/secrets/chat/synapse/homeserver.tls.dh @@ -0,0 +1 @@ +USER_LONG DH parameters for matrix ssl key? how does this work? diff --git a/app/im/secrets/chat/synapse/homeserver.tls.dh.sample b/app/im/secrets/chat/synapse/homeserver.tls.dh.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/im/secrets/chat/synapse/homeserver.tls.key b/app/im/secrets/chat/synapse/homeserver.tls.key new file mode 100644 index 0000000..feee544 --- /dev/null +++ b/app/im/secrets/chat/synapse/homeserver.tls.key @@ -0,0 +1 @@ +SSL_KEY synapse im.deuxfleurs.fr diff --git a/app/im/secrets/chat/synapse/homeserver.tls.key.sample b/app/im/secrets/chat/synapse/homeserver.tls.key.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/im/secrets/chat/synapse/ldap_binddn b/app/im/secrets/chat/synapse/ldap_binddn new file mode 100644 index 0000000..2631bef --- /dev/null +++ b/app/im/secrets/chat/synapse/ldap_binddn @@ -0,0 +1 @@ +SERVICE_DN matrix Matrix chat server diff --git a/app/im/secrets/chat/synapse/ldap_binddn.sample b/app/im/secrets/chat/synapse/ldap_binddn.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/im/secrets/chat/synapse/ldap_bindpw b/app/im/secrets/chat/synapse/ldap_bindpw new file mode 100644 index 0000000..ba07446 --- /dev/null +++ b/app/im/secrets/chat/synapse/ldap_bindpw @@ -0,0 +1 @@ +SERVICE_PASSWORD matrix diff --git a/app/im/secrets/chat/synapse/ldap_bindpw.sample b/app/im/secrets/chat/synapse/ldap_bindpw.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/im/secrets/chat/synapse/postgres_db b/app/im/secrets/chat/synapse/postgres_db new file mode 100644 index 0000000..74eefa7 --- /dev/null +++ b/app/im/secrets/chat/synapse/postgres_db @@ -0,0 +1 @@ +CONST synapse diff --git a/app/im/secrets/chat/synapse/postgres_db.sample b/app/im/secrets/chat/synapse/postgres_db.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/im/secrets/chat/synapse/postgres_pwd b/app/im/secrets/chat/synapse/postgres_pwd new file mode 100644 index 0000000..ba07446 --- /dev/null +++ b/app/im/secrets/chat/synapse/postgres_pwd @@ -0,0 +1 @@ +SERVICE_PASSWORD matrix diff --git a/app/im/secrets/chat/synapse/postgres_pwd.sample b/app/im/secrets/chat/synapse/postgres_pwd.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/im/secrets/chat/synapse/postgres_user b/app/im/secrets/chat/synapse/postgres_user new file mode 100644 index 0000000..b08e86a --- /dev/null +++ b/app/im/secrets/chat/synapse/postgres_user @@ -0,0 +1 @@ +CONST matrix diff --git a/app/im/secrets/chat/synapse/postgres_user.sample b/app/im/secrets/chat/synapse/postgres_user.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/im/secrets/chat/synapse/registration_shared_secret b/app/im/secrets/chat/synapse/registration_shared_secret new file mode 100644 index 0000000..395cccc --- /dev/null +++ b/app/im/secrets/chat/synapse/registration_shared_secret @@ -0,0 +1 @@ +USER Shared secret for homeserver registrations (?) diff --git a/app/im/secrets/chat/synapse/registration_shared_secret.sample b/app/im/secrets/chat/synapse/registration_shared_secret.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/jitsi/secrets/jitsi/auth.jitsi.deuxfleurs.fr.crt b/app/jitsi/secrets/jitsi/auth.jitsi.deuxfleurs.fr.crt new file mode 100644 index 0000000..f2c4d4b --- /dev/null +++ b/app/jitsi/secrets/jitsi/auth.jitsi.deuxfleurs.fr.crt @@ -0,0 +1 @@ +SSL_CERT jitsi_auth autj.jitsi.deuxfleurs.fr diff --git a/app/jitsi/secrets/jitsi/auth.jitsi.deuxfleurs.fr.crt.sample b/app/jitsi/secrets/jitsi/auth.jitsi.deuxfleurs.fr.crt.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/jitsi/secrets/jitsi/auth.jitsi.deuxfleurs.fr.key b/app/jitsi/secrets/jitsi/auth.jitsi.deuxfleurs.fr.key new file mode 100644 index 0000000..4a332f8 --- /dev/null +++ b/app/jitsi/secrets/jitsi/auth.jitsi.deuxfleurs.fr.key @@ -0,0 +1 @@ +SSL_KEY jitsi_auth autj.jitsi.deuxfleurs.fr diff --git a/app/jitsi/secrets/jitsi/auth.jitsi.deuxfleurs.fr.key.sample b/app/jitsi/secrets/jitsi/auth.jitsi.deuxfleurs.fr.key.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/jitsi/secrets/jitsi/jitsi.deuxfleurs.fr.crt b/app/jitsi/secrets/jitsi/jitsi.deuxfleurs.fr.crt new file mode 100644 index 0000000..32750d3 --- /dev/null +++ b/app/jitsi/secrets/jitsi/jitsi.deuxfleurs.fr.crt @@ -0,0 +1 @@ +SSL_CERT jitsi jitsi.deuxfleurs.fr diff --git a/app/jitsi/secrets/jitsi/jitsi.deuxfleurs.fr.crt.sample b/app/jitsi/secrets/jitsi/jitsi.deuxfleurs.fr.crt.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/jitsi/secrets/jitsi/jitsi.deuxfleurs.fr.key b/app/jitsi/secrets/jitsi/jitsi.deuxfleurs.fr.key new file mode 100644 index 0000000..7676132 --- /dev/null +++ b/app/jitsi/secrets/jitsi/jitsi.deuxfleurs.fr.key @@ -0,0 +1 @@ +SSL_KEY jitsi diff --git a/app/jitsi/secrets/jitsi/jitsi.deuxfleurs.fr.key.sample b/app/jitsi/secrets/jitsi/jitsi.deuxfleurs.fr.key.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/platoo/secrets/platoo/bddpw b/app/platoo/secrets/platoo/bddpw new file mode 100644 index 0000000..1c9d86e --- /dev/null +++ b/app/platoo/secrets/platoo/bddpw @@ -0,0 +1 @@ +SERVICE_PASSWORD platoo diff --git a/app/platoo/secrets/platoo/bddpw.sample b/app/platoo/secrets/platoo/bddpw.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/postgres/secrets/postgres/keeper/pg_repl_pwd b/app/postgres/secrets/postgres/keeper/pg_repl_pwd new file mode 100644 index 0000000..ae0c229 --- /dev/null +++ b/app/postgres/secrets/postgres/keeper/pg_repl_pwd @@ -0,0 +1 @@ +SERVICE_PASSWORD replicator diff --git a/app/postgres/secrets/postgres/keeper/pg_repl_pwd.sample b/app/postgres/secrets/postgres/keeper/pg_repl_pwd.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/postgres/secrets/postgres/keeper/pg_repl_username b/app/postgres/secrets/postgres/keeper/pg_repl_username new file mode 100644 index 0000000..58e6e46 --- /dev/null +++ b/app/postgres/secrets/postgres/keeper/pg_repl_username @@ -0,0 +1 @@ +CONST replicator diff --git a/app/postgres/secrets/postgres/keeper/pg_repl_username.sample b/app/postgres/secrets/postgres/keeper/pg_repl_username.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/postgres/secrets/postgres/keeper/pg_su_pwd b/app/postgres/secrets/postgres/keeper/pg_su_pwd new file mode 100644 index 0000000..a193b9e --- /dev/null +++ b/app/postgres/secrets/postgres/keeper/pg_su_pwd @@ -0,0 +1 @@ +SERVICE_PASSWORD postgres diff --git a/app/postgres/secrets/postgres/keeper/pg_su_pwd.sample b/app/postgres/secrets/postgres/keeper/pg_su_pwd.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/seafile/config/conf/mykey.peer.sample b/app/seafile/config/conf/mykey.peer.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/seafile/secrets/mariadb/main/ldap_binddn b/app/seafile/secrets/mariadb/main/ldap_binddn new file mode 100644 index 0000000..e77ff39 --- /dev/null +++ b/app/seafile/secrets/mariadb/main/ldap_binddn @@ -0,0 +1 @@ +SERVICE_DN mysql MySQL/MariaDB database diff --git a/app/seafile/secrets/mariadb/main/ldap_binddn.sample b/app/seafile/secrets/mariadb/main/ldap_binddn.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/seafile/secrets/mariadb/main/ldap_bindpwd b/app/seafile/secrets/mariadb/main/ldap_bindpwd new file mode 100644 index 0000000..c29f983 --- /dev/null +++ b/app/seafile/secrets/mariadb/main/ldap_bindpwd @@ -0,0 +1 @@ +SERVICE_PASSWORD mysql diff --git a/app/seafile/secrets/mariadb/main/ldap_bindpwd.sample b/app/seafile/secrets/mariadb/main/ldap_bindpwd.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/seafile/secrets/mariadb/main/mysql_pwd b/app/seafile/secrets/mariadb/main/mysql_pwd new file mode 100644 index 0000000..ae7fd75 --- /dev/null +++ b/app/seafile/secrets/mariadb/main/mysql_pwd @@ -0,0 +1 @@ +USER mysql_pwd (what is this?) diff --git a/app/seafile/secrets/mariadb/main/mysql_pwd.sample b/app/seafile/secrets/mariadb/main/mysql_pwd.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/seafile/secrets/seafile/conf/mykey.peer b/app/seafile/secrets/seafile/conf/mykey.peer new file mode 100644 index 0000000..12f0e5f --- /dev/null +++ b/app/seafile/secrets/seafile/conf/mykey.peer @@ -0,0 +1 @@ +USER Seafile peer key diff --git a/app/seafile/secrets/seafile/conf/mykey.peer.sample b/app/seafile/secrets/seafile/conf/mykey.peer.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/secrets.py b/app/secrets.py new file mode 100644 index 0000000..00f6016 --- /dev/null +++ b/app/secrets.py @@ -0,0 +1,44 @@ +#!/usr/bin/env python3 + +""" +TODO: this will be a utility to handle secrets in the Consul database +for the various components of the Deuxfleurs infrastructure + +Functionnalities: +- check that secrets are correctly configured +- help user fill in secrets +- create LDAP service users and fill in corresponding secrets +- maybe one day: manage SSL certificates and keys + +It uses files placed in /secrets/* to know what secrets +it should handle. These secret files contain directives for what to do +about these secrets. + +Example directives: + +USER +(a secret that must be filled in by the user) + +USER_LONG +(the same, indicates that the secret fits on several lines) + +CONST +(the secret has a constant value set here) + +CONST_LONG + +(same) + +SERVICE_DN +(the LDAP DN of a service user) + +SERVICE_PASSWORD +(the LDAP password for the corresponding service user) + +SSL_CERT +(a SSL domain for the given domains) + +SSL_KEY +(the SSL key going with corresponding certificate) +""" + diff --git a/app/web_static/secrets/web/home_token b/app/web_static/secrets/web/home_token new file mode 100644 index 0000000..d0cf281 --- /dev/null +++ b/app/web_static/secrets/web/home_token @@ -0,0 +1 @@ +USER web home_token (what is this?) diff --git a/app/web_static/secrets/web/home_token.sample b/app/web_static/secrets/web/home_token.sample deleted file mode 100644 index e69de29..0000000 diff --git a/app/web_static/secrets/web/quentin.dufour.io_token b/app/web_static/secrets/web/quentin.dufour.io_token new file mode 100644 index 0000000..c47c82c --- /dev/null +++ b/app/web_static/secrets/web/quentin.dufour.io_token @@ -0,0 +1 @@ +USER web quentin.dufour.io token (what is this?) diff --git a/app/web_static/secrets/web/quentin.dufour.io_token.sample b/app/web_static/secrets/web/quentin.dufour.io_token.sample deleted file mode 100644 index e69de29..0000000 From 850ccbf1c7c4ebba28b1971bafae0a6ba922b7c7 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sat, 16 Jan 2021 20:03:00 +0100 Subject: [PATCH 10/17] secretmgr.py does quite a few things! --- app/.gitignore | 1 + app/dummy/secrets/dummy/test_cmd | 1 + app/dummy/secrets/dummy/test_const | 1 + app/dummy/secrets/dummy/test_const_long | 5 + app/dummy/secrets/dummy/test_service_dn | 1 + app/dummy/secrets/dummy/test_service_password | 1 + app/dummy/secrets/dummy/test_user | 1 + app/plume/secrets/plume/pgsql_pw | 1 + app/plume/secrets/plume/pgsql_pw.sh | 2 - app/plume/secrets/plume/secret_key | 1 + app/plume/secrets/plume/secret_key.sh | 2 - .../secrets/postgres/keeper/pg_su_pwd | 2 +- app/secretmgr.py | 369 ++++++++++++++++++ app/secrets.py | 44 --- 14 files changed, 383 insertions(+), 49 deletions(-) create mode 100644 app/.gitignore create mode 100644 app/dummy/secrets/dummy/test_cmd create mode 100644 app/dummy/secrets/dummy/test_const create mode 100644 app/dummy/secrets/dummy/test_const_long create mode 100644 app/dummy/secrets/dummy/test_service_dn create mode 100644 app/dummy/secrets/dummy/test_service_password create mode 100644 app/dummy/secrets/dummy/test_user create mode 100644 app/plume/secrets/plume/pgsql_pw delete mode 100755 app/plume/secrets/plume/pgsql_pw.sh create mode 100644 app/plume/secrets/plume/secret_key delete mode 100755 app/plume/secrets/plume/secret_key.sh create mode 100755 app/secretmgr.py delete mode 100644 app/secrets.py diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..bee8a64 --- /dev/null +++ b/app/.gitignore @@ -0,0 +1 @@ +__pycache__ diff --git a/app/dummy/secrets/dummy/test_cmd b/app/dummy/secrets/dummy/test_cmd new file mode 100644 index 0000000..0c1593f --- /dev/null +++ b/app/dummy/secrets/dummy/test_cmd @@ -0,0 +1 @@ +CMD head -c 10 /dev/urandom | base64 diff --git a/app/dummy/secrets/dummy/test_const b/app/dummy/secrets/dummy/test_const new file mode 100644 index 0000000..ac68954 --- /dev/null +++ b/app/dummy/secrets/dummy/test_const @@ -0,0 +1 @@ +CONST this is a constant diff --git a/app/dummy/secrets/dummy/test_const_long b/app/dummy/secrets/dummy/test_const_long new file mode 100644 index 0000000..f5c2b0a --- /dev/null +++ b/app/dummy/secrets/dummy/test_const_long @@ -0,0 +1,5 @@ +CONST_LONG +this is a +constant +on several +lines diff --git a/app/dummy/secrets/dummy/test_service_dn b/app/dummy/secrets/dummy/test_service_dn new file mode 100644 index 0000000..dbc90f0 --- /dev/null +++ b/app/dummy/secrets/dummy/test_service_dn @@ -0,0 +1 @@ +SERVICE_DN dummy Dummy service for testing secretmgr.py diff --git a/app/dummy/secrets/dummy/test_service_password b/app/dummy/secrets/dummy/test_service_password new file mode 100644 index 0000000..f788a50 --- /dev/null +++ b/app/dummy/secrets/dummy/test_service_password @@ -0,0 +1 @@ +SERVICE_PASSWORD dummy diff --git a/app/dummy/secrets/dummy/test_user b/app/dummy/secrets/dummy/test_user new file mode 100644 index 0000000..b1ab993 --- /dev/null +++ b/app/dummy/secrets/dummy/test_user @@ -0,0 +1 @@ +USER Test user value diff --git a/app/plume/secrets/plume/pgsql_pw b/app/plume/secrets/plume/pgsql_pw new file mode 100644 index 0000000..978be54 --- /dev/null +++ b/app/plume/secrets/plume/pgsql_pw @@ -0,0 +1 @@ +CMD openssl rand -base64 32 diff --git a/app/plume/secrets/plume/pgsql_pw.sh b/app/plume/secrets/plume/pgsql_pw.sh deleted file mode 100755 index 519a30a..0000000 --- a/app/plume/secrets/plume/pgsql_pw.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -openssl rand -base64 32 > pgsql_pw diff --git a/app/plume/secrets/plume/secret_key b/app/plume/secrets/plume/secret_key new file mode 100644 index 0000000..978be54 --- /dev/null +++ b/app/plume/secrets/plume/secret_key @@ -0,0 +1 @@ +CMD openssl rand -base64 32 diff --git a/app/plume/secrets/plume/secret_key.sh b/app/plume/secrets/plume/secret_key.sh deleted file mode 100755 index f4bbee5..0000000 --- a/app/plume/secrets/plume/secret_key.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -openssl rand -base64 32 > secret_key diff --git a/app/postgres/secrets/postgres/keeper/pg_su_pwd b/app/postgres/secrets/postgres/keeper/pg_su_pwd index a193b9e..907e2b8 100644 --- a/app/postgres/secrets/postgres/keeper/pg_su_pwd +++ b/app/postgres/secrets/postgres/keeper/pg_su_pwd @@ -1 +1 @@ -SERVICE_PASSWORD postgres +USER postgres superuser password diff --git a/app/secretmgr.py b/app/secretmgr.py new file mode 100755 index 0000000..6af6d13 --- /dev/null +++ b/app/secretmgr.py @@ -0,0 +1,369 @@ +#!/usr/bin/env python3 + +# DEPENDENCY: python-consul +import consul + +# DEPENDENCY: python-ldap +import ldap + +# DEPENDENCY: passlib +from passlib.hash import ldap_salted_sha1 + +import os +import sys +import glob +import subprocess +import getpass +import base64 +from secrets import token_bytes + + +""" +TODO: this will be a utility to handle secrets in the Consul database +for the various components of the Deuxfleurs infrastructure + +Functionnalities: +- check that secrets are correctly configured +- help user fill in secrets +- create LDAP service users and fill in corresponding secrets +- maybe one day: manage SSL certificates and keys + +It uses files placed in /secrets/* to know what secrets +it should handle. These secret files contain directives for what to do +about these secrets. + +Example directives: + +USER +(a secret that must be filled in by the user) + +USER_LONG +(the same, indicates that the secret fits on several lines) + +CMD +(a secret that is generated by running this command) + +CONST +(the secret has a constant value set here) + +CONST_LONG + +(same) + +SERVICE_DN +(the LDAP DN of a service user) + +SERVICE_PASSWORD +(the LDAP password for the corresponding service user) + +SSL_CERT +(a SSL domain for the given domains) + +SSL_KEY +(the SSL key going with corresponding certificate) + +RSA_PUBLIC_KEY +(a public RSA key) + +RSA_PRIVATE_KEY +(the corresponding private RSA key) +""" + + +# Parameters +LDAP_URL = "ldap://localhost:1389" +SERVICE_DN_SUFFIX = "ou=services,ou=users,dc=deuxfleurs,dc=fr" +consul_server = consul.Consul() + + +# ---- + +USER = "USER" +USER_LONG = "USER_LONG" +CMD = "CMD" +CONST = "CONST" +CONST_LONG = "CONST_LONG" +SERVICE_DN = "SERVICE_DN" +SERVICE_PASSWORD = "SERVICE_PASSWORD" +SSL_CERT = "SSL_CERT" +SSL_KEY = "SSL_KEY" +RSA_PUBLIC_KEY = "RSA_PUBLIC_KEY" +RSA_PRIVATE_KEY = "RSA_PRIVATE_KEY" + +class bcolors: + HEADER = '\033[95m' + OKBLUE = '\033[94m' + OKCYAN = '\033[96m' + OKGREEN = '\033[92m' + WARNING = '\033[93m' + FAIL = '\033[91m' + ENDC = '\033[0m' + BOLD = '\033[1m' + UNDERLINE = '\033[4m' + +def read_secret(key, file_path): + lines = [l.strip() for l in open(file_path, "r")] + l0 = lines[0].split(" ") + stype = l0[0] + secret = {"type": stype, "key": key} + if stype in [USER, USER_LONG]: + secret["desc"] = " ".join(l0[1:]) + elif stype == CMD: + secret["cmd"] = " ".join(l0[1:]) + elif stype == CONST: + secret["value"] = " ".join(l0[1:]) + elif stype == CONST_LONG: + secret["value"] = "\n".join(lines[1:]) + elif stype in [SERVICE_DN, SERVICE_PASSWORD]: + secret["service"] = l0[1] + if stype == SERVICE_DN: + secret["service_desc"] = " ".join(l0[2:]) + elif stype in [SSL_CERT, SSL_KEY]: + secret["cert_name"] = l0[1] + if stype == SSL_CERT: + secret["cert_domains"] = l0[2:] + elif stype in [RSA_PUBLIC_KEY, RSA_PRIVATE_KEY]: + secret["key_name"] = l0[1] + if stype == RSA_PUBLIC_KEY: + secret["key_desc"] = " ".join(l0[2:]) + else: + print(bcolors.FAIL, "ERROR:", bcolors.ENDC, "Invalid secret type", stype, "in", file_path) + sys.exit(-1) + + return secret + +def read_secrets(module_list): + secrets = {} + for mod in module_list: + for file_path in glob.glob(mod.strip('/') + "/secrets/**", recursive=True): + if os.path.isfile(file_path): + key = '/'.join(file_path.split("/")[1:]) + secrets[key] = read_secret(key, file_path) + return secrets + +def get_secrets_services(secrets): + services = {} + for key, secret in secrets.items(): + if secret["type"] not in [SERVICE_DN, SERVICE_PASSWORD]: + continue + svc = secret["service"] + print(svc, "@", key, bcolors.OKCYAN, "...", bcolors.ENDC) + if svc not in services: + services[svc] = { + "dn": "cn=%s,%s"%(svc, SERVICE_DN_SUFFIX), + "pass": None, + "dn_at": [], + "pass_at": [], + } + if secret["type"] == SERVICE_DN: + services[svc]["dn_at"].append(key) + services[svc]["desc"] = secret["service_desc"] + + if secret["type"] == SERVICE_PASSWORD: + services[svc]["pass_at"].append(key) + _, data = consul_server.kv.get(key) + if data is not None: + if services[svc]["pass"] is None: + services[svc]["pass"] = data["Value"].decode('ascii').strip() + + return services + +ldap_admin_conn = None +def get_ldap_admin_conn(): + global ldap_admin_conn + if ldap_admin_conn is None: + ldap_admin_conn = ldap.initialize(LDAP_URL) + ldap_user = input("LDAP admin user (full DN, please!): ") + ldap_pass = getpass.getpass("LDAP admin password: ") + ldap_admin_conn.simple_bind_s(ldap_user, ldap_pass) + return ldap_admin_conn + +# ---- CHECK COMMAND ---- + +def check_secrets(module_list): + secrets = read_secrets(module_list) + print("Found", len(secrets), "secrets to check") + print() + + check_secrets_presence(secrets) + check_secrets_services(secrets) + +def check_secrets_presence(secrets): + print("Checking secrets presence...") + for key in secrets.keys(): + _, data = consul_server.kv.get(key) + if data is None: + print(key, bcolors.FAIL, "x", bcolors.ENDC) + else: + print(key, bcolors.OKGREEN, "✓", bcolors.ENDC) + print() + +def check_secrets_services(secrets): + print("Checking secrets for LDAP service users...") + services = get_secrets_services(secrets) + + for svc_name, svc in services.items(): + for dn_key in svc["dn_at"]: + _, data = consul_server.kv.get(dn_key) + if data is not None: + got_val = data["Value"].decode('ascii').strip() + if got_val != svc["dn"]: + print(svc_name, "wrong DN at", dn_key, bcolors.FAIL, "x", bcolors.ENDC) + print("got:", got_val, "instead of:", svc["dn"]) + + if svc["pass"] is None: + print(svc_name, bcolors.FAIL, "no password stored", bcolors.ENDC) + else: + for pass_key in svc["pass_at"]: + _, data = consul_server.kv.get(pass_key) + if data is not None: + got_val = data["Value"].decode('ascii').strip() + if got_val != svc["pass"]: + print(svc_name, "wrong pass at", dn_key, bcolors.FAIL, "x", bcolors.ENDC) + + l = ldap.initialize(LDAP_URL) + try: + l.simple_bind_s(svc["dn"], svc["pass"]) + print(svc_name, bcolors.OKGREEN, "✓", bcolors.ENDC) + except Exception as e: + print(svc_name, bcolors.FAIL, e, bcolors.ENDC) + print() + + +# ---- GEN COMMAND ---- + +def gen_secrets(module_list, regen): + secrets = read_secrets(module_list) + print("Found", len(secrets), "secrets to check and maybe generate") + print() + + gen_secrets_base(secrets, regen) + gen_secrets_services(secrets, regen) + + check_secrets_presence(secrets) + check_secrets_services(secrets) + +def gen_secrets_base(secrets, regen): + print("Filling in user secrets and cmd secrets...") + + for key, secret in secrets.items(): + _, data = consul_server.kv.get(key) + if data is not None and not regen: + continue + + if secret["type"] == USER: + print("----") + print(key) + print("Description:", secret["desc"]) + print("Enter value for secret, or ^C to skip:") + try: + val = input().strip() + consul_server.kv.put(key, val) + print(bcolors.OKCYAN, "Value set.", bcolors.ENDC) + except KeyboardInterrupt: + print(bcolors.WARNING, "Skipped.", bcolors.ENDC) + + if secret["type"] == USER_LONG: + print("----") + print(key) + print("Description:", secret["desc"]) + print("Enter value for secret, or ^C to skip:") + print("THIS IS A LONG VALUE, ENTER SEVERAL LINES AND FINISH WITH A LINE CONTAINING A SINGLE .") + try: + lines = [] + while True: + line = input().strip() + if line == ".": + break + vals.append(line) + val = "\n".join(lines) + consul_server.kv.put(key, val) + print(bcolors.OKCYAN, "Value set.", bcolors.ENDC) + except KeyboardInterrupt: + print(bcolors.WARNING, "Skipped.", bcolors.ENDC) + + if secret["type"] in [CONST, CONST_LONG]: + print("----") + print(key) + print("Resetting to constant value.") + consul_server.kv.put(key, secret["value"]) + print(bcolors.OKCYAN, "Value set.", bcolors.ENDC) + + if secret["type"] == CMD: + print("----") + print(key) + print("Executing command:", secret["cmd"]) + val = subprocess.check_output(["sh", "-c", secret["cmd"]]) + consul_server.kv.put(key, val) + print(bcolors.OKCYAN, "Value set.", bcolors.ENDC) + + print() + +def gen_secrets_services(secrets, regen): + print("Generating LDAP service accounts...") + services = get_secrets_services(secrets) + + for svc_name, svc in services.items(): + print("----") + print("Service:", svc_name) + print("Description:", svc["desc"]) + + for dn_key in svc["dn_at"]: + _, data = consul_server.kv.get(dn_key) + if data is None or data["Value"].decode('ascii').strip() != svc["dn"]: + print(bcolors.OKCYAN, "Setting DN", bcolors.ENDC, "at", dn_key) + consul_server.kv.put(dn_key, svc["dn"]) + + if svc["pass"] is None or regen: + print(bcolors.OKCYAN, "Generating new password", bcolors.ENDC) + svc["pass"] = base64.urlsafe_b64encode(token_bytes(12)).decode('ascii') + + l = ldap.initialize(LDAP_URL) + try: + l.simple_bind_s(svc["dn"], svc["pass"]) + except: + fix_service_user(svc) + + for pass_key in svc["pass_at"]: + _, data = consul_server.kv.get(pass_key) + if data is None or data["Value"].decode('ascii').strip() != svc["pass"]: + print(bcolors.OKCYAN, "Setting password", bcolors.ENDC, "at", pass_key) + consul_server.kv.put(pass_key, svc["pass"]) + + print() + +def fix_service_user(svc): + print("Fixing service user", svc["dn"], "...") + l = get_ldap_admin_conn() + res = l.search_s(svc["dn"], ldap.SCOPE_BASE, "objectclass=*") + pass_crypt = ldap_salted_sha1.hash(svc["pass"]) + if res is None or len(res) == 0: + print(bcolors.OKCYAN, "Creating entity...", bcolors.ENDC) + l.add_s(svc["dn"], + [ + ("objectclass", [b"person", b"top"]), + ("displayname", [svc["desc"].encode('ascii')]), + ("userpassword", [pass_crypt.encode('ascii')]), + ]) + else: + print(bcolors.OKCYAN, "Resetting entity password", bcolors.ENDC) + l.modify_s(svc["dn"], + [ + (ldap.MOD_REPLACE, "userpassword", [pass_crypt.encode('ascii')]) + ]) + +# ---- MAIN ---- + +if __name__ == "__main__": + for i, val in enumerate(sys.argv): + if val == "check": + check_secrets(sys.argv[i+1:]) + break + elif val == "gen": + gen_secrets(sys.argv[i+1:], False) + break + elif val == "regen": + gen_secrets(sys.argv[i+1:], True) + break + + diff --git a/app/secrets.py b/app/secrets.py deleted file mode 100644 index 00f6016..0000000 --- a/app/secrets.py +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env python3 - -""" -TODO: this will be a utility to handle secrets in the Consul database -for the various components of the Deuxfleurs infrastructure - -Functionnalities: -- check that secrets are correctly configured -- help user fill in secrets -- create LDAP service users and fill in corresponding secrets -- maybe one day: manage SSL certificates and keys - -It uses files placed in /secrets/* to know what secrets -it should handle. These secret files contain directives for what to do -about these secrets. - -Example directives: - -USER -(a secret that must be filled in by the user) - -USER_LONG -(the same, indicates that the secret fits on several lines) - -CONST -(the secret has a constant value set here) - -CONST_LONG - -(same) - -SERVICE_DN -(the LDAP DN of a service user) - -SERVICE_PASSWORD -(the LDAP password for the corresponding service user) - -SSL_CERT -(a SSL domain for the given domains) - -SSL_KEY -(the SSL key going with corresponding certificate) -""" - From 79b7273ff2a487d6721d393682c8ad3927467a75 Mon Sep 17 00:00:00 2001 From: Quentin Date: Mon, 18 Jan 2021 06:51:19 +0100 Subject: [PATCH 11/17] Remove my blog --- app/deployment/web_static.hcl | 50 ----------------------------------- 1 file changed, 50 deletions(-) diff --git a/app/deployment/web_static.hcl b/app/deployment/web_static.hcl index a02d48b..16c8b35 100644 --- a/app/deployment/web_static.hcl +++ b/app/deployment/web_static.hcl @@ -58,55 +58,5 @@ EOH } } } - - group "quentin" { - network { - port "quentin_port" { to = 8080 } - } - - task "server" { - driver = "docker" - config { - image = "superboum/amd64_webpull_ruby:v1" - ports = [ "quentin_port" ] - } - - template { - data = < Date: Mon, 18 Jan 2021 08:06:19 +0100 Subject: [PATCH 12/17] Add some documentation + add a requirements file --- README.md | 1 + app/README.md | 34 ++++++++++++++++++++++++++++++++++ app/requirements.txt | 3 +++ 3 files changed, 38 insertions(+) create mode 100644 app/requirements.txt diff --git a/README.md b/README.md index 26a7856..5dc02d1 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,7 @@ alias bind_df="ssh \ -L 8500:127.0.0.1:8500 \ -L 8082:traefik-admin.service.2.cluster.deuxfleurs.fr:8082 \ -L 5432:psql-proxy.service.2.cluster.deuxfleurs.fr:5432 \ + -L 1389:bottin2.service.2.cluster.deuxfleurs.fr:389 \ " ``` diff --git a/app/README.md b/app/README.md index a877cfa..21eb936 100644 --- a/app/README.md +++ b/app/README.md @@ -1,3 +1,37 @@ +## How to install `secretmgr` + +How to install its dependencies: + +```bash +# on fedora: +dnf install -y openldap-devel +# on ubuntu: +apt-get install -y libldap2-dev + +# for eveyrone: +pip3 install --user --requirement requirements.txt +``` + +## How to use `secretmgr` + +Check that all secrets are correctly deployed for app `dummy`: + +```bash +./secretmgr.py check dummy +``` + +Generate secrets for app `dummy` if they don't already exist: + +```bash +./secretmgr.py gen dummy +``` + +Rotate secrets for app `dummy`, overwriting existing ones (be careful, this is dangerous!): + +```bash +./secretmgr.py regen dummy +``` + ## How to upgrade our packaged apps to a new version? 1. Edit `docker-compose.yml` diff --git a/app/requirements.txt b/app/requirements.txt new file mode 100644 index 0000000..7874d93 --- /dev/null +++ b/app/requirements.txt @@ -0,0 +1,3 @@ +python-consul==1.1.0 +python-ldap==3.3.1 +passlib==1.7.4 From c642370def01f09d966b3b9c643cfe416ea115cf Mon Sep 17 00:00:00 2001 From: Quentin Date: Mon, 18 Jan 2021 08:08:48 +0100 Subject: [PATCH 13/17] Add hierarchy to the README --- app/README.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/app/README.md b/app/README.md index 21eb936..3049cac 100644 --- a/app/README.md +++ b/app/README.md @@ -1,4 +1,14 @@ -## How to install `secretmgr` +## Understand this folder hierarchy + +This folder contains the following hierarchy: + +- `/build//`: folders with dockerfiles and other necessary resources for building container images +- `/config/`: folder containing configuration files, referenced by deployment file +- `/secrets/`: folder containing secrets, which can be synchronized with Consul using `secretmgr.py` +- `/deploy/`: folder containing the HCL file(s) necessary for deploying the module +- `/integration/`: folder containing files for integration testing using docker-compose + +## How to install `secretmgr.py` dependencies How to install its dependencies: @@ -12,7 +22,7 @@ apt-get install -y libldap2-dev pip3 install --user --requirement requirements.txt ``` -## How to use `secretmgr` +## How to use `secretmgr.py` Check that all secrets are correctly deployed for app `dummy`: From 6c8c861dd50aebf4a12232ecc1fab12c5f83bf03 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Mon, 18 Jan 2021 16:46:08 +0100 Subject: [PATCH 14/17] Update README --- README.md | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 26a7856..f0324d0 100644 --- a/README.md +++ b/README.md @@ -5,21 +5,24 @@ deuxfleurs.fr ## Our abstraction stack -We try to build a generic abstraction stack between our different resources (CPU, RAM, disk, etc.) and our services (Chat, Storage, etc.): +We try to build a generic abstraction stack between our different resources (CPU, RAM, disk, etc.) and our services (Chat, Storage, etc.), we develop our own tools when needed: - * ansible (physical node conf) - * nomad (schedule containers) - * consul (distributed key value store / lock / service discovery) - * garage/glusterfs (file storage) - * stolon + postgresql (distributed relational database) - * docker (container tool) - * bottin (LDAP server, auth) + * **[garage](https://git.deuxfleurs.fr/Deuxfleurs/garage/):** object storage (we also have a legacy glusterfs cluster) + * **[diplonat](https://git.deuxfleurs.fr/Deuxfleurs/diplonat):** network automation (firewalling, upnp igd) + * **[bottin](https://git.deuxfleurs.fr/Deuxfleurs/bottin):** authentication and authorization (LDAP protocol, consul backend) + * **ansible:** physical node configuration + * **nomad:** schedule containers and handle their lifecycle + * **consul:** distributed key value store + lock + service discovery + * **stolon + postgresql:** distributed relational database + * **docker:** package, distribute and isolate applications Some services we provide: - * Chat (Matrix/Riot) - * Email (Postfix/Dovecot/Sogo) - * Storage (Seafile) + * **Websites:** garage (static) + fediverse blog (plume) + * **Chat:** Synapse + Element Web (Matrix protocol) + * **Email:** Postfix SMTP + Dovecot IMAP + opendkim DKIM + Sogo webmail (legacy) | Alps webmail (experimental) + * **Storage:** Seafile (legacy) | Nextcloud (experimental) + * **Visio:** Jitsi As a generic abstraction is provided, deploying new services should be easy. @@ -40,14 +43,6 @@ To ease the development, we make the choice of a fully integrated environment ## Start hacking -### Clone the repository - -``` -git clone https://gitlab.com/superboum/deuxfleurs.fr.git -git submodule init -git submodule update -``` - ### Deploying/Updating new services is done from your machine *The following instructions are provided for ops that already have access to the servers.* From 7e637a070cd48e8a5c24ac5cbedc7ef72e60cfd4 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Mon, 18 Jan 2021 16:49:46 +0100 Subject: [PATCH 15/17] Add guichet in our readme Signed-off-by: Quentin Dufour --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 2e8ac35..c411edf 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ We try to build a generic abstraction stack between our different resources (CPU * **[garage](https://git.deuxfleurs.fr/Deuxfleurs/garage/):** object storage (we also have a legacy glusterfs cluster) * **[diplonat](https://git.deuxfleurs.fr/Deuxfleurs/diplonat):** network automation (firewalling, upnp igd) * **[bottin](https://git.deuxfleurs.fr/Deuxfleurs/bottin):** authentication and authorization (LDAP protocol, consul backend) + * **[guichet](https://git.deuxfleurs.fr/Deuxfleurs/guichet):** a dashboard for our users and administrators * **ansible:** physical node configuration * **nomad:** schedule containers and handle their lifecycle * **consul:** distributed key value store + lock + service discovery From 0be20b22a6aecc52c6f76f3f773cd023e95b76d3 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Mon, 18 Jan 2021 16:51:06 +0100 Subject: [PATCH 16/17] Upgrade garage description --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c411edf..5bf9f58 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ deuxfleurs.fr We try to build a generic abstraction stack between our different resources (CPU, RAM, disk, etc.) and our services (Chat, Storage, etc.), we develop our own tools when needed: - * **[garage](https://git.deuxfleurs.fr/Deuxfleurs/garage/):** object storage (we also have a legacy glusterfs cluster) + * **[garage](https://git.deuxfleurs.fr/Deuxfleurs/garage/):** S3-compatible lightweight object store for self-hosted geo-distributed deployments (we also have a legacy glusterfs cluster) * **[diplonat](https://git.deuxfleurs.fr/Deuxfleurs/diplonat):** network automation (firewalling, upnp igd) * **[bottin](https://git.deuxfleurs.fr/Deuxfleurs/bottin):** authentication and authorization (LDAP protocol, consul backend) * **[guichet](https://git.deuxfleurs.fr/Deuxfleurs/guichet):** a dashboard for our users and administrators From eb925049ac4aab369763fbecb0caaec3579977a3 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Tue, 19 Jan 2021 13:47:50 +0100 Subject: [PATCH 17/17] Remove web_static --- app/web_static/build/webpull/.gitignore | 1 - .../build/webpull/Dockerfile.nodejs | 9 -- app/web_static/build/webpull/Dockerfile.ruby | 12 --- app/web_static/build/webpull/README.md | 23 ---- app/web_static/build/webpull/main.go | 100 ------------------ app/web_static/deploy/web_static.hcl | 62 ----------- app/web_static/secrets/web/home_token | 1 - .../secrets/web/quentin.dufour.io_token | 1 - 8 files changed, 209 deletions(-) delete mode 100644 app/web_static/build/webpull/.gitignore delete mode 100644 app/web_static/build/webpull/Dockerfile.nodejs delete mode 100644 app/web_static/build/webpull/Dockerfile.ruby delete mode 100644 app/web_static/build/webpull/README.md delete mode 100644 app/web_static/build/webpull/main.go delete mode 100644 app/web_static/deploy/web_static.hcl delete mode 100644 app/web_static/secrets/web/home_token delete mode 100644 app/web_static/secrets/web/quentin.dufour.io_token diff --git a/app/web_static/build/webpull/.gitignore b/app/web_static/build/webpull/.gitignore deleted file mode 100644 index ba2906d..0000000 --- a/app/web_static/build/webpull/.gitignore +++ /dev/null @@ -1 +0,0 @@ -main diff --git a/app/web_static/build/webpull/Dockerfile.nodejs b/app/web_static/build/webpull/Dockerfile.nodejs deleted file mode 100644 index acc7e74..0000000 --- a/app/web_static/build/webpull/Dockerfile.nodejs +++ /dev/null @@ -1,9 +0,0 @@ -FROM node:13.8-buster - -RUN apt-get update && \ - apt-get install -y git - -COPY ./main /srv/httpd -WORKDIR /srv -CMD ["/srv/httpd"] - diff --git a/app/web_static/build/webpull/Dockerfile.ruby b/app/web_static/build/webpull/Dockerfile.ruby deleted file mode 100644 index 7578cca..0000000 --- a/app/web_static/build/webpull/Dockerfile.ruby +++ /dev/null @@ -1,12 +0,0 @@ -FROM fedora:32 - -ENV LC_ALL=C.UTF-8 -ENV LANG=C.UTF-8 -ENV LANGUAGE=en_US.UTF-8 -ENV RUBYOPT --disable-did_you_mean - -RUN dnf install -y git ruby ruby-devel rubygems rubygem-bundler @development-tools redhat-rpm-config gcc-c++ zlib-devel - -COPY ./main /srv/httpd -WORKDIR /srv -CMD ["/srv/httpd"] diff --git a/app/web_static/build/webpull/README.md b/app/web_static/build/webpull/README.md deleted file mode 100644 index 5d17d17..0000000 --- a/app/web_static/build/webpull/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# webpull - -Webpull allows you to update your live website without deploying a new docker container but by simply calling an URL - -You need to specify a secret token at boot: - -``` -WEBPULL_TOKEN=s3cr3et ./webpull -``` - -## Node.js version - -``` -go build ./main.go -sudo docker build -f ./Dockerfile.nodejs -t superboum/amd64_webpull_pug:v1 . -``` - -## Ruby version - -``` -go build ./main.go -sudo docker build -f ./Dockerfile.ruby -t superboum/amd64_webpull_ruby:v1 . -``` diff --git a/app/web_static/build/webpull/main.go b/app/web_static/build/webpull/main.go deleted file mode 100644 index 46c90b9..0000000 --- a/app/web_static/build/webpull/main.go +++ /dev/null @@ -1,100 +0,0 @@ -package main - -import ( - "fmt" - "errors" - "io" - "os/exec" - "os" - "log" - "net/http" - "strings" -) - -func myexec(w io.Writer, main string, params ...string) error { - cmd := exec.Command(main, params...) - cmd.Stdout = w - cmd.Stderr = w - err := cmd.Run() - if err != nil { - fmt.Fprintf(w, "Failed to run: %s %s\n", main, strings.Join(params, " ")) - } - return err -} - -func update(w io.Writer) error { - fmt.Fprintf(w, "Start update...\n") - _, err := os.Stat("./.git") - if err != nil { - fmt.Fprintf(w, ".git folder does not exist, creating it...\n") - err := myexec(w, "git", "init") - if err != nil { - return err - } - } - - err = myexec(w, "git", "remote", "get-url", "origin") - if err != nil { - repo, exists := os.LookupEnv("WEBPULL_REPO") - if !exists { - fmt.Fprintf(w, "You must define WEBPULL_REPO env variable...\n") - return errors.New("Missing environment variable WEBPULL_REPO") - } - fmt.Fprintf(w, "git remote is not yet set...\n") - err := myexec(w, "git", "remote", "add", "origin", repo) - if err != nil { - return err - } - } - - err = myexec(w, "git", "pull", "origin", "master") - if err != nil { - fmt.Fprintf(w, "Failed to pull...\n") - return err - } - - _, err = os.Stat("./.webpull") - if err != nil { - fmt.Fprintf(w, "You must create an executable file named '.webpull' at the root of your repository.\nIf you have nothing to run, just create an empty bash script...\n") - return err - } - - err = myexec(w, "./.webpull") - if err != nil { - fmt.Fprintf(w, "An error occured during script execution\n") - return err - } - - fmt.Fprintf(w, "Success.\n") - return nil -} - -func main() { - token, exists := os.LookupEnv("WEBPULL_TOKEN") - if !exists { - log.Fatal("Environment variable 'WEBPULL_TOKEN' must be defined") - } - - if update(os.Stdout) != nil { - log.Fatal("Initial 'update' failed") - } - - fs := http.FileServer(http.Dir("./static")) - http.HandleFunc("/update", func(w http.ResponseWriter, r *http.Request) { - keys, ok := r.URL.Query()["token"] - if !ok || len(keys[0]) < 1 { - http.Error(w, "Missing 'token' query parameter", 401) - return - } - - if keys[0] != token { - http.Error(w, "Wrong token", 401) - return - } - - update(w) - }) - http.Handle("/", fs) - - log.Fatal(http.ListenAndServe(":8080", nil)) -} diff --git a/app/web_static/deploy/web_static.hcl b/app/web_static/deploy/web_static.hcl deleted file mode 100644 index 16c8b35..0000000 --- a/app/web_static/deploy/web_static.hcl +++ /dev/null @@ -1,62 +0,0 @@ -job "web_static" { - datacenters = ["dc1"] - type = "service" - - constraint { - attribute = "${attr.cpu.arch}" - value = "amd64" - } - - group "landing" { - network { - port "deuxfleurs_port" { to = 8080 } - } - - task "server" { - driver = "docker" - config { - image = "superboum/amd64_webpull_pug:v4" - ports = [ "deuxfleurs_port" ] - } - - template { - data = <