Skip to content

Instantly share code, notes, and snippets.

@agaffney
Last active December 14, 2022 12:56
Show Gist options
  • Save agaffney/679ece1117f6e49cffe086846ec9bb2c to your computer and use it in GitHub Desktop.
Save agaffney/679ece1117f6e49cffe086846ec9bb2c to your computer and use it in GitHub Desktop.
Building/installing AWX for ARM64

NOTE: it seems that somebody else beat me to this, so I'm not going to finish this

https://qiita.com/ussvgr/items/81b88653b2845b0f1bea

Prerequisites:

  1. An ARM64 machine with Ansible and Docker installed to build the images on. This doesn't necessarily need to be the same machine that you're going to deploy AWX on. Considering using something like an AWS Graviton2-based EC2 instance to cut down on image build time
  2. A Docker registry to push the custom images to
  3. A Kubernetes cluster on ARM64 to deploy on

Steps:

  1. Clone the https://github.com/ansible/awx repo on your ARM64 machine
  2. Checkout the tag of the latest AWX release (e.g. 19.3.0)
  3. Build the AWX image. This will take a while (it took ~80 minutes on my RasPi 4)
$ ansible-playbook tools/ansible/build.yml -v -e awx_image=<registry>/<prefix>/awx
  1. Push the image to the registry
$ docker push <registry>/<prefix>/awx:<version>
  1. Clone the https://github.com/ansible/awx-operator repo on your ARM64 machine
  2. Checkout the tag of the latest release (e.g. 0.13.0)
  3. Build the awx-operator image
$ docker build -t <registry>/<prefix>/awx-operator:<version> -f build/Dockerfile .
  1. Push the image to the registry
$ docker push <registry>/<prefix>/awx-operator:<version>
  1. Fetch the awx-operator install manifest
$ wget https://raw.githubusercontent.com/ansible/awx-operator/<version>/deploy/awx-operator.yaml
  1. Replace the image value in the Deployment resource with your custom image
$ sed -i 's|quay.io/ansible/awx-operator:[0-9.]\+|<registry>/<prefix>/awx-operator:<version>|' awx-operator.yaml
  1. Apply the modified manifest
$ kubectl apply -f awx-operator.yaml
  1. Create your AWX manifest and specify the custom image
---
apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
  name: awx-demo
spec:
...
  image: <registry>/<prefix>/awx
  image_version: <version>
...
  1. Apply the manifest
$ kubectl apply -f awx.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment