I wrote a little ago about how to install Ansible Semaphore as a docker. It’s been raining a lot since them, and now it’s time to finish what I started and install it for real. It’s not so complicated. Unfortunately the result didn’t deliver. Below you have my installation log and my setup, together with a relevant output.
## > wget https://github.com/ansible-semaphore/semaphore/releases/\
> download/v2.8.75/semaphore_2.8.75_linux_amd64.rpm
--DATE-- https://github.com//semaphore_2.8.75_linux_amd64.rpm
Resolving github.com (github.com)... 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://XXX
Saving to: - semaphore_2.8.75_linux_amd64.rpm
100%[==========================>] 11,696,811 34.3MB/s in 0.3s
DATE (34.3 MB/s) - semaphore_2.8.75_linux_amd64.rpm
saved [11696811/11696811]
## > yum install semaphore_2.8.75_linux_amd64.rpm
Loaded plugins: fastestmirror, langpacks, nvidia
Examining semaphore_2.8.75_linux_amd64.rpm:
semaphore-2.8.75-1.x86_64
Marking semaphore_2.8.75_linux_amd64.rpm
to be installed
Resolving Dependencies
--> Running transaction check
---> Package semaphore.x86_64 0:2.8.75-1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
============================
Package Arch Version Repository Size
============================
Installing:
semaphore x86_64 2.8.75-1 semaphore_2.8.75_linux_amd64 31 M
Transaction Summary
================================
Install 1 Package
Total size: 31 M
Installed:
semaphore.x86_64 0:2.8.75-1
Complete!
## > semaphore setup
Hello! You will now be guided through a setup to:
1. Set up configuration for a MySQL/MariaDB database
2. Set up a path for your playbooks (auto-created)
3. Run database Migrations
4. Set up initial semaphore user & password
What database to use:
1 - MySQL
2 - BoltDB
3 - PostgreSQL
(default 1):
db Hostname (default 127.0.0.1:3306):
db User (default root):
db Password: MYPASSWORD
db Name (default semaphore):
Playbook path (default /tmp/semaphore):
Web root URL (optional, see Web-root-URL):
Enable email alerts? (yes/no) (default no): yes
Mail server host (default localhost):
Mail server port (default 25):
Mail sender address (default semaphore@localhost): XXX
Enable telegram alerts? (yes/no) (default no):
Enable slack alerts? (yes/no) (default no):
Enable LDAP authentication? (yes/no) (default no):
Config output directory (default /root/Downloads):
Running: mkdir -p /XXX/semaphore..
Configuration written to /XXX/semaphore/config.json..
Pinging db..
Running db Migrations..
Executing migration v0.0.0 (at DATE)...
Creating migrations table
[12/0]8]
Executing migration v1.0.0 (at DATE)...
[4/87]
... some other migrations...
Executing migration v2.8.58 (at DATE)...
[1/57]
Migrations Finished
> Username: root
> Email: my.email@domain.org
WARN[0075] no rows in result set level=Warn
> Your name: MYNAME
> Password: MYPASSWORD
You are all setup Juan!
Re-launch this program pointing to the configuration file
./semaphore server --config /XXX/semaphore/config.json
To run as daemon:
nohup ./semaphore server \
--config /XXX/semaphore/config.json &
You can login with my.email@domain.org or root.
Now let’s run it.
## > semaphore server --config /XXX/semaphore/config.json
MySQL root@127.0.0.1:3306 semaphore
Tmp Path (projects home) /XXX/ansible/semaphore
Semaphore v2.8.75
Interface
Port :3000
Server is running
WARN[0037] write IP:3000->IP:41248: write: broken pipe level=Warn
INFO[322969] Task 1 added to queue
INFO[322970] Set resource locker with TaskRunner 1
INFO[322970] Stopped preparing TaskRunner 1
INFO[322970] Release resource locker with TaskRunner 1
INFO[322975] Task 1 removed from queue
The INFO entries are produced after running my first task successfully. It takes a little to configure it (you need to write an inventory, an environment, choose a key and define your repositories). Everything is fine from now on. Unfortunately it’s relying on repositories and quite complex playbooks, so it’s not going to be my choice. I want something that even a monkey with a keyboard can use. I’ll keep you informed of the results of my search 🙂