mirror of
https://github.com/ansible/awx.git
synced 2026-05-15 05:17:36 -02:30
Update docker-compose (#10664)
* Update docker-compose - Deploys 1 control and 1 execution node * Add a new Receptor cluster configuration file * update receptor peer to awx_1 to match how hop node is configured in cluster (Jim Ladd's commit) * Move receptor_1 instantiation in the docker-compose setup * Hard code receptor_1 name * Update execution node name, move standalone conf file to docker-compose directory * Reformat docker-compose file, mount another volume, change privileges
This commit is contained in:
committed by
Alan Rominger
parent
f597205fa7
commit
c3843004aa
@@ -27,6 +27,7 @@ services:
|
|||||||
links:
|
links:
|
||||||
- postgres
|
- postgres
|
||||||
- redis_{{ container_postfix }}
|
- redis_{{ container_postfix }}
|
||||||
|
- execution_node_1
|
||||||
working_dir: "/awx_devel"
|
working_dir: "/awx_devel"
|
||||||
volumes:
|
volumes:
|
||||||
- "../../../:/awx_devel"
|
- "../../../:/awx_devel"
|
||||||
@@ -40,7 +41,7 @@ services:
|
|||||||
- "/sys/fs/cgroup:/sys/fs/cgroup"
|
- "/sys/fs/cgroup:/sys/fs/cgroup"
|
||||||
- "~/.kube/config:/var/lib/awx/.kube/config"
|
- "~/.kube/config:/var/lib/awx/.kube/config"
|
||||||
- "redis_socket_{{ container_postfix }}:/var/run/redis/:rw"
|
- "redis_socket_{{ container_postfix }}:/var/run/redis/:rw"
|
||||||
- "receptor_{{ container_postfix }}:/var/run/receptor/"
|
- "execution_node_1:/var/run/receptor/"
|
||||||
privileged: true
|
privileged: true
|
||||||
tty: true
|
tty: true
|
||||||
ports:
|
ports:
|
||||||
@@ -62,6 +63,16 @@ services:
|
|||||||
entrypoint: ["redis-server"]
|
entrypoint: ["redis-server"]
|
||||||
command: ["/usr/local/etc/redis/redis.conf"]
|
command: ["/usr/local/etc/redis/redis.conf"]
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
execution_node_1:
|
||||||
|
image: quay.io/awx/awx_devel:devel
|
||||||
|
user: root
|
||||||
|
container_name: tools_execution_node_1
|
||||||
|
hostname: execution_node_1
|
||||||
|
command: 'receptor --config /etc/receptor/awx-1-receptor-standalone.conf'
|
||||||
|
volumes:
|
||||||
|
- "../../docker-compose-cluster:/etc/receptor"
|
||||||
|
- "/sys/fs/cgroup:/sys/fs/cgroup"
|
||||||
|
privileged: true
|
||||||
{% if cluster_node_count|int > 1 %}
|
{% if cluster_node_count|int > 1 %}
|
||||||
haproxy:
|
haproxy:
|
||||||
image: haproxy
|
image: haproxy
|
||||||
@@ -99,8 +110,8 @@ volumes:
|
|||||||
name: tools_awx_db
|
name: tools_awx_db
|
||||||
{% for i in range(cluster_node_count|int) -%}
|
{% for i in range(cluster_node_count|int) -%}
|
||||||
{% set container_postfix = loop.index %}
|
{% set container_postfix = loop.index %}
|
||||||
receptor_{{ container_postfix }}:
|
execution_node_1:
|
||||||
name: tools_receptor_{{ container_postfix }}
|
name: tools_execution_node_1
|
||||||
redis_socket_{{ container_postfix }}:
|
redis_socket_{{ container_postfix }}:
|
||||||
name: tools_redis_socket_{{ container_postfix }}
|
name: tools_redis_socket_{{ container_postfix }}
|
||||||
{% endfor -%}
|
{% endfor -%}
|
||||||
|
|||||||
25
tools/docker-compose/awx-1-receptor-standalone.conf
Normal file
25
tools/docker-compose/awx-1-receptor-standalone.conf
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
- node:
|
||||||
|
id: execution_node_1
|
||||||
|
|
||||||
|
- log-level: info
|
||||||
|
|
||||||
|
#- tls-client:
|
||||||
|
# name: mutual-tls-client
|
||||||
|
# cert: /etc/receptor/certs/receptor_1.crt
|
||||||
|
# key: /etc/receptor/certs/receptor_1.key
|
||||||
|
# rootcas: /etc/receptor/certs/ca.crt
|
||||||
|
|
||||||
|
- tcp-peer:
|
||||||
|
address: awx_1:4444
|
||||||
|
redial: true
|
||||||
|
#tls: mutual-tls-client
|
||||||
|
|
||||||
|
- work-command:
|
||||||
|
worktype: ansible-runner
|
||||||
|
command: ansible-runner
|
||||||
|
params: worker
|
||||||
|
allowruntimeparams: true
|
||||||
|
|
||||||
|
- control-service:
|
||||||
|
service: control
|
||||||
Reference in New Issue
Block a user