Esri / arcgis-gitops

GitHub Actions workflows for ArcGIS Enterprise deployment and operation
Apache License 2.0
6 stars 1 forks source link

Update version of RHEL 8 image #80

Closed pbobov closed 4 months ago

pbobov commented 4 months ago

Currently the default rhel8 image is RHEL 8.6 (RHEL-8.6.0_HVM--x86_64--Hourly2-GP2). RHEL 8.6 includes Python 3.6. Ansible 10.x drops support for Python 2.7 and 3.6 on remote machines.

Ansible 10.x fails on RHEL 8.6 EC2 instances with:

{"ansible_facts": {}, "changed": false, "failed_modules":
{"ansible.legacy.setup": {"ansible_facts":
{"discovered_interpreter_python": "/usr/bin/python3"}, "failed": true,
"module_stderr": "", "module_stdout": "/bin/sh: /usr/bin/python3: No such file or directory\r\r", "msg": "The module failed to execute correctly, you probably need to set the interpreter.\nSee stdout/stderr for the exact error", "rc": 127, "warnings": ["No python interpreters found for host ip-10-0-64-55.us-west-2.compute.internal (tried ['python3.12', 'python3.11', 'python3.10', 'python3.9', 'python3.8', 'python3.7', '/usr/bin/python3', 'python3'])"]}}, "msg": "The following modules failed to execute: ansible.legacy.setup\n"}

RHEL 8 needs to be updated to 8.9, which is the latest RHEL 8 service pack tested with ArcGIS Enterprise 11.3. See https://enterprise.arcgis.com/en/system-requirements/latest/linux/arcgis-server-system-requirements.htm

pbobov commented 4 months ago
  1. Updated rhel8 image from RHEL 8.6 to RHEL 8.9
  2. Changed rhel9 image EBS type from GP2 to GP3
  3. Installed Python 3.11 on RHEL EC2 instances
  4. Set ansible_python_interpreter to "/usr/bin/python3"
  5. Fixed Ansible version to 10.x
  6. Added a workaround for ansible.builtin.package module (that uses does not work on RHEL 8 with Ansible 10)
pbobov commented 4 months ago

cloud-init utility on RHEL 9 AMI conflict with python 3.11 installed with yum. The hard learned lesson is not to mess with the system and do not update components of the AMI. Back to the drawing board.

pbobov commented 4 months ago

The PR locks Ansible to version 9 that supports python 3.6 on RHEL 8 instead of installing python 3.11.