3 Installing Oracle Linux Automation Manager

This chapter discusses how to prepare a new host to be used in an Oracle Linux Automation Manager deployment. When a host is prepared, it must be installed with the Oracle Linux Automation Manager software packages.

This chapter shows you how to set up a host and install the Oracle Linux Automation Manager software.

Installing Oracle Linux Automation Manager

This section discusses installing the Oracle Linux Automation Manager.

To set up the host:

  1. Install the ol_automation to install Oracle Linux Automation Manager.

    sudo dnf install ol-automation-manager

    Note:

    The following error messages can be safely ignored as they do not indicate any failures:

    ValueError: File context for /var/run/tower(/.*)? already defined
    [/usr/lib/tmpfiles.d/*.conf:1] Line references path below legacy directory
  2. Edit the /etc/redis.conf file to include the following lines:

    unixsocket /var/run/redis/redis.sock 
    unixsocketperm 775
  3. Run the following script to start and set up the database:

    sudo /var/lib/ol-automation-manager/ol-automation-manager-DB-init.sh
  4. Prepare an Oracle Linux Automation Manager deployment as the awx user. Do the following:

    1. Run the following commands:

      sudo su -l awx -s /bin/bash
      awx-manage migrate
      awx-manage createsuperuser --username admin --email email

      In the previous example, email is the email address of the admin user.

    2. Enter and repeat the password for the admin user.

      Password: 
      Password (again):
    3. Run the following command:

      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
      awx-manage setup_managed_credential_types

      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.

    4. Exit the awx shell environment.
      exit
  5. Generate SSL certificates for NGINX:

    Note:

    The following instruction explains how to create a self-signed certificate for use by NGINX as part of Oracle Linux Automation Manager. It is recommended that on production systems you use CA signed certificates for this purpose. For more information on working with SSL certificates, see Oracle Linux: Managing Certificates and Public Key Infrastructure.

    sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/tower/tower.key -out /etc/tower/tower.crt
  6. Remove any default configuration for NGINX. Edit /etc/nginx/nginx.conf to contain the following configuration::

    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;
    }

    Note:

    For advanced NGINX users, the Oracle Linux Automation Manager NGINX configuration file is located in /etc/nginx/conf.d/ol-automation-manager-nginx.conf. If you have an existing customized NGINX setup, ensure that you also apply the ol-automation-manager-nginx.conf settings.

  7. Edit the /etc/tower/settings.py file and set the CLUSTER_HOST_ID parameter as follows:

    CLUSTER_HOST_ID = "hostname or ip address"
  8. Start the service:

    sudo systemctl enable --now ol-automation-manager.service

Installing Oracle Linux Automation Manager CLI

You can install the Oracle Linux Automation Manager CLI on the same machine you installed the Oracle Linux Automation Manager server or on another Oracle Linux 8 machine. For information about installing the Oracle Linux Automation Manager CLI, see Oracle Linux Automation Manager 1.0: CLI and API Reference Guide.