Installing Oracle Linux Automation Manager on Oracle Linux

4
0
Send lab feedback

Installing Oracle Linux Automation Manager on Oracle Linux 8

Introduction

The following tutorial provides instructions for installing Oracle Linux Automation Manager on Oracle Linux 8.

Objectives

In this lab, you'll learn how to:

  • Enable the Oracle Linux DNF repository
  • Set the firewall rules
  • Download, install, and configure Oracle Linux Automation Manager

Prerequisites

  • A system with Oracle Linux 8 installed.

Enable the Oracle Linux DNF Repository and Set the Firewall Rules

Note: When using the free lab environment, see Oracle Linux Lab Basics for connection and other usage instructions.

Enable the required yum repositories and firewall rules before you install Oracle Linux Automation Manager.

  1. Enable the latest Oracle Linux 8 BaseOS repository.

    sudo dnf config-manager --enable ol8_baseos_latest
  2. Install the Oracle Linux Automation Manager repository.

    sudo dnf install oraclelinux-automation-manager-release-el8
  3. Enable the required repositories for installation.

    sudo dnf config-manager --enable ol8_automation ol8_addons ol8_UEKR6 ol8_appstream
  4. Add the HTTP/HTTPS services to the firewall rules.

    sudo firewall-cmd --add-service=http --permanent
    sudo firewall-cmd --add-service=https --permanent
    sudo firewall-cmd --reload

Install and Configure Oracle Linux Automation Manager

  1. Install the Oracle Linux Automation Manager package and any dependencies.

    sudo dnf install ol-automation-manager
  2. Edit the /etc/redis.conf file and add the following lines.

    sudo vi /etc/redis.conf
    unixsocket /var/run/redis/redis.sock
    unixsocketperm 775
  3. Run the following script to install and initialize the database.

    sudo /var/lib/ol-automation-manager/ol-automation-manager-DB-init.sh
  4. Switch to the awx user and shell.

    sudo su -l awx -s /bin/bash
  5. Create the Oracle Linux Automation Manager schema and admin user account.

    awx-manage migrate
    awx-manage createsuperuser --username admin --email <email>

    Note: In the previous example, <email> is the email address of the admin user.

  6. Enter and confirm the password for the admin user.

  7. Run these commands to load the initial data set and provision an instance.

    awx-manage create_preload_data
    awx-manage provision_instance --hostname=<hostname or ip address>
    awx-manage register_queue --queuename=tower --hostnames=<hostname or ip address>

    Note: In the previous example, <hostname or ip address> is the hostname or IP address of the system running Oracle Linux Automation Manager . If hostname is used, the host must be resolvable.

  8. Exit the awx users shell.

    exit
  9. Generate a SSL certificate for NGINX.

    sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
    -keyout /etc/tower/tower.key -out /etc/tower/tower.crt

    Enter the requested information or just hit the ENTER key.

  10. Edit the /etc/nginx/nginx.conf file and replace default configuration with the following text.

    user nginx;
    worker_processes auto;
    error_log /var/log/nginx/error.log;
    pid /run/nginx.pid;
    
    # Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
    include /usr/share/nginx/modules/*.conf;
    
    events {
     worker_connections 1024;
    }
    
    http {
     log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                       '$status $body_bytes_sent "$http_referer" '
                       '"$http_user_agent" "$http_x_forwarded_for"';
    
     access_log  /var/log/nginx/access.log  main;
    
     sendfile            on;
     tcp_nopush          on;
     tcp_nodelay         on;
     keepalive_timeout   65;
     types_hash_max_size 2048;
    
     include             /etc/nginx/mime.types;
     default_type        application/octet-stream;
    
     # Load modular configuration files from the /etc/nginx/conf.d directory.
     # See http://nginx.org/en/docs/ngx_core_module.html#include
     # for more information.
     include /etc/nginx/conf.d/*.conf;
    }
  11. Edit the /etc/tower/settings.py file and set the CLUSTER_HOST_ID parameter.

    CLUSTER_HOST_ID = "<hostname or ip address>"

    Note: In the previous example, <hostname or ip address> is the hostname or IP address of the system running Oracle Linux Automation Manager . If hostname is used, the host must be resolvable.

  12. Start the service.

    sudo systemctl enable --now ol-automation-manager.service
  13. Right-click the Virtual Desktop and select Open Terminal Here.

  14. Configure an SSH tunnel.

    ssh -L 8444:localhost:443 opc@<hostname or ip address>

    Note: In the previous example, <hostname or ip address> is the hostname or IP address of the system running Oracle Linux Automation Manager . If hostname is used, the host must be resolvable.

  15. Open a web browser and enter the URL.

    https://localhost:8444

    Note: Approve the security warning based on the browser used. For Chrome, click the Advanced button and then the Proceed to localhost (unsafe) link.

  16. Login to Oracle Linux Automation Manager with the USERNAME admin and the password created during setup.

For More Information

See the documentation in https://docs.oracle.com/en/operating-systems/oracle-linux/8/oracle-linux-automation-manager/ .

SSR