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:
Bianca Henderson 2021-07-21 11:57:18 -04:00 committed by Alan Rominger
parent f597205fa7
commit c3843004aa
No known key found for this signature in database
GPG Key ID: C2D7EAAA12B63559
2 changed files with 39 additions and 3 deletions

View File

@ -27,6 +27,7 @@ services:
links:
- postgres
- redis_{{ container_postfix }}
- execution_node_1
working_dir: "/awx_devel"
volumes:
- "../../../:/awx_devel"
@ -40,7 +41,7 @@ services:
- "/sys/fs/cgroup:/sys/fs/cgroup"
- "~/.kube/config:/var/lib/awx/.kube/config"
- "redis_socket_{{ container_postfix }}:/var/run/redis/:rw"
- "receptor_{{ container_postfix }}:/var/run/receptor/"
- "execution_node_1:/var/run/receptor/"
privileged: true
tty: true
ports:
@ -62,6 +63,16 @@ services:
entrypoint: ["redis-server"]
command: ["/usr/local/etc/redis/redis.conf"]
{% 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 %}
haproxy:
image: haproxy
@ -99,8 +110,8 @@ volumes:
name: tools_awx_db
{% for i in range(cluster_node_count|int) -%}
{% set container_postfix = loop.index %}
receptor_{{ container_postfix }}:
name: tools_receptor_{{ container_postfix }}
execution_node_1:
name: tools_execution_node_1
redis_socket_{{ container_postfix }}:
name: tools_redis_socket_{{ container_postfix }}
{% endfor -%}

View 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