Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update from upstream, streamline collections #2

Merged
merged 15 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/build-latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build and Push latest image

on:
push:
# build and push anytime commits are merged to main
branches:
- main

jobs:
build_and_push_latest:
runs-on: ubuntu-22.04
name: Build and push latest tag from main on new commits
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install -r requirements.txt

- name: Quay login
run: |
echo "${{ secrets.QUAY_TOKEN }}" | docker login quay.io -u ${{ secrets.QUAY_USERNAME }} --password-stdin

- name: Build and push image
run: |
docker buildx create --name awx-ee-buildx
docker buildx use awx-ee-buildx
ansible-builder create -v3 --output-file=Dockerfile
docker buildx build \
--push \
--platform=linux/amd64 \
--tag=${{ vars.IMAGE_REGISTRY }}:latest \
context

48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---

name: CI

on:
pull_request:
branches:
- main

jobs:
podman:
runs-on: ubuntu-22.04
name: Podman
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install -r requirements.txt

- name: Build EE with Podman
run: |
ansible-builder build -v3 -t ${{ vars.IMAGE_REGISTRY }}:latest --container-runtime=podman

docker:
runs-on: ubuntu-22.04
name: Docker
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install -r requirements.txt

- name: Build EE with Docker
run: |
ansible-builder build -v3 -t ${{ vars.IMAGE_REGISTRY }}:latest --container-runtime=docker

38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release

on:
release:
types:
- created

jobs:
release:
runs-on: ubuntu-22.04
name: Release
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install -r requirements.txt

- name: Quay login
run: |
echo "${{ secrets.QUAY_TOKEN }}" | docker login quay.io -u ${{ secrets.QUAY_USERNAME }} --password-stdin

- name: Build and push image
run: |
docker buildx create --name awx-ee-buildx
docker buildx use awx-ee-buildx
ansible-builder create -v3 --output-file=Dockerfile
docker buildx build \
--push \
--platform=linux/amd64 \
--tag=${{ vars.IMAGE_REGISTRY }}:${{ github.event.release.tag_name }} \
context

7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# AWX EE

The default Execution Environment for AWX.
The InfluxData Execution Environment for AWX.

## Build the image locally

Expand All @@ -11,3 +11,8 @@ Then run the following command from the root of this repo:
```bash
$ ansible-builder build -v3 -t quay.io/ansible/awx-ee # --container-runtime=docker # Is podman by default
```

## Build the image via CI

The Github actions configuration in this repository should work for you as well, provided that you're using that platform. Just updates the secrets to reflect your chosen container repository.

32 changes: 17 additions & 15 deletions execution-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,25 @@ images:
name: quay.io/centos/centos:stream9
dependencies:
ansible_core:
# Require minimum of 2.15 to get ansible-inventory --limit option
package_pip: ansible-core==2.15.1
# A minimum of 2.15 is required to get ansible-inventory --limit option
package_pip: ansible-core==2.16.4
ansible_runner:
package_pip: ansible-runner==2.3.3
package_pip: ansible-runner==2.3.5
python_interpreter:
package_system: python3.12
python_path: "/usr/bin/python3.12"
galaxy: |
---
collections:
- name: awx.awx
- name: azure.azcollection
- name: amazon.aws
- name: theforeman.foreman
- name: google.cloud
- name: openstack.cloud
- name: community.vmware
- name: ovirt.ovirt
- name: kubernetes.core
- name: ansible.posix
- name: ansible.windows
- name: redhatinsights.insights
- name: community.general
- name: community.docker
- name: amazon.aws
- name: community.aws
system: |
git-core [platform:rpm]
python3.9-devel [platform:rpm compile]
python3.12-devel [platform:rpm compile]
libcurl-devel [platform:rpm compile]
krb5-devel [platform:rpm compile]
krb5-workstation [platform:rpm]
Expand All @@ -43,6 +37,12 @@ dependencies:
unzip [platform:rpm]
jq [platform:rpm]
openssl [platform:rpm]
podman-remote [platform:rpm]
cmake [platform:rpm compile]
gcc [platform:rpm compile]
gcc-c++ [platform:rpm compile]
make [platform:rpm compile]
openssl-devel [platform:rpm compile]
python: |
git+https://github.com/ansible/ansible-sign
ncclient
Expand All @@ -59,10 +59,12 @@ dependencies:
cryptography>=39.0.0
redis
boto3[crt]
receptorctl
netaddr
additional_build_steps:
append_base:
- RUN $PYCMD -m pip install -U pip
append_final:
- COPY --from=quay.io/ansible/receptor:v1.4.1 /usr/bin/receptor /usr/bin/receptor
- COPY --from=quay.io/ansible/receptor:v1.4.4 /usr/bin/receptor /usr/bin/receptor
- RUN mkdir -p /var/run/receptor
- RUN git lfs install --system