mirror of
https://github.com/ZwareBear/awx.git
synced 2026-03-20 07:43:35 -05:00
Allow for dynamically scaling automation mesh in dev env
This commit is contained in:
committed by
Alan Rominger
parent
9881bb72b8
commit
460c7c3379
@@ -1,7 +1,7 @@
|
||||
---
|
||||
version: '2.1'
|
||||
services:
|
||||
{% for i in range(cluster_node_count|int) %}
|
||||
{% for i in range(control_plane_node_count|int) %}
|
||||
{% set container_postfix = loop.index %}
|
||||
{% set awx_sdb_port_start = 7899 + (loop.index0*1000) | int %}
|
||||
{% set awx_sdb_port_end = 7999 + (loop.index0*1000) | int %}
|
||||
@@ -27,7 +27,6 @@ services:
|
||||
links:
|
||||
- postgres
|
||||
- redis_{{ container_postfix }}
|
||||
- execution_node_1
|
||||
working_dir: "/awx_devel"
|
||||
volumes:
|
||||
- "../../../:/awx_devel"
|
||||
@@ -41,12 +40,11 @@ services:
|
||||
- "/sys/fs/cgroup:/sys/fs/cgroup"
|
||||
- "~/.kube/config:/var/lib/awx/.kube/config"
|
||||
- "redis_socket_{{ container_postfix }}:/var/run/redis/:rw"
|
||||
- "execution_node_1:/var/run/receptor/"
|
||||
privileged: true
|
||||
tty: true
|
||||
ports:
|
||||
- "{{ awx_sdb_port_start }}-{{ awx_sdb_port_end }}:{{ awx_sdb_port_start }}-{{ awx_sdb_port_end }}" # sdb-listen
|
||||
{% if cluster_node_count|int == 1 %}
|
||||
{% if control_plane_node_count|int == 1 %}
|
||||
- "6899:6899"
|
||||
- "8080:8080" # unused but mapped for debugging
|
||||
- "8888:8888" # jupyter notebook
|
||||
@@ -63,17 +61,7 @@ services:
|
||||
entrypoint: ["redis-server"]
|
||||
command: ["/usr/local/etc/redis/redis.conf"]
|
||||
{% endfor %}
|
||||
execution_node_1:
|
||||
image: quay.io/awx/awx_devel:devel
|
||||
user: "{{ ansible_user_uid }}"
|
||||
container_name: tools_execution_node_1
|
||||
hostname: execution_node_1
|
||||
command: 'receptor --config /etc/receptor/awx-1-receptor-standalone.conf'
|
||||
volumes:
|
||||
- "../../docker-compose:/etc/receptor"
|
||||
- "/sys/fs/cgroup:/sys/fs/cgroup"
|
||||
privileged: true
|
||||
{% if cluster_node_count|int > 1 %}
|
||||
{% if control_plane_node_count|int > 1 %}
|
||||
haproxy:
|
||||
image: haproxy
|
||||
user: "{{ ansible_user_uid }}"
|
||||
@@ -84,7 +72,7 @@ services:
|
||||
- "8043:8043"
|
||||
- "1936:1936"
|
||||
depends_on:
|
||||
{% for i in range(cluster_node_count|int) -%}
|
||||
{% for i in range(control_plane_node_count|int) -%}
|
||||
{% set container_postfix = loop.index %}
|
||||
- "awx_{{ container_postfix }}"
|
||||
{% endfor %}
|
||||
@@ -105,13 +93,40 @@ services:
|
||||
POSTGRES_PASSWORD: {{ pg_password }}
|
||||
volumes:
|
||||
- "awx_db:/var/lib/postgresql/data"
|
||||
{% if execution_node_count|int > 0 %}
|
||||
receptor-hop:
|
||||
image: quay.io/project-receptor/receptor:latest
|
||||
user: root
|
||||
container_name: tools_receptor_hop
|
||||
hostname: receptor-hop
|
||||
command: 'receptor --config /etc/receptor/receptor.conf'
|
||||
links:
|
||||
- awx_1
|
||||
ports:
|
||||
- "5555:5555"
|
||||
volumes:
|
||||
- "../../docker-compose/_sources/receptor/receptor-hop.conf:/etc/receptor/receptor.conf"
|
||||
{% for i in range(execution_node_count|int) -%}
|
||||
receptor-{{ loop.index }}:
|
||||
image: quay.io/awx/awx_devel:devel
|
||||
user: "{{ ansible_user_uid }}"
|
||||
container_name: tools_receptor_{{ loop.index }}
|
||||
hostname: receptor-1
|
||||
command: 'receptor --config /etc/receptor/receptor.conf'
|
||||
links:
|
||||
- receptor-hop
|
||||
volumes:
|
||||
- "../../docker-compose/_sources/receptor/receptor-worker-{{ loop.index }}.conf:/etc/receptor/receptor.conf"
|
||||
- "/sys/fs/cgroup:/sys/fs/cgroup"
|
||||
privileged: true
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
volumes:
|
||||
awx_db:
|
||||
name: tools_awx_db
|
||||
{% for i in range(cluster_node_count|int) -%}
|
||||
{% for i in range(control_plane_node_count|int) -%}
|
||||
{% set container_postfix = loop.index %}
|
||||
execution_node_1:
|
||||
name: tools_execution_node_1
|
||||
redis_socket_{{ container_postfix }}:
|
||||
name: tools_redis_socket_{{ container_postfix }}
|
||||
{% endfor -%}
|
||||
|
||||
Reference in New Issue
Block a user