From 8f0cb24246a19f25f1865109730939ea64dbab2b Mon Sep 17 00:00:00 2001 From: LUXEY Adrien Date: Fri, 29 Jan 2021 10:56:42 +0100 Subject: [PATCH 1/3] added zinz.dev static auth secret declaration --- app/im/secrets/chat/coturn/static_auth_secret_zinzdev | 1 + 1 file changed, 1 insertion(+) create mode 100644 app/im/secrets/chat/coturn/static_auth_secret_zinzdev diff --git a/app/im/secrets/chat/coturn/static_auth_secret_zinzdev b/app/im/secrets/chat/coturn/static_auth_secret_zinzdev new file mode 100644 index 0000000..c61486d --- /dev/null +++ b/app/im/secrets/chat/coturn/static_auth_secret_zinzdev @@ -0,0 +1 @@ +USER Serveur coturn (TURN/STUN) d'Adrien, c'est un jeton d'identification. \ No newline at end of file From d286da23d8c9754f38dd2cf38a107e233218219c Mon Sep 17 00:00:00 2001 From: LUXEY Adrien Date: Fri, 29 Jan 2021 11:53:03 +0100 Subject: [PATCH 2/3] pushed Synapse and Element-web to latest version, and rewrote the OP guide a bit --- app/docker-compose.yml | 8 ++++---- op_guide/update_matrix/README.md | 28 ++++++++++++++++------------ 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/app/docker-compose.yml b/app/docker-compose.yml index 717e8ce..9f50c26 100644 --- a/app/docker-compose.yml +++ b/app/docker-compose.yml @@ -14,16 +14,16 @@ services: context: ./im/build/riotweb args: # https://github.com/vector-im/riot-web/releases - VERSION: 1.7.16 - image: superboum/amd64_riotweb:v19 + VERSION: 1.7.18 + image: particallydone/amd64_riotweb:v20 synapse: build: context: ./im/build/matrix-synapse args: # https://github.com/matrix-org/synapse/releases - VERSION: 1.25.0 - image: superboum/amd64_synapse:v40 + VERSION: 1.26.0 + image: particallydone/amd64_synapse:v41 # Email sogo: diff --git a/op_guide/update_matrix/README.md b/op_guide/update_matrix/README.md index 7df588f..0862be0 100644 --- a/op_guide/update_matrix/README.md +++ b/op_guide/update_matrix/README.md @@ -3,22 +3,26 @@ How to update Matrix? ## 1. Build the new containers -It starts with this file: `app/build/docker-compose.yml`. Often, I update Riot Web and Synapse at the same time. -In the file, find the `riot` and `synapse` entries. -The only thing you need to do is to update the `VERSION` argument. -This argument is then used to template the Dockerfile. -The `VERSION` value should match a github release, the link to the corresponding release page is put as a comment next to the variable in the compose file. -Next, we put tags on our images. -You need to increment it, for example: `superboum/amd64_riotweb:v17` will become `superboum/amd64_riotweb:v18`. -We use the docker hub to store our images, if you are not `superboum` you must change the name with your handle, eg. `john/amd64_riotweb:v18`. -So, from now we expact you have: - - changed the `VERSION` value and `image` name/tag of `riot` - - changed the `VERSION` value and `image` name/tag of `synapse` +* Open `app/docker-compose.yml` and locate `riot` (the Element Web service) and `synapse` (the Matrix Synapse server). There are two things you need to do for each service: -You can now simply build and push the new images: + * Set the `VERSION` argument to the target service version (e.g. `1.26.0` for Synapse). This argument is then used to template the Dockerfile. + + The `VERSION` value should match a github release, the link to the corresponding release page is put as a comment next to the variable in the compose file; + + * Tag the image with a new incremented version tag. For example: `superboum/amd64_riotweb:v17` will become `superboum/amd64_riotweb:v18`. + + We use the docker hub to store our images. So, if you are not `superboum` you must change the name with your own handle, eg. `john/amd64_riotweb:v18`. This requires that you registered an account (named `john`) on https://hub.docker.com. + + +So, from now we expect you have: + +* changed the `VERSION` value and `image` name/tag of `riot` +* changed the `VERSION` value and `image` name/tag of `synapse` + +From the `/app` folder, you can now simply build and push the new images: ```bash docker-compose build riot synapse From 24dcc096958799745a51abe06e2fe1712aaba940 Mon Sep 17 00:00:00 2001 From: LUXEY Adrien Date: Fri, 29 Jan 2021 12:11:43 +0100 Subject: [PATCH 3/3] Upgraded Synapse and Element-web on cluster's nomad, and the OP guide --- app/im/deploy/im.hcl | 4 ++-- op_guide/update_matrix/README.md | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/im/deploy/im.hcl b/app/im/deploy/im.hcl index c9591e6..48181b7 100644 --- a/app/im/deploy/im.hcl +++ b/app/im/deploy/im.hcl @@ -15,7 +15,7 @@ job "im" { driver = "docker" config { - image = "superboum/amd64_synapse:v40" + image = "particallydone/amd64_synapse:v41" network_mode = "host" readonly_rootfs = true ports = [ "client_port", "federation_port" ] @@ -220,7 +220,7 @@ job "im" { task "server" { driver = "docker" config { - image = "superboum/amd64_riotweb:v19" + image = "particallydone/amd64_riotweb:v20" ports = [ "web_port" ] volumes = [ "secrets/config.json:/srv/http/config.json" diff --git a/op_guide/update_matrix/README.md b/op_guide/update_matrix/README.md index 0862be0..e330277 100644 --- a/op_guide/update_matrix/README.md +++ b/op_guide/update_matrix/README.md @@ -38,9 +38,9 @@ Don't forget to commit and push your changes before doing anything else! ## 2. Deploy the new containers -Now, we will edit the deployment file `app/deployment/im.hcl`. +Now, we will edit the deployment file `app/im/deploy/im.hcl`. -Find where the image is defined in the file, for example in Riot, it will look like that: +Find where the image is defined in the file, for example Element-web will look like that: ```hcl @@ -56,25 +56,25 @@ Find where the image is defined in the file, for example in Riot, it will look l } ``` -And replace the `image =` entry with your image name. -Do the same thing for `synapse`. +And replace the `image =` entry with its new version created above. +Do the same thing for the `synapse` service. Now, you need a way to access the cluster to deploy this file. To do this, you must bind nomad on your machine through a SSH tunnel. -Check the end of `README.md` to do it. +Check the end of [the parent `README.md`](../README.md) to do it. If you have access to the Nomad web UI when entering http://127.0.0.1:4646 you are ready to go. -You must have installed the Nomad command line tool on your machine (also explained in `README.md`). +You must have installed the Nomad command line tool on your machine (also explained in [the parent `README.md`](../README.md)). -Now, on your machine, you must be able to run (from the `app/deployment` folder) : +Now, on your machine and from the `app/im/deploy` folder, you must be able to run: ``` nomad plan im.hcl ``` Check that the proposed diff corresponds to what you have in mind. -If it seems OK, just copy paste the proposed `nomad job run ... im.hcl` command proposed as part of the output of the `nomad plan` command. +If it seems OK, just copy paste the `nomad job run ... im.hcl` command proposed as part of the output of the `nomad plan` command. From now, it will take around ~2 minutes to deploy the new images. You can follow the deployment from the Nomad UI. @@ -88,6 +88,6 @@ If something went wrong, you must rollback your deployment. 2. Revert to this deployment with [nomad job revert](https://www.nomadproject.io/docs/commands/job/revert) Now, if the deployment failed, you should probably investigate what went wrong offline. -In this case, I build a test stack with docker-compose in `app/integration` (for now, I had to do that only for plume and jitsi). +I built a test stack with docker-compose in `app//integration` that should help you out (for now, test suites are only written for plume and jitsi).