Skip to content

Commit

Permalink
Move receptor and AWX images to environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanCoding committed Sep 26, 2024
1 parent 5b7a050 commit 43cb1f4
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 16 deletions.
1 change: 0 additions & 1 deletion .github/workflows/stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ jobs:
run: |
ansible-playbook -v tools/ansible/stage.yml \
-e repo=${{ github.repository }} \
-e awx_image=ghcr.io/${{ github.repository }} \
-e version=${{ github.event.inputs.version }} \
-e github_token=${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,6 @@ docker-compose-sources: .git/hooks/pre-commit
fi;

$(ANSIBLE_PLAYBOOK) -i tools/docker-compose/inventory tools/docker-compose/ansible/sources.yml \
-e awx_image=$(DEV_DOCKER_TAG_BASE)/awx_devel \
-e awx_image_tag=$(COMPOSE_TAG) \
-e receptor_image=$(RECEPTOR_IMAGE) \
-e control_plane_node_count=$(CONTROL_PLANE_NODE_COUNT) \
-e execution_node_count=$(EXECUTION_NODE_COUNT) \
Expand Down
2 changes: 0 additions & 2 deletions tools/docker-compose/ansible/roles/sources/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
---
compose_name: 'docker-compose.yml'
awx_image: 'ghcr.io/ansible/awx_devel'
pg_port: 5432
pg_username: 'awx'
pg_database: 'awx'
pg_tls: false
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
ingress_path: /
api_urlpattern_prefix: ''

Expand Down
5 changes: 0 additions & 5 deletions tools/docker-compose/ansible/roles/sources/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,6 @@
set_fact:
user_id: "'{{ current_user.stdout }}'"

- name: Set global version if not provided
set_fact:
awx_image_tag: "{{ lookup('file', playbook_dir + '/../../../VERSION') }}"
when: awx_image_tag is not defined

- name: Generate Private RSA key for signing work
command: openssl genrsa -out {{ work_sign_private_keyfile }} {{ receptor_rsa_bits }}
args:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#jinja2: lstrip_blocks: True
---
version: '2.1'
services:
{% if editable_dependencies | length > 0 %}
init_awx:
image: "{{ awx_image }}:{{ awx_image_tag }}"
image: ${DEVEL_IMAGE_NAME:-ghcr.io/ansible/awx_devel:devel}
container_name: tools_init_awx
command: /awx_devel/tools/docker-compose/editable_dependencies/install.sh
user: root
Expand All @@ -25,7 +24,7 @@ services:
# Primary AWX Development Container
awx_{{ container_postfix }}:
user: "{{ ansible_user_uid }}"
image: "{{ awx_image }}:{{ awx_image_tag }}"
image: ${DEVEL_IMAGE_NAME:-ghcr.io/ansible/awx_devel:devel}
container_name: tools_awx_{{ container_postfix }}
hostname: awx-{{ container_postfix }}
command: launch_awx.sh
Expand Down Expand Up @@ -308,7 +307,7 @@ services:

{% if execution_node_count|int > 0 %}
receptor-hop:
image: {{ receptor_image }}
image: ${RECEPTOR_IMAGE:-quay.io/ansible/receptor:devel}
user: root
container_name: tools_receptor_hop
hostname: receptor-hop
Expand All @@ -321,7 +320,7 @@ services:
- "../../docker-compose/_sources/receptor/receptor-hop.conf:/etc/receptor/receptor.conf"
{% for i in range(execution_node_count|int) %}
receptor-{{ loop.index }}:
image: "{{ awx_image }}:{{ awx_image_tag }}"
image: ${DEVEL_IMAGE_NAME:-ghcr.io/ansible/awx_devel:devel}
user: "{{ ansible_user_uid }}"
container_name: tools_receptor_{{ loop.index }}
hostname: receptor-{{ loop.index }}
Expand Down
1 change: 0 additions & 1 deletion tools/docker-compose/inventory
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ localhost ansible_connection=local ansible_python_interpreter="/usr/bin/env pyth
# pg_username=""
# pg_hostname=""

# awx_image="ghcr.io/ansible/awx_devel"
# migrate_local_docker=false

0 comments on commit 43cb1f4

Please sign in to comment.