- 09 Feb 2023
Quick Installation Method
- Updated on 09 Feb 2023
Quick Install (RHEL 7)
RHEL 7 installation exactly matches CentOS 7 installation with the following important exceptions:
- Each RHEL instance must be fully registered before many features (e.g., yum) can be utilized.
- For registration information see RedHat Registration Information.
- To enable automatic registration via CLI use
subscription-manager register --auto-attach.
- If issues arise with automatic registration you can try to use the
- Additional RHEL registration information or troubleshooting is beyond the scope of this installation guide.
epel-releasecommand should not be run as it will fail:
yum -y install epel-release.
Refer to the Installation Prerequisites page for information regarding the Software Repository and Registry Credentials that can be used with the various IAG installation methods.
Quick Install (CentOS 7)
- This quick install script is tested against a fresh installation of CentOS 7 Minimal. Users must fill in the below variables, review the script, and then run it as root.
- Do not forget to edit the first set of exported variables before running!
⚠ Refer to the Installation Prerequisites page for information regarding the Software Repository and Registry Credentials that can be used with the various IAG installation methods.
The following method is great for quickly booting Automation Gateway for testing purposes. Due to its use of python's virtualenv module, it is very easy to retry a fresh installation if you make any mistakes. However, it should be understood that you can run Automation Gateway via global, user, or venv installations as you see fit for your environment. Therefore, we recommend the quick install for testing, and the Full Installation Method for a production environment.
With regard to integrations and versioning, the script assumes you do not have an existing Ansible, Nornir, Terraform installation and no preference on the versioning of them. The script also uses registry credentials for the Nexus repository. For registry credentials to the JFrog repository, refer to the Installation Prerequisites page.
echo "## CUSTOMIZE THESE VARIABLES BEFORE RUNNING THIS SCRIPT: ##" && \ export AUTOMATION_GATEWAY_VERSION="" && \ export REGISTRY_USERNAME="" && \ export REGISTRY_PASSWORD="" && \ export REGISTRY_URL="registry.aws.itential.com/repository/automation-gateway-release/simple" && \ echo "## ENABLE REPOSITORIES ##" && \ yum -y install epel-release && \ yum -y install \ https://repo.ius.io/ius-release-el7.rpm \ https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm echo "## UPDATE SYSTEM PACKAGES ##" && \ yum -y update echo "## INSTALL SYSTEM DEPENDENCIES ##" && \ yum -y install gcc-c++ make yaml-cpp yaml-cpp-devel libyaml libyaml-devel libselinux-python echo "## INSTALL PYTHON ##" && \ yum -y groupinstall "Development Tools" && \ yum -y install openssl-devel libffi-devel zlib-devel bzip2-devel wget sqlite-devel && \ wget https://www.python.org/ftp/python/3.9.2/Python-3.9.2.tgz && \ tar xvf Python-3.9.2.tgz && \ cd Python-3.9*/ && \ ./configure --enable-optimizations --enable-loadable-sqlite-extensions && \ make altinstall echo "## EXPOSE PORT(S) ##" && \ firewall-cmd --zone=public --add-port=8083/tcp --permanent && \ firewall-cmd --reload echo "## CREATE NON ROOT USER ##" && \ useradd itential && \ usermod -aG wheel itential && \ echo "itential ALL = NOPASSWD: /home/itential/automation-gateway/bin/automation-gateway-setup.sh" >> /etc/sudoers && \ echo "## CREATE AND ASSIGN DIRECTORIES ##" && \ mkdir -p /opt/automation-gateway/data \ /usr/share/ansible/inventory \ /usr/share/ansible/modules \ /usr/share/ansible/roles \ /usr/share/ansible/collections \ /usr/share/ansible/playbooks \ /usr/share/nornir/modules \ /usr/share/scripts \ /usr/share/terraform && \ chown -R itential:itential \ /opt/automation-gateway/data \ /usr/share/ansible \ /usr/share/nornir \ /usr/share/scripts \ /usr/share/terraform echo "## SWITCH USER ##" && \ su itential cd echo "## CREATE PYTHON VIRTUAL ENVIRONMENT ##" && \ python3.9 -m venv $HOME/automation-gateway && \ source $HOME/automation-gateway/bin/activate echo "## INSTALL PYTHON DEPENDENCIES ##" && \ python3.9 -m pip install --upgrade pip setuptools wheel echo "## INSTALL AUTOMATION GATEWAY AND INTEGRATIONS (Ansible/Nornir/Netmiko/Terraform/etc) ##" && \ python3.9 -m pip install \ automation-gateway[integrations]==$AUTOMATION_GATEWAY_VERSION \ --extra-index-url https://$REGISTRY_USERNAME:$REGISTRY_PASSWORD@$REGISTRY_URL echo "## INSTALLATION COMPLETE ##"
At this point, your system, python, and Automation Gateway installations are all complete. The final decision will be how you would like to start the server.
Quick Start (On Demand)
The Quick Start is most appropriate for temporary testing of properties.yml settings, firewalls, etc. As the server will stop as soon as the user inputs CTRL-C or the terminal session is closed, this method is not suitable for anything other than testing.
echo "## START AUTOMATION GATEWAY ##" && \ echo "## REMEMBER TO SOURCE $HOME/automation-gateway/bin/activate ON SUBSEQUENT RUNS ##" && \ source $HOME/automation-gateway/bin/activate && \ automation-gateway
Service Start (Systemd Script)
Installing Automation Gateway as a service allows the server to persist beyond a single terminal session and even through system failures or reboots. Systemd Services require elevated permissions. Either run the setup script as root with the absolute path to
automation-gateway-setup.sh or via the sudo command with the
$HOME shortcut as in the example below. The sudo method assumes the
/etc/sudoers modification from the quick install above. The modification allows the
itential user to run the setup via sudo without a password.
The Systemd Service Start is most appropriate for production installations, but can also be used to test all aspects of the server as long as you have access to rebooting the process via systemctl:
systemctl restart automation-gateway
To begin the interactive installation process, simply use:
echo "## START AUTOMATION GATEWAY ##" && \ sudo $HOME/automation-gateway/bin/automation-gateway-setup.sh --setup
To run the non-interactive installation process, simply copy/paste the following after changing any default parameters to your liking:
echo "## START AUTOMATION GATEWAY ##" && \ sudo $HOME/automation-gateway/bin/automation-gateway-setup.sh \ --setup \ --user=itential \ --custom-content-dir=/usr/share \ --install-dir=/opt/automation-gateway \ --systemd \ --start-on-boot