Installing Semaphore Web UI for Ansible on Ubuntu 22.04 LTS

Introduction

Semaphore provides a user interface (UI) for setting up and managing CI/CD pipelines. It allows users to define workflows, configure build and deployment steps, and automate the testing and delivery of software. Semaphore is not directly related to Ansible, but you can integrate Ansible into your CI/CD pipeline on Semaphore to automate tasks like deployment, configuration, and provisioning.

Prerequisites

  • Up and running ubuntu 22.04 LTS machine.
  • Basic knowledge in linux commands.
  • Internet connectivity.

In this post, We are going to install and setup Semaphore Web UI for Ansible on Ubuntu 22.04 LTS.

Step 1: Run System Updates

We need to execute the following command in order t update in the ubuntu current repository.

sudo apt-get update

Step 2: Installing MariaDB Server

To install MariaDB on Ubuntu, you can use the following steps:

To install MariaDB server.

sudo apt-get install mariadb-server -y

To validate the service of mariadb service.

sudo systemctl status mariadb.service

Secure MariaDB and set root password.

sudo mysql_secure_installation

This command will prompt you to answer a series of questions to improve the security of your MariaDB installation, such as setting the root password, removing anonymous users, disallowing remote root login, and removing the test database.

After completing these steps, MariaDB should be installed and running on your Ubuntu 22.04 LTS system. You can then use the mysql command to interact with the MariaDB server:

mysql -u root -p

Step 3: Creating Database, User for Semaphore

To create database for Semaphore.

CREATE DATABASE `semaphore`;

To create and password.

CREATE USER 'semaphore' IDENTIFIED BY 'CHANGE-PASSWORD';

To Grant usages.

GRANT USAGE ON *.* TO 'semaphore'@localhost IDENTIFIED BY 'CHANGE-PASSWORD';

To grant all privileges.

GRANT ALL privileges ON `semaphore`.* TO 'semaphore'@localhost;

To flush privileges.

FLUSH PRIVILEGES;

Note: We need to change username, password and database name in real environment.

Step 4: Installing Semaphore Web UI

We need to download and install .db package by using given commands.

wget https://github.com/ansible-semaphore/semaphore/releases/\
download/v2.8.75/semaphore_2.8.75_linux_amd64.deb

To install the downloaded packages.

sudo dpkg -i semaphore_2.8.75_linux_amd64.deb

Setup Semaphore by using the following command:

semaphore setup

Now you can run Semaphore:

semaphore service --config=./config.json

Step 5: Accessing Semaphore Web UI

by default Semaphore start running on port 3000, So we need to disable or open the port 3000 in your machine and network firewall.

http://localhost:3000/ or http://Your-IP-Address:3000

Conclusion

We have done successfully installation of Semaphore web UI on ubuntu 22.04 LTS machine, Still you are having any issue, So please leave a comment below.

Author

Installing Semaphore Web UI for Ansible on Ubuntu 22.04 LTS

10 thoughts on “Installing Semaphore Web UI for Ansible on Ubuntu 22.04 LTS

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top