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

[DDS-1844] Add AWX EE builds. #245

Merged
merged 43 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
8d2b6ea
[DDS-1844] Added gh cli tool.
GROwen Jan 17, 2024
f781cb2
[DDS-1845] Added awx-ee build step.
GROwen Jan 18, 2024
bd2eea6
[DDS-1845] Added bake-action for awx-ee.
GROwen Jan 18, 2024
051cdb5
[DDS-1845] Fixed workdir declaration.
GROwen Jan 18, 2024
bd7976e
[DDS-1845] Moved awx-ee build step to independent workflow.
GROwen Jan 18, 2024
593d7c6
[DDS-1845] Updated name of awx-ee build workflow.
GROwen Jan 18, 2024
4f60e1e
[DDS-1845] Specify build image format.
GROwen Jan 18, 2024
e04031f
[DDS-1845] Removed sudo calls.
GROwen Jan 18, 2024
0ed36dc
[DDS-1845] Updated workflow step names.
GROwen Jan 18, 2024
710c7e8
[DDS-1845] Implemented bake-action for tagging etc.
GROwen Jan 18, 2024
414c501
[DDS-1845] Fixed image ref for metadata action.
GROwen Jan 18, 2024
0044054
[DDS-1845] Removed override.
GROwen Jan 18, 2024
108f3f1
[DDS-1845] Debug context.
GROwen Jan 18, 2024
82d69a8
[DDS-1845] Test runtime time for create cmd.
GROwen Jan 18, 2024
0608014
[DDS-1845] Set output file name for docker.
GROwen Jan 18, 2024
e07d674
[DDS-1845] Removed debug.
GROwen Jan 18, 2024
cc8f33a
[DDS-1845] Fixed syntax error.
GROwen Jan 18, 2024
e471523
[DDS-1845] Build speed comparison.
GROwen Jan 18, 2024
7e5a17e
[DDS-1845] Build speed comparison - consolidate workflow.
GROwen Jan 19, 2024
65d02d3
[DDS-1845] Moved build inst. file creation. into job.
GROwen Jan 19, 2024
2c2e8c0
[DDS-1845] Troubleshoot awx-ee path.
GROwen Jan 19, 2024
6759ff8
[DDS-1845] Troubleshoot awx-ee path.
GROwen Jan 19, 2024
79c19b3
[DDS-1845] Troubleshoot awx-ee path.
GROwen Jan 19, 2024
42f9b85
[DDS-1845] Fixed path resolution.
GROwen Jan 19, 2024
b17e2db
[DDS-1845] Updated bakefile awx context.
GROwen Jan 19, 2024
87380a3
[DDS-1845] Debug awx-ee context.
GROwen Jan 19, 2024
650b880
[DDS-1845] Debug awx-ee context.
GROwen Jan 19, 2024
fe166b3
[DDS-1845] Revert to step for awx-ee context creation.
GROwen Jan 19, 2024
7aa1ca6
[DDS-1845] Updated awx-ee independent workflow.
GROwen Jan 19, 2024
8c43b85
Trigger actions run.
GROwen Jan 19, 2024
90df157
[DDS-1845] Fixed syntax for labels.
GROwen Jan 19, 2024
bb0279f
[DDS-1845] Fixed run syntax.
GROwen Jan 19, 2024
ccdcb23
[DDS-1845] Added ulimit command to build.
GROwen Jan 23, 2024
fa6b217
[DDS-1845] Added ulimit command to append_final.
GROwen Jan 24, 2024
47628a0
Revert "[DDS-1845] Added ulimit command to append_final."
GROwen Jan 29, 2024
cd8b111
Revert "[DDS-1845] Added ulimit command to build."
GROwen Jan 29, 2024
f9ab48c
[DDS-1844] Removed independent AWX EE workflow.
GROwen Feb 21, 2024
39548f3
[DDS-1844] Fixed bay-cli install errors.
GROwen Feb 21, 2024
1876488
[DDS-1844] Added noninteractive flag for installs.
GROwen Feb 21, 2024
dff2bc8
[DDS-1844] Testing speed tuning.
GROwen Feb 21, 2024
a0a2a75
[DDS-1844] Reinstate update.
GROwen Feb 21, 2024
557ac2c
[DDS-1844] Revert changes used to test build speed.
GROwen Feb 21, 2024
91dcf4e
[DDS-1844] Bumped actions versions to fix dependency errors.
GROwen Feb 21, 2024
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
11 changes: 10 additions & 1 deletion .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- uses: actions/checkout@v3

