DEV-380: put changed in new branches due to merge conflict stuff

feature/DEV-380_2nd
friedrich goerz 4 years ago
parent 43892e7a54
commit bd85993f23

@ -222,3 +222,5 @@ prometheus_alert_pg_replication_lag: 120
upstream_dns_servers:
- 185.12.64.1
- 185.12.64.2
wordpress_haproxy_admin_password: "{{ wordpress_haproxy_admin_password_vault | default('haproxy-admin') }}"

@ -1,6 +1,6 @@
---
connect_wordpress_maria_host: "{{ shared_service_maria_hostname }}"
connect_wordpress_maria_host: "mariaproxy"
connect_wordpress_maria_database: "{{ stage }}_{{ tenant_id }}_{{ cluster_name }}_connect_wordpress"
connect_wordpress_maria_username: "{{ connect_wordpress_maria_database }}"
connect_wordpress_maria_password: "connect-wordpress-maria-admin"

@ -58,12 +58,18 @@ shared_service_pg_slave_ip: "{{ stage_server_infos
| list
| first
| default('-') }}"
shared_service_maria_ip: "{{ stage_server_infos
shared_service_maria_1st_ip: "{{ stage_server_infos
| selectattr('name', 'match', stage + '-maria-01' )
| map(attribute='private_ip')
| list
| first
| default('-') }}"
shared_service_maria_2nd_ip: "{{ stage_server_infos
| selectattr('name', 'match', stage + '-maria-02' )
| map(attribute='private_ip')
| list
| first
| default('-') }}"
shared_service_keycloak_ip: "{{ stage_server_infos
| selectattr('name', 'match', stage + '-keycloak-01' )
| map(attribute='private_ip')
@ -139,7 +145,8 @@ shared_service_management_ip: "{{ stage_server_infos
shared_service_kube_ip: "{{ stage_private_ingress_loadbalancer_ip | default('-') }}"
shared_service_maria_hostname: "{{ stage }}-maria-01"
shared_service_maria_1st_hostname: "{{ stage }}-maria-01"
shared_service_maria_2nd_hostname: "{{ stage }}-maria-02"
shared_service_postgres_01_hostname: "{{ stage }}-postgres-01"
shared_service_elastic_stack_01_hostname: "{{ stage }}-elastic-stack-elastic-01"
shared_service_elastic_stack_02_hostname: "{{ stage }}-elastic-stack-elastic-02"
@ -193,8 +200,12 @@ shared_service_hosts: [
name: "{{ shared_service_elastic_stack_logstash_01_hostname }}"
},
{
ip: "{{ shared_service_maria_ip }}",
name: "{{ shared_service_maria_hostname }}"
ip: "{{ shared_service_maria_1st_ip }}",
name: "{{ shared_service_maria_1st_hostname }}"
},
{
ip: "{{ shared_service_maria_2nd_ip }}",
name: "{{ shared_service_maria_2nd_hostname }}"
},
{
ip: "{{ shared_service_pg_master_ip }}",

@ -58,12 +58,18 @@ shared_service_pg_slave_ip: "{{ stage_server_infos
| list
| first
| default('-') }}"
shared_service_maria_ip: "{{ stage_server_infos
shared_service_maria_1st_ip: "{{ stage_server_infos
| selectattr('name', 'match', stage + '-maria-01' )
| map(attribute='private_ip')
| list
| first
| default('-') }}"
shared_service_maria_2nd_ip: "{{ stage_server_infos
| selectattr('name', 'match', stage + '-maria-02' )
| map(attribute='private_ip')
| list
| first
| default('-') }}"
shared_service_keycloak_ip: "{{ stage_server_infos
| selectattr('name', 'match', stage + '-keycloak-01' )
| map(attribute='private_ip')
@ -139,7 +145,8 @@ shared_service_management_ip: "{{ stage_server_infos
shared_service_kube_ip: "{{ stage_private_ingress_loadbalancer_ip | default('-') }}"
shared_service_maria_hostname: "{{ stage }}-maria-01"
shared_service_maria_1st_hostname: "{{ stage }}-maria-01"
shared_service_maria_2nd_hostname: "{{ stage }}-maria-02"
shared_service_postgres_01_hostname: "{{ stage }}-postgres-01"
shared_service_elastic_stack_01_hostname: "{{ stage }}-elastic-stack-elastic-01"
shared_service_elastic_stack_02_hostname: "{{ stage }}-elastic-stack-elastic-02"
@ -193,8 +200,12 @@ shared_service_hosts: [
name: "{{ shared_service_elastic_stack_logstash_01_hostname }}"
},
{
ip: "{{ shared_service_maria_ip }}",
name: "{{ shared_service_maria_hostname }}"
ip: "{{ shared_service_maria_1st_ip }}",
name: "{{ shared_service_maria_1st_hostname }}"
},
{
ip: "{{ shared_service_maria_2nd_ip }}",
name: "{{ shared_service_maria_2nd_hostname }}"
},
{
ip: "{{ shared_service_pg_master_ip }}",

@ -58,12 +58,18 @@ shared_service_pg_slave_ip: "{{ stage_server_infos
| list
| first
| default('-') }}"
shared_service_maria_ip: "{{ stage_server_infos
shared_service_maria_1st_ip: "{{ stage_server_infos
| selectattr('name', 'match', stage + '-maria-01' )
| map(attribute='private_ip')
| list
| first
| default('-') }}"
shared_service_maria_2nd_ip: "{{ stage_server_infos
| selectattr('name', 'match', stage + '-maria-02' )
| map(attribute='private_ip')
| list
| first
| default('-') }}"
shared_service_keycloak_ip: "{{ stage_server_infos
| selectattr('name', 'match', stage + '-keycloak-01' )
| map(attribute='private_ip')
@ -139,7 +145,8 @@ shared_service_management_ip: "{{ stage_server_infos
shared_service_kube_ip: "{{ stage_private_ingress_loadbalancer_ip | default('-') }}"
shared_service_maria_hostname: "{{ stage }}-maria-01"
shared_service_maria_1st_hostname: "{{ stage }}-maria-01"
shared_service_maria_2nd_hostname: "{{ stage }}-maria-02"
shared_service_postgres_01_hostname: "{{ stage }}-postgres-01"
shared_service_elastic_stack_01_hostname: "{{ stage }}-elastic-stack-elastic-01"
shared_service_elastic_stack_02_hostname: "{{ stage }}-elastic-stack-elastic-02"
@ -193,10 +200,13 @@ shared_service_hosts: [
name: "{{ shared_service_elastic_stack_logstash_01_hostname }}"
},
{
ip: "{{ shared_service_maria_ip }}",
name: "{{ shared_service_maria_hostname }}"
ip: "{{ shared_service_maria_1st_ip }}",
name: "{{ shared_service_maria_1st_hostname }}"
},
{
ip: "{{ shared_service_maria_2nd_ip }}",
name: "{{ shared_service_maria_2nd_hostname }}"
},
ip: "{{ shared_service_pg_master_ip }}",
name: "{{ shared_service_postgres_01_hostname }}"
},

