第 2 章 Installing Red Hat Ansible Automation Platform components on a single machine
You can install Red Hat Ansible Automation Platform components on a single machine in one of the following supported scenarios.
You can use these instructions to install a standalone instance of automation controller with a database on the same node, or a non-installer managed database. This scenario includes installation of automation controller, including the web frontend, REST API backend, and database on a single machine. It installs PostgreSQL, and configures the automation controller to use that as its database. This is considered the standard automation controller installation scenario.
2.1.1. Prerequisites 复制链接链接已复制到粘贴板!
- You chose and obtained a platform installer
- You are installing on a machine that meets base system requirements.
You can use the Red Hat Ansible Automation Platform installer inventory file to specify your installation scenario.
- Using external databases: ensure the database sections of your inventory file are properly setup.
-
Add automation hub information in the
[automationhub]
group - automation hub and automation controller cannot be installed on the same node.
- automation controller will not configure replication or failover for the database that it uses. automation controller should work with any replication you have.
- The database server should be on the same network or in the same data center as the automation controller server for performance reasons.
- For upgrading an existing cluster: When upgrading a cluster, you may decide that you want to also reconfigure your cluster to omit existing instances or instance groups. Omitting the instance or the instance group from the inventory file will not be enough to remove them from the cluster. In addition to omitting instances or instance groups from the inventory file, you must also deprovision instances or instance groups before starting the upgrade. Otherwise, omitted instances or instance groups will continue to communicate with the cluster, which can cause issues with tower services during the upgrade.
-
For clustered installations: If you are creating a clustered setup, you must replace
localhost
with the hostname or IP address of all instances. All nodes/instances must be able to reach any others using this hostname or address. In other words, you cannot use thelocalhost ansible_connection=local
on one of the nodes AND all of the nodes should use the same format for the host names.
- Root access to remote machines is required. With Ansible, this can be achieved in different ways:
-
ansible_user=root ansible_ssh_pass=”your_password_here”
inventory host or group variables -
ansible_user=root ansible_ssh_private_key_file=”path_to_your_keyfile.pem”
inventory host or group variables -
ANSIBLE_BECOME_METHOD=’sudo’ ANSIBLE_BECOME=True ./setup.sh
For more information on become
plugins, see Understanding privilege escalation.
Procedure
Navigate to the installer
[bundled installer]
cd ansible-automation-platform-setup-bundle-<latest-version>
$ cd ansible-automation-platform-setup-bundle-<latest-version>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow [online installer]
cd ansible-automation-platform-setup-<latest-version>
$ cd ansible-automation-platform-setup-<latest-version>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
-
Open the
inventory
file with a text editor. -
Edit
inventory
file parameters to specify your installation scenario. Follow the example below.
This example describes how you can populate the inventory file for a single node installation of automation controller.
Do not use special characters for pg_password
. It may cause the setup to fail.
2.1.4. Flags and extra vars 复制链接链接已复制到粘贴板!
You can pass flags and extra variables when installing automation controller.
:
Argument | Description |
---|---|
| Show this help message and exit |
|
Path to Ansible inventory file (default: |
| Set additional Ansible variables as key=value or YAML/JSON |
| Perform a database backup in lieu of installing |
| Perform a database restore in lieu of installing |
| Generate and dsitribute a SECRET_KEY |
Use the --
separator to add any Ansible arguments you wish to apply. For example: ./setup.sh -i my_awesome_inventory.yml -e matburt_is_country_gold=True — -K
.
When passing
-r
to perform a database restore default restore path is used unless EXTRA_VARS are provided with a non-default path. See the example below that passed an EXTRA_VAR specifying the restore path:./setup.sh -e 'restore_backup_file=/path/to/nondefault/location' -r
./setup.sh -e 'restore_backup_file=/path/to/nondefault/location' -r
Copy to Clipboard Copied! Toggle word wrap Toggle overflow You can force an online installation by passing
-e bundle_install=false
:./setup.sh -e bundle_install=false
$ ./setup.sh -e bundle_install=false
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Variable | Description | Default |
---|---|---|
| When installing automation controller make sure Ansible is also up to date |
|
| When installing Tower also create the Demo Org, project, credential, Job Template, etc. |
|
| When installing from a bundle where to put the bundled repos |
|
| Disable HTTPS traffic through nginx, this is useful if offloading HTTPS to a load balancer |
|
| Disable HSTS web-security policy mechanism |
|
| Port to configure nginx to listen to for HTTP |
|
| Port to configure nginx to listen to for HTTPS |
|
| A temp location to use when backing up |
|
| Specify an alternative backup file to restore from | None |
| The minimum RAM required to install Tower (should only be changed for test installation) |
|
| The minimum open file descriptions (should only be changed for test installations) | None |
|
Ignore preflight checks, useful when installing into a template or other non-system image (overrides |
|
Examples
- To upgrade core:
./setup.sh -e upgrade_ansible_with_tower=1
./setup.sh -e upgrade_ansible_with_tower=1
- To disable https handling at nginx:
./setup.sh -e nginx_disable_https=true
./setup.sh -e nginx_disable_https=true
- To specify a non-default path when restoring from a backup file:
./setup.sh -e 'restore_backup_file=/path/to/nondefault/location' -r
./setup.sh -e 'restore_backup_file=/path/to/nondefault/location' -r
*
To override an inventory file used by passing it as an argument to the setup script:
To override an inventory file used by passing it as an argument to the setup script:
You can run the setup script once you finish updating the inventory
file with required parameters for installing your Private Automation Hub.
Procedure
Run the
setup.sh
script./setup.sh
$ ./setup.sh
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
The installation will begin.
2.1.6. Verifying automation controller installation 复制链接链接已复制到粘贴板!
Once the installation completes, you can verify your automation controller has been installed successfully by logging in with the admin credentials you inserted into the inventory
file.
Procedure
-
Navigate to the IP address specified for the automation controller node in the
inventory
file. -
Log in with the Admin credentials you set in the
inventory
file.
The automation controller server is accessible from port 80 (https://<TOWER_SERVER_NAME>/) but will redirect to port 443 so 443 needs to be available also.
If the installation fails and you are a customer who has purchased a valid license for Red Hat Ansible Automation Platform, please contact Ansible via the Red Hat Customer portal at https://access.redhat.com/.
Your automation controller is now ready for initial configuration.