PDA

View Full Version : EQEmu run for Docker containers V2 (Plug-and-play version)


zhangshen147
01-02-2017, 09:35 AM
OK, guys ... now can quickly create EQEmu Server using the Docker.
I have everything needed for good.
You only need to set up a computer running a Docker.
Look here: https://www.docker.com/products/overview

First of all, we need to prepare a server running file:

Create a eqemu working directory, e.g.
mkdir -p /opt/eqemu <------ [emufile_path]
mkdir -p /opt/eqemu/server

Download EQEmu source code/maps/quests ...
EQEmu source code:
git clone https://github.com/EQEmu/Server.git /opt/eqemu/source
maps
git clone https://github.com/Akkadius/EQEmuMaps.git /opt/eqemu/eqmaps
quests
git clone https://github.com/ProjectEQ/projecteqquests.git /opt/eqemu/quests

mv -f /opt/eqemu/eqmaps/maps /opt/eqemu/ && rm -rf eqmaps

Enter the EQEmu source code directory, to build the executable file.
More compile information, please look here: http://wiki.eqemulator.org/

When the compile is complete:
cd /opt/eqemu/server
cp ../source/utils/defaults/eqemu_config.xml.full ../eqemu_config.xml
cp ../source/loginserver/login_util/login.ini ../
ln -sf ../source/bin/* .
ln -sf ../source/utils/defaults/* .
ln -sf ../source/utils/patches/* .
ln -sf ../source/utils/scripts/* .
ln -sf ../source/loginserver/login_util/login* .
rm -rf Maps
ln -sf ../maps .
ln -sf ../maps ./Maps
ln -sf ../quests .
ln -sf ../quests/lua_modules .
ln -sf ../quests/plugins .
ln -sf ../eqemu_config.xml .
ln -sf ../login.ini .

Edit the settings file eqemu_config.xml and login.ini

Preparation complete.

Database setup:
docker run --name [your_Containers_name] -p 3306:3306 -v [your_database_path]:/var/lib/mysql -v [your_config_path]:/etc/mysql/conf.d -e MYSQL_ROOT_PASSWORD=[your_root_pass] -d mariadb

You need download SQL files create peq database and login database.
http://peqtgc.com/releases

EQEmu login server for Docker:
docker run --name [your_Containers_name] -p 5998:5998/udp -p 5999:5999/udp -v [your_emufile_path]:/mnt/eqemu -d rabbired/emulogin

EQEmu Server for Docker:
docker run --name [your_Containers_name] -p 9001:9001 -p 9080:9080 -p 9000:9000/udp -p 7000-7100:7000-7100/udp -v [your_emufile_path]:/mnt/eqemu -d rabbired/emuserver

Port 9001 for Supervisord WebUI.

ok,finish~

N0ctrnl
01-02-2017, 04:41 PM
I messed with this a little a while back. It's nice to see somebody going this route. Well done on that.

I do have to ask, however, why go to the trouble to make containers for login, database and server, but not include the source or anything? All those manual steps should be in a deployable container. Save the trouble of having to do it manually for no good reason.

Good start, for sure. Keep working on it :)

zhangshen147
01-02-2017, 09:47 PM
I messed with this a little a while back. It's nice to see somebody going this route. Well done on that.

I do have to ask, however, why go to the trouble to make containers for login, database and server, but not include the source or anything? All those manual steps should be in a deployable container. Save the trouble of having to do it manually for no good reason.

Good start, for sure. Keep working on it :)

Yes, that was my first thought, but the data packed into containers, will make the huge container volume ... I'm uploading a EMU data package, download and extract can be used directly.

zhangshen147
01-06-2017, 12:45 PM
Part I
https://hub.docker.com/r/rabbired/emudata/
Part II
https://hub.docker.com/r/rabbired/emulogin/
Part III
https://hub.docker.com/r/rabbired/emuserver/

over, play game ~

N0ctrnl
01-06-2017, 03:23 PM
Script it. Make a firstboot script to run the commands you're breaking out manually. Then it has the same function - to be small and streamlined to deploy - but also has the most current source and all that. This is how we built the Linux installer scripts.

Akkadius
01-06-2017, 03:28 PM
Part I
https://hub.docker.com/r/rabbired/emudata/
Part II
https://hub.docker.com/r/rabbired/emulogin/
Part III
https://hub.docker.com/r/rabbired/emuserver/

over, play game ~

Very nice. I like the effort you have made here to streamline a docker instance for people.

Only few things I would mention is why you would feel the need to do this when an installer for Linux is already provided?

https://github.com/EQEmu/Server#server-installs

This scripted installer is always up to date, keeps binaries up to date, fetches the latest database and configures everything consistent and necessary for different distributions.

Not sure if you were aware of this already or not.

Looks neat though!

zhangshen147
01-07-2017, 02:53 PM
Script it. Make a firstboot script to run the commands you're breaking out manually. Then it has the same function - to be small and streamlined to deploy - but also has the most current source and all that. This is how we built the Linux installer scripts.

This is what I posted in the V2 version.

zhangshen147
01-07-2017, 03:10 PM
Very nice. I like the effort you have made here to streamline a docker instance for people.

Only few things I would mention is why you would feel the need to do this when an installer for Linux is already provided?

https://github.com/EQEmu/Server#server-installs

This scripted installer is always up to date, keeps binaries up to date, fetches the latest database and configures everything consistent and necessary for different distributions.

Not sure if you were aware of this already or not.

Looks neat though!

Thank you for everything you're doing.

Docker's soul lies in the simple and rapid deployment.
Only need to pull \edit config file\run and Play Game~
Save time to switch between different hardware with different operating systems.
And also very easy to maintain.:grin:

jd_war_eagle
01-16-2017, 10:47 PM
Wow, just came to the forums to post about some work I've been doing on some eqemulator docker containers over the last couple days as well. It looks like we've been going in a very similar direction. Your stuff looks good!

I was going for more of a 1 button approach, and didn't so much follow the typical docker model of splitting processes up into their own containers as my goal was mostly just to have an easy way to bring up a private server for mysql to mess around with :D

I haven't pushed the images anywhere since they do end up being quite large after everything is downloaded and built into them so a build is required. May do that down the road.

https://github.com/jd-war-eagle/eqemu-docker

Cheers!

Akkadius
01-17-2017, 04:52 PM
Wow, just came to the forums to post about some work I've been doing on some eqemulator docker containers over the last couple days as well. It looks like we've been going in a very similar direction. Your stuff looks good!

I was going for more of a 1 button approach, and didn't so much follow the typical docker model of splitting processes up into their own containers as my goal was mostly just to have an easy way to bring up a private server for mysql to mess around with :D

I haven't pushed the images anywhere since they do end up being quite large after everything is downloaded and built into them so a build is required. May do that down the road.

https://github.com/jd-war-eagle/eqemu-docker

Cheers!

1 button approach has been here:

https://github.com/EQEmu/Server/#server-installs

zhangshen147
01-18-2017, 02:00 AM
Wow, just came to the forums to post about some work I've been doing on some eqemulator docker containers over the last couple days as well. It looks like we've been going in a very similar direction. Your stuff looks good!

I was going for more of a 1 button approach, and didn't so much follow the typical docker model of splitting processes up into their own containers as my goal was mostly just to have an easy way to bring up a private server for mysql to mess around with :D

I haven't pushed the images anywhere since they do end up being quite large after everything is downloaded and built into them so a build is required. May do that down the road.

https://github.com/jd-war-eagle/eqemu-docker

Cheers!

wow...docker-compose ! it's a good idea.

Shin Noir
01-18-2017, 03:42 AM
If you wanted to be slick, take a VM you can keep up 24/7 and fork latest eqemu/server master branch, then set up a cron to auto pull it to a local instance and keep it up with latest tip and auto compile, and commit to another repo precompiled for your docker instance.

Put a copy of quest/misc files in there too.

Then, set up a db dump for initial run, and use akka's world menu from then on.

Lastly, write a master Makefile tweaks, like
make init, initialize and pull down latest repo db, quest etc into current dir.
make update, pull down latest repo db/quest etc
make run, run docker instance with current dir as volume attachment point.
make shell, shell into docker instance
make list, list current running docker containers

etc

Then, spinning up your docker instance is all contained in a makefile.. If someone wants to ground up compile, they just replace the binaries, but if they don't, this makefile can configure and run everything without compiling.

I'm not sure why your image is large, why not just split mysql into it's own docker image vanilla pointing to a local volume dir, link it to a vanilla linux instance, and mount the local stuff and include some commands to build the few dependencies required to run eqemu, and be done with it? no need for gcc and all that. Docker-compose can handle it all. And, could look into kubernetes as an alternative.

When someone wants to dev and build source, i'd say toss that in it's own standalone image, and add it to the above make listing :D

Been looking into putting eqemu on docker myself for a bit. =)

I think I have the docker eqemu project/org reserved, btw, if you want to push the imagesthere eventually let me know.

Akkadius
01-18-2017, 04:25 AM
https://cdn.meme.am/cache/instances/folder927/500x/48573927.jpg

Rikon
10-24-2017, 03:29 PM
https://github.com/EQEmu/Server#server-installs


If no one has said this, this is awesome. :cool: