Add new apps server. Move first service over. Remove container dashboard and monitoring.
parent
8411c83ad0
commit
2d8cc9bc2a
@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
ansible-playbook site.yml --inventory hosts --user=root --ask-pass $*
|
||||
ansible-playbook site.yml --inventory hosts --user=root $*
|
||||
|
@ -1,4 +1,5 @@
|
||||
apps.torsion.org
|
||||
newapps.torsion.org
|
||||
audio.dandy
|
||||
automation.dandy
|
||||
lyra-music.dandy
|
||||
|
@ -1,2 +0,0 @@
|
||||
ssl_client_certificate /etc/nginx/certs/ca.crt;
|
||||
ssl_verify_client optional;
|
@ -1,3 +0,0 @@
|
||||
if ($ssl_client_verify != SUCCESS) {
|
||||
return 403;
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
dependencies:
|
||||
- role: docker_compose
|
||||
- role: web_server
|
@ -1,39 +0,0 @@
|
||||
- name: add client certificate configuration
|
||||
copy:
|
||||
dest: "/etc/nginx/vhost.d/{{ container_dashboard_hostname }}"
|
||||
src: client_certificate_nginx.conf
|
||||
tags:
|
||||
- container_dashboard
|
||||
|
||||
- name: add client certificate location configuration
|
||||
copy:
|
||||
dest: "/etc/nginx/vhost.d/{{ container_dashboard_hostname }}_location"
|
||||
src: client_certificate_nginx_location.conf
|
||||
tags:
|
||||
- container_dashboard
|
||||
|
||||
- name: run Portainer container
|
||||
docker_compose:
|
||||
project_name: container_dashboard
|
||||
pull: yes
|
||||
definition:
|
||||
version: '3'
|
||||
services:
|
||||
container-dashboard:
|
||||
image: "portainer/portainer-ce:{{ portainer_version }}"
|
||||
restart: always
|
||||
volumes:
|
||||
- /var/lib/portainer:/data
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
environment:
|
||||
VIRTUAL_HOST: "{{ container_dashboard_hostname }}"
|
||||
VIRTUAL_PORT: 9000
|
||||
LETSENCRYPT_HOST: "{{ container_dashboard_hostname }}"
|
||||
LETSENCRYPT_EMAIL: "{{ admin_email }}"
|
||||
networks:
|
||||
default:
|
||||
external:
|
||||
name: shared
|
||||
tags:
|
||||
- container_dashboard
|
@ -1,2 +0,0 @@
|
||||
ssl_client_certificate /etc/nginx/certs/ca.crt;
|
||||
ssl_verify_client optional;
|
@ -1,3 +0,0 @@
|
||||
if ($ssl_client_verify != SUCCESS) {
|
||||
return 403;
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
nginx_netdata:
|
||||
path: '/var/log/nginx/access.log'
|
@ -1,3 +0,0 @@
|
||||
dependencies:
|
||||
- role: docker_compose
|
||||
- role: web_server
|
@ -1,104 +0,0 @@
|
||||
- name: add client certificate configuration
|
||||
copy:
|
||||
dest: "/etc/nginx/vhost.d/{{ monitoring_hostname }}"
|
||||
src: client_certificate_nginx.conf
|
||||
tags:
|
||||
- monitoring
|
||||
|
||||
- name: add client certificate location configuration
|
||||
copy:
|
||||
dest: "/etc/nginx/vhost.d/{{ monitoring_hostname }}_location"
|
||||
src: client_certificate_nginx_location.conf
|
||||
tags:
|
||||
- monitoring
|
||||
|
||||
- name: create configuration directory
|
||||
file:
|
||||
path: /etc/netdata/override/python.d
|
||||
state: directory
|
||||
mode: 0700
|
||||
tags:
|
||||
- monitoring
|
||||
|
||||
- name: create lib directory
|
||||
file:
|
||||
path: /var/lib/netdata
|
||||
state: directory
|
||||
mode: 0700
|
||||
owner: 201
|
||||
tags:
|
||||
- monitoring
|
||||
|
||||
- name: create cache directory
|
||||
file:
|
||||
path: /var/cache/netdata
|
||||
state: directory
|
||||
mode: 0700
|
||||
owner: 201
|
||||
tags:
|
||||
- monitoring
|
||||
|
||||
- name: opt out of telemetry
|
||||
blockinfile:
|
||||
path: /etc/netdata/.opt-out-from-anonymous-statistics
|
||||
block:
|
||||
mode: 0600
|
||||
tags:
|
||||
- monitoring
|
||||
|
||||
- name: get web log path
|
||||
command: "docker inspect --format='{% raw %}{{ .LogPath }}{% endraw %}' nginx"
|
||||
register: web_log_path_output
|
||||
tags:
|
||||
- monitoring
|
||||
|
||||
- name: configure web log tailing
|
||||
copy:
|
||||
src: web_log.conf
|
||||
dest: /etc/netdata/override/python.d/web_log.conf
|
||||
mode: 0600
|
||||
tags:
|
||||
- monitoring
|
||||
|
||||
- name: run monitoring containers
|
||||
docker_compose:
|
||||
project_name: monitoring
|
||||
pull: yes
|
||||
definition:
|
||||
version: '3'
|
||||
services:
|
||||
monitoring:
|
||||
image: netdata/netdata:v{{ netdata_version }}
|
||||
hostname: "{{ monitoring_hostname }}"
|
||||
restart: always
|
||||
cap_add:
|
||||
- SYS_PTRACE
|
||||
security_opt:
|
||||
- apparmor:unconfined
|
||||
volumes:
|
||||
- /etc/netdata:/etc/netdata:ro
|
||||
- /var/lib/netdata:/var/lib/netdata
|
||||
- /var/cache/netdata:/var/cache/netdata
|
||||
- "{{ web_log_path_output.stdout }}:/var/log/nginx/access.log:ro"
|
||||
- /etc/passwd:/host/etc/passwd:ro
|
||||
- /etc/group:/host/etc/group:ro
|
||||
- /proc:/host/proc:ro
|
||||
- /sys:/host/sys:ro
|
||||
- /etc/os-release:/host/etc/os-release:ro
|
||||
environment:
|
||||
VIRTUAL_HOST: "{{ monitoring_hostname }}"
|
||||
VIRTUAL_PORT: 80
|
||||
LETSENCRYPT_HOST: "{{ monitoring_hostname }}"
|
||||
LETSENCRYPT_EMAIL: "{{ admin_email }}"
|
||||
SMTP_FROM: "{{ monitoring_from_email }}"
|
||||
SMTP_TO: "{{ monitoring_to_email }}"
|
||||
SMTP_SERVER: "{{ monitoring_email_host }}"
|
||||
SMTP_PORT: "{{ monitoring_email_port }}"
|
||||
SMTP_USER: "{{ monitoring_email_username }}"
|
||||
SMTP_PASS: "{{ monitoring_email_password }}"
|
||||
networks:
|
||||
default:
|
||||
external:
|
||||
name: shared
|
||||
tags:
|
||||
- monitoring
|
Loading…
Reference in New Issue