feat: support RL10 and install azure-client
This commit is contained in:
4 files changed
+110
-1
No files matched your search
@@ -105,11 +105,45 @@ jobs:
|
|||||||
--tag git.cryptic.systems/volker.raschek/ansible:${TAG}-rockylinux-9 \
|
--tag git.cryptic.systems/volker.raschek/ansible:${TAG}-rockylinux-9 \
|
||||||
.
|
.
|
||||||
|
|
||||||
|
push-rocky-linux-10:
|
||||||
|
runs-on: ubuntu-latest-amd64
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
|
|
||||||
|
- uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
|
||||||
|
with:
|
||||||
|
registry: git.cryptic.systems
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
|
||||||
|
|
||||||
|
- uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
|
||||||
|
with:
|
||||||
|
registry: harbor.cryptic.systems
|
||||||
|
username: ${{ secrets.HARBOR_CRYPTIC_SYSTEMS_USERNAME }}
|
||||||
|
password: ${{ secrets.HARBOR_CRYPTIC_SYSTEMS_PASSWORD }}
|
||||||
|
|
||||||
|
- uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0
|
||||||
|
with:
|
||||||
|
image: docker.io/tonistiigi/binfmt:qemu-v10.2.3 # renovate: datasource=docker registryUrl=https://docker.io depName=tonistiigi/binfmt extractVersion='qemu-(?<version>v\d+\.\d+\.\d+)$'
|
||||||
|
|
||||||
|
- uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
|
||||||
|
|
||||||
|
- name: Build and push image
|
||||||
|
run: |
|
||||||
|
TAG=$(echo ${{ github.ref_name }} | sed 's/v//gm')
|
||||||
|
|
||||||
|
docker buildx build \
|
||||||
|
--file Dockerfile.rockylinux10 \
|
||||||
|
--push \
|
||||||
|
--tag git.cryptic.systems/volker.raschek/ansible:${TAG}-rockylinux-10 \
|
||||||
|
.
|
||||||
|
|
||||||
sync-to-hub-docker-io:
|
sync-to-hub-docker-io:
|
||||||
needs:
|
needs:
|
||||||
- push-arch-linux
|
- push-arch-linux
|
||||||
- push-rocky-linux-8
|
- push-rocky-linux-8
|
||||||
- push-rocky-linux-9
|
- push-rocky-linux-9
|
||||||
|
- push-rocky-linux-10
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Copy images to docker.io
|
- name: Copy images to docker.io
|
||||||
@@ -119,7 +153,7 @@ jobs:
|
|||||||
apt-get update --yes
|
apt-get update --yes
|
||||||
apt-get install --yes skopeo
|
apt-get install --yes skopeo
|
||||||
|
|
||||||
for suffix in archlinux rockylinux-8 rockylinux-9; do
|
for suffix in archlinux rockylinux-8 rockylinux-9 rockylinux-10; do
|
||||||
skopeo copy \
|
skopeo copy \
|
||||||
--all \
|
--all \
|
||||||
--dest-password ${{ secrets.DOCKER_IO_PASSWORD }} \
|
--dest-password ${{ secrets.DOCKER_IO_PASSWORD }} \
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
FROM docker.io/library/rockylinux:10
|
||||||
|
|
||||||
|
RUN dnf update --assumeyes && \
|
||||||
|
dnf install --assumeyes bash-completion sudo && \
|
||||||
|
dnf install --assumeyes epel-release && \
|
||||||
|
dnf install --assumeyes ansible-core && \
|
||||||
|
dnf install --assumeyes python3.12 python3-boto3 python3-botocore && \
|
||||||
|
dnf remove --assumeyes epel-release && \
|
||||||
|
dnf clean all
|
||||||
|
|
||||||
|
# We must change python to 3.12 (default 3.9), to be compliant with ansible-core. Furthermore, we must upgrade pip to
|
||||||
|
# latest version. Otherwise is still used pip for python 3.9. At least, we install boto3, which is required for the aws
|
||||||
|
# dynamic inventory manually, because the official python-boto3 package is for python 3.9. At least, we install
|
||||||
|
# ansible-lint via pip to be able to lint ansible roles.
|
||||||
|
RUN ln --symbolic --force /usr/bin/python3.12 /usr/bin/python3 && \
|
||||||
|
curl --fail --silent --location https://bootstrap.pypa.io/get-pip.py --output get-pip.py && \
|
||||||
|
python3 get-pip.py && \
|
||||||
|
pip install ansible-lint boto3 passlib
|
||||||
|
|
||||||
|
# Install Azure Client
|
||||||
|
RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc && \
|
||||||
|
dnf install --assumeyes https://packages.microsoft.com/config/rhel/10.0/packages-microsoft-prod.rpm && \
|
||||||
|
dnf update --assumeyes && \
|
||||||
|
dnf install --assumeyes azure-cli
|
||||||
|
|
||||||
|
# Create default ansible inventory file
|
||||||
|
RUN mkdir --parents /etc/ansible
|
||||||
|
RUN echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
|
||||||
|
|
||||||
|
# Remove unnecessary getty and udev targets that result in high CPU usage when
|
||||||
|
# using multiple containers with molecule
|
||||||
|
# (https://github.com/ansible/molecule/issues/1104)
|
||||||
|
RUN rm --recursive --force /lib/systemd/system/systemd*udev* && \
|
||||||
|
rm --recursive --force /lib/systemd/system/getty.target
|
||||||
|
|
||||||
|
VOLUME [ "/sys/fs/cgroup", "/tmp", "/run"]
|
||||||
@@ -17,6 +17,12 @@ RUN ln --symbolic --force /usr/bin/python3.12 /usr/bin/python3 && \
|
|||||||
python3 get-pip.py && \
|
python3 get-pip.py && \
|
||||||
pip install ansible-lint boto3 passlib
|
pip install ansible-lint boto3 passlib
|
||||||
|
|
||||||
|
# Install Azure Client
|
||||||
|
RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc && \
|
||||||
|
dnf install --assumeyes https://packages.microsoft.com/config/rhel/9.0/packages-microsoft-prod.rpm && \
|
||||||
|
dnf update --assumeyes && \
|
||||||
|
dnf install --assumeyes azure-cli
|
||||||
|
|
||||||
# Create default ansible inventory file
|
# Create default ansible inventory file
|
||||||
RUN mkdir --parents /etc/ansible
|
RUN mkdir --parents /etc/ansible
|
||||||
RUN echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
|
RUN echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
|
||||||
|
|||||||
@@ -30,6 +30,15 @@ ANSIBLE_RL9_IMAGE_VERSION?=latest
|
|||||||
ANSIBLE_RL9_IMAGE_VERSION_SUFFIX=rockylinux-9
|
ANSIBLE_RL9_IMAGE_VERSION_SUFFIX=rockylinux-9
|
||||||
ANSIBLE_RL9_IMAGE_FULLY_QUALIFIED=${ANSIBLE_RL9_IMAGE_REGISTRY_HOST}/${ANSIBLE_RL9_IMAGE_NAMESPACE}/${ANSIBLE_RL9_IMAGE_REPOSITORY}:${ANSIBLE_RL9_IMAGE_VERSION}-${ANSIBLE_RL9_IMAGE_VERSION_SUFFIX}
|
ANSIBLE_RL9_IMAGE_FULLY_QUALIFIED=${ANSIBLE_RL9_IMAGE_REGISTRY_HOST}/${ANSIBLE_RL9_IMAGE_NAMESPACE}/${ANSIBLE_RL9_IMAGE_REPOSITORY}:${ANSIBLE_RL9_IMAGE_VERSION}-${ANSIBLE_RL9_IMAGE_VERSION_SUFFIX}
|
||||||
|
|
||||||
|
# RockyLinux9
|
||||||
|
ANSIBLE_RL10_IMAGE_REGISTRY_HOST?=git.cryptic.systems
|
||||||
|
ANSIBLE_RL10_IMAGE_REGISTRY_USER?=volker.raschek
|
||||||
|
ANSIBLE_RL10_IMAGE_NAMESPACE?=${ANSIBLE_RL8_IMAGE_REGISTRY_USER}
|
||||||
|
ANSIBLE_RL10_IMAGE_REPOSITORY:=ansible
|
||||||
|
ANSIBLE_RL10_IMAGE_VERSION?=latest
|
||||||
|
ANSIBLE_RL10_IMAGE_VERSION_SUFFIX=rockylinux-10
|
||||||
|
ANSIBLE_RL10_IMAGE_FULLY_QUALIFIED=${ANSIBLE_RL10_IMAGE_REGISTRY_HOST}/${ANSIBLE_RL10_IMAGE_NAMESPACE}/${ANSIBLE_RL10_IMAGE_REPOSITORY}:${ANSIBLE_RL10_IMAGE_VERSION}-${ANSIBLE_RL10_IMAGE_VERSION_SUFFIX}
|
||||||
|
|
||||||
# BUILD ANSIBLE ARCHLINUX CONTAINER IMAGE
|
# BUILD ANSIBLE ARCHLINUX CONTAINER IMAGE
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
PHONY:=container-image/build/arch-linux
|
PHONY:=container-image/build/arch-linux
|
||||||
@@ -102,6 +111,30 @@ container-image/push/rocky-linux-9:
|
|||||||
echo ${ANSIBLE_ARCH_IMAGE_REGISTRY_PASSWORD} | ${CONTAINER_RUNTIME} login ${ANSIBLE_ARCH_IMAGE_REGISTRY_HOST} --username ${ANSIBLE_ARCH_IMAGE_REGISTRY_USER} --password-stdin
|
echo ${ANSIBLE_ARCH_IMAGE_REGISTRY_PASSWORD} | ${CONTAINER_RUNTIME} login ${ANSIBLE_ARCH_IMAGE_REGISTRY_HOST} --username ${ANSIBLE_ARCH_IMAGE_REGISTRY_USER} --password-stdin
|
||||||
${CONTAINER_RUNTIME} push ${ANSIBLE_ARCH_IMAGE_FULLY_QUALIFIED}
|
${CONTAINER_RUNTIME} push ${ANSIBLE_ARCH_IMAGE_FULLY_QUALIFIED}
|
||||||
|
|
||||||
|
# BUILD ANSIBLE RL10 CONTAINER IMAGE
|
||||||
|
# ==============================================================================
|
||||||
|
PHONY:=container-image/build/rocky-linux-10
|
||||||
|
container-image/build/rocky-linux-10:
|
||||||
|
${CONTAINER_RUNTIME} build \
|
||||||
|
--file Dockerfile.rockylinux10 \
|
||||||
|
--no-cache \
|
||||||
|
--pull \
|
||||||
|
--tag ${ANSIBLE_RL10_IMAGE_FULLY_QUALIFIED} \
|
||||||
|
.
|
||||||
|
|
||||||
|
# DELETE ANSIBLE RL10 CONTAINER IMAGE
|
||||||
|
# ==============================================================================
|
||||||
|
PHONY:=container-image/delete/rocky-linux-10
|
||||||
|
container-image/delete/rocky-linux-10:
|
||||||
|
- ${CONTAINER_RUNTIME} image rm ${ANSIBLE_RL10_IMAGE_FULLY_QUALIFIED}
|
||||||
|
|
||||||
|
# PUSH ANSIBLE RL10 CONTAINER IMAGE
|
||||||
|
# ==============================================================================
|
||||||
|
PHONY+=container-image/push/rocky-linux-10
|
||||||
|
container-image/push/rocky-linux-10:
|
||||||
|
echo ${ANSIBLE_ARCH_IMAGE_REGISTRY_PASSWORD} | ${CONTAINER_RUNTIME} login ${ANSIBLE_ARCH_IMAGE_REGISTRY_HOST} --username ${ANSIBLE_ARCH_IMAGE_REGISTRY_USER} --password-stdin
|
||||||
|
${CONTAINER_RUNTIME} push ${ANSIBLE_ARCH_IMAGE_FULLY_QUALIFIED}
|
||||||
|
|
||||||
# PHONY
|
# PHONY
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
# Declare the contents of the PHONY variable as phony. We keep that information
|
# Declare the contents of the PHONY variable as phony. We keep that information
|
||||||
|
|||||||
Reference in new issue
Block a user