çããããã«ã¡ã¯ãRed Hat ã½ãªã¥ã¼ã·ã§ã³ã¢ã¼ããã¯ãã®å²¡éã§ãã åå㯠AAP2.1 ã®å¤§ããªå¤æ´ç¹ã§ããã³ã³ããåãããå®è¡ç°å¢ã¨ãAnsible Automation Controller ã«ããå®è¡æ¹æ³ã«ã¤ãã¦ã説æãã¾ãããä»åãansible-navigator ã®ã説æããããï¼ã¨æã£ã¦ããã®ã§ãããã¡ãã£ã¨äºå®ãå¤æ´ãã¦ãæ§ãã¼ã¸ã§ã³ããã®ã¢ããã°ã¬ã¼ãã«é¢ãã¦ã説æãããã¨æãã¾ãã
æ§ãã¼ã¸ã§ã³ã§ãããAAP 1.2ï¼Ansible Tower 3.8ï¼ã¯ã2022å¹´11æ18æ¥ ã§ãµãã¼ãçµäºï¼EOLï¼ãªã®ã§ãããå®ã¯ãããè¦è¶ãã¦ãå¼ç¤¾ãµãã¼ãã«ã¯ã
ãAnsible Tower 3.8 ã®11æ18æ¥ä»¥éã®ãµãã¼ãã£ã¦ã©ããªããã§ãã!?ã
ã¨ãããããªåãåãããè¤æ°æ¥ã¦ããæ§ã§ããå¿è« EOL å¾ã¯ãµãã¼ããç¡ããªãã®ã§ãAAP 2.1 ã¸æ©ãã®ç§»è¡ããé¡ããã¾ãï¼ã¨ãªãã®ã§ãããã¢ããã°ã¬ã¼ãã¸ã®ä¸å®ã大ããã®ããªã¨ãæãã
ãããã°ã§æ©ããç´¹ä»ããªããã°ã
ã¨æãç«ã£ãã¨ããã®ãèæ¯ã§ãããã®æ¹ããäºããããã¼ã§ããããâ¬
ã¾ããæåã«ç³ãä¸ãã¦ããã¨ãAAP 1.2 â AAP 2.1 ã¸ã®ãã¼ã¸ã§ã³ã¢ããã¯æ±ºãã¦é£ããããã¾ããã
æ¼ããã¦ããã¹ãç¹ã¯ä»¥ä¸ã®2ã¤ã§ãã
- ã¢ããã°ã¬ã¼ãã®ææ³ã¨ãã¦ã¯ãã¤ã³ãã¬ã¼ã¹ã¢ããã°ã¬ã¼ããã¾ãã¯ãããã¯ã¢ããã»ãªã¹ãã¢ããå¯è½
ä½ãã使ããææ³ã¯æ¢åç°å¢ã«ä¾å - å¤æ´ã¾ãã¯ãµãã¼ããããªããªã£ãæ©è½ã¨ãã®ç§»è¡æ¹æ³ã«ã¤ãã¦ç解ãã
AAP 1.2 㨠AAP 2.1 ã®ã主ãªéããã¯ä¸è¨ã®éãã§ãã
ã·ã¹ãã è¦ä»¶
æå° 4CPU/16GB ãªã©ãOSã¯RHEL 8.4 or later ã®ã¿ãµãã¼ãï¼RHEL 7.x / CentOS ãéãµãã¼ãã«ï¼
â»Disk ãªã©ãã®ä»ã®è¦ä»¶ã¯ããã¥ã¢ã«ãã確èªãã ãããPython ã®ä»®æ³ç°å¢ (virtualenv) â execution environment
virtualenv ã使ã£ã¦ããå ´åã¯å®è¡ç°å¢ã¸ã®ç§»è¡ãæ¤è¨ansible engine 2.9 â ansible-core 2.12 ã¢ã¸ã¥ã¼ã«æä¾æ¹æ³ã®éã
ç¾å¨ AAP 1.2 ç°å¢ã§å©ç¨ãã¦ããã¢ã¸ã¥ã¼ã«ã¨ AAP 2.1 ã§ã®æä¾æ¹æ³ã«ã¤ãã¦ã®ç¢ºèª
å¿ è¦ãªå ´åã¯å®è¡ç°å¢ã¸ã®ã¢ã¸ã¥ã¼ã«ã®è¿½åIsolated Node â Automation Meshï¼ãã®ï¼ã§ãç´¹ä»ï¼
Isolated Node ã使ã£ã¦ããå ´å㯠Automation Mesh ã®æ©è½ã®ç解ã¨ç§»è¡æ¹æ³ã®ç¢ºèª
ãã®ä» AAP 2.0 以éãµãã¼ããããªããªã£ãæ©è½ã«é¢ãã¦ã¯ä»¥ä¸ã®ãªãªã¼ã¹ãã¼ããã確èªãã ããã
ã§ã¯ãä¸è¨ãèæ ®ããå ·ä½çãªã¢ããã°ã¬ã¼ãæ¹æ³ãè¦ã¦ããã¾ãã
1. ã·ã¹ãã è¦ä»¶ãèæ
®ããã¢ããã°ã¬ã¼ãææ³ã®é¸æ
AAP 1.2 â AAP 2.1 ã¸ã®ãã¼ã¸ã§ã³ã¢ããã®æ¹æ³ã¯ä»¥ä¸ã®2ã¤ãæä¾ããã¦ãã¾ãã
- ã¤ã³ãã¬ã¼ã¹ã¢ããã°ã¬ã¼ã
- ããã¯ã¢ãããªã¹ãã¢
ç°¡åãªã®ã¯ã1ãã§ããæ¢åã® AAP 1.2 ç°å¢ã«å¯¾ãã AAP 2.1 ã®ä¸æ¸ãã¤ã³ã¹ãã¼ã«ãªã®ã§ãAAP 2.1 ã®æ°è¦ã¤ã³ã¹ãã¼ã«ãç解ããæ¹ã§ããã°ç°¡åã§ããä½ãããã®æ¹æ³ã¯æ§ç°å¢ã AAP 1.2 ã§ãããã¨ãã¾ããAAP 2.1 ã®ã·ã¹ãã è¦ä»¶ãæ§ç°å¢ãæºããã¦ããäºãæ¡ä»¶ã¨ãªãã¾ããä¾ãã°ãAnsible Tower 3.7 (æ¢ã«EOLã§ãã...) ããå©ç¨ã®å ´åã«ã¯ãAAP 1.2 ã¸ã®äºåã¢ããã°ã¬ã¼ããRHEL 7.x ããå©ç¨ã®å ´åã¯ãRHEL 8 ã¸ã®ã¢ããã°ã¬ã¼ãï¼ä»¥ä¸ã®ãªã³ã¯åç §ï¼ãäºåã«å®æ½ããã ãå¿ è¦ãããã¾ãã
æ¢å ã CentOS ã®å ´åãã¾ããæ¢å㯠RHEL 7.x ãªãã ãã©ããã£ã±ã RHEL 8 ã¯æ°è¦ã§ã¤ã³ã¹ãã¼ã«ãããã»ã»ã»ãã¨ããå ´åãªã©ãæ°ã㪠OS ã®ä¸ã« AAP 2.1 ãã¤ã³ã¹ãã¼ã«ããå ´åã¯ãã2ã ã®ããã¯ã¢ãããªã¹ãã¢ãè¡ãäºã«ãªãã¾ãããã®éã®æ³¨æç¹ã¯ã
ãããã¯ã¢ããå ã® AAP ã¨ãªã¹ãã¢å ã® AAP ã®ãã¼ã¸ã§ã³ã¯åä¸ã§ãããã¨ã
ã¨ããæ¡ä»¶ãããäºã§ãããã®ããã以ä¸ã®ãããªã¢ããã°ã¬ã¼ãæé ã¨ãªãã¾ãã
- æ°ãã« RHEL 8.4 (or later) ãã¤ã³ã¹ãã¼ã«
- æ°ç°å¢ã« AAP 1.2 ãã¤ã³ã¹ãã¼ã« (./setup.sh)
- æ§ AAP 1.2 ã®ããã¯ã¢ãããåå¾ (./setup.sh -b)
- æ° AAP 1.2 ç°å¢ã«ããã¯ã¢ããã¤ã¡ã¼ã¸ããªã¹ã㢠(./setup.sh -r)
- æ°ç°å¢ã AAP 1.2 â AAP 2.1 ã«ã¤ã³ãã¬ã¼ã¹ã¢ããã°ã¬ã¼ã
AAP 1.2 ã®ãã¯ã¢ããã¤ã¡ã¼ã¸ãç´æ¥ AAP 2.1 ç°å¢ã«ãªã¹ãã¢åºæ¥ãªããããæé ãå°ãå¤ããªãã¾ããä¼¼ããããªã³ãã³ãå©ãã ããªã®ã§é£ãããã¨ã¯ããã¾ãããAnsible Towerã®ããã¯ã¢ãããªã¹ãã¢ã«é¢ãã¦ã¯ãã¡ãããåç §ãã ããã
2. Python ã®ä»®æ³ç°å¢ (virtualenv) â execution environment
3. ansible engine 2.9 â ansible-core 2.12 ã¢ã¸ã¥ã¼ã«æä¾æ¹æ³ã®éã
2 㨠3 ã§ãããå
±ã«ãå®è¡ç°å¢ãã«ã¹ã¿ã ã§ä½æããäºãã«ãã対å¿ãã¾ããåå Part 1ã§ãAAP 2.1 ã§å©ç¨ããã³ã³ããåãããå®è¡ç°å¢ã¯ Red Hat Ecosystem Catalog ããæä¾ãããã¨ããã説æããã¾ããããã«ã¹ã¿ã ã§ä½æããäºãå¯è½ã§ããã«ã¹ã¿ã ã§ã®å®è¡ç°å¢ã®ä½æãå¿
è¦ã¨ãªãã®ã¯ä¸»ã«ä»¥ä¸ã®äºã¤ã®ã±ã¼ã¹ã§ãã
- AAP 1.2 ã§å©ç¨ãã¦ãã virtualenv ã®ç§»è¡
- ã¢ã¸ã¥ã¼ã«ãä¾åããã±ã¼ã¸ã®ã¤ã³ã¹ãã¼ã«
AAP 1.2 㧠Python ã®ä»®æ³ç°å¢ã§ãã virtualenv ãå©ç¨ããã¦ããå ´åãAAP 2.1 ã§ã¯ããã®ç°å¢ãã³ã³ããåãããå®è¡ç°å¢ã«ç§»è¡ããã®ããã¹ããã©ã¯ãã£ã¹ã§ããã¾ããæ¢åã® AAP 1.2 ç°å¢ã§ ansible 2.9 ã«å¯¾ã㦠Collections ã追å ã¤ã³ã¹ãã¼ã«ãã¦ããæ§ãªå ´åã¯ãããããå«ãå®è¡ç°å¢ã®ã«ã¹ã¿ã ä½æãåºæ¬ã¹ã¿ã³ã¹ã¨ãªãã¾ãããã ã
ãå®è¡ç°å¢ãã«ã¹ã¿ã ã§ä½æããã£ã¦é£ããã...ã
ã»ã»ã»ã§ããããã§ããAAP 2.1 ã§ãµãã¼ããããå®è¡ç°å¢ã®ã«ã¹ã¿ãã¤ãºãã¼ã«ã§ãã ansible-builder
ã使ãã¨ç°¡åã§ãï¼ ansible-builder
㯠AAP 2.1 ã¨ã¯å¥ã¤ã³ã¹ãã¼ã«ã® CLI ãã¼ã«ã§ããã¾ãã¯ãansible-builder ã®ã³ãã³ãã©ã¤ã³ããç´æ¥èªã¿è¾¼ã¾ãã execution-environment.yml
ãã¡ã¤ã«ãä½æããããã«ãã®ä¸ããæ大4ã¤ã®ãã¡ã¤ã«ãèªã¿è¾¼ãã§å®è¡ç°å¢ãä½æãã¾ããè¦ã¯ãã®ãã¡ã¤ã«ã®ä¸ã«èªåã追å ãããã³ã³ãã¼ãã³ããè¨è¼ãã¦ã³ãã³ããå®è¡ããã°OKãèãããããã£ã¦ã¿ãã¨å®ã¯ç°¡åã§ãã
- execution-environment.yml
ã³ãã³ãå®è¡æã«æå®ãããã¡ã¤ã«ããã®ä¸ã§ä»¥ä¸ã®ãã¡ã¤ã«ãæå®ãã¾ãã- ansible.cfg
Collections ã®ãã¦ã³ãã¼ãå ã«é¢ããæ å ±ã¨ã¢ã¯ã»ã¹ãã¼ã¯ã³æ å ± - requirements.yml
ãã¦ã³ãã¼ã対象㮠Collections ã®æå® - requirements.txt
Collections ãå¿ è¦ã¨ãã Python ã¢ã¸ã¥ã¼ã« - bindep.txt
Collections ãå¿ è¦ã¨ãã OS ããã±ã¼ã¸
- ansible.cfg
execution-environment.yml
ããèªã¿è¾¼ã¾ãã4ã¤ã®ãã¡ã¤ã«ã«ã¤ãã¦ã¯å¿
è¦ãªãã¡ã¤ã«ã®ã¿ä½æã®ä¸æå®ããã°OKã§ããä¸ä¾ã§ãããã«ã¹ã¿ãã¤ãºç¨ã®æå°ã®ã¤ã¡ã¼ã¸ ee-minimal-rhel8 ã« vmware ã®ã³ãã¥ããã£ã¢ã¸ã¥ã¼ã« community.vmware
ã追å ããå ´åã¯ãããªæãã§ãã¡ã¤ã«ãä½æãã¾ãã
ã»execution-environment.yml
version: 1 build_arg_defaults: EE_BASE_IMAGE: 'registry.redhat.io/ansible-automation-platform-21/ee-minimal-rhel8:latest' EE_BUILDER_IMAGE: 'registry.redhat.io/ansible-automation-platform-21/ansible-builder-rhel8:latest' ansible_config: 'ansible.cfg' dependencies: galaxy: requirements.yml python: requirements.txt system: bindep.txt
ã
ã»ansible.cfg
url=https://cloud.redhat.com/api/automation-hub/ auth_url=https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token token=<your_access_token_here>
â» ã¢ã¯ã»ã¹ãã¼ã¯ã³ã¯ãèªèº«ã®ç©ã«ç½®ãæãã¦ãã ãã
ã
ã»requirements.yml
collections: - community.vmware
â»requirements.txt 㨠bindep.txt ã¯ä»åã¯ç©ºãã¡ã¤ã«ã§ãã
ã
ansible-builder
åã³ãansible-navigator
ãã¤ã³ã¹ãã¼ã«ãã¦ããªãå ´åã¯ã¤ã³ã¹ãã¼ã«ãã¾ãããã
$ sudo subscription-manager repos --enable ansible-automation-platform-2.1-for-rhel-8-x86_64-rpms $ sudo dnf install ansible-navigator $ sudo dnf install ansible-builer ### ãã¼ã¹ã¤ã¡ã¼ã¸ã®ãã¦ã³ãã¼ãã«å¿ è¦ãª Red Hat Ecosystem Catalog ã¸ã®ãã°ã¤ã³ $ podman login registry.redhat.io
ansible-builer build
ã³ãã³ãã§ãã«ããã¾ãï¼ï¼
$ ansible-builder build -t com-vmware:0.0.1
podman
ã³ãã³ãã§ä½æããå®è¡ç°å¢ã¤ã¡ã¼ã¸ã«ã¤ãã¦ç¢ºèªãã¦ã¿ã¾ãã
$ podman images REPOSITORY TAG IMAGE ID CREATED SIZE localhost/com-vmware 0.0.1 7baa2662f467 53 minutes ago 553 MB <none> <none> 724422227dd8 49 minutes ago 422 MB <none> <none> 699ecae59108 49 minutes ago 403 MB
<none>
ã¯ãã«ãã«å©ç¨ããä¸éã¤ã¡ã¼ã¸ã§ãã容éãé£ãã®ã§åé¤ãã¦ããã¾ããããâ¬
$ podman image prune
ansible-navigator
ã«ããå®è¡ç°å¢ã®è©³ç´°ç¢ºèª
$ ansible-navigator images --pp never
ä½æããã¤ã¡ã¼ã¸ã¨ããã«ãã«å©ç¨ããå®è¡ç°å¢ã®ã¤ã¡ã¼ã¸ãä¸è¦§è¡¨ç¤ºããã¾ãã詳細確èªã«ã¯å·¦æ¨ªã®çªå·ããã¼ãã¼ãå ¥åãã ãããä¸è¨ã®å ´åã¯ãã5ãã§ããä½æã«å©ç¨ãããã¼ã¹ã¤ã¡ã¼ã¸ã¯ã10ãã§ããã
ããã«ãã2ããå ¥åãã¦ãã¤ã³ã¹ãã¼ã«ããã Collections ã確èªãã¦ã¿ã¦ãã ããã
community.vmware
ãã¤ã³ã¹ãã¼ã«ããã¦ãããã¨ãåããã¾ãããescããã¼ã使ã£ã¦å
ã«æ»ããããã«ã3ããå
¥åãã¦ãPython ããã±ã¼ã¸ã確èªãã¦ã¿ã¦ãã ããã
community.vmware
ã«å¿
è¦ãª pyvmomi
ãvSphere-Automation-SDK
ãã¤ã³ã¹ãã¼ã«ããã¦ãããã¨ãåããã¾ããèå³ããæ¹ã¯ãä¸è¨å
容ãããã¼ã¹ã¨ãªã£ãã¤ã¡ã¼ã¸ã¨æ¯ã¹ã¦ã¿ãã¨è¯ãã¨æãã¾ããããã§ãansible-core 2.12 ã®å®è¡ç°å¢ã«community.vmware ãçµã¿è¾¼ãäºãåºæ¥ã¾ããã®ã§ãå¾ã¯ãã®å®è¡ç°å¢ã使ã£ã¦å®éã® vSphere ã®ç°å¢ãæä½ã§ããã確èªããã°å®äºã§ãï¼ç°¡åã§ãããâ¬
ä¸è¨ã§ã¯ç°¡åãªä¾ã¨ãã¦ãcommunity.vmware
ã¢ã¸ã¥ã¼ã«ã追å ãã¾ããããansible.posix
ãamazon.aws
ãansible.windows
ã追å ããå ´åã¯ãrequirement.yml
ã以ä¸ã®æ§ã«ç·¨éããã«ãããã°OKã§ãã
ã»requirements.yml
collections: - ansible.posix - amazon.aws - ansible.windows
æ £ããã¨ç°¡åã§ãã®ã§ãè²ã ä½æãã¦éãã§ã¿ã¦ãã ãããâ¬
ansible-builder
ã使ã£ã¦ã«ã¹ã¿ã ãã«ãã®å®è¡ç°å¢ãåºæ¥ãæ§ã«ãªã£ãããvirtualenv
ã®ç§»è¡ãç°¡åã§ãã以ä¸ã®ããã¥ã¢ã«ã«åããæãè¨è¼ããã¦ãã¾ãã®ã§ã確èªããã ããã°ã¨æãã¾ãã
åºæ¬çã«ã¯ã以ä¸ã®æé ã¨ãªãã¾ãã
- æ¢åç°å¢ã§å®ç¾©ããã¦ããå ¨ã¦ã®ã«ã¹ã¿ã ä»®æ³ç°å¢ã¨ãã®ãã¹ãä¸è¦§è¡¨ç¤º (list_custom_venvs)
- 移è¡äºå®ã®ã«ã¹ã¿ã ä»®æ³ç°å¢ã«ä¾åããAutomation Controller ã®ãªã½ã¼ã¹ã表示 (custom_venv_associations)
- 移è¡äºå®ã®ã«ã¹ã¿ã ä»®æ³ç°å¢ã requirements.txt ã¨ãã¦ã¨ã¯ã¹ãã¼ããã (export_custom_venv -q)ã
- requirements.txt ã使ã£ã¦å®è¡ç°å¢ããã«ã
ã¡ãã£ã¨é·ããªãã¾ããã®ã§ãIsolated Node â Automation Mesh ã«ã¤ãã¦ã¯æ¬¡åã説æãããã¨æãã¾ãã
ã¾ã¨ã
ã¢ããã°ã¬ã¼ããæ¤è¨ããéã®ãã¤ã³ãã¯ä»¥ä¸ã¨ãªãã¾ãã
- ã·ã¹ãã è¦ä»¶ãæ©è½ãªã© AAP 1.2 ã¨ã®å·®ç°ãç解ãã
- ãµãã¼ããããªããªã£ãæ©è½ã® AAP 1.2 ã§ã®å©ç¨ã®æç¡ã確èªãã
- ãµãã¼ããããªããªã£ãæ©è½ã®ç§»è¡ã¨ãã®æ¹æ³ã«ã¤ãã¦ç解ãã
virtualenv â execution environment
Isolated Node â Automation Mesh ï¼æ¬¡å説æï¼ãªã©
ansible-builder ã®å©ç¨è©³ç´°ã«ã¤ãã¦ã¯ä»¥ä¸ã®ããã¥ã¢ã«ãåç
§ãã ããã
access.redhat.com