Skip to content

Latest commit

 

History

History
100 lines (81 loc) · 3.1 KB

README.md

File metadata and controls

100 lines (81 loc) · 3.1 KB

Diglett

A cron management system that manage all your cronjobs over multiple servers without modifying crontab. Handles locking, logging, and more.

screen shot 2016-06-15 at 10 38 34 pm

You can choose any project you have and see all crons with time of execution and last status of every cron. In addition to manage these crons via UI.

screen shot 2016-06-17 at 6 58 50 pm

You can broadcast your task to all your servers.

screen shot 2016-06-15 at 10 39 21 pm

Read More

On Opensooq Engineering Blog : http://engineering.opensooq.com/manage-cronjobs-over-multiple-servers/

Alerting

Diglett uses two methods of alerting for now, Email and Push Notifications.

Emails

Mainly depends on mail-utlis on linux system, therefore it should be installed on your Diglett Server.

Push Notification

For now, Diglett is using only one push notification backend called SimplePush. To use it, you should install the application on your Android and insert the key in config.ini file.

Also, you can disable the push notification feature from the same file.

What's New


Diglett now has a systemD service that monitor active hosts and change them in case of faliures.

Installation

This guide is orianted to CentOS/Fedora Systems.

  • Install Nginx as a webserver and Mongodb as DB.
$ sudo yum update -y
$ sudo yum install -y nginx git mongodb-server mongodb
  • Clone diglett
$ git clone https://github.com/OpenSooq/Diglett.git ~/diglett
  • Copy systemd service file and nginx configuration file.
$ sudo cp ~/diglett/examples/diglett@.service /etc/systemd/system/
$ sudo cp ~/diglett/examples/nginx.conf /etc/nginx/conf.d/diglett.conf
  • Install required packages
$ cat ~/diglett/requirements.txt | grep -v ^# | xargs sudo dnf install -y
$ sudo yum install python-pip && sudo pip install pymongo==3.0.0
$ vim ~/diglett/uwsgi.ini and change the following :
...
uid = username
gid = username
...
$ sudo vim /etc/systemd/system/diglett@.service
...
User= username
Group= username
...
  • Change the admin user to a user that has root/sudo access to all servers.
$ vim  ~/diglett/config.ini
...
[manager]
admin= username
manager_url= http://PROJECT_IP
...
  • Initialize the database
$ mongo diglett < examples/initialize_db.js
  • Start and enable services :
$ sudo systemctl enable nginx && sudo systemctl start nginx
$ sudo systemctl enable mongod && sudo systemctl start mongod
$ sudo systemctl start diglett@3030
  • Start the Diglett-WatchDog service
$ sudo cp ~/diglett/examples/diglett-watchdog.service /etc/systemd/system/
$ systemctl enable diglett-watchdog.service 
$ systemctl start diglett-watchdog.service