mirror of
https://github.com/element-hq/ess-helm.git
synced 2026-11-20 00:51:27 -08:00
3.2 KiB
3.2 KiB
Migrating
From Ansible Docker Deploy project
If you want to migrate from Ansible Docker Deploy project, follow the following steps :
- Follow the Preparing the environment section of the documentation.
- Install yq.
- Run this command:
./scripts/ansible-docker-deploy-to-values.sh /matrix ~/ess-config-values. This will create initial values file with all your configuration from ansible-docker-deploy. - A difference with the ansible-docker-deploy project is that Matrix Authentication Service is deployed under a dedicated hostname. If you are using Matrix Authentication Service, replace
CHANGEMEwith the new DNS Name for MAS in the generatedhostnames.yaml. - Install PostgreSQL on your server. Make sure that k3s can access it :
- In
postgresql.conf,listen_addressesmust be set to a routable IP of your server, different from localhost. Usually, you can use the same IP as the one discovered by Traefik in the reverse proxy configuration. - In
pg_hba.conf, make sure that you allow synapse and Matrix Authentication Service :
host <synapse db> <synapse_user> 10.42.0.1/24 md5
host <mas db> <mas_user> 10.42.0.1/24 md5
- Make sure that the firewall denies connections from outside of the server, and allows connection from your 10.42.0.1/24 network.
- Create a new database for Synapse and Matrix Authentication Service. Follow the Using a dedicated PostgreSQL database section of the advanced documentation.
- Stop Synapse systemd unit:
sudo systemctl stop matrix-synapse.service - Export
matrix-ansible-dockerPostgreSQL Synapse database into a local dump :docker exec matrix-postgres pg_dump -C -h localhost -U matrix synapse > ./synapse.sql - Adjust the user from the dump file to match your new database user and password:
sed -i 's/OWNER TO synapse/OWNER TO <your_synapse_user>/g' synapse.sql - Import
matrix-ansible-dockerPostgreSQL Synapse database into your new Synapse database :sudo -u postgres psql <synapse_db> < synapse.sql - Follow the Certificates section of the documentation
- Follow the Installation section of the documentation
- Import the media-store from your old Synapse to your new one :
- Import
local_content:sudo kubectl cp -n ess /matrix/synapse/storage/media-store/local_content ess-synapse-main-0:/media/media_store - Import
local_thumbnails:sudo kubectl cp -n ess /matrix/synapse/storage/media-store/local_thumbnails ess-synapse-main-0:/media/media_store - Import
remote_content:sudo kubectl cp -n ess /matrix/synapse/storage/media-store/remote_content ess-synapse-main-0:/media/media_store
- Import
- Follow the verification steps of the documentation to assert that your server is running properly.
The migration should now be completed.