Complete Multi-server Management Framework

General Stuff about Armagetron, That doesn't belong anywhere else...
Post Reply
User avatar
fman23
On Lightcycle Grid
Posts: 36
Joined: Thu Sep 08, 2011 1:54 am
Location: Yes
Contact:

Complete Multi-server Management Framework

Post by fman23 »

Today, I am releasing my server management framework under the MIT License for everyone to benefit from it!

What is this?

This is a complete package that will manage multiple server daemons, provide an easy to use web interface, and provide a python based scripting API. It is designed for unix-like systems so it can easily work on Mac OS, Linux, or FreeBSD. It might work on Windows too assuming you have all of the dependencies for each module you want to use. It is modular so you do not have to use all three parts (although the web interface requires the daemon manager).

The Daemon Manager

The base of this project is the multi-server daemon manager. I designed it out of frustration with the inability to run multiple servers reliably and easily. This remedies that and manages the separate processes almost flawlessly.

Features:
  • - Restarts a server if it crashes
    - Saving a log, error log, and script error log
    - PID file locking
    - Will remove lock file if the process no longer exists (useful in case of system power failure)
    - Kill unresponsive server/script
    - Full support for scripting
    - Clears error log on startup
The Web Interface

The web interface was prompted by LOVER$BOY, but at first, I only gave him a very simplistic interface with only a start/stop buttons and a command box. No log, no settings, and no status. I decided to make a better version and attach it to my daemon management tool.

Features:
  • - User management
    - Start/Stop/Restart/Reload buttons
    - Command box to send commands to the server
    - Reversed log that updates every half second
    - Log supports fancy characters
    - Changing settings_custom.cfg
    - Changing script.py (with a documented scripting API)
    - Script error log
    - Full syntax highlighting for the settings and script
Not going to fix (unless someone pays me to):
  • - Support for IE versions below IE9
    - Making the editor highlight color coded portions with their color
The Scripting API

The scripting API was designed because, again, I was frustrated with the difficulty and flakiness of tailing ladderlog into a PHP script and tailing the output into the Armagetron program. This remedies that by providing a nice easy to use interface to the ladderlog and chat commands in an easy to use language. It is documented at http://arma.fkmclane.tk/api.html.

Features:
  • - Support for adding multiple callbacks to a single ladderlog command
    - Support for special characters
    - Support for chat command handlers
    - Keeps track of and provides a nice interface to:
    • - Current round
      - The number of players
      - All of the players and their name, IP address and score and whether they are alive or dead
      - All of the teams and their name, score, players, and player positions
      - All of the zones and various features about them
Dependencies:

Daemon Manager:
  • sh (bash, dash, or anything compatible with the bourne shell)
    coreutils (GNU coreutils, busybox, etc.)
    daemonize
Web Interface:
  • Daemon Manager (above)
    PHP
Scripting API:
  • Python
I found a bug! I found a bug!

Could you please report it on GitHub?

Where can I get this?

You can see a live demo at http://arma.fkmclane.tk/. It shows off the web interface and the simplicity of the scripting API with a simple script to reset the settings when everyone leaves. Simply login with these credentials:
  • Username: demo
    Password: demo
You can get the entire framework at https://github.com/fkmclane/ArmaAdmin. Instructions to install it are at the bottom of the page. All it requires (to ensure init safety and versatility) is for you to set the directory where the framework resides and possibly the directories for individual parts if they are different than the default. To use the web interface, you must also configure the MySQL/MariaDB and directory settings in config.php.

Note: The scripting API and daemon manager can be used independently of each other, but the web interface depends on the daemon manager to work. The web interface is also geared toward using the scripting API, but can be easily changed to support (and highlight!) any generic script.

Note: Despite what GitHub thinks, this project is NOT a majority of JavaScript. That number comes from the codemirror syntax highlighting that is packaged with it.

Can I sell servers with this?

Sure, it is under the MIT license after all. You can make changes to the code, redistribute it, rebrand it, and do whatever you want, you just need to keep my copyright notice. I don't care if you sell your own servers with this. Odds are you have better computers than the single one I am hosting with.

I can't host my own server, but I like the interface. Can you host a server for me?

Yes, I will soon be selling servers with access to this web interface for probably just $2-3 a month. It won't be top of the line hosting, but a few extra dollars a month would be nice and these servers would fund further development of this framework. I could easily host probably 20 servers without any noticeable lag, but I will not accept more than that at first. If there is enough demand, I will probably use the money I make from this to buy another server dedicated to Armagetron. This server would probably have 2GB of RAM and host up to 50 servers (Servers usually take anywhere from 5-20MB).
User avatar
compguygene
Adjust Outside Corner Grinder
Posts: 2346
Joined: Thu Aug 21, 2008 12:09 pm
Location: Cleveland, Ohio
Contact:

Re: Complete Multi-server Management Framework

Post by compguygene »

Thank you, Thank you, THANK YOU! For 4 years now I have been waiting for somebody to do this. I have encouraged others to do it, but nobody has. I will be setting this up on my servers, which will make it easier to do stuff, and easier for Phytotron to innovate the servers that I host for him. This will allow me to let my fellow clan members (I am back in Ww) to innovate and create new stuff.
And for so many other people that host servers, and want to resell them (I don't) perhaps some new and more creative servers can be setup.
Armagetron: It's a video game that people should just play and enjoy :)
https://bit.ly/2KBGYjvCheck out the simple site about TheServerPharm
User avatar
fman23
On Lightcycle Grid
Posts: 36
Joined: Thu Sep 08, 2011 1:54 am
Location: Yes
Contact:

Re: Complete Multi-server Management Framework

Post by fman23 »

By the way, I forgot to mention that I made a much nicer authentication script at https://github.com/fkmclane/ArmaAuth. It is far simpler than the one on the Armagetron launchpad. It only supports MD5 authentication, but (as far as I know), no one was using anything different anyway and it allows for a lot of simplification. It fits nicely in with forum software because it has a configurable username and password column. The script also supports rankings with the user@example.com/rank format and integrates with most forums' user role/ranking attribute by a configurable rank column and value -> rank conversion.
User avatar
/dev/null
Shutout Match Winner
Posts: 819
Joined: Sat Sep 04, 2004 6:28 pm
Location: Chicago-ish

Re: Complete Multi-server Management Framework

Post by /dev/null »

Nice work, gentoo used to have some nice init scripts for tron, but the package became unmaintained due to some longstanding security issue in tron causing it to get dropped from portage. Ive been maintaining my own ebuild for it ever since. The management interface is interesting, likely beats how I do it now. I might give this a shot.
User avatar
AI-team
Shutout Match Winner
Posts: 1020
Joined: Tue Jun 23, 2009 6:17 pm
Location: Germany/Munich
Contact:

Re: Complete Multi-server Management Framework

Post by AI-team »

I've always wanted to do this, but could never motivate myself. I'm glad someone finally did it, Fantastic job :)
  
 
"95% of people believe in every quote you post on the internet" ~ Abraham Lincoln
 
 
Post Reply