move turn over to its own role

This commit is contained in:
Nico Schottelius 2023-12-04 09:15:08 +01:00
parent 4dffeb3bf6
commit 67f3f2dbd1
15 changed files with 23 additions and 79 deletions

View file

@ -10,6 +10,9 @@ runa:
- "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCjWYALKYHTs6mX7GrrpxR0TPhxwVplmmcTPAA7zjhVCZajcUwLduy3Yct4YXBwRiEydGyhExoVVB8i7UhyvMQsTheRk751uJZyKWIkqbQJoJx1LPmZ00EJNaiIEiJih762D9KWZ1GoLBfB4QAEmoWDzVm3CFJ9tBVEsQ7i9BH+Cbe2GsnqflfWjb09bZhaOSTrmWNcBxgpXirZyi8EI0SrVtmnwVzdH8HXOalvFqW57aY1q/RjE1DIh7Pp+RiGscZz6CJ5oJtSEKbjZ2aUe4gomlQwYmGNVk22RdjvB7+0KDXMwdp702Z5ETv2xYk9v5YrA/lsWk/9JX8vGYb5Y5N+GGG9woZ5M1JIRjXduxNf68VMSQbxZTeonoWkh6Q8CNgDsHyyAyNuPAss7SCCGk5G8s0q/4IDGfV0A1QKFhHOId1qEqGQtLKaRbo6ZTi9wXSieA5D3kMNh+WWufutxI/t56USzNSaeYjqpYwiICBZ8jzWBJrDamiFne4KkW3PTao7Czv6yIeXHHfGYDtdvXppMSjamw+rbA/btTes5X+pYlFxniO5sZJUa+jnJOo3SYBGoRYftqxw7Usqm/i/koHP1RM8L3Iq+/xXNr5+AyFzRBCUUuDfRw1MY1n9OJXvYykNGth4ablfVFcP1R8Qq7jVGksK1dzckzD9SmCdubzwtw== nico-2014" - "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCjWYALKYHTs6mX7GrrpxR0TPhxwVplmmcTPAA7zjhVCZajcUwLduy3Yct4YXBwRiEydGyhExoVVB8i7UhyvMQsTheRk751uJZyKWIkqbQJoJx1LPmZ00EJNaiIEiJih762D9KWZ1GoLBfB4QAEmoWDzVm3CFJ9tBVEsQ7i9BH+Cbe2GsnqflfWjb09bZhaOSTrmWNcBxgpXirZyi8EI0SrVtmnwVzdH8HXOalvFqW57aY1q/RjE1DIh7Pp+RiGscZz6CJ5oJtSEKbjZ2aUe4gomlQwYmGNVk22RdjvB7+0KDXMwdp702Z5ETv2xYk9v5YrA/lsWk/9JX8vGYb5Y5N+GGG9woZ5M1JIRjXduxNf68VMSQbxZTeonoWkh6Q8CNgDsHyyAyNuPAss7SCCGk5G8s0q/4IDGfV0A1QKFhHOId1qEqGQtLKaRbo6ZTi9wXSieA5D3kMNh+WWufutxI/t56USzNSaeYjqpYwiICBZ8jzWBJrDamiFne4KkW3PTao7Czv6yIeXHHfGYDtdvXppMSjamw+rbA/btTes5X+pYlFxniO5sZJUa+jnJOo3SYBGoRYftqxw7Usqm/i/koHP1RM8L3Iq+/xXNr5+AyFzRBCUUuDfRw1MY1n9OJXvYykNGth4ablfVFcP1R8Qq7jVGksK1dzckzD9SmCdubzwtw== nico-2014"
matrix_service: "" matrix_service: ""
turn:
realm: ""
logs_dirs: logs_dirs:
- name: nginx - name: nginx
uid: 101 uid: 101
@ -21,11 +24,11 @@ runa:
ank: ank:
hosts: hosts:
mtx-turn-1.ankr.corp-services.app: mtx-turn-1.ankr.corp-services.app:
docker_compose: matrix_service: "turn"
- turn1 turn:
realm: "turn-1.corp-serv.net"
external_ip: "135.125.151.180/10.80.24.41"
mtx-turn-2.ankr.corp-services.app: mtx-turn-2.ankr.corp-services.app:
docker_compose:
- turn2
lat: lat:
hosts: hosts:
mtx-elem-1.lat.internal.ru.com: mtx-elem-1.lat.internal.ru.com:

