From 4ece1566548ab826312451192c0a817687af63d7 Mon Sep 17 00:00:00 2001 From: nfc_bot Date: Wed, 20 Mar 2024 08:04:40 +0000 Subject: [PATCH 01/14] feat(ansible_playbooks): updated submodule ansible_playbooks Automation Data: { "branch": "development", "current_commit": "19ca5148044353bcde1ab313713fa93bcbc0b79e)", "name": "ansible_playbooks", "path": "/builds/nofusscomputing/projects/ansible/execution_environment/_automation_/includes/etc/ansible/playbooks", "remote_head": "99c75930d9952acd7bd8caa5ed2c5692a0074a56)", "remote_name": "origin", "url": "https://gitlab.com/nofusscomputing/projects/ansible/ansible_playbooks.git" } Changes: Submodule path includes/etc/ansible/playbooks: checked out 99c75930d9952acd7bd8caa5ed2c5692a0074a56 MR !245 --- includes/etc/ansible/playbooks | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/etc/ansible/playbooks b/includes/etc/ansible/playbooks index 19ca514..99c7593 160000 --- a/includes/etc/ansible/playbooks +++ b/includes/etc/ansible/playbooks @@ -1 +1 @@ -Subproject commit 19ca5148044353bcde1ab313713fa93bcbc0b79e +Subproject commit 99c75930d9952acd7bd8caa5ed2c5692a0074a56 From 7ed472f83f63ec365001ba8d3ff344e4bead489b Mon Sep 17 00:00:00 2001 From: nfc_bot Date: Wed, 20 Mar 2024 10:48:51 +0000 Subject: [PATCH 02/14] feat(ansible_playbooks): updated submodule ansible_playbooks Automation Data: { "branch": "development", "current_commit": "99c75930d9952acd7bd8caa5ed2c5692a0074a56)", "name": "ansible_playbooks", "path": "/builds/nofusscomputing/projects/ansible/execution_environment/_automation_/includes/etc/ansible/playbooks", "remote_head": "0c090f4aeafe6369a6199f027a075ff5d37e43fd)", "remote_name": "origin", "url": "https://gitlab.com/nofusscomputing/projects/ansible/ansible_playbooks.git" } Changes: Submodule path includes/etc/ansible/playbooks: checked out 0c090f4aeafe6369a6199f027a075ff5d37e43fd MR !246 --- includes/etc/ansible/playbooks | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/etc/ansible/playbooks b/includes/etc/ansible/playbooks index 99c7593..0c090f4 160000 --- a/includes/etc/ansible/playbooks +++ b/includes/etc/ansible/playbooks @@ -1 +1 @@ -Subproject commit 99c75930d9952acd7bd8caa5ed2c5692a0074a56 +Subproject commit 0c090f4aeafe6369a6199f027a075ff5d37e43fd From adfba5980131d1e21ba21b14c0627e86e91ab77d Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 20 Mar 2024 20:53:57 +0930 Subject: [PATCH 03/14] feat(collection): nofusscomputing.kubernetes 1.2.0 -> 1.4.0 !247 nofusscomputing/projects/ansible/collections/kubernetes!50 nofusscomputing/projects/ansible/collections/kubernetes!51 --- dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfile b/dockerfile index a6d356a..3ec1c33 100644 --- a/dockerfile +++ b/dockerfile @@ -99,4 +99,4 @@ RUN ansible-galaxy collection install \ community.postgresql==3.4.0 \ theforeman.foreman==4.0.0; \ ansible-galaxy collection install --pre \ - nofusscomputing.kubernetes==1.2.0 \ No newline at end of file + nofusscomputing.kubernetes==1.4.0 \ No newline at end of file From 837dcd9d1b51d2e69aa1e537e003952f96d5ebac Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 22 Mar 2024 03:12:39 +0930 Subject: [PATCH 04/14] feat(collection): nofusscomputing.kubernetes 1.4.0 -> 1.5.0 !247 --- dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfile b/dockerfile index 3ec1c33..cb2c503 100644 --- a/dockerfile +++ b/dockerfile @@ -99,4 +99,4 @@ RUN ansible-galaxy collection install \ community.postgresql==3.4.0 \ theforeman.foreman==4.0.0; \ ansible-galaxy collection install --pre \ - nofusscomputing.kubernetes==1.4.0 \ No newline at end of file + nofusscomputing.kubernetes==1.5.0 \ No newline at end of file From edebaa8806d6ccceb53123591f4278bc9bcdc308 Mon Sep 17 00:00:00 2001 From: nfc_bot Date: Tue, 26 Mar 2024 07:01:25 +0000 Subject: [PATCH 05/14] feat(ansible-roles): updated submodule ansible-roles Automation Data: { "branch": "development", "current_commit": "538e9ebe2da71f853644cada2bae9efded42d3ea)", "name": "ansible-roles", "path": "/builds/nofusscomputing/projects/ansible/execution_environment/_automation_/includes/etc/ansible/roles", "remote_head": "33197d244ec3705696b06d04e6d4f80d4d21b3fb)", "remote_name": "origin", "url": "https://gitlab.com/nofusscomputing/projects/ansible/ansible-roles.git" } Changes: Submodule path includes/etc/ansible/roles: checked out 33197d244ec3705696b06d04e6d4f80d4d21b3fb MR !248 --- includes/etc/ansible/roles | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/etc/ansible/roles b/includes/etc/ansible/roles index 538e9eb..33197d2 160000 --- a/includes/etc/ansible/roles +++ b/includes/etc/ansible/roles @@ -1 +1 @@ -Subproject commit 538e9ebe2da71f853644cada2bae9efded42d3ea +Subproject commit 33197d244ec3705696b06d04e6d4f80d4d21b3fb From 3ee6d0d7fe0cb49538d7d9e7f9a4922b7d75f942 Mon Sep 17 00:00:00 2001 From: Jon Date: Tue, 26 Mar 2024 19:03:49 +0930 Subject: [PATCH 06/14] feat(collection): add community.crypto for openssl ops !247 --- dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/dockerfile b/dockerfile index cb2c503..f93ead7 100644 --- a/dockerfile +++ b/dockerfile @@ -90,6 +90,7 @@ RUN ansible-galaxy collection install \ # ansible.posix.authorized_key for SSH ansible.posix==1.5.4 \ ansible.utils==3.1.0 \ + community.crypto==2.18.0 \ community.dns==2.8.1 \ # docker managment community.docker==3.8.0 \ From 2eda50db8dfdbcd3c93032ef38906a6daa10478c Mon Sep 17 00:00:00 2001 From: nfc_bot Date: Thu, 28 Mar 2024 03:08:22 +0000 Subject: [PATCH 07/14] feat(ansible_playbooks): updated submodule ansible_playbooks Automation Data: { "branch": "development", "current_commit": "0c090f4aeafe6369a6199f027a075ff5d37e43fd)", "name": "ansible_playbooks", "path": "/builds/nofusscomputing/projects/ansible/execution_environment/_automation_/includes/etc/ansible/playbooks", "remote_head": "d33a223f02b61bded00c527fbe2711a1e3a070ec)", "remote_name": "origin", "url": "https://gitlab.com/nofusscomputing/projects/ansible/ansible_playbooks.git" } Changes: Submodule path includes/etc/ansible/playbooks: checked out d33a223f02b61bded00c527fbe2711a1e3a070ec MR !249 --- includes/etc/ansible/playbooks | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/etc/ansible/playbooks b/includes/etc/ansible/playbooks index 0c090f4..d33a223 160000 --- a/includes/etc/ansible/playbooks +++ b/includes/etc/ansible/playbooks @@ -1 +1 @@ -Subproject commit 0c090f4aeafe6369a6199f027a075ff5d37e43fd +Subproject commit d33a223f02b61bded00c527fbe2711a1e3a070ec From 7e0fece6fc188240dd8155cfc891f5ff29ac11e6 Mon Sep 17 00:00:00 2001 From: Jon Date: Thu, 18 Apr 2024 14:30:15 +0930 Subject: [PATCH 08/14] feat(collection): add netbox collection !250 --- dockerfile | 1 + requirements.txt | 2 ++ 2 files changed, 3 insertions(+) diff --git a/dockerfile b/dockerfile index f93ead7..b79d821 100644 --- a/dockerfile +++ b/dockerfile @@ -98,6 +98,7 @@ RUN ansible-galaxy collection install \ community.general==8.4.0 \ community.mysql==3.9.0 \ community.postgresql==3.4.0 \ + netbox.netbox==3.17.0 \ theforeman.foreman==4.0.0; \ ansible-galaxy collection install --pre \ nofusscomputing.kubernetes==1.5.0 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 46b45ec..a800244 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,6 +8,8 @@ python_gitlab==4.3.0 psycopg2==2.9.9 # community.mysql PyMySQL==1.1.0 +# NetBox +pytz==2024.1 dnspython==2.4.2 From e98c6b384445b05844b16666492bc1f0cae6330c Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 24 Apr 2024 08:34:36 +0930 Subject: [PATCH 09/14] feat(app): install helm and helm diff !251 --- dockerfile | 42 +++++++++++++++++++++++++++++++++++++----- requirements.txt | 2 ++ 2 files changed, 39 insertions(+), 5 deletions(-) diff --git a/dockerfile b/dockerfile index b79d821..36e0e44 100644 --- a/dockerfile +++ b/dockerfile @@ -1,8 +1,29 @@ +ARG release_name=bookworm FROM --platform=$TARGETPLATFORM quay.io/ansible/receptor:v1.4.4 as receptor -FROM --platform=$TARGETPLATFORM python:3.11-slim-bookworm +FROM --platform=$TARGETPLATFORM python:3.11-slim-${release_name} as prep + + + + +ENV DEBIAN_FRONTEND noninteractive + + +RUN apt update; \ + apt install -y \ + curl \ + gpg + + +RUN curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | tee /usr/share/keyrings/helm.gpg > /dev/null; \ + echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" > /etc/apt/sources.list.d/helm.list; \ + cat /etc/apt/sources.list.d/helm.list; + + +FROM --platform=$TARGETPLATFORM python:3.11-slim-${release_name} + # Ansible chucks a wobbler without. see: https://github.com/ansible/ansible/issues/78283 ENV LC_ALL en_US.UTF-8 @@ -40,19 +61,29 @@ RUN apt update \ && cp /tmp/deb/sbin/ldconfig /sbin/ \ && rm -Rf /tmp/deb \ && rm $(ls | grep libc-bin_ | grep -a '.deb') \ - && apt-get install --reinstall \ + && apt-get install -y --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!! && apt install -y \ locales \ + apt-transport-https \ && sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen \ - && locale-gen \ - && apt list --upgradable \ + && locale-gen; + + +COPY --from=prep --chmod=644 /etc/apt/sources.list.d/helm.list /etc/apt/sources.list.d/helm.list + +COPY --from=prep --chmod=644 /usr/share/keyrings/helm.gpg /usr/share/keyrings/helm.gpg + + +RUN apt update; \ + apt list --upgradable \ && apt upgrade --no-install-recommends -y \ && apt-get install --no-install-recommends -y \ openssh-client \ git \ + helm \ sshpass \ postgresql-common \ postgresql-client \ @@ -65,7 +96,8 @@ RUN apt update \ # see issue https://gitlab.com/nofusscomputing/projects/ansible/execution_environment/-/issues/9 for following two lines && apt remove -y \ python3* \ - libpython3* \ + libpython3*; \ + helm plugin install https://github.com/databus23/helm-diff; \ && rm -rf /var/lib/apt/lists/* diff --git a/requirements.txt b/requirements.txt index a800244..e0ef125 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,6 +11,8 @@ PyMySQL==1.1.0 # NetBox pytz==2024.1 +PyYAML>=3.11 + dnspython==2.4.2 xmltodict==0.13.0 From 838112adc452f39c46e882533c011ce23f29de85 Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 24 Apr 2024 10:20:51 +0930 Subject: [PATCH 10/14] feat: Install kubectl !251 --- dockerfile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/dockerfile b/dockerfile index 36e0e44..7400c33 100644 --- a/dockerfile +++ b/dockerfile @@ -1,11 +1,15 @@ ARG release_name=bookworm +ARG kubernetes_version=1.29 + + FROM --platform=$TARGETPLATFORM quay.io/ansible/receptor:v1.4.4 as receptor FROM --platform=$TARGETPLATFORM python:3.11-slim-${release_name} as prep +ARG kubernetes_version ENV DEBIAN_FRONTEND noninteractive @@ -22,6 +26,11 @@ RUN curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | tee /usr/share/ cat /etc/apt/sources.list.d/helm.list; +RUN curl -fsSL https://pkgs.k8s.io/core:/stable:/v${kubernetes_version}/deb/Release.key | gpg --dearmor | tee /usr/share/keyrings/kubernetes.gpg > /dev/null; \ + echo "deb [signed-by=/usr/share/keyrings/kubernetes.gpg] https://pkgs.k8s.io/core:/stable:/v${kubernetes_version}/deb/ /" > /etc/apt/sources.list.d/kubernetes.list; \ + cat /etc/apt/sources.list.d/kubernetes.list; + + FROM --platform=$TARGETPLATFORM python:3.11-slim-${release_name} @@ -76,6 +85,10 @@ COPY --from=prep --chmod=644 /etc/apt/sources.list.d/helm.list /etc/apt/sources. COPY --from=prep --chmod=644 /usr/share/keyrings/helm.gpg /usr/share/keyrings/helm.gpg +COPY --from=prep --chmod=644 /etc/apt/sources.list.d/kubernetes.list /etc/apt/sources.list.d/kubernetes.list + +COPY --from=prep --chmod=644 /usr/share/keyrings/kubernetes.gpg /usr/share/keyrings/kubernetes.gpg + RUN apt update; \ apt list --upgradable \ @@ -84,6 +97,7 @@ RUN apt update; \ openssh-client \ git \ helm \ + kubectl \ sshpass \ postgresql-common \ postgresql-client \ From 25146e758639d6556757854daf58be320c0605c3 Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 24 Apr 2024 10:24:05 +0930 Subject: [PATCH 11/14] fix: typo !251 --- dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfile b/dockerfile index 7400c33..4a67d17 100644 --- a/dockerfile +++ b/dockerfile @@ -112,7 +112,7 @@ RUN apt update; \ python3* \ libpython3*; \ helm plugin install https://github.com/databus23/helm-diff; \ - && rm -rf /var/lib/apt/lists/* + rm -rf /var/lib/apt/lists/* WORKDIR /workdir From 061475fced3bf6f5e5007021a2a8bb6b7de4d533 Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 24 Apr 2024 10:32:51 +0930 Subject: [PATCH 12/14] fix(build_cache_image): correct missing flag !251 --- dockerfile-build_cache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfile-build_cache b/dockerfile-build_cache index 7f8a3ff..356f26a 100644 --- a/dockerfile-build_cache +++ b/dockerfile-build_cache @@ -46,7 +46,7 @@ RUN which ldconfig # && rm libc-bin_*.deb # Should re-install without issue -RUN apt-get install --reinstall \ +RUN apt-get install -y --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!! From 30a9828b312a53d0da6c09d64867171b24ec99e6 Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 24 Apr 2024 11:01:13 +0930 Subject: [PATCH 13/14] fix(kubernetes): add missing python module jsonpatch !251 !247 --- requirements.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/requirements.txt b/requirements.txt index e0ef125..b746ba8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,6 +12,8 @@ PyMySQL==1.1.0 pytz==2024.1 PyYAML>=3.11 +# kubernetes.core.k8s +jsonpatch dnspython==2.4.2 From 63a1cc7e137018bfd829a7e817d567c80206f747 Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 24 Apr 2024 12:04:10 +0930 Subject: [PATCH 14/14] fix(kubernetes): update nofusscomputing.kubernetes 1.5.0 -> 1.7.1 !247 --- dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfile b/dockerfile index 4a67d17..a9cff09 100644 --- a/dockerfile +++ b/dockerfile @@ -147,4 +147,4 @@ RUN ansible-galaxy collection install \ netbox.netbox==3.17.0 \ theforeman.foreman==4.0.0; \ ansible-galaxy collection install --pre \ - nofusscomputing.kubernetes==1.5.0 \ No newline at end of file + nofusscomputing.kubernetes==1.7.1 \ No newline at end of file