Allow customizing the receptor image in the development environment (#11374)

* Allow for customizing the receptor image

* Hook in receptor image to docker-compose template

* Fix missing -e to pass into Dockerfile playbook

* Add some docs
This commit is contained in:
Alan Rominger
2021-11-19 14:00:23 -05:00
committed by GitHub
parent 44237426df
commit 099efb883d
6 changed files with 35 additions and 5 deletions

View File

@@ -83,6 +83,29 @@ ansible/awx_devel latest ba9ec3e8df74
> By default, this image will be tagged with your branch name. You can specify a custom tag by setting an environment variable, for example: `DEVEL_IMAGE_NAME=quay.io/your_user/awx_devel:17.0.1`
#### Customizing the Receptor Image
By default, the development environment will use the `devel` image from receptor.
This is used directly in `docker-compose.yml` for the hop nodes.
The receptor binary is also copied over to the main awx_devel image, used in all other AWX nodes.
Because of this, the `RECEPTOR_IMAGE` environment variable must be set when running
both docker-compose-build and docker-compose in order to use the correct receptor in all containers.
If you need to create a new receptor image, you can check out receptor and build it like this:
```bash
CONTAINERCMD=docker TAG=quay.io/ansible/receptor:release_1.1 make container
```
Then that can be used by AWX like this:
```bash
export RECEPTOR_IMAGE=quay.io/ansible/receptor:release_1.1
make docker-compose-build
make docker-compose
```
### Run AWX
##### Start the containers

View File

@@ -8,6 +8,7 @@ pg_database: 'awx'
control_plane_node_count: 1
minikube_container_group: false
receptor_socket_file: /var/run/awx-receptor/receptor.sock
receptor_image: quay.io/ansible/receptor:devel
# Keys for signing work
receptor_rsa_bits: 4096

View File

@@ -98,7 +98,7 @@ services:
- "awx_db:/var/lib/postgresql/data"
{% if execution_node_count|int > 0 %}
receptor-hop:
image: quay.io/ansible/receptor:devel
image: {{ receptor_image }}
user: root
container_name: tools_receptor_hop
hostname: receptor-hop