Skip to content

Instantly share code, notes, and snippets.

@euterklaas
Created December 18, 2019 11:18
Show Gist options
  • Save euterklaas/16ee98f58f1a5a533d03b42dc49e4485 to your computer and use it in GitHub Desktop.
Save euterklaas/16ee98f58f1a5a533d03b42dc49e4485 to your computer and use it in GitHub Desktop.
Deploy AWX behind a proxy with own images and https
Tested this deployment with AWX 7 and updated to version 9.1. The following file needs some modifications:
awx/installer/roles/image_build/files/Dockerfile.sdist:
FROM centos:7
RUN yum -y update && yum -y install epel-release && yum -y install https://centos7.iuscommunity.org/ius-release.rpm
RUN yum install -y bzip2 \
gcc-c++ \
gettext \
git2u \
git2u-core \
make \
nodejs \
python3-setuptools
# Use the distro provided npm to bootstrap our required version of node
RUN git config --global url.https://.insteadOf git://
RUN git config --global http.proxy http://yourProxy:8080
RUN git config --global https.proxy http://yourProxy:8080
RUN npm install -g n
RUN npm config set proxy http://yourProxy:8080
RUN npm config set https-proxy http://yourProxy:8080
RUN n 10.15.0
RUN yum remove -y nodejs
ENV PATH=/usr/local/n/versions/node/10.15.0/bin:$PATH
WORKDIR "/awx"
ENTRYPOINT ["/bin/bash", "-c"]
CMD ["make sdist"]
awx/installer/inventory:
[...]
# dockerhub_base=ansible
[...]
host_port_ssl=443
ssl_certificate=/path/to/your/cert/file.pem
[...]
http_proxy=http://yourProxy:8080
https_proxy=http://yourProxy:8080
Then start the install via playbook:
ansible-playbook -vvv -i inventory install.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment