projects:matrix:riot

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
projects:matrix:riot [2020/05/02 07:44] – [update] scipioprojects:matrix:riot [2022/11/04 08:21] (current) – removed sscipioni
Line 1: Line 1:
-====== matrix synapse ====== 
  
-vr: 
-  * 172.30.18.45: synapse, riot, dimension server 
-  * 172.30.18.54: jitsi 
- 
-galileo: 
-  * matrix.csgalileo.org: synapse, riot, dimension server 
-  * jitsi: meet.csgalileo.org (bilanciamento tra 1.meet.csgalileo.org e 2.meet.csgalileo.org) 
- 
- 
-===== synapse (matrix) ===== 
- 
-  * configurazione: /etc/matrix-synapse 
-  * service: matrix-synapse.service 
- 
-==== aggiornamento ==== 
- 
-normale apt 
- 
-==== install ==== 
- 
- 
-<code> 
-apt install nginx 
-</code> 
- 
-installare da repository 
-<code> 
-wget -qO - https://matrix.org/packages/debian/repo-key.asc | sudo apt-key add - 
-sudo add-apt-repository https://matrix.org/packages/debian/ 
- 
-apt install matrix-synapse-py3 
-apt install python-matrix-synapse-ldap3 
-</code> 
- 
-a questo punto synapse si trova nel virtualenv /opt/venvs/matrix-synapse/ 
- 
-==== nextcloud auth ==== 
- 
-python package synapse_g creato nella cartella /opt/venvs/synapse_g e utilizzato da /etc/matrix-synapse/homeserver.yaml 
-<code> 
-cd /opt/venvs/synapse_g 
- 
-/opt/venvs/synapse_g 
-├── setup.py 
-├── synapse_g 
-│   ├── __init__.py 
-│   └── nextcloud_provider.py 
-</code> 
- 
-==== setup con db postgresql ==== 
- 
-Installare postgresql. 
- 
-<code> 
-apt install postgresql postgresql-contrib 
-</code> 
- 
-Creare un utente e un database per synapse. 
- 
-<code> 
-su - postgres 
-createuser --pwprompt synapse_admin 
- 
-psql 
-    CREATE DATABASE synapse  
-    ENCODING 'UTF8' 
-    LC_COLLATE='C' 
-    LC_CTYPE='C' 
-    template=template0 
-    OWNER synapse_admin; 
-</code> 
- 
-Installare i pacchetti per synapse e postgres 
- 
-<code> 
-apt install libpq5 
-/opt/venvs/matrix-synapse/bin/pip install matrix-synapse[postgres] 
-</code> 
- 
-Importante: prima di effettuare il porting mettere il nome del server nel file di configurazione "homeserver.yaml" alla voce server_name (Es: server_name: "matrix.csgalileo.org") 
-altrimenti lo script va in errore 
-Il servername si trova in /etc/matrix-synapse/conf.d/server_name.yaml  
- 
- 
-Preparare le configurazioni 
- 
-<code> 
-cp /etc/matrix-synapse/homeserver.yaml /etc/matrix-synapse/homeserver-postgres.yaml 
-cp /etc/matrix-synapse/homeserver.yaml /etc/matrix-synapse/homeserver-old-sqlite.yaml 
- 
-vim /etc/matrix-synapse/homeserver-postgres.yaml 
-database: 
-    name: psycopg2 
-    args: 
-        user: "synapse_admin" 
-        password: "la password del db per synapse_admin" 
-        database: synapse 
-        host: 127.0.0.1 
-        cp_min: 5 
-        cp_max: 10 
-</code> 
- 
-=== Porting === 
- 
-<code> 
-systemctl stop  matrix-synapse 
- 
-synapse_port_db --sqlite-database /var/lib/matrix-synapse/homeserver.db \ 
-    --postgres-config /etc/matrix-synapse/homeserver-postgres.yaml 
-     
-mv /etc/matrix-synapse/homeserver-postgres.yaml /etc/matrix-synapse/homeserver.yaml 
- 
-systemctl start  matrix-synapse 
-</code> 
- 
- 
-===== riot ===== 
- 
-ambiente di sviluppo creato da https://github.com/vector-im/riot-web#setting-up-a-dev-environment 
- 
-==== aggiornamento ==== 
- 
-<code> 
-cd /lab/riot 
-source lib/bin/activate 
- 
-cd matrix-react-sdk 
-git co develop 
-git pull 
-git co verona 
-git merge develop 
-... risolvere i conflitti 
-yarn install 
-cd .. 
- 
-cd matrix-js-sdk 
-git pull 
-yarn install 
- 
- 
-cd riot-web 
-git co develop 
-git pull 
-git co verona 
-git merge develop 
-... risolvere i conflitti 
-yarn install 
-</code> 
- 
- 
-test in locale  
-<code> 
-yarn start 
-</code> 
- 
-deploy galileo 
-<code> 
-cd /lab/riot 
-make deploy 
-</code> 
- 
-deploy verona 
-<code> 
-cd /var/www 
-cp -a riot-dev riot-backup/ 
-</code> 
-<code> 
-cd /lab/riot 
-make deployvr 
-</code> 
-===== matrix-dimension ===== 
- 
-==== update ==== 
- 
-<code> 
-su - dimension 
-cd matrix-dimension 
-git pull 
-npm install 
-</code> 
- 
-<code> 
-systemctl restart matrix-synapse.service 
-</code> 
- 
-check with browser https://dimension.comune.verona.it 
-==== install ==== 
- 
- 
-in synapse server create local user called dimension for matrix-dimension binding 
-<code> 
-/opt/venvs/matrix-synapse/bin/register_new_matrix_user -c /etc/matrix-synapse/homeserver.yaml http://localhost:8008 
-New user localpart [root]: dimension 
-Password:  
-Confirm password:  
-Make admin [no]:  
-Sending registration request... 
-Success! 
-</code> 
- 
-run browser in incognito mode and login with dimension credentials in https://matrix.csgalileo.org and copy token 
- 
-{{ :tips:settings.png?400 |}} 
- 
-{{ :tips:token.png?400 |}} 
- 
- 
-as user root 
-<code> 
-apt install g++ gcc sqlite3 make 
-</code> 
- 
- 
-as user dimension 
- 
-<code> 
-nodeenv -n 10.19.0 venv 
-. venv/bin/activate 
- 
-unset NODE_ENV 
- 
-# Download dimension 
-git clone https://github.com/turt2live/matrix-dimension.git 
-cd matrix-dimension 
- 
-# Install dependencies 
-npm install 
- 
-# Build it 
-npm run build 
-</code> 
- 
-<code> 
-cp config/default.yaml config/production.yaml 
-</code> 
- 
-get token at https://t2bot.io/docs/access_tokens 
- 
-verify token 
-<code> 
-TOKEN=xxxxxxx 
-curl -H "Authorization: Bearer $TOKEN" https://matrix.csgalileo.org/_matrix/client/r0/account/whoami 
-</code> 
- 
- 
-edit config/production.yaml 
-<file> 
-homeserver: 
-  name: "csgalileo.org" 
-  clientServerUrl: "https://matrix.csgalileo.org" 
-  mediaUrl: "https://t2bot.io" 
-  accessToken: "....... 
-admins: 
-  - "@stefano.scipioni:matrix.csgalileo.org" 
-dimension: 
-  publicUrl: "https://dimension2.csgalileo.org/" 
-</file> 
- 
-<code> 
-NODE_ENV=production npm run start:app 
-</code> 
- 
-systemd service 
-<code> 
-[Service] 
-ExecStart=/bin/bash -c 'source /home/dimension/venv/bin/activate; /home/dimension/venv/bin/npm run start:app' 
- 
- 
-#ExecStart=/home/dimension/venv/bin/npm run start:app 
-WorkingDirectory=/home/dimension/matrix-dimension 
-Environment=NODE_ENV=production 
- 
-# Restart timing 
-Restart=always 
-RestartSec=60 
- 
-# Output to syslog 
-StandardOutput=syslog 
-StandardError=syslog 
-SyslogIdentifier=matrix-dimension 
- 
-# User & group to run service as 
-User=dimension 
- 
-[Install] 
-WantedBy=default.target 
-</code> 
  • projects/matrix/riot.1588398287.txt.gz
  • Last modified: 2020/05/02 07:44
  • by scipio