tech:awx_-_build_to_run
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| tech:awx_-_build_to_run [2025/12/15 11:59] – Jean-Baptiste | tech:awx_-_build_to_run [2026/02/06 14:52] (Version actuelle) – Jean-Baptiste | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | < | ||
| + | {{tag> | ||
| + | |||
| + | # AWX - build to run | ||
| + | |||
| + | ## AWX Resource Requirements | ||
| + | |||
| + | Voir : | ||
| + | * [[AWX sur K8S Kind - partage de fichier pour les blob - Execution pods]] | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | |||
| + | | Requirement | Required | ||
| + | | ----------- | ---------------------------------------------------- | | ||
| + | | RAM | ||
| + | | CPUs | 4 | | ||
| + | | Local disk | 40 GB min (20GB min available under / | ||
| + | | Local disk | 1500 IOPS | | ||
| + | |||
| + | |||
| + | PostgreSQL requirements | ||
| + | |||
| + | Voir : | ||
| + | * https:// | ||
| + | |||
| + | |||
| + | | Requirement | Required | ||
| + | | ----------- | ------------------------------------------------------ | | ||
| + | | RAM | ||
| + | | CPUs | 4 | | ||
| + | | Local disk | 20 GB dedicated hard disk space. 150 GB+ recommended | | ||
| + | | Local disk | 1500 IOPS | | ||
| + | |||
| + | |||
| + | |||
| + | ## Prérequis logiciels | ||
| + | |||
| + | * have configured an NTP client on all nodes | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ## Architecture | ||
| + | |||
| + | Choix : | ||
| + | * Base de données sur le hôte ou sur K8S ? | ||
| + | * Idéalement Postgres dans un conteneur : plus de souplesse avec la gestion des versions | ||
| + | |||
| + | |||
| + | ## Conf système hôte | ||
| + | |||
| + | * Réactiver SELinux | ||
| + | * Après avoir redéfini '' | ||
| + | |||
| + | Changer dans Job settings - Container Run Options | ||
| + | ~~~python | ||
| + | [ | ||
| + | " | ||
| + | " | ||
| + | ] | ||
| + | ~~~ | ||
| + | |||
| + | Désactiver le SWAP. Totalement ou `memory.swap.max=0` ? | ||
| + | Voir | ||
| + | ~~~bash | ||
| + | cat / | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ## Conf Podman | ||
| + | |||
| + | Tester le démarrage automatique native Podman | ||
| + | |||
| + | ~~~bash | ||
| + | podman update --restart=always kind-control-plane | ||
| + | ~~~ | ||
| + | |||
| + | A la place de '' | ||
| + | |||
| + | |||
| + | |||
| + | ## Réseau | ||
| + | |||
| + | Voir : | ||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | |||
| + | ## Conf AWX | ||
| + | |||
| + | Voir : | ||
| + | * https:// | ||
| + | |||
| + | |||
| + | ~~~bash | ||
| + | kubectl get AWX -o json | jq ' | ||
| + | ~~~ | ||
| + | |||
| + | * auto_upgrade | ||
| + | * hostname | ||
| + | * ipv6_disabled | ||
| + | |||
| + | |||
| + | |||
| + | ## Sauvegarde / backup | ||
| + | |||
| + | 1. Export de tous les objets AWX en YAML | ||
| + | 2. Export de la base de données | ||
| + | 3. Sauvegarde avec AWX Operator | ||
| + | |||
| + | |||
| + | ### Export de tous les objets AWX en YAML | ||
| + | |||
| + | ~~~bash | ||
| + | awx -f yaml export > all.yaml | ||
| + | ~~~~ | ||
| + | |||
| + | NOTE : Les credentials ne sont pas exportés, ni certains objets | ||
| + | |||
| + | |||
| + | ### Export de la base de données PostgreSQL | ||
| + | |||
| + | Voir : | ||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | ~~~bash | ||
| + | # retrieve your secret' | ||
| + | kubectl get secrets | ||
| + | |||
| + | # show secrets | ||
| + | kubectl get secrets awx-your-instance-postgres-configuration -o yaml | ||
| + | |||
| + | kubectl port-forward awx-your-postgre-pod 5432:5432 | ||
| + | ~~~ | ||
| + | Source : https:// | ||
| + | |||
| + | |||
| + | ### Sauvegarde avec AWX Operator | ||
| + | |||
| + | Voir : | ||
| + | * https:// | ||
| + | |||
| + | ## PoC Stockage | ||
| + | |||
| + | Voir : | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | |||
| + | |||
| + | '' | ||
| + | ~~~yaml | ||
| + | kind: Cluster | ||
| + | apiVersion: kind.x-k8s.io/ | ||
| + | nodes: | ||
| + | - role: control-plane | ||
| + | extraPortMappings: | ||
| + | - containerPort: | ||
| + | hostPort: 30000 | ||
| + | protocol: TCP | ||
| + | extraMounts: | ||
| + | - containerPath: | ||
| + | hostPath: /data/files | ||
| + | ~~~ | ||
| + | |||
| + | '' | ||
| + | ~~~yaml | ||
| + | --- | ||
| + | apiVersion: v1 | ||
| + | kind: PersistentVolume | ||
| + | metadata: | ||
| + | name: awx-ansible-files-volume | ||
| + | spec: | ||
| + | accessModes: | ||
| + | - ReadWriteOnce | ||
| + | persistentVolumeReclaimPolicy: | ||
| + | capacity: | ||
| + | storage: 2Gi | ||
| + | storageClassName: | ||
| + | hostPath: | ||
| + | path: / | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | |||
| + | '' | ||
| + | ~~~yaml | ||
| + | --- | ||
| + | apiVersion: v1 | ||
| + | kind: PersistentVolumeClaim | ||
| + | metadata: | ||
| + | name: awx-ansible-files-claim | ||
| + | spec: | ||
| + | accessModes: | ||
| + | - ReadWriteOnce | ||
| + | volumeMode: Filesystem | ||
| + | resources: | ||
| + | requests: | ||
| + | storage: 2Gi | ||
| + | storageClassName: | ||
| + | |||
| + | ~~~ | ||
| + | |||
| + | ~~~bash | ||
| + | kubectl create secret generic awx-custom-certs --from-file=bundle-ca.crt=/ | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | '' | ||
| + | ~~~yaml | ||
| + | --- | ||
| + | |||
| + | kind: Cluster | ||
| + | apiVersion: kind.x-k8s.io/ | ||
| + | nodes: | ||
| + | - role: control-plane | ||
| + | extraPortMappings: | ||
| + | - containerPort: | ||
| + | hostPort: 30000 | ||
| + | protocol: TCP | ||
| + | extraMounts: | ||
| + | - containerPath: | ||
| + | hostPath: / | ||
| + | - containerPath: | ||
| + | hostPath: / | ||
| + | - containerPath: | ||
| + | hostPath: / | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | Fixer la version avec l' | ||
| + | ~~~bash | ||
| + | kind create cluster --image kindest/ | ||
| + | ~~~ | ||
| + | Available tags can be found at https:// | ||
| + | |||
| + | ~~~bash | ||
| + | kind create cluster --config=cluster-config.yml --name=kind2 | ||
| + | |||
| + | # kubectl create deployment nginx --image=nginx --port=80 | ||
| + | # kubectl create service nodeport nginx --tcp=80:80 --node-port=30000 | ||
| + | |||
| + | kubectl create service nodeport awx-service --tcp=80:80 --node-port=30000 | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | |||
| + | Dans jobs settings changer : | ||
| + | |||
| + | Paths to expose to isolated jobs | ||
| + | ~~~python | ||
| + | [ | ||
| + | "/ | ||
| + | "/ | ||
| + | ] | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ## Debug | ||
| + | |||
| + | * https:// | ||
| + | |||
| + | |||
