Benutzer-Werkzeuge

Webseiten-Werkzeuge


linux:oracle_linux_8_ansible_tower

Oracle Linux Automation Manager OLAM (aka “Oracle Ansible Tower”) unter Oracle Linux 8

Für die Verwaltung von Ansible steht als Open-Source Projekt Ansible AWX ( https://github.com/ansible/awx ) zur Verfügung , die gleiche Applikation mit Support von Red Hat als Ansible Tower (https://www.ansible.com/) und seit kurzen (September 2021) für Oracle Linux 8 als Oracle Linux Automation Manager zur Verfügung.

Nach dem Installation von Ansible (Oracle Linux Automation Engine ) ⇒ Ein Oracle Linux 8 Basis System für Ansible verwenden - eine Oracle Umgebung mit Ansible warten wird die Ansible Verwaltungsoberfläche Oracle Linux Automation Manager ( wie „RedHat Tower“ bzw. AWX) installiert.

Der Oracle Linux Automation Manager 1.0 basiert auf der Open-Source Software AWX version 15.0.1, siehe ⇒ https://github.com/ansible/awx/tree/15.0.1.

Die Oracle Linux Automation Engine (das eigentliche Ansible) basiert auf der Ansible Version 2.9.21 ⇒ https://github.com/ansible/ansible/tree/v2.9.21.


Das Repository hinterlegen

Repository installieren:

#ol8_automation nach installieren mit :
 
 
dnf config-manager --add-repo http://yum.oracle.com/repo/OracleLinux/OL8/automation/x86_64
 
#alternativ
dnf install oraclelinux-automation-manager-release-el8
 
 
#Repos Anzeigen lassen
 
dnf repolist
 
 
repo id                       repo name
ol8_UEKR6                     Latest Unbreakable Enterprise Kernel Release 6 for Oracle Linux 8 (x86_64)
ol8_appstream                 Oracle Linux 8 Application Stream (x86_64)
ol8_automation                Oracle Linux Automation Manager 1.0 based on the open source projects Ansible and AWX (x86_64)
ol8_baseos_latest             Oracle Linux 8 BaseOS Latest (x86_64)
ol8_developer_EPEL            Oracle Linux 8 EPEL Packages for Development (x86_64)

Auf den letzten Stand das System updaten:

dnf update

Vorbereitungen

Falls FW im Einsatz:

firewall-cmd –add-service=http –permanent firewall-cmd –add-service=https –permanent

Installieren

Suchen:

dnf search automation-manager
 
 
Last metadata expiration check: 0:22:51 ago on Wed 27 Oct 2021 16:30:51 CEST.
================================================== Name Matched: automation-manager ===================================================
ol-automation-manager.src : Oracle Linux Automation Manager, based on AWX, provides a web-based user interface, REST API, and task
                          : engine built on top of Ansible.
ol-automation-manager.x86_64 : Oracle Linux Automation Manager, based on AWX, provides a web-based user interface, REST API, and task
                             : engine built on top of Ansible.
oraclelinux-automation-manager-release-el8.x86_64 : Oracle Linux Automation Manager yum repository configuration
oraclelinux-automation-manager-release-el8.src : Oracle Linux Automation Manager yum repository configuration

Automation Manager installieren:

dnf install ol-automation-manager

Umgebung konfigurieren

Redis Konfigurieren:

vi /etc/redis.conf
 
#Oracle Automation Manager
unixsocket /var/run/redis/redis.sock
unixsocketperm 775

Autostart einrichten:

/var/lib/ol-automation-manager/ol-automation-manager-DB-init.sh

Oracle Linux Automation Manager deployment als AWX User einrichten:

su -l awx -s /bin/bash
 
awx-manage migrate
 
awx-manage createsuperuser --username admin --email info@pipperr.local
#Password eingeben!

Den Host zu AWX hinzufügen:

awx-manage create_preload_data 
awx-manage provision_instance --hostname=10.10.10.82
awx-manage register_queue --queuename=tower --hostnames=10.10.10.82
 
exit

Zertifkat erstellen:

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

In NGINX hinterlegen, dazu /etc/nginx/nginx.conf mit folgenden Inhalt überschreiben:

vi /etc/nginx/nginx.conf
 
 
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;
}

/etc/tower/settings.py anpassen mit der Namen des Servers:

vi /etc/tower/settings.py 
 
..
CLUSTER_HOST_ID = "10.10.10.82"
..

Dienst aktivieren

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

Problem: <fc #800000>*nginx: [emerg] bind() to [::1]:80 failed (99: Cannot assign requested address)*</fc>

Meine Maschine unterstützt kein ipV6 daher dies deaktvieren:

cd /etc/nginx/conf.d
 
vi ol-automation-manager-nginx.conf
 
server {
    listen 443 default_server ssl;
    listen 127.0.0.1:80 default_server;
#    listen [::]:443 default_server ssl;
#    listen [::1]:80 default_server;

Aufruf mit https://10.10.10.82/#/home


Nächste Schritte

Job Parameter einstellen

Damit Playbooks auch vom den Ausgaben in der richtigen Zeitzone laufen (Default ist immer UTC) diese für den Job setzen ⇒ https://access.redhat.com/solutions/4124131

Unter Settings/Job/

EXTRA ENVIRONMENT Variables:

{
"TZ": "Europe/Berlin"
}


awx cli Setup

siehe aus ⇒ Mit der Ansible Tower CLI das Tower Inventory pflegen

Da für Oracle Linux nicht direkt verfügbar:

# als der user des es später verwenden will:
 
pip3 install --user https://releases.ansible.com/ansible-tower/cli/ansible-tower-cli-latest.tar.gz

Wo landet das awx am ende? Im Home Verzeichnis!

/root/.local/bin/awx

Hmm, auch nicht ideal…

Alternativ für alle installieren

pip3 install https://releases.ansible.com/ansible-tower/cli/ansible-tower-cli-latest.tar.gz

dann liegt es unter/usr/local/bin/awx



Quellen

Diese Website verwendet Cookies. Durch die Nutzung der Website stimmen Sie dem Speichern von Cookies auf Ihrem Computer zu. Außerdem bestätigen Sie, dass Sie unsere Datenschutzbestimmungen gelesen und verstanden haben. Wenn Sie nicht einverstanden sind, verlassen Sie die Website.Weitere Information
"Autor: Gunther Pipperr"
linux/oracle_linux_8_ansible_tower.txt · Zuletzt geändert: 2021/10/29 09:59 von gpipperr