This repository contains the configuration for deploying a Matrix chat server on matrix.developers.italia.it
.
The configuration uses the matrix-docker-ansible-deploy playbook.
- Git
- Ansible
- just
- Open the ports listed in prerequisites.md
-
Clone this repository:
git clone --recurse-submodules [email protected]:teamdigitale/matrix.developers.italia.it.git
-
Link the
inventory
directory:cd matrix.developers.italia.it/ ln -s ../inventory matrix-docker-ansible-deploy/inventory
-
Get the vault file with secrets:
Get vault.yml and save it to
inventory/host_vars/matrix.developers.italia.it/vault.yml
(you'll need access to the repo).
Your SSH key must be added to authorized_keys
of root on the server.
-
Move to the playbook directory:
cd matrix-docker-ansible-deploy/
-
Update the roles:
just roles
-
Install and start everything:
ansible-playbook -i inventory/hosts setup.yml --ask-vault-pass --tags=install-all,ensure-matrix-users-created,start
This should be done periodically as to not fall behind too much. Small frequent updates are less risky and more likely to be rollback-able than big ones.
Nevertheless, updates can break things proceed carefully and follow these steps:
-
Move to the playbook submodule directory:
cd matrix-docker-ansible-deploy/
-
Check for changes:
Check for the changes and investigate if there's something potentially risky or not backwards compatible.
git fetch origin git shortlog HEAD..origin/master
-
Check the CHANGELOG:
Check the CHANGELOG for breaking changes and adapt the local variables if there are any.
-
Update the playbook submodule:
Move to the repo root:
cd ..
Sync the submodule to the latest commit and push:
git submodule update --remote git commit -am "chore: update playbook to latest commit" git push
-
Pull the repo:
git pull --recurse-submodules
-
Move to the playbook directory:
cd matrix-docker-ansible-deploy/
-
Update the roles:
just roles
-
Update the installation :
Beware: this will result in a short downtime because the services will be restarted.
⚠️ just setup-all --ask-vault-pass