From 9f17b7bbae5dca7ff211b87a31e4a1b007fbb29f Mon Sep 17 00:00:00 2001 From: Thomas Daley Date: Sun, 13 Mar 2022 08:49:40 -0700 Subject: [PATCH 1/6] Switch to use host network instead. This is to solve certain issues with local clients being treated as remote clients due to docker bridge netoworking --- .ansible/templates/docker-compose.yaml.j2 | 7 +++++++ .drone.yaml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.ansible/templates/docker-compose.yaml.j2 b/.ansible/templates/docker-compose.yaml.j2 index beb8d5e..bac2c26 100644 --- a/.ansible/templates/docker-compose.yaml.j2 +++ b/.ansible/templates/docker-compose.yaml.j2 @@ -20,6 +20,8 @@ services: - {{ config_dir }}:/config - {{ data_dir }}:/transcode - nas-media:/data:ro + networks: + hostnet: {} volumes: nas-media: @@ -30,3 +32,8 @@ volumes: type: nfs o: addr={{ nfs_host }},ro,nfsvers=4,async device: :{{ nfs_path }} + +networks: + hostnet: + external: true + name: host diff --git a/.drone.yaml b/.drone.yaml index c034fae..823cee9 100644 --- a/.drone.yaml +++ b/.drone.yaml @@ -22,6 +22,6 @@ trigger: event: - push branch: - - stable + - development ... From 89f6c17ce9936d9f9a8c1b3938e4d9d86db5ab85 Mon Sep 17 00:00:00 2001 From: Thomas Daley Date: Sun, 13 Mar 2022 08:51:12 -0700 Subject: [PATCH 2/6] host key changed --- .ansible/inventories/production/hosts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ansible/inventories/production/hosts b/.ansible/inventories/production/hosts index a097a02..3a3f080 100644 --- a/.ansible/inventories/production/hosts +++ b/.ansible/inventories/production/hosts @@ -3,7 +3,7 @@ all: plex: hosts: - gpu.diesel.net: + quadro.diesel.net: vars: ansible_user: automation From 7bb69541a1fd53583bfb015108bd341cd62c4b94 Mon Sep 17 00:00:00 2001 From: Thomas Daley Date: Sun, 13 Mar 2022 08:54:24 -0700 Subject: [PATCH 3/6] Remove port mapping now that we are on host network --- .ansible/templates/docker-compose.yaml.j2 | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.ansible/templates/docker-compose.yaml.j2 b/.ansible/templates/docker-compose.yaml.j2 index bac2c26..7abb809 100644 --- a/.ansible/templates/docker-compose.yaml.j2 +++ b/.ansible/templates/docker-compose.yaml.j2 @@ -4,10 +4,6 @@ services: media-server: image: plexinc/pms-docker:public hostname: {{ plex_host }} - ports: -{% for port in plex_ports %} - - {{ port['host'] }}:{{ port['docker'] }}/{{ port['proto'] }} -{% endfor %} environment: - PLEX_UID={{ plex_user_id }} - PLEX_GID={{ plex_group_id }} From 60d3a3962c9bd2e2b4dc5fea17cced5cdfc66905 Mon Sep 17 00:00:00 2001 From: Thomas Daley Date: Sun, 13 Mar 2022 08:58:46 -0700 Subject: [PATCH 4/6] remove docker port mapping references --- .ansible/group_vars/all/plex.yaml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.ansible/group_vars/all/plex.yaml b/.ansible/group_vars/all/plex.yaml index c33c708..5f0f046 100644 --- a/.ansible/group_vars/all/plex.yaml +++ b/.ansible/group_vars/all/plex.yaml @@ -3,34 +3,24 @@ plex_web_port: 32400 plex_ports: - host: "{{ plex_web_port }}" - docker: 32400 proto: tcp - host: 1900 - docker: 1900 proto: udp - host: 3005 - docker: 3005 proto: tcp - host: 5353 - docker: 5353 proto: udp - host: 8324 - docker: 8324 proto: tcp - host: 32410 - docker: 32410 proto: udp - host: 32412 - docker: 32412 proto: udp - host: 32413 - docker: 32413 proto: udp - host: 32414 - docker: 32414 proto: udp - host: 32469 - docker: 32469 proto: tcp plex_user_id: "{{ ansible_user_uid }}" From eaff37e121f18880a9480ae231fd0e1d672e84ec Mon Sep 17 00:00:00 2001 From: Thomas Daley Date: Sun, 13 Mar 2022 09:03:23 -0700 Subject: [PATCH 5/6] change some variable names --- .ansible/deploy.yaml | 6 +++--- .ansible/group_vars/all/plex.yaml | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.ansible/deploy.yaml b/.ansible/deploy.yaml index 097c574..5dd60cc 100644 --- a/.ansible/deploy.yaml +++ b/.ansible/deploy.yaml @@ -15,12 +15,12 @@ - name: allow ports through firewall on host ufw: rule: allow - port: "{{ port['host'] }}" - proto: "{{ port['proto'] }}" + port: "{{ item['port'] }}" + proto: "{{ item['proto'] }}" become: yes loop: "{{ plex_ports }}" loop_control: - loop_var: port + loop_var: item - name: reload firewall and enable at boot ufw: diff --git a/.ansible/group_vars/all/plex.yaml b/.ansible/group_vars/all/plex.yaml index 5f0f046..f40b14f 100644 --- a/.ansible/group_vars/all/plex.yaml +++ b/.ansible/group_vars/all/plex.yaml @@ -2,25 +2,25 @@ plex_web_port: 32400 plex_ports: - - host: "{{ plex_web_port }}" + - port: "{{ plex_web_port }}" proto: tcp - - host: 1900 + - port: 1900 proto: udp - - host: 3005 + - port: 3005 proto: tcp - - host: 5353 + - port: 5353 proto: udp - - host: 8324 + - port: 8324 proto: tcp - - host: 32410 + - port: 32410 proto: udp - - host: 32412 + - port: 32412 proto: udp - - host: 32413 + - port: 32413 proto: udp - - host: 32414 + - port: 32414 proto: udp - - host: 32469 + - port: 32469 proto: tcp plex_user_id: "{{ ansible_user_uid }}" From 04649de996e06ee37153a0e3ea7a087fe323a998 Mon Sep 17 00:00:00 2001 From: Thomas Daley Date: Sun, 13 Mar 2022 09:06:21 -0700 Subject: [PATCH 6/6] Lock in stable branch builds --- .drone.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yaml b/.drone.yaml index 823cee9..c034fae 100644 --- a/.drone.yaml +++ b/.drone.yaml @@ -22,6 +22,6 @@ trigger: event: - push branch: - - development + - stable ...