Mocker - Complete TinyMUX setup with Docker
For a lot of people setting up the basic infrastructure for a new game can be difficult. Downloading the tools appropriate to the operating system to compile a copy of the game server and then compiling it can be a chore. Many games today have an accompanying wiki which then requires additional setup (unless the administrator chooses to use a hosted wiki solution).
The hope is to streamline this process through the use of Docker containers with precompiled images. The name Mocker is a portmanteau of Mux and Docker. A basic installation of Mocker should take only a few minutes and will produce a tinyMux 2.10 server, an apache2 server with mediawiki installed, and a mySQL server to support both of these.
At present the installation will produce a very minimal setup. The tinyMux game has Sandbox Globals installed but nothing else. The wiki is setup with only a single user and no pages. However, it is hoped that if the core project proves the proof of concept that future Mocker releases will include game with fully installed character generation systems and wikis preloaded with templates for things such as character pages, house rules, and logs.
Mocker can be downloaded here. At present it is probably not the most highly secured setup and instructions are very minimal. The whole reason for throwing it out there is so that people can go ahead and download it, find the gaping flaws in security, and complain about how the documentation doesn't provide enough information. That way the gaping flaws can be patched, the documentation can be updated to include the information people need, and more advanced datasets can be implemented. (I'm experimenting at present with building a codebase for Eclipse Phase with most character data being stored in SQL instead of on the character object under a Mocker setup).
Ultimately the goal is to create a sort of 'pop-up' design that will allow people to get a good solid game framework setup in just a few minutes. They may still need to build out their grid and set up staff bits and rules pages but a lot of the technical hurdles will hopefully be overcome allowing people to focus more on the creative issues that need to be addressed.
Feedback is not simply encouraged but desperately needed. It is all too easy to code in a bubble and think that what you're doing is going to cure cancer, bring peace to the Middle East, and cause the final season of Lost make sense, only to find out that what you've done is create the perfect tool for your own tiny edge case and nearly everything you've done will be useless to everyone else. I fully intend to document how I have created the Docker images and what is going on with them so that the project will outlive me, assuming there is interest, and people will be able to create their own quick deploy setups.
faraday last edited by
I fully intend to document how I have created the Docker images and what is going on with them so that the project will outlive me, assuming there is interest, and people will be able to create their own quick deploy setups.
This is awesome. I want to do a docker image for Ares but I don't really know much about it. I definitely would be interested in how you set this thing up.
Griatch last edited by
Always nice with more install options! I would suggest putting up your Dockerfile in a github repo somewhere if you want feedback on it.
Docker images can be very nice for production deployment. I've however found that the whole concept of a docker image can feel so alien for people that it doesn't help newbies very much. Our official Evennia image is mostly appreciated by those who already know that they want a docker image (and those people could install normally without a problem).
I'm sure it depends a bit on the layout of the application you are dockerizing of course. In the case of MUSH it might be a better fit since all development happens in softode so once the 'hardcode' runs you don't need to bother with it much.
@faraday It turns out not to be too terribly difficult, at least at the level I'm working at right now. There's certainly more advanced Docker stuff that will probably result in images that are more secure and which do things 'properly' but for now what I'm doing seems to work.
What I did was I created a Docker instance for Ubuntu (I actually tried some more minimal setups at first but went back to Ubuntu because of some of the tools I wanted). Once you spin that up you can log into it using a command similar to docker exec -i -t mocker_game_1 /bin/bash (mocker_game_1 is the name of the Docker instance I'm running and /bin/bash gives me a shell inside of it).
From there I basically figured out all the steps that I would have to run to setup a new tinyMux server (downloading build tools, configuring, compiling, etc.). You then create a Dockerfile (not to be confused with docker-compose.yml) that repeats those instructions. You run a new command along the lines of docker build -ttinymux:2.10-U ~/Docker/mocker/release/ which tells Docker to build a new image called tinymux:2.10-U using the Dockerfile found in ~/Docker/mocker/release/.
That's sort of the 'elevator pitch' version of it, anyway. It does get a little tricky since the commands in the file can't pause for input and you need to work in stuff so that when you run things for the very first time data gets moved around so it is accessible from outside docker (for persistence and so you can back it up) but if you're already capable of compiling a game on a new machine you can probably handle those extra issues.
Like I said, I will provide more complete details about everything I was doing so that you can build your own Arcker (or whatever you'd like to call it) image. I just want to wait a day or two in case someone says 'oh, Holy Hell, the way you've done this will lead to the eventual extinction of life on Earth. Don't do it that way' or something similar before I write out the more detailed account. This is just to show you that it is probably not hard at all (having never spun up a copy of Ares I don't want to absolutely promise it will be easy since there might be some gotcha I don't know about) for you to build your own image.