From f9712ae42a8439b8ebc06fcd1760a1919a23469c Mon Sep 17 00:00:00 2001 From: Olivier Navas Date: Fri, 9 Aug 2024 11:57:41 +0200 Subject: [PATCH] Commit initial --- .gitignore | 2 ++ CHANGELOG.md | 30 ++++++++++++++++++++++++++ LICENSE | 18 ++++++++++++++++ README.md | 45 +++++++++++++++++++++++++++++++++++++++ bindep.txt | 16 ++++++++++++++ execution-environment.yml | 25 ++++++++++++++++++++++ requirements.txt | 17 +++++++++++++++ requirements.yml | 17 +++++++++++++++ 8 files changed, 170 insertions(+) create mode 100644 .gitignore create mode 100644 CHANGELOG.md create mode 100644 LICENSE create mode 100644 README.md create mode 100644 bindep.txt create mode 100644 execution-environment.yml create mode 100644 requirements.txt create mode 100644 requirements.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..88760d2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +context +venv-awx-ee-libretic diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..75c0083 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,30 @@ +# **Registre des modifications** 📜📝 + +Les changements notables apportés au projet sont notés ici. + +Document au format basé sur [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). + +Les versions de ce projet suivent les préconisations de [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +--- + +## [**v0.1.3**] - 2024-04-25 + +* Ajout de la bibliothèque pip dnspython + +## [**v0.1.2**] - 2024-04-25 + +* Ajout du certificat DEP33-CA.crt +* Ajout de pyvmomi +* Ajout de molecule + +## [**v0.1.1**] - 2024-03-13 + +* Clarification des versions des dépendances ansible et python +* Intégration d'opentofu + +## [**v0.1.0**] - 2024-03-13 + +Première version + + diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b3f8e2a --- /dev/null +++ b/LICENSE @@ -0,0 +1,18 @@ +Copyright (c) Département Gironde + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +The Software is provided "as is", without warranty of any kind, express or +implied, including but not limited to the warranties of merchantability, fitness +for a particular purpose and noninfringement. In no event shall the authors or +copyright holders be liable for any claim, damages or other liability, whether +in an action of contract, tort or otherwise, arising from, out of or in +connection with the Software or the use or other dealings in the Software. diff --git a/README.md b/README.md new file mode 100644 index 0000000..e3895b1 --- /dev/null +++ b/README.md @@ -0,0 +1,45 @@ +# AWX Execution Environment Builder + +Construit les environnements d'exécution AWX utilisés chez Libretic + +cf. : https://github.com/ansible/awx-ee + +## Préparation du virtualenv + +```bash +sudo apt update +apt install python3-venv +cd awx-ee-libretic +python3 -m venv venv-awx-ee-libretic +. venv-awx-ee-libretic/bin/activate +pip install --upgrade pip +pip install ansible-builder +``` + + +## Dépendances à inclure dans l'environnement d'exécution + +Les dépendances requises à inclure dans l'environnement s'expriment à travers plusieurs fichiers : + +* execution-requirements.yml : processus général de construction ; il inclut les autres +* requirements.yml : collections ansible à inclure +* requirements.txt : paquets python à inclure +* bindep.txt : paquets system à inclure + +## Construction de l'environnement d'exécution + +Adapter le numéro de version selon la version souhaitée du projet awx-ee-builder (cf. CHANGELOG.md) + +```bash +VERSION=vxxx +ansible-builder build -v3 --tag=awx-ee-libretic:$VERSION --container-runtime=docker +``` + + +## Publier l'environnement d'exécution + +```bash +docker login +docker tag awx-ee-libretic:$VERSION libretic/awx-ee-libretic:$VERSION +docker push libretic/awx-ee-libretic:$VERSION +``` diff --git a/bindep.txt b/bindep.txt new file mode 100644 index 0000000..1e334dd --- /dev/null +++ b/bindep.txt @@ -0,0 +1,16 @@ +git-core [platform:rpm] +python3.9-devel [platform:rpm compile] +libcurl-devel [platform:rpm compile] +git-lfs [platform:rpm] +sshpass [platform:rpm] +rsync [platform:rpm] +epel-release [platform:rpm] +python-unversioned-command [platform:rpm] +unzip [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] +ca-certificates [platform:rpm] diff --git a/execution-environment.yml b/execution-environment.yml new file mode 100644 index 0000000..a6f7ac7 --- /dev/null +++ b/execution-environment.yml @@ -0,0 +1,25 @@ +--- +version: 3 +images: + base_image: + name: quay.io/centos/centos:stream9 +dependencies: + ansible_core: + package_pip: ansible-core==2.15.12 + ansible_runner: + package_pip: ansible-runner + galaxy: requirements.yml + python: requirements.txt + system: bindep.txt +#additional_build_files: +# - src: monfichier +# dest: files/ +additional_build_steps: + append_base: + - RUN dnf -y install git + - RUN $PYCMD -m pip install -U pip + append_final: + - COPY --from=quay.io/ansible/receptor:devel /usr/bin/receptor /usr/bin/receptor + - RUN mkdir -p /var/run/receptor + - RUN git lfs install --system +# - COPY _build/files/monfichier /chemin/dans/limage diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e3c047e --- /dev/null +++ b/requirements.txt @@ -0,0 +1,17 @@ +git+https://github.com/ansible/ansible-sign +ncclient==0.6.15 +paramiko==3.4.0 +pyOpenSSL==24.1.0 +toml==0.10.2 +pexpect==4.9.0 +python-daemon==2.3.2 +pyyaml==6.0.1 +six==1.16.0 +receptorctl==1.4.4 +passlib==1.7.4 +molecule==v6.0.3 +dnspython==2.6.1 +pytz==2024.1 +ovh==1.2.0 +proxmoxer==2.0.1 +passlib==1.7.4 diff --git a/requirements.yml b/requirements.yml new file mode 100644 index 0000000..ae46352 --- /dev/null +++ b/requirements.yml @@ -0,0 +1,17 @@ +--- +collections: + - name: awx.awx + version: 24.6.1 + - name: openstack.cloud + version: 2.2.0 + - name: kubernetes.core + version: 2.4.0 + - name: ansible.posix + version: 1.5.4 + - name: community.general + version: 7.5.2 + - name: community.docker + version: 3.4.11 + - name: https://github.com/synthesio/infra-ovh-ansible-module.git + type: git + version: 5.10.3