Merge branch 'fix-mysql-shrink-image' into 'development'
fix: issues 25, 23 Closes #25 See merge request nofusscomputing/projects/ansible/execution_environment!184
This commit is contained in:
@ -8,7 +8,7 @@ variables:
|
|||||||
DOCKER_IMAGE_PUBLISH_NAME: 'ansible-ee'
|
DOCKER_IMAGE_PUBLISH_NAME: 'ansible-ee'
|
||||||
DOCKER_IMAGE_PUBLISH_REGISTRY: docker.io/nofusscomputing
|
DOCKER_IMAGE_PUBLISH_REGISTRY: docker.io/nofusscomputing
|
||||||
DOCKER_IMAGE_PUBLISH_URL: https://hub.docker.com/r/nofusscomputing/$DOCKER_IMAGE_PUBLISH_NAME
|
DOCKER_IMAGE_PUBLISH_URL: https://hub.docker.com/r/nofusscomputing/$DOCKER_IMAGE_PUBLISH_NAME
|
||||||
PAGES_ENVIRONMENT_PATH: projects/execution_environment/
|
PAGES_ENVIRONMENT_PATH: projects/ansible/execution_environment/
|
||||||
|
|
||||||
include:
|
include:
|
||||||
- project: nofusscomputing/projects/gitlab-ci
|
- project: nofusscomputing/projects/gitlab-ci
|
||||||
@ -27,6 +27,7 @@ Build/Cache Python Packages:
|
|||||||
- name: docker:23-dind
|
- name: docker:23-dind
|
||||||
entrypoint: ["env", "-u", "DOCKER_HOST"]
|
entrypoint: ["env", "-u", "DOCKER_HOST"]
|
||||||
command: ["dockerd-entrypoint.sh"]
|
command: ["dockerd-entrypoint.sh"]
|
||||||
|
needs: []
|
||||||
variables:
|
variables:
|
||||||
DOCKER_HOST: tcp://docker:2375/
|
DOCKER_HOST: tcp://docker:2375/
|
||||||
DOCKER_DRIVER: overlay2
|
DOCKER_DRIVER: overlay2
|
||||||
@ -49,7 +50,8 @@ Build/Cache Python Packages:
|
|||||||
--platform=$DOCKER_IMAGE_BUILD_TARGET_PLATFORMS . \
|
--platform=$DOCKER_IMAGE_BUILD_TARGET_PLATFORMS . \
|
||||||
--build-arg CI_JOB_TOKEN=$CI_JOB_TOKEN \
|
--build-arg CI_JOB_TOKEN=$CI_JOB_TOKEN \
|
||||||
--build-arg CI_API_V4_URL=$CI_API_V4_URL \
|
--build-arg CI_API_V4_URL=$CI_API_V4_URL \
|
||||||
--build-arg CI_PROJECT_ID=$CI_PROJECT_ID
|
--build-arg CI_PROJECT_ID=$CI_PROJECT_ID \
|
||||||
|
--progress plain
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
||||||
when: never
|
when: never
|
||||||
|
19
dockerfile
19
dockerfile
@ -2,7 +2,7 @@
|
|||||||
FROM --platform=$TARGETPLATFORM quay.io/ansible/receptor:devel as receptor
|
FROM --platform=$TARGETPLATFORM quay.io/ansible/receptor:devel as receptor
|
||||||
|
|
||||||
|
|
||||||
FROM --platform=$TARGETPLATFORM python:3.11-bullseye
|
FROM --platform=$TARGETPLATFORM python:3.11-slim-bookworm
|
||||||
|
|
||||||
# Ansible chucks a wobbler without. see: https://github.com/ansible/ansible/issues/78283
|
# Ansible chucks a wobbler without. see: https://github.com/ansible/ansible/issues/78283
|
||||||
ENV LC_ALL en_US.UTF-8
|
ENV LC_ALL en_US.UTF-8
|
||||||
@ -11,7 +11,7 @@ ENV DEBIAN_FRONTEND noninteractive
|
|||||||
|
|
||||||
ENV ANSIBLE_PLAYBOOK_DIR=/etc/ansible/playbooks
|
ENV ANSIBLE_PLAYBOOK_DIR=/etc/ansible/playbooks
|
||||||
|
|
||||||
ENV ANSIBLE_COLLECTIONS_PATHS=/etc/ansible/collections
|
ENV ANSIBLE_COLLECTIONS_PATH=/etc/ansible/collections
|
||||||
|
|
||||||
|
|
||||||
COPY includes /
|
COPY includes /
|
||||||
@ -36,10 +36,10 @@ RUN apt update \
|
|||||||
&& cd /tmp \
|
&& cd /tmp \
|
||||||
&& apt-get download \
|
&& apt-get download \
|
||||||
libc-bin \
|
libc-bin \
|
||||||
&& dpkg --extract ./libc-bin_*.deb /tmp/deb \
|
&& dpkg --extract $(ls | grep libc-bin_ | grep -a '.deb') /tmp/deb \
|
||||||
&& cp /tmp/deb/sbin/ldconfig /sbin/ \
|
&& cp /tmp/deb/sbin/ldconfig /sbin/ \
|
||||||
&& rm -Rf /tmp/deb \
|
&& rm -Rf /tmp/deb \
|
||||||
&& rm libc-bin_*.deb \
|
&& rm $(ls | grep libc-bin_ | grep -a '.deb') \
|
||||||
&& apt-get install --reinstall \
|
&& apt-get install --reinstall \
|
||||||
libc-bin \
|
libc-bin \
|
||||||
# EoF fixing dpkg ldconfig not found error
|
# EoF fixing dpkg ldconfig not found error
|
||||||
@ -57,6 +57,7 @@ RUN apt update \
|
|||||||
postgresql-common \
|
postgresql-common \
|
||||||
postgresql-client \
|
postgresql-client \
|
||||||
mariadb-client \
|
mariadb-client \
|
||||||
|
mariadb-client-core \
|
||||||
&& mkdir -p /etc/ansible/roles \
|
&& mkdir -p /etc/ansible/roles \
|
||||||
&& mkdir -p /etc/ansible/collections \
|
&& mkdir -p /etc/ansible/collections \
|
||||||
&& mkdir -p /workdir \
|
&& mkdir -p /workdir \
|
||||||
@ -83,15 +84,15 @@ RUN pip install --index-url https://gitlab.com/api/v4/projects/45741845/packages
|
|||||||
|
|
||||||
|
|
||||||
RUN ansible-galaxy collection install \
|
RUN ansible-galaxy collection install \
|
||||||
awx.awx==23.5.0 \
|
awx.awx==23.6.0 \
|
||||||
# ansible.posix.authorized_key for SSH
|
# ansible.posix.authorized_key for SSH
|
||||||
ansible.posix==1.5.4 \
|
ansible.posix==1.5.4 \
|
||||||
ansible.utils==3.0.0 \
|
ansible.utils==3.0.0 \
|
||||||
community.dns==2.6.4 \
|
community.dns==2.7.0 \
|
||||||
# docker managment
|
# docker managment
|
||||||
community.docker==3.4.11 \
|
community.docker==3.5.0 \
|
||||||
# community.general.gitlab_*
|
# community.general.gitlab_*
|
||||||
community.general==8.1.0 \
|
community.general==8.2.0 \
|
||||||
community.mysql==3.8.0 \
|
community.mysql==3.8.0 \
|
||||||
community.postgresql==3.2.0 \
|
community.postgresql==3.3.0 \
|
||||||
kubernetes.core==3.0.0
|
kubernetes.core==3.0.0
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM --platform=$TARGETPLATFORM python:3.11-slim-bookworm as wheelbuild
|
FROM --platform=$TARGETPLATFORM python:3.11-bookworm as wheelbuild
|
||||||
|
|
||||||
ARG CI_JOB_TOKEN
|
ARG CI_JOB_TOKEN
|
||||||
ARG CI_API_V4_URL
|
ARG CI_API_V4_URL
|
||||||
@ -6,62 +6,91 @@ ARG CI_PROJECT_ID
|
|||||||
|
|
||||||
|
|
||||||
ENV LC_ALL en_US.UTF-8
|
ENV LC_ALL en_US.UTF-8
|
||||||
|
|
||||||
ENV PATH /usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.cargo/bin::~/.cargo/bin
|
ENV PATH /usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.cargo/bin::~/.cargo/bin
|
||||||
|
|
||||||
RUN export DEBIAN_FRONTEND=noninteractive \
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
&& dpkg-reconfigure debconf -f noninteractive
|
|
||||||
|
|
||||||
RUN apt update \
|
|
||||||
&& apt install --reinstall -yq \
|
RUN dpkg-reconfigure debconf -f noninteractive
|
||||||
git \
|
|
||||||
|
|
||||||
|
RUN apt update
|
||||||
|
|
||||||
|
# SoF fixing dpkg ldconfig not found error
|
||||||
|
# Download Binary
|
||||||
|
RUN cd /tmp \
|
||||||
|
&& apt-get download \
|
||||||
|
libc-bin
|
||||||
|
|
||||||
|
RUN ls -la
|
||||||
|
|
||||||
|
# Extract Binary
|
||||||
|
RUN cd /tmp; \
|
||||||
|
dpkg --extract $(ls | grep libc-bin_ | grep -a '.deb') /tmp/deb; ls -laR
|
||||||
|
|
||||||
|
# # Extracted?
|
||||||
|
# RUN ls -laR
|
||||||
|
|
||||||
|
# Copy to home location
|
||||||
|
RUN cp /tmp/deb/sbin/ldconfig /sbin/
|
||||||
|
|
||||||
|
# Confirm present
|
||||||
|
RUN ls -l /sbin/ldconfig
|
||||||
|
|
||||||
|
# Confirm can be found
|
||||||
|
RUN which ldconfig
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
# RUN rm -Rf /tmp/deb \
|
||||||
|
# && rm libc-bin_*.deb
|
||||||
|
|
||||||
|
# Should re-install without issue
|
||||||
|
RUN apt-get install --reinstall \
|
||||||
|
libc-bin
|
||||||
|
# EoF fixing dpkg ldconfig not found error
|
||||||
|
# Set Locale to en_US as ansible requires a locale for it to function without chucking a tantrum!!
|
||||||
|
|
||||||
|
|
||||||
|
RUN apt install -yq \
|
||||||
|
build-essential \
|
||||||
|
cargo \
|
||||||
curl \
|
curl \
|
||||||
rustc cargo \
|
git \
|
||||||
libpq-dev || true
|
libffi-dev \
|
||||||
|
libpq-dev \
|
||||||
|
libssl-dev \
|
||||||
RUN mkdir -p /tmp/python_modules /tmp/python_builds
|
mariadb-client \
|
||||||
|
mariadb-client-core \
|
||||||
|
openssh-client \
|
||||||
|
pkg-config \
|
||||||
|
postgresql-client \
|
||||||
|
postgresql-common \
|
||||||
|
python3-dev \
|
||||||
|
rustc
|
||||||
|
|
||||||
|
|
||||||
RUN rustc --version \
|
RUN rustc --version \
|
||||||
&& cargo --version
|
&& cargo --version
|
||||||
|
|
||||||
RUN export DEBIAN_FRONTEND=noninteractive \
|
|
||||||
&& apt update \
|
|
||||||
&& apt --fix-broken install \
|
|
||||||
&& apt install -y libc-bin locales-all \
|
|
||||||
&& apt update \
|
|
||||||
&& apt install --reinstall -yq \
|
|
||||||
openssh-client \
|
|
||||||
git || true \
|
|
||||||
&& dpkg --purge --force-all libc-bin \
|
|
||||||
&& apt-get install -y \
|
|
||||||
openssh-client \
|
|
||||||
git
|
|
||||||
|
|
||||||
|
|
||||||
RUN export DEBIAN_FRONTEND=noninteractive \
|
|
||||||
&& apt update \
|
|
||||||
&& apt install --no-install-recommends -yq libc-bin locales-all \
|
|
||||||
&& apt-get install --reinstall -yq \
|
|
||||||
build-essential \
|
|
||||||
libssl-dev \
|
|
||||||
libffi-dev \
|
|
||||||
python3-dev \
|
|
||||||
cargo \
|
|
||||||
pkg-config \
|
|
||||||
libpq-dev || true
|
|
||||||
|
|
||||||
|
|
||||||
RUN pip install --upgrade pip
|
RUN pip install --upgrade pip
|
||||||
|
|
||||||
|
|
||||||
RUN pip install --upgrade \
|
RUN pip install --upgrade \
|
||||||
setuptools \
|
setuptools \
|
||||||
wheel \
|
wheel \
|
||||||
setuptools-rust \
|
setuptools-rust \
|
||||||
twine
|
twine
|
||||||
|
|
||||||
|
|
||||||
COPY requirements.txt /tmp/requirements.txt
|
COPY requirements.txt /tmp/requirements.txt
|
||||||
|
|
||||||
|
|
||||||
|
RUN mkdir -p /tmp/python_modules /tmp/python_builds
|
||||||
|
|
||||||
|
|
||||||
RUN cd /tmp/python_modules \
|
RUN cd /tmp/python_modules \
|
||||||
&& pip download --dest . --check-build-dependencies \
|
&& pip download --dest . --check-build-dependencies \
|
||||||
-r /tmp/requirements.txt
|
-r /tmp/requirements.txt
|
||||||
@ -70,7 +99,11 @@ RUN cd /tmp/python_modules \
|
|||||||
RUN cd /tmp/python_modules \
|
RUN cd /tmp/python_modules \
|
||||||
# && export PATH=$PATH:~/.cargo/bin \
|
# && export PATH=$PATH:~/.cargo/bin \
|
||||||
&& echo "[DEBUG] PATH=$PATH" \
|
&& echo "[DEBUG] PATH=$PATH" \
|
||||||
&& pip wheel --wheel-dir /tmp/python_builds --find-links . *.whl
|
&& pip wheel --wheel-dir /tmp/python_builds --find-links . *.whl; \
|
||||||
|
pip wheel --wheel-dir /tmp/python_builds --find-links . *.tar.gz;
|
||||||
|
|
||||||
|
RUN cd /tmp; \
|
||||||
|
ls -laR
|
||||||
|
|
||||||
|
|
||||||
RUN TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --verbose --skip-existing --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi /tmp/python_builds/*
|
RUN TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --verbose --skip-existing --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi /tmp/python_builds/*
|
||||||
|
@ -8,9 +8,9 @@ about: https://gitlab.com/nofusscomputing/projects/ansible/execution_environment
|
|||||||
|
|
||||||
This docker container is designed to be used with Ansible AWX/Tower or from within the Gitlab CI/CD Environment. Included in the container are the following projects from us:
|
This docker container is designed to be used with Ansible AWX/Tower or from within the Gitlab CI/CD Environment. Included in the container are the following projects from us:
|
||||||
|
|
||||||
- [Ansible Playbooks](../ansible_playbooks/index.md)
|
- [Ansible Playbooks](../playbooks/index.md)
|
||||||
|
|
||||||
- [Ansible Roles](../ansible-roles/index.md)
|
- [Ansible Roles](../roles/index.md)
|
||||||
|
|
||||||
This container can be found at dockerhub at <https://hub.docker.com/r/nofusscomputing/ansible-ee> and for use from docker with `docker pull nofusscomputing/ansible-ee`. versioning and git tags are in accordance with semver.
|
This container can be found at dockerhub at <https://hub.docker.com/r/nofusscomputing/ansible-ee> and for use from docker with `docker pull nofusscomputing/ansible-ee`. versioning and git tags are in accordance with semver.
|
||||||
|
|
0
docs/projects/ansible/roles/index.md
Normal file
0
docs/projects/ansible/roles/index.md
Normal file
11
mkdocs.yml
11
mkdocs.yml
@ -17,11 +17,18 @@ nav:
|
|||||||
|
|
||||||
- projects/index.md
|
- projects/index.md
|
||||||
|
|
||||||
- Ansible Roles:
|
- Ansible:
|
||||||
|
|
||||||
|
- projects/ansible/index.md
|
||||||
|
|
||||||
- Execution Environment:
|
- Execution Environment:
|
||||||
|
|
||||||
- projects/execution_environment/index.md
|
- projects/ansible/execution_environment/index.md
|
||||||
|
|
||||||
|
- Playbooks: projects/ansible/playbooks/index.md
|
||||||
|
|
||||||
|
- Roles: projects/ansible/roles/index.md
|
||||||
|
|
||||||
|
|
||||||
- Operations:
|
- Operations:
|
||||||
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
ansible-core==2.16.1
|
ansible-core==2.16.1
|
||||||
ansible-lint==6.15.0
|
ansible-lint==6.15.0
|
||||||
ansible-runner==2.3.4
|
ansible-runner==2.3.4
|
||||||
awxkit==23.5.1
|
awxkit==23.6.0
|
||||||
# Required for community.general.gitlab_*
|
# Required for community.general.gitlab_*
|
||||||
python_gitlab==3.14.0
|
python_gitlab==4.3.0
|
||||||
# community.postgresql
|
# community.postgresql
|
||||||
psycopg2==2.9.9
|
psycopg2==2.9.9
|
||||||
# community.mysql
|
# community.mysql
|
||||||
PyMySQL==1.1.0
|
PyMySQL==1.1.0
|
||||||
|
|
||||||
dnspython
|
dnspython==2.4.2
|
||||||
|
|
||||||
xmltodict==0.13.0
|
xmltodict==0.13.0
|
||||||
|
Reference in New Issue
Block a user