This guide provides step-by-step information to install and configure Itential Automation Gateway.
Note: Itential Automation Gateway (IAG) is compatible with several third-party software products for network operating environments. Beginning with the system requirements for 2019.1.2, all third-party software version compatibility is documented in Release Notes. To get the most up-to-date requirements for any third-party software, including open source, first identify which IAG release you’re using and then refer to the respective release notes.
Install Software
Itential Automation Gateway resides on the same server as your Ansible implementation. If you have multiple Ansible implementations, you must install Automation Gateway for each Ansible implementation. Optionally, Itential adapters will connect into each Automation Gateway installation to manage all of your Ansible networks from a single point within the Itential Automation Platform (IAP).
Requirements
- Red Hat 7
- CentOS 7
- Fedora Linux
- Python 3.6 or greater
- pipenv (packaging tool for Python)
- YAML parsing (installed)
IAG Server
The following table describes required IAG server components for production and development environments along with the recommended specs for usage.
Component | Requirement | Production ENV | Development ENV |
---|---|---|---|
CPU | 64-bit x86 CPU cores | 8 Cores | 4 Cores |
RAM | Memory | 32GB | 16GB |
Disk | Additional storage needs are dependent on custom scripts and content required by the installer. | Min: 20GB Rec: 40GB |
Min: 10GB Rec: 20GB |
In situations where a number of custom scripts, content, and logging is heavily utilized, then CPU, RAM, and disk space allocations may need to be increased to better suit those requirements.
Virtual Machine
For purposes of this guide, Itential Automation Gateway was installed on top of a virtual machine.
- CentOS 7.4 (minimal)
Repositories
The following repositories were used.
- epel-release
- ius-release
- Itential pip registry
Note: The index to the Itential pip registry is located at https://registry.aws.itential.com/repository/automation-gateway/simple. To obtain credentials for the Itential pip registry, contact the Itential Service Desk.
OS Prerequisites
The use of Python and pip requires installation of build tools available from the base OS repository. Install the following packages on your server.
sudo yum install -y gcc-c++ make yaml-cpp yaml-cpp-devel libyaml libyaml-devel libselinux-python
Install Ansible
Both Ansible and Python can be installed in a variety of ways. For purposes of this guide, we installed the python-pip
package from the EPEL registry, and Ansible from the pip registry. You can use the mechanism of your choice to install Ansible and Python.
sudo yum install -y epel-release
Optionally, install all available updates to your system.
sudo yum update -y
Install the pip
and yaml-cpp
packages from the EPEL registry.
sudo yum install -y python-pip
Update to the latest pip
version.
sudo pip install --upgrade pip
Install a patch version of Ansible 2.7 using pip
; Ansible 2.7.10 will be used for demonstration. For the most up-to-date version, refer to the respective release note.
sudo pip install ansible==2.8.3
Output
Successfully installed MarkupSafe-1.1.1 PyYAML-5.1.1 ansible-2.7.10 asn1crypto-0.24.0 bcrypt-3.1.7 cffi-1.12.3 cryptography-2.7 enum34-1.1.6 jinja2-2.10.1 paramiko-2.6.0 pycparser-2.19 pynacl-1.3.0 six-1.12.0
The python-devel
and psutil
packages should be installed after Ansible.
sudo yum install -y python-devel
sudo pip2 install psutil
Note: The
psutil
package should be installed using the samepip
that Ansible uses (eitherpip2
orpip3
), depending on your environment.
Install Python 3
Itential Automation Gateway requires Python version 3.6 to run. For purposes of this guide, we installed Python 3.6 from the ius-release
registry. You can use the mechanism of your choice to install Python 3.6.
sudo yum install -y https://repo.ius.io/ius-release-el7.rpm
Install Python 3.6 and related packages.
sudo yum install -y python36u python36u-libs python36u-devel python36u-pip yaml-cpp
Update to the latest pip
version.
sudo pip3.6 install --upgrade pip
Output
Successfully installed pip-19.1.1
Install HA-Proxy
Itential Automation Gateway uses haproxy
to support HTTPS security requirements.
sudo yum install -y haproxy
Verify Install of Prerequisites
Run the following commands to verify the above prerequisites were installed correctly.
Output
$ sudo pip3 show pip
Name: pip
Version: 19.1.1
Summary: The PyPA recommended tool for installing Python packages.
Home-page: https://pip.pypa.io/
Author: The pip developers
Author-email: pypa-dev@groups.google.com
License: MIT
Location: /usr/lib/python3.6/site-packages
Requires:
Required-by:
$ yum info python-devel
Loaded plugins: fastestmirror
Determining fastest mirrors
* base: mirror.team-cymru.com
* epel: mirror.steadfastnet.com
* extras: mirror.genesishosting.com
* ius: archive.linux.duke.edu
* updates: mirrors.centos.webair.com epel
12744/12744
Installed Packages
Name : python-devel
Arch : x86_64
Version : 2.7.5
Release : 80.el7_6
Size : 1.1 M
Repo : installed
From repo : base
Summary : The libraries and header files needed for Python development
URL : http://www.python.org/
License : Python
Description :
The Python programming language's interpreter can be extended with : dynamically loaded extensions and can be embedded in other programs. This package contains the header files and libraries needed to do these types of tasks. Install python-devel if you want to develop Python extensions. The python package will also need to be installed. You'll probably also want to install the python-docs package, which contains Python documentation.
$ ansible --version
ansible 2.7.10
config file = None
configured module search path = [u'/home/jondoe/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.5 (default, Oct 30 2018, 23:45:53) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
$ pip2 show psutil
Name: psutil
Version: 5.6.3
Summary: Cross-platform lib for process and system monitoring in Python.
Home-page: https://github.com/giampaolo/psutil
Author: Giampaolo Rodola
Author-email: g.rodola@gmail.com
License: BSD
Location: /usr/lib64/python2.7/site-packages
Requires:
Required-by:
Install Automation Gateway Using PIP
Install the Itential Automation Gateway component from the Itential pip registry. The latest version must be specified.
Note: For 2019.1, the version will only increment the very last digit of the version below. Please modify the command below to match the appropriate released version that you are attempting to install.
sudo pip3.6 install automation-gateway==1.33.11-2019.1.3 --extra-index-url https://registry.aws.itential.com/repository/automation-gateway/simple
Post Installation
Review the following post installation tasks and, if necessary, perform the tasks that are applicable to your system.
Modifying the SystemD Script for IAG
If your network requires using a proxy for http
or https
access, you may set the http_proxy
and https_proxy
settings via the systemd unit file. This method will properly set the environment variables for IAG.
Example
Below is an example of incorporating environment variables for an IAG SystemD proxy modification.
...
[Service]
...
Environment=HTTP_PROXY=http://192.168.11.50:3128
Environment=HTTPS_PROXY=http://192.168.11.50:3128
Where Automation Gateway Gets Installed
As a Python 3 application, Automation Gateway is installed within /usr/lib/python3.6/site-packages/automation_gateway
.
- Files within this directory structure should not be modified or manipulated without first moving your required roles to the default location for Ansible roles.
- Any updates made to Automation Gateway will overwrite the files within this directory.
$ cd /usr/lib/python3.6/site-packages/automation_gateway
$ ll
total 136
-rw-r--r--. 1 root root 1621 Jul 3 15:17 ansible_info.pyc
drwxr-xr-x. 3 root root 4096 Jul 3 15:17 api
drwxr-xr-x. 3 root root 251 Jul 3 15:17 api_utils
drwxr-xr-x. 3 root root 4096 Jul 3 15:17 api_v2
-rw-r--r--. 1 root root 376 Jul 3 15:17 argument_helper.pyc
-rw-r--r--. 1 root root 2174 Jul 3 15:17 authentication.pyc
-rw-r--r--. 1 root root 3030 Jul 3 15:17 cli.pyc
-rw-r--r--. 1 root root 3068 Jul 3 15:17 config.pyc
drwxr-xr-x. 3 root root 271 Jul 3 15:17 data
-rw-r--r--. 1 root root 2936 Jul 3 15:17 device.pyc
-rw-r--r--. 1 root root 1934 Jul 3 15:17 Errors.pyc
-rw-r--r--. 1 root root 2682 Jul 3 15:17 groups.pyc
-rw-r--r--. 1 root root 25 Jul 3 15:17 __init__.py
-rw-r--r--. 1 root root 136 Jul 3 15:17 __init__.pyc
drwxr-xr-x. 3 root root 19 Jul 3 15:17 integrations
drwxr-xr-x. 3 root root 85 Jul 3 15:17 license
drwxr-xr-x. 3 root root 21 Jul 3 15:17 metadata
-rw-r--r--. 1 root root 696 Jul 3 15:17 metadata_loader.pyc
-rw-r--r--. 1 root root 7599 Jul 3 15:17 modules.pyc
-rw-r--r--. 1 root root 515 Jul 3 15:17 password_helper.pyc
-rw-r--r--. 1 root root 4570 Jul 3 15:17 playbooks.pyc
-rw-r--r--. 1 root root 2998 Jul 3 15:17 properties.yml
drwxr-xr-x. 2 root root 63 Jul 3 15:17 __pycache__
-rw-r--r--. 1 root root 5501 Jul 3 15:17 roles.pyc
-rw-r--r--. 1 root root 9968 Jul 3 15:17 runner.pyc
drwxr-xr-x. 2 root root 114 Jul 3 15:17 schema
-rw-r--r--. 1 root root 5038 Jul 3 15:17 schema.pyc
-rw-r--r--. 1 root root 1866 Jul 3 15:17 script_command_line_builder.pyc
-rw-r--r--. 1 root root 6256 Jul 3 15:17 scripts.pyc
-rw-r--r--. 1 root root 2436 Jul 3 15:17 sessions.pyc
drwxr-xr-x. 2 root root 75 Jul 3 15:17 swagger
-rw-r--r--. 1 root root 1799 Jul 3 15:17 automation_gateway.pyc
-rw-r--r--. 1 root root 419 Jul 3 15:17 token_builder.pyc
drwxr-xr-x. 3 root root 170 Jul 3 15:17 ui
-rw-r--r--. 1 root root 2133 Jul 3 15:17 user_schema.pyc
-rw-r--r--. 1 root root 3436 Jul 3 15:17 web_app.pyc