Expand Down Expand Up @@ -53,6 +53,15 @@ jobs:
org.opencontainers.image.title=${{ matrix.images }}
org.opencontainers.image.description=${{ matrix.images }} image for Bay container platform

- name: Create the AWX-EE context
if: matrix.images == 'awx-ee'
run: |
pip install --upgrade ansible-builder
ansible-builder create \
--output-filename Dockerfile \
--verbosity 3
working-directory: ./images/awx-ee

- name: Build and push the images
uses: docker/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vulnerability-scan-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
echo "SANITISED-REF-NAME=${{ github.ref_name }}" | tr '/' '-' >> "$GITHUB_OUTPUT"
- name: Scan for vulnerabilities
id: scan
uses: crazy-max/ghaction-container-scan@v2
uses: crazy-max/ghaction-container-scan@v3
with:
image: ${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.images }}:${{ steps.sanitise-ref-name.outputs.SANITISED-REF-NAME }}
dockerfile: ./images/${{ matrix.images }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vulnerability-scan-schedule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
steps:
- name: Scan for vulnerabilities
id: scan
uses: crazy-max/ghaction-container-scan@v2
uses: crazy-max/ghaction-container-scan@v3
with:
image: ${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.images }}:${{matrix.branches}}
dockerfile: ./images/${{ matrix.images }}
Expand Down
10 changes: 9 additions & 1 deletion gh-actions-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,12 @@ target "ripple-static" {
"org.opencontainers.image.description" = "Ripple static site generator image optimised for the Bay container platform"
}
}

target "awx-ee" {
inherits = ["docker-metadata-action"]
context = "${CONTEXT}/awx-ee/context"
platforms = ["linux/amd64", "linux/arm64"]
args = {
PYCMD = "/usr/local/bin/python3"
PKGMGR = "/usr/bin/apt-get"
}
}
12 changes: 5 additions & 7 deletions images/awx-ee/docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,15 @@ variable "IMAGE_TAG" {
}

group "default" {
targets = ["ee"]
targets = ["awx-ee"]
}