View file

@ -1,69 +0,0 @@
version: '3'
services:
synapse-main:
image: matrixdotorg/synapse:${SYNAPSE_VERSION}
ports:
- "8008:8008/tcp"
volumes:
- /mnt/synapse_data:/data
- ./config:/config
# ports:
# - "8008:8008/tcp"
command:
- run
- --config-path=/config/homeserver.yaml
restart: always
synapse-worker-generic:
image: matrixdotorg/synapse:latest
command:
- run
- "--config-path=/config/homeserver.yaml"
- "--config-path=/config/synapse-worker-generic.yaml"
# ports:
# - "8008:8008/tcp"
volumes:
- /mnt/synapse_data:/data
- ./config:/config
environment:
SYNAPSE_WORKER: synapse.app.generic_worker
depends_on:
- synapse-main
restart: unless-stopped
# healthcheck:
# test: ["CMD-SHELL", "curl -fSs http://localhost:8081/health || exit 1"]
# start_period: "5s"
# interval: "15s"
# timeout: "5s"
nginx:
image: nginx:${NGINX_VERSION}
ports:
- "80:80/tcp"
- "443:443/tcp"
volumes:
- ./nginx:/etc/nginx/conf.d
- /ssl:/ssl
restart: unless-stopped
redis:
image: "redis:latest"
ports:
- "6379:6379/tcp"
restart: "unless-stopped"
# synapse-federation-sender-1:
# image: matrixdotorg/synapse:latest
# container_name: synapse-federation-sender-1
# restart: unless-stopped
# entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/synapse-federation-sender-1.yaml"]
# healthcheck:
# disable: true
# network_mode: "host"
# volumes:
# - ./synapse:/data
# environment:
# SYNAPSE_WORKER: synapse.app.generic_worker
# depends_on:
# - synapse

View file

@ -1,7 +1,7 @@
- name: Copy docker-compose contents - name: Copy docker-compose contents
ansible.builtin.copy: ansible.builtin.copy:
src: files/basedir/ src: files/basedir/
dest: /home/{{ ansible_user }}/docker_compose/{{ docker_compose }} dest: /home/{{ ansible_user }}/docker_compose/{{ matrix_service }}
owner: "{{ ansible_user }}" owner: "{{ ansible_user }}"
mode: '0644' mode: '0644'
tags: tags:
@ -10,7 +10,7 @@
- name: Create nginx dir - name: Create nginx dir
ansible.builtin.file: ansible.builtin.file:
path: /home/{{ ansible_user }}/docker_compose/nginx path: /home/{{ ansible_user }}/docker_compose/{{ matrix_service }}/nginx
state: directory state: directory
owner: "{{ ansible_user }}" owner: "{{ ansible_user }}"
mode: '0755' mode: '0755'
@ -21,7 +21,7 @@
- name: Create nginx config - name: Create nginx config
ansible.builtin.template: ansible.builtin.template:
src: "nginx/elementweb.conf" src: "nginx/elementweb.conf"
dest: /home/{{ ansible_user }}/docker_compose/nginx/elementweb.conf dest: /home/{{ ansible_user }}/docker_compose/{{ matrix_service }}/nginx/elementweb.conf
owner: "{{ ansible_user }}" owner: "{{ ansible_user }}"
mode: '0644' mode: '0644'
tags: tags:

View file

@ -0,0 +1,9 @@
- name: Copy docker-compose contents
ansible.builtin.copy:
src: files/basedir/
dest: /home/{{ ansible_user }}/docker_compose/{{ matrix_service }}
owner: "{{ ansible_user }}"
mode: '0644'
tags:
- files
- test

View file

@ -1,13 +1,14 @@
realm=turn-1.corp-serv.net realm={{ turn.realm }}
no-tcp-relay no-tcp-relay
listening-ip=0.0.0.0 listening-ip=0.0.0.0
listening-port=3478 listening-port=3478
min-port=49152 min-port=49152
max-port=65535 max-port=65535
external-ip=135.125.151.180/10.80.24.41 external-ip={{ turn.external_ip }}
log-file=stdout #log-file=stdout
log-file=/logs/turn-{{ inventory_hostname }}.log
verbose verbose
pidfile=/var/tmp/turnserver.pid pidfile=/var/tmp/turnserver.pid
use-auth-secret use-auth-secret