filmov
tv
Install Ansible Semaphore in AlmaLinux 9 (UI for Ansible - Open Source Ansible Tower Alternative)

Показать описание
In this video, we will install Ansible Semaphore Web UI on Alma Linux 9.
Semaphore is an open source web-based solution that makes Ansible easy to use for IT teams of all kinds. It gives you a Web interface from where you can launch and manage Ansible Tasks.
PLEASE SUBSCRIBE :)
PLEASE HIT LIKE IF IT HELPED :)
Semaphore depends on database like MariaDB or PostgreSQL
It also required git and, of course, Ansible to be installed on the server.
LINKS:
Steps:
sudo dnf -y update
sudo reboot
MariaDB
sudo bash mariadb_repo_setup
sudo dnf -y install MariaDB-server MariaDB-client MariaDB-backup
sudo systemctl enable --now mariadb
systemctl status mariadb
sudo mariadb-secure-installation
mysql -u root -p
CREATE DATABASE semaphore;
GRANT ALL PRIVILEGES ON semaphore.* TO 'semaphore'@'localhost' IDENTIFIED BY 'Password123!';
exit
Git
sudo dnf -y install git
git --version
Semaphore
sudo dnf -y install wget
sudo useradd -m -d /opt/semaphore semaphore
sudo su - semaphore
semaphore setup
[Unit]
Description=Semaphore Ansible
[Service]
Type=simple
User=semaphore
Group=semaphore
ExecReload=/bin/kill -HUP $MAINPID
SyslogIdentifier=semaphore
Restart=always
[Install]
sudo mkdir /etc/semaphore
sudo chown -R semaphore:semaphore /etc/semaphore
sudo systemctl daemon-reload
sudo systemctl enable --now semaphore
sudo systemctl status semaphore
sudo ss -tunelp | grep 3000
Nginx
[nginx]
name=Nginx Repo
gpgcheck=0
enabled=1
sudo dnf -y install nginx
sudo systemctl enable --now nginx
sudo systemctl status nginx
sudo mkdir /etc/nginx/ssl
cd /etc/nginx/ssl
[req]
default_bits = 2048
prompt = no
distinguished_name = dn
req_extensions = req_ext
x509_extensions = v3_ca
[ dn ]
C = PH
ST = NCR
L = Manila
O = localhost
OU = Development
CN = localhost
[req_ext]
subjectAltName = @alt_names
[v3_ca]
subjectAltName = @alt_names
[alt_names]
DNS.1 = localhost
DNS.2 = 127.0.0.1
upstream semaphore {
server 127.0.0.1:3000;
}
server {
listen 443 ssl http2;
server_name _;
# add Strict-Transport-Security to prevent man in the middle attacks
add_header Strict-Transport-Security "max-age=31536000" always;
# SSL
# Recommendations from
ssl_protocols TLSv1.1 TLSv1.2;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
# required to avoid HTTP 411: see Issue # 1486
chunked_transfer_encoding on;
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
proxy_request_buffering off;
}
location /api/ws {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Origin "";
}
}
sudo nginx -t
sudo systemctl restart nginx
Firewall
sudo firewall-cmd --permanent --add-port=443/tcp
SELinux
sudo setsebool -P httpd_can_network_connect 1
Chapters:
00:00 Intro
00:42 Install MariaDB
01:28 Secure MariaDB
02:09 Database Setup
02:26 Install Git
02:42 Install Semaphore
02:59 Semaphore Setup
05:09 Nginx Reverse Proxy Install and Setup
06:50 Firewall
07:03 SELinux
07:35 Outro
Semaphore is an open source web-based solution that makes Ansible easy to use for IT teams of all kinds. It gives you a Web interface from where you can launch and manage Ansible Tasks.
PLEASE SUBSCRIBE :)
PLEASE HIT LIKE IF IT HELPED :)
Semaphore depends on database like MariaDB or PostgreSQL
It also required git and, of course, Ansible to be installed on the server.
LINKS:
Steps:
sudo dnf -y update
sudo reboot
MariaDB
sudo bash mariadb_repo_setup
sudo dnf -y install MariaDB-server MariaDB-client MariaDB-backup
sudo systemctl enable --now mariadb
systemctl status mariadb
sudo mariadb-secure-installation
mysql -u root -p
CREATE DATABASE semaphore;
GRANT ALL PRIVILEGES ON semaphore.* TO 'semaphore'@'localhost' IDENTIFIED BY 'Password123!';
exit
Git
sudo dnf -y install git
git --version
Semaphore
sudo dnf -y install wget
sudo useradd -m -d /opt/semaphore semaphore
sudo su - semaphore
semaphore setup
[Unit]
Description=Semaphore Ansible
[Service]
Type=simple
User=semaphore
Group=semaphore
ExecReload=/bin/kill -HUP $MAINPID
SyslogIdentifier=semaphore
Restart=always
[Install]
sudo mkdir /etc/semaphore
sudo chown -R semaphore:semaphore /etc/semaphore
sudo systemctl daemon-reload
sudo systemctl enable --now semaphore
sudo systemctl status semaphore
sudo ss -tunelp | grep 3000
Nginx
[nginx]
name=Nginx Repo
gpgcheck=0
enabled=1
sudo dnf -y install nginx
sudo systemctl enable --now nginx
sudo systemctl status nginx
sudo mkdir /etc/nginx/ssl
cd /etc/nginx/ssl
[req]
default_bits = 2048
prompt = no
distinguished_name = dn
req_extensions = req_ext
x509_extensions = v3_ca
[ dn ]
C = PH
ST = NCR
L = Manila
O = localhost
OU = Development
CN = localhost
[req_ext]
subjectAltName = @alt_names
[v3_ca]
subjectAltName = @alt_names
[alt_names]
DNS.1 = localhost
DNS.2 = 127.0.0.1
upstream semaphore {
server 127.0.0.1:3000;
}
server {
listen 443 ssl http2;
server_name _;
# add Strict-Transport-Security to prevent man in the middle attacks
add_header Strict-Transport-Security "max-age=31536000" always;
# SSL
# Recommendations from
ssl_protocols TLSv1.1 TLSv1.2;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
# required to avoid HTTP 411: see Issue # 1486
chunked_transfer_encoding on;
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
proxy_request_buffering off;
}
location /api/ws {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Origin "";
}
}
sudo nginx -t
sudo systemctl restart nginx
Firewall
sudo firewall-cmd --permanent --add-port=443/tcp
SELinux
sudo setsebool -P httpd_can_network_connect 1
Chapters:
00:00 Intro
00:42 Install MariaDB
01:28 Secure MariaDB
02:09 Database Setup
02:26 Install Git
02:42 Install Semaphore
02:59 Semaphore Setup
05:09 Nginx Reverse Proxy Install and Setup
06:50 Firewall
07:03 SELinux
07:35 Outro
Комментарии