redhat-cop / aap_utilities

Ansible Collection for automated deployment of AAP and other objects for general use
https://galaxy.ansible.com/infra/aap_utilities
GNU General Public License v3.0
81 stars 50 forks source link

added support for installing AAP 2.5 #257

Closed snagoor closed 3 weeks ago

snagoor commented 1 month ago

What does this PR do?

This adds support to install the latest AAP 2.5 version.

How should this be tested?

Automated tests are preferred, but not always doable - especially for infrastructure. Include commands to run your new feature, and also post-run commands to validate that it worked. (please use code blocks to format code samples)

aap_setup_down_offline_token: "<token>"
aap_setup_down_version: "2.5"
aap_setup_down_type: "setup"
aap_setup_rhel_version: "9"
aap_setup_prep_inv_nodes:
  automationcontroller:
    controller.example.com:
  database:
    db.example.com:
  automationgateway:
    gateway.example.com:
  automationhub:
    hub.example.com:
  automationedacontroller:
    eda.example.com:
aap_setup_prep_inv_vars:
  automationcontroller:
    node_type: hybrid
    ignore_preflight_errors: true
  automationhub:
    ignore_preflight_errors: true
  automationedacontroller:
    ignore_preflight_errors: true
  automationgateway:
    ignore_preflight_errors: true
  all:
    pg_host: "db.example.com"
    pg_port: "5432"
    pg_database: "awx"
    pg_username: "awx"
    pg_sslmode: "prefer"

    automationhub_pg_host: db.example.com
    automationhub_pg_port: "5432"
    automationhub_pg_database: "automationhub"
    automationhub_pg_username: "automationhub"
    automationhub_pg_sslmode: "prefer"

    automationedacontroller_pg_host: db.example.com
    automationedacontroller_pg_port: "5432"
    automationedacontroller_pg_database: "automationedacontroller"
    automationedacontroller_pg_username: "automationedacontroller"
    automationedacontroller_pg_sslmode: "prefer"

    automationgateway_pg_host: db.example.com
    automationgateway_pg_port: "5432"
    automationgateway_pg_database: "automationgateway"
    automationgateway_pg_username: "automationgateway"
    automationgateway_pg_sslmode: "prefer"

    receptor_listener_port: 27199
aap_setup_prep_inv_secrets:
  all:
    registry_url: "registry.redhat.io"
    registry_username: "<registry_user>"
    registry_password: "<registry_password>"
    admin_password: 'changeme'
    pg_password: 'changeme'
    automationhub_admin_password: 'changeme'
    automationhub_pg_password: 'changeme'
    automationedacontroller_admin_password: 'changeme'
    automationedacontroller_pg_password: 'changeme'
    automationgateway_admin_password: 'changeme'
    automationgateway_pg_password: 'changeme'
aap_setup_inst_extra_vars:
  disable_no_log: true
controller_hostname: "controller.example.com"
controller_validate_certs: false
ah_hostname: "hub.example.com"
ah_validate_certs: false
eda_hostname: "eda.example.com"
eda_validate_certs: false
gateway_hostname: "gateway.example.com"
gateway_validate_certs: false

Is there a relevant Issue open for this?

Provide a link to any open issues that describe the problem you are solving. resolves #[number]

Other Relevant info, PRs, etc

Please be aware of this Jira AAP-32816 where the EDA status shows degraded (404 not found on port 8443) when you hit the Gateway API. This causes the setup.sh to still execute even though the component is installed correctly.

To test it properly, after the installation is successful, change the following on EDA Server

# vi /etc/nginx/conf.d/automation-eda-controller-event-stream.conf 

#location ~ ^/api/eda/v1/external_event_stream/ { ---> comment out this line
location ~ ^/api/eda/ {   ---> add this line

Restart EDA Server

# automation-eda-controller-service restart

Now check the Gateway API status

# curl -k -u admin:changeme https://gateway.example.com/api/gateway/v1/status/