Join the service-mesh docker network

* Put the awx node(s) on a service-mesh docker network so they can be
  proxied to. Also put all the other containers on an explicit awx
  network otherwise they can not talk to each other. We might could be
  more surgical about what containers we put on awx but I just added all
  of them.
This commit is contained in:
Chris Meyers
2024-01-23 07:52:01 -05:00
committed by Chris Meyers
parent f69f600cff
commit e3b52f0169

View File

@@ -34,6 +34,9 @@ services:
links: links:
- postgres - postgres
- redis_{{ container_postfix }} - redis_{{ container_postfix }}
networks:
- awx
- service-mesh
working_dir: "/awx_devel" working_dir: "/awx_devel"
volumes: volumes:
- "../../../:/awx_devel" - "../../../:/awx_devel"
@@ -73,6 +76,8 @@ services:
volumes: volumes:
- "../../redis/redis.conf:/usr/local/etc/redis/redis.conf:Z" - "../../redis/redis.conf:/usr/local/etc/redis/redis.conf:Z"
- "redis_socket_{{ container_postfix }}:/var/run/redis/:rw" - "redis_socket_{{ container_postfix }}:/var/run/redis/:rw"
networks:
- awx
entrypoint: ["redis-server"] entrypoint: ["redis-server"]
command: ["/usr/local/etc/redis/redis.conf"] command: ["/usr/local/etc/redis/redis.conf"]
{% endfor %} {% endfor %}
@@ -82,6 +87,8 @@ services:
user: "{{ ansible_user_uid }}" user: "{{ ansible_user_uid }}"
volumes: volumes:
- "./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:Z" - "./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:Z"
networks:
- awx
ports: ports:
- "8013:8013" - "8013:8013"
- "8043:8043" - "8043:8043"
@@ -98,6 +105,8 @@ services:
container_name: tools_keycloak_1 container_name: tools_keycloak_1
hostname: keycloak hostname: keycloak
user: "{{ ansible_user_uid }}" user: "{{ ansible_user_uid }}"
networks:
- awx
ports: ports:
- "8443:8443" - "8443:8443"
environment: environment:
@@ -115,6 +124,8 @@ services:
container_name: tools_ldap_1 container_name: tools_ldap_1
hostname: ldap hostname: ldap
user: "{{ ansible_user_uid }}" user: "{{ ansible_user_uid }}"
networks:
- awx
ports: ports:
- "389:1389" - "389:1389"
- "636:1636" - "636:1636"
@@ -137,6 +148,8 @@ services:
image: splunk/splunk:latest image: splunk/splunk:latest
container_name: tools_splunk_1 container_name: tools_splunk_1
hostname: splunk hostname: splunk
networks:
- awx
ports: ports:
- "8000:8000" - "8000:8000"
- "8089:8089" - "8089:8089"
@@ -150,6 +163,8 @@ services:
image: prom/prometheus:latest image: prom/prometheus:latest
container_name: tools_prometheus_1 container_name: tools_prometheus_1
hostname: prometheus hostname: prometheus
networks:
- awx
ports: ports:
- "9090:9090" - "9090:9090"
volumes: volumes:
@@ -165,6 +180,8 @@ services:
image: grafana/grafana-enterprise:latest image: grafana/grafana-enterprise:latest
container_name: tools_grafana_1 container_name: tools_grafana_1
hostname: grafana hostname: grafana
networks:
- awx
ports: ports:
- "3001:3000" - "3001:3000"
volumes: volumes:
@@ -201,13 +218,17 @@ services:
POSTGRES_PASSWORD: {{ pg_password }} POSTGRES_PASSWORD: {{ pg_password }}
volumes: volumes:
- "awx_db:/var/lib/postgresql/data" - "awx_db:/var/lib/postgresql/data"
networks:
- awx
ports: ports:
- "${AWX_PG_PORT:-5432}:5432" - "${AWX_PG_PORT:-5441}:5432"
{% if enable_pgbouncer|bool %} {% if enable_pgbouncer|bool %}
pgbouncer: pgbouncer:
image: bitnami/pgbouncer:latest image: bitnami/pgbouncer:latest
container_name: tools_pgbouncer_1 container_name: tools_pgbouncer_1
hostname: pgbouncer hostname: pgbouncer
networks:
- awx
environment: environment:
POSTGRESQL_USERNAME: {{ pg_username }} POSTGRESQL_USERNAME: {{ pg_username }}
POSTGRESQL_DATABASE: {{ pg_database }} POSTGRESQL_DATABASE: {{ pg_database }}
@@ -231,6 +252,8 @@ services:
command: 'receptor --config /etc/receptor/receptor.conf' command: 'receptor --config /etc/receptor/receptor.conf'
links: links:
- awx_1 - awx_1
networks:
- awx
ports: ports:
- "5555:5555" - "5555:5555"
volumes: volumes:
@@ -246,6 +269,8 @@ services:
RECEPTORCTL_SOCKET: {{ receptor_socket_file }} RECEPTORCTL_SOCKET: {{ receptor_socket_file }}
links: links:
- receptor-hop - receptor-hop
networks:
- awx
volumes: volumes:
- "../../../:/awx_devel" # not used, but mounted so that any in-place installs can be used for whole cluster - "../../../:/awx_devel" # not used, but mounted so that any in-place installs can be used for whole cluster
- "../../docker-compose/_sources/receptor/receptor-worker-{{ loop.index }}.conf:/etc/receptor/receptor.conf" - "../../docker-compose/_sources/receptor/receptor-worker-{{ loop.index }}.conf:/etc/receptor/receptor.conf"
@@ -260,6 +285,8 @@ services:
container_name: tools_vault_1 container_name: tools_vault_1
command: server command: server
hostname: vault hostname: vault
networks:
- awx
ports: ports:
- "1234:1234" - "1234:1234"
environment: environment:
@@ -302,8 +329,11 @@ volumes:
grafana_storage: grafana_storage:
name: tools_grafana_storage name: tools_grafana_storage
{% endif %} {% endif %}
{% if minikube_container_group|bool %}
networks: networks:
awx:
service-mesh:
name: service-mesh
{% if minikube_container_group|bool %}
default: default:
external: external:
name: minikube name: minikube