target "ee" {
target "docker-metadata-action" {}

target "awx-ee" {
inherits = ["docker-metadata-action"]
context = "./context"
dockerfile = "Dockerfile"
platforms = ["linux/amd64", "linux/arm64"]
tags = [
// "singledigital/awx-ee:${IMAGE_TAG}",
"${GHCR}/dpc-sdp/bay/awx-ee:${IMAGE_TAG}"
]
args = {
PYCMD = "/usr/local/bin/python3"
PKGMGR = "/usr/bin/apt-get"
Expand Down
22 changes: 16 additions & 6 deletions images/awx-ee/execution-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,19 @@ additional_build_steps:
append_base: []

prepend_final:
- LABEL org.opencontainers.image.authors="Digital Victoria"
- LABEL org.opencontainers.image.description="Provides an AWX execution environment image optimised for use with SDP."
- LABEL org.opencontainers.image.source="https://github.com/dpc-sdp/bay/blob/6.x/images/awx-ee/context/Dockerfile"
- LABEL maintainer="Digital Transformation"
- LABEL org.opencontainers.image.authors="Digital Transformation"
- LABEL org.opencontainers.image.title="SDP AWX Execution Environment image."
- LABEL org.opencontainers.image.description="Provides an AWX execution environment image optimised for use with SDP. Built with ansible-builder."
- LABEL org.opencontainers.image.source="https://github.com/dpc-sdp/bay/blob/6.x/images/awx-ee/"
- ARG LAGOON_CLI_VERSION=v0.15.4
- ARG NVM_INSTALL_VERSION=v0.39.1
- ARG NODE_VERSION=v14.15.1

append_final:
- | # Required dependencies.
RUN set -eux; \
apt-get update && apt-get install -y \
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
git git-lfs \
jq \
rsync \
Expand All @@ -39,7 +41,7 @@ additional_build_steps:
- | # Install php & composer.
RUN set -eux; \
curl -sSL https://packages.sury.org/php/README.txt | bash -x; \
apt-get update && apt-get install -y \
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
php8.3-cli \
php8.3-gd \
php8.3-zip; \
Expand Down Expand Up @@ -73,4 +75,12 @@ additional_build_steps:
- RUN curl -L https://github.com/google/yamlfmt/releases/download/v0.10.0/yamlfmt_0.10.0_Linux_x86_64.tar.gz --output /tmp/yamlfmt_0.10.0_Linux_x86_64.tar.gz
- RUN tar -C /tmp -xvf /tmp/yamlfmt_0.10.0_Linux_x86_64.tar.gz
- RUN chmod +x /tmp/yamlfmt
- RUN mv /tmp/yamlfmt /usr/local/bin
- RUN mv /tmp/yamlfmt /usr/local/bin
- | # Install GitHub gh cli tool
SHELL ["/bin/bash", "-c"]
RUN set -eux; \
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
&& chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& apt update \
&& DEBIAN_FRONTEND=noninteractive apt install gh -y
6 changes: 4 additions & 2 deletions images/php/Dockerfile.cli
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ RUN wget -O /usr/local/bin/dockerize https://github.com/dpc-sdp/dockerize/releas
RUN apk add redis --no-cache

# Install bay-cli.
RUN wget "https://github.com/dpc-sdp/bay-cli/releases/download/v0.1.0/bay_$(echo ${TARGETPLATFORM:-linux/amd64} | tr '/' '_')" -O /bin/bay && \
chmod +x /bin/bay
RUN curl -L "https://github.com/dpc-sdp/bay-cli/releases/download/v0.1.1/bay_$(echo ${TARGETPLATFORM:-linux/amd64} | tr '/' '_').tar.gz" --output /tmp/bay_$(echo ${TARGETPLATFORM:-linux/amd64} | tr '/' '_').tar.gz
RUN tar -C /tmp -xvf /tmp/bay_$(echo ${TARGETPLATFORM:-linux/amd64} | tr '/' '_').tar.gz
RUN chmod +x /tmp/bay
RUN mv /tmp/bay /bin/bay

RUN mkdir /bay

Expand Down
6 changes: 4 additions & 2 deletions images/php/Dockerfile.fpm
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ RUN apk add --no-cache tzdata \
&& echo $TZ > /etc/timezone

# Install bay-cli.
RUN wget "https://github.com/dpc-sdp/bay-cli/releases/download/v0.0.1/bay_$(echo ${TARGETPLATFORM:-linux/amd64} | tr '/' '_')" -O /bin/bay && \
chmod +x /bin/bay
RUN curl -L "https://github.com/dpc-sdp/bay-cli/releases/download/v0.1.1/bay_$(echo ${TARGETPLATFORM:-linux/amd64} | tr '/' '_').tar.gz" --output /tmp/bay_$(echo ${TARGETPLATFORM:-linux/amd64} | tr '/' '_').tar.gz
RUN tar -C /tmp -xvf /tmp/bay_$(echo ${TARGETPLATFORM:-linux/amd64} | tr '/' '_').tar.gz
RUN chmod +x /tmp/bay
RUN mv /tmp/bay /bin/bay

ONBUILD ARG BAY_DISABLE_FUNCTIONS=phpinfo,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,system,exec,shell_exec,passthru,phpinfo,show_source,highlight_file,popen,fopen_with_path,dbmopen,dbase_open,filepro,filepro_rowcount,filepro_retrieve,posix_mkfifo
ONBUILD ARG BAY_UPLOAD_LIMIT=100M
Expand Down
Loading