Managing/Running multiple Evennia instances

88 views
Skip to first unread message

Tristano Ajmone

unread,
Mar 4, 2015, 5:00:54 AM3/4/15
to eve...@googlegroups.com
I have a question about multiple games in Evennia.

In the New year Devel branch updates post I read:

The package change means that Evennia itself takes on the role of a library with an "evennia" executable to do operations. [...] Since the game directory is created on the fly it is not a part of Evennia's version control which means that you can change it and restructure it as you please without being afraid of running into merge conflicts down the line. You can also easily create multiple games in different folders (as long as you change their ports to avoid collisions). 

I was wondering if this is going to be a future option or wether it's already achievable. From "evennia -h" I don't get any extra info regarding options to specify which game to run. I gather that the only prerequisite is that as long as you run the "evennia -start" command inside the root of a game folder that game will be started within Evennia.

So, i could just create different games in different folders and run them concurrently (on different ports), right?

Reading the documentation I haven't come across instructions regarding backups, ecc. If i just make a zipped copy of MyGame folder, and then the sytem crashes and I have to reinstall Evennia from scratch, will it be enough to unzip my backup copy and just run it on Evennia? or are they some extra game-related files outside the MyGame folder?

If things are like I think, it seems easy enough to have a single virtualenv setup holding different game folders (one for tests, another the actual development work, another one for whatever, ecc). Are there any issues to keep in mind (apart from ports) in case of running multiple Evennia instances concurrently?

Another thing about backup.... What about database dumping operations? Are there some Evennia cmds related to exporting database? I was thinking of the players data, like if I wanted to make sure that whatever might go wrong with the worldbuiling code I should have a backup dump of all players and their settings. Are these type of operations to be done via the database interface (sqlite, MySql, or whatever) outside of Evennia, or is it better to do it from within Evennia code? or Evennia's Admin web-interface?

Am I just missing something because its too obvious to derserve mentioning, or is it an issue not yet decided-upone/implemented/documented?

bare patient if my questions might sound stupid and obvious, but I have no experience on administering a MUD--and I realize that some MUDs out there have HUGE databases, with thousands of room, tens of thousands of registered players, and so on, and I guess that backups are something better done in the background in order to avoid clogging the server (I've read a post somewhere explaining how a MUD admin used a special system for backing up without stopping the server or clogging it, and it mentioned a process quite lengthy ).

Tristano

lee philip

unread,
Mar 4, 2015, 6:57:43 AM3/4/15
to eve...@googlegroups.com
This is also an issue that concerns me, for django, we can assign a different settings file --settings=settings_production for a different site with different database or other config.

I recommend evennia can do like this,  adding a parameter like --settings to "evennia -i start" and "evennia stop", so we can make more settings file with different database and conifg to run more games on a server. And we should can assign ports in settings file, the current version of evennia use the stable ports, it's impossible to run more games on a server. 

Griatch Art

unread,
Mar 4, 2015, 3:29:47 PM3/4/15
to eve...@googlegroups.com
Hi,

I've not actually tested running multiple instances of Evennia from different folders, but I don't see why it shouldn't work ... Just set up two settings files in each game folder with different ports and start them from each's respective folder (you don't need separate virtualenvs either). You might want to run from different terminals if you are using -i so as to not have the output from the two servers get mixed up.

Backups of the game folder is up to you. It's all in isolated in one location - the install of Evennia doesn't need to follow it around, nothing is stored in evennia itself. So just copying the whole thing is easy enough. In the documentation we recommend you put your game directory under version control, this way you can not only track your progress, you could also share code with your collaborators (put it up on github if your code is open, otherwise use some of the available private online solutions).

Databases can be exported using django-admin commands, which Evennia passes through, such as the dumpdata argument to create data fixtures. If you use sqlite though, just copying the entire database file is a lot easier. But generally, since Evennia uses standard database systems (contrary to some legacy codebases out there), these things are generally something you should be able to find plenty of information and help on - there are very powerful database management tools out there for much more demanding applications than MUDs. I would suggest this is not something you'd need to worry about as a first step though.
.
Griatch

Griatch Art

unread,
Mar 4, 2015, 3:39:38 PM3/4/15
to eve...@googlegroups.com
@lee philip

You can already set ports in your settings file, there are no such thing as "stable ports", just change the defaults.

For running multiple games (or production/devel) I would suggest that you just put your game directory under version control, clone it to wherever you want it and change the ports in the settings file and run - that should be it. If you are developing in the same repo as your production code (which it sounds like you want to do) you could just put two different versions of your settings file in different git branches and just switch between them. If you run two simultaneous server instances you can just as well do so from different folders imo.

This is not something I feel is all that important at this time - there are so many ways to resolve it. But that said, it's probably not hard to add and if you still think this is something that should be added, do put in a feature request for it, maybe someone will take it on!
.
Griatch

lee philip

unread,
Mar 4, 2015, 10:26:20 PM3/4/15
to eve...@googlegroups.com
Yes, it's my mistake, in my memory, the port is in a code file, not default_settings.py. here should be no problem to run more instants in different folders with different ports.

I think make a parameter to assign settings file is necessary. I build django site structure often like this. Settings.py file is for development, then make a setting_production.py file on production server like this:

from settings import *
DEBUG = False
DATABASES =
...

And make the server use this settings_production.py file. Then I can use sqlite for development, and mysql for production server. When changed code, just update on server wthout any changes on sever can make it work.
But it's not very important, I will make a feature request.

Griatch Art

unread,
Mar 5, 2015, 9:45:39 AM3/5/15
to eve...@googlegroups.com
@lee philip

You didn't make a feature request for it, but it was so easy to add that I added a --settings option to the launcher now. The settings file must still sit under yourgame/server/conf/.

Enjoy!
.
Griatch

lee philip

unread,
Mar 5, 2015, 6:58:40 PM3/5/15
to eve...@googlegroups.com
I'm travling, posted thread with phone and planed to add feature request when get back.

Very thank you have done this so rapidly.
Reply all
Reply to author
Forward
0 new messages