diff --git a/tools/docker-compose/ansible/roles/sources/templates/docker-compose.yml.j2 b/tools/docker-compose/ansible/roles/sources/templates/docker-compose.yml.j2 index 5d084f51be..1fd016f554 100644 --- a/tools/docker-compose/ansible/roles/sources/templates/docker-compose.yml.j2 +++ b/tools/docker-compose/ansible/roles/sources/templates/docker-compose.yml.j2 @@ -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 -%} diff --git a/tools/docker-compose/awx-1-receptor-standalone.conf b/tools/docker-compose/awx-1-receptor-standalone.conf new file mode 100644 index 0000000000..4c2912ea88 --- /dev/null +++ b/tools/docker-compose/awx-1-receptor-standalone.conf @@ -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