Run matrix-eavesdrop on eavesdrop
Thin runs the new matrix-eavesdrop bot on the eavesdrop server. It will write logs out to the limnoria logs directory, which is mounted inside the container. Change-Id: I867eec692f63099b295a37a028ee096c24109a2e
This commit is contained in:
parent
b58b204a8e
commit
82c966e6da
1
playbooks/roles/matrix-eavesdrop/README.rst
Normal file
1
playbooks/roles/matrix-eavesdrop/README.rst
Normal file
@ -0,0 +1 @@
|
|||||||
|
Run a matrix-eavesdrop bot
|
17
playbooks/roles/matrix-eavesdrop/files/docker-compose.yaml
Normal file
17
playbooks/roles/matrix-eavesdrop/files/docker-compose.yaml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# Version 2 is the latest that is supported by docker-compose in
|
||||||
|
# Ubuntu Xenial.
|
||||||
|
version: '2'
|
||||||
|
|
||||||
|
services:
|
||||||
|
eavesdrop:
|
||||||
|
image: docker.io/opendevorg/matrix-eavesdrop:latest
|
||||||
|
network_mode: host
|
||||||
|
restart: always
|
||||||
|
logging:
|
||||||
|
driver: syslog
|
||||||
|
options:
|
||||||
|
tag: "docker-matrix-eavesdrop"
|
||||||
|
volumes:
|
||||||
|
- /var/lib/matrix-eavesdrop/data:/data
|
||||||
|
- /var/lib/matrix-eavesdrop/config:/config
|
||||||
|
- /var/lib/limnoria/opendev/logs/ChannelLogger/oftc:/logs
|
44
playbooks/roles/matrix-eavesdrop/tasks/main.yaml
Normal file
44
playbooks/roles/matrix-eavesdrop/tasks/main.yaml
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
- name: Ensure bot directories
|
||||||
|
file:
|
||||||
|
state: directory
|
||||||
|
path: '/var/lib/matrix-eavesdrop/{{ item }}'
|
||||||
|
mode: 0755
|
||||||
|
loop:
|
||||||
|
- data
|
||||||
|
- config
|
||||||
|
|
||||||
|
- name: Install eavesdrop config
|
||||||
|
template:
|
||||||
|
src: config.yaml
|
||||||
|
dest: /var/lib/matrix-eavesdrop/config/config.yaml
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0644
|
||||||
|
|
||||||
|
- name: Ensure /etc/matrix-eavesdrop-docker directory
|
||||||
|
file:
|
||||||
|
state: directory
|
||||||
|
path: /etc/matrix-eavesdrop-docker
|
||||||
|
mode: 0755
|
||||||
|
|
||||||
|
- name: Put docker-compose file in place
|
||||||
|
copy:
|
||||||
|
src: docker-compose.yaml
|
||||||
|
dest: /etc/matrix-eavesdrop-docker/docker-compose.yaml
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0644
|
||||||
|
|
||||||
|
- name: Run docker-compose pull
|
||||||
|
shell:
|
||||||
|
cmd: docker-compose pull
|
||||||
|
chdir: /etc/matrix-eavesdrop-docker/
|
||||||
|
|
||||||
|
- name: Run docker-compose up
|
||||||
|
shell:
|
||||||
|
cmd: "docker-compose up -d"
|
||||||
|
chdir: /etc/matrix-eavesdrop-docker/
|
||||||
|
|
||||||
|
- name: Run docker prune to cleanup unneeded images
|
||||||
|
shell:
|
||||||
|
cmd: docker image prune -f
|
13
playbooks/roles/matrix-eavesdrop/templates/config.yaml
Normal file
13
playbooks/roles/matrix-eavesdrop/templates/config.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
config:
|
||||||
|
data_dir: /data
|
||||||
|
homeserver: https://opendev.ems.host
|
||||||
|
user_id: "@logs:opendev.org"
|
||||||
|
password: "{{ matrix_logs_password }}"
|
||||||
|
log_dir: /logs
|
||||||
|
|
||||||
|
# For each room, add the following:
|
||||||
|
# id: The full Matrix ID of the room
|
||||||
|
# path: A relative path to log_dir, or begin with '/' for an absolute path.
|
||||||
|
rooms:
|
||||||
|
- id: "#test:opendev.org"
|
||||||
|
path: "#test"
|
@ -9,3 +9,4 @@
|
|||||||
- gerritbot
|
- gerritbot
|
||||||
- statusbot
|
- statusbot
|
||||||
- limnoria
|
- limnoria
|
||||||
|
- matrix-eavesdrop
|
||||||
|
@ -53,3 +53,4 @@ limnoria_oftc_channels:
|
|||||||
- '#opendev-sandbox'
|
- '#opendev-sandbox'
|
||||||
statusbot_channels:
|
statusbot_channels:
|
||||||
- 'opendev-sandbox'
|
- 'opendev-sandbox'
|
||||||
|
matrix_logs_password: password
|
||||||
|
@ -473,8 +473,11 @@
|
|||||||
- playbooks/roles/limnoria
|
- playbooks/roles/limnoria
|
||||||
- playbooks/roles/statusbot
|
- playbooks/roles/statusbot
|
||||||
- playbooks/roles/logrotate
|
- playbooks/roles/logrotate
|
||||||
|
- playbooks/roles/matrix-eavesdrop
|
||||||
|
- playbooks/zuul/templates/group_vars/eavesdrop.yaml.j2
|
||||||
- docker/accessbot/
|
- docker/accessbot/
|
||||||
- docker/ircbot
|
- docker/ircbot
|
||||||
|
- docker/matrix-eavesdrop
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: infra-prod-run-accessbot
|
name: infra-prod-run-accessbot
|
||||||
|
@ -21,6 +21,8 @@
|
|||||||
soft: true
|
soft: true
|
||||||
- name: system-config-build-image-ircbot
|
- name: system-config-build-image-ircbot
|
||||||
soft: true
|
soft: true
|
||||||
|
- name: system-config-build-image-matrix-eavesdrop
|
||||||
|
soft: true
|
||||||
- system-config-run-codesearch:
|
- system-config-run-codesearch:
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: opendev-buildset-registry
|
- name: opendev-buildset-registry
|
||||||
@ -155,6 +157,8 @@
|
|||||||
soft: true
|
soft: true
|
||||||
- name: system-config-upload-image-ircbot
|
- name: system-config-upload-image-ircbot
|
||||||
soft: true
|
soft: true
|
||||||
|
- name: system-config-upload-image-matrix-eavesdrop
|
||||||
|
soft: true
|
||||||
- system-config-run-codesearch:
|
- system-config-run-codesearch:
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: opendev-buildset-registry
|
- name: opendev-buildset-registry
|
||||||
@ -252,7 +256,7 @@
|
|||||||
- name: opendev-buildset-registry
|
- name: opendev-buildset-registry
|
||||||
- name: system-config-build-image-python-builder-3.9
|
- name: system-config-build-image-python-builder-3.9
|
||||||
soft: true
|
soft: true
|
||||||
- system-config-build-image-matrix-eavesdrop:
|
- system-config-upload-image-matrix-eavesdrop:
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: opendev-buildset-registry
|
- name: opendev-buildset-registry
|
||||||
- name: system-config-build-image-python-builder-3.9
|
- name: system-config-build-image-python-builder-3.9
|
||||||
|
@ -131,6 +131,7 @@
|
|||||||
- gerritbot-container-image
|
- gerritbot-container-image
|
||||||
- statusbot-container-image
|
- statusbot-container-image
|
||||||
- ircbot-container-image
|
- ircbot-container-image
|
||||||
|
- matrix-eavesdrop-container-image
|
||||||
nodeset:
|
nodeset:
|
||||||
nodes:
|
nodes:
|
||||||
- name: bridge.openstack.org
|
- name: bridge.openstack.org
|
||||||
@ -158,9 +159,12 @@
|
|||||||
- playbooks/roles/accessbot
|
- playbooks/roles/accessbot
|
||||||
- playbooks/roles/limnoria
|
- playbooks/roles/limnoria
|
||||||
- playbooks/roles/logrotate
|
- playbooks/roles/logrotate
|
||||||
|
- playbooks/roles/matrix-eavesdrop
|
||||||
- playbooks/roles/statusbot
|
- playbooks/roles/statusbot
|
||||||
- playbooks/zuul/templates/group_vars/eavesdrop.yaml.j2
|
- playbooks/zuul/templates/group_vars/eavesdrop.yaml.j2
|
||||||
- docker/accessbot/
|
- docker/accessbot/
|
||||||
|
- docker/ircbot
|
||||||
|
- docker/matrix-eavesdrop
|
||||||
- testinfra/test_eavesdrop.py
|
- testinfra/test_eavesdrop.py
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
|
Loading…
Reference in New Issue
Block a user