@ -27,6 +27,23 @@ wordpress_docker: {
},
],
services: [
{
name: "mariaproxy",
image_name: "haproxytech/haproxy-alpine",
image_version: "2.2.24",
ports: [
{
"external": "16666",
"internal": "6666",
},
],
volumes: [
'"./config/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro"',
],
networks: [
'"back-tier"',
],
},
{
name: "{{ wordpress_id }}",
image_name: "{{ wordpress_image_name }}",

@ -0,0 +1,32 @@
global
user haproxy
group haproxy
daemon
maxconn 4096
defaults
mode tcp
balance roundrobin
timeout client 30000ms
timeout server 30000ms
timeout connect 3000ms
retries 3
frontend stats
bind *:6666
mode http
stats enable
stats uri /haproxystats
stats show-node
stats auth {{ wordpress_haproxy_admin_username | default('haproxy-admin') }}:{{ wordpress_haproxy_admin_password }}
stats refresh 10s
frontend wordpress_backend
bind 0.0.0.0:3306
default_backend mariadb_servers
backend mariadb_servers
option tcp-check
server maria-01 {{ shared_service_maria_1st_hostname }}:3306 maxconn 2048 check
# TODO - disabled till M-M-replication is in place
# server maria-02 {{ shared_service_maria_2nd_hostname }}:3306 maxconn 2048 check
Loading…
Cancel
Save