Coder Social home page Coder Social logo

mangos-docker's Introduction

mangos-docker

This repository lists everything needed to build and run Docker images for Mangos project.

How the repository is organized

Each folder is dedicated to a specific version of Mangos, inside you will find everything about this precise version (from Dockerfile to deployment files). Each version currently provides 3 Docker images :

  • mangosd: this the world server that needs maps to work. This is the server the players will be playing on.
  • realmd: this is the login server. This is the server the players will log into.
  • mysql-database: this is the database used both by the world server and the login server.

How to build the Docker images

Each image is self-sufficient, you can build it simply going into the folder of the version you wish to build and using:

docker build -t mytag:myversion .

Note: I personnaly have automatic CI/CD to build and push up-to-date Docker images to the Docker Hub.

How to create my own server

Several ways are available to launch your own server and are listed below.

Using Docker containers

This is OK if you want to create a little server with not much players. Also, this is a way to check that your configuration is OK.

Launching world server

docker run -i -v /path/to/maps:/etc/mangos/maps -v /path/to/vmaps:/etc/mangos/vmaps -v /path/to/mmaps:/etc/mangos/mmaps -v /path/to/dbc:/etc/mangos/dbc -e "LOGIN_DATABASE_INFO=localhost;3306;root;mangos;realmd" -e "WORLD_DATABASE_INFO=localhost;3306;root;mangos;mangos" -e "CHARACTER_DATABASE_INFO=localhost;3306;root;mangos;characters" -p 8085:8085 -d ssorriaux/<version>-server:latest
Configure ahbot.conf

It is possible to configure AH using the ahbot.conf file. Add this parameter to the world server launch command:

-v /path/to/ahbot.conf:/mangosconf/ahbot.conf

Be aware to use the /mangosconf/ahbot.conf file and not the one in /etc/mangos/.

Launching the database

docker run -e MYSQL_ROOT_PASSWORD=mangos -p 3306:3306 -v /path/to/data/:/var/lib/mysql -d ssorriaux/<version>-database-mysql:latest

If /path/to/data is empty, the database will be initialized running all SQL scripts from the database repository.

Please note the MYSQL_ROOT_PASSWORD value will be used for root user password.

If you already have datas and want to update your database, you can use the /docker-entrypoint-initdb.d folder. Those scripts will be played before giving access to the database. This can be done adding the following parameter to the previous command:

-v /path/to/my/sql/scripts/:/docker-entrypoint-initdb.d/

Launching the login server

docker run -e "LOGIN_DATABASE_INFO=localhost;3306;root;mangos;realmd" -p 3724:3724 -d ssorriaux/<version>-realmd:latest

Using docker-compose

You will first need to edit the docker-compose.yml file to specify the path to your maps.

Then, simply execute:

docker-compose up -d

Using Kubernetes

Currently, you will need to add the maps on the node that will host the world server and change the volume declaration inside the world server deployment. In the future, it is possible to make this simpler putting all maps inside somewhere and getting it using an initContainer or using a PersistentVolume.

Create the whole server using:

kubectl apply -f kubernetes-deployment.yml

Passwords are kept inside the Secret resource.

Using Helm

There is a helm chart included in this repository that can be used to provide a more flexible way of deploying to Kubernetes.

To deploy, make any needed edits to the values.yaml file and apply using:

helm install

What about the maps?

You will not find any maps (those resources are Blizzard's properties) in these Docker images, you will need to provide it yourself using several methods listed below.

Using Docker containers

When creating your world server container, you will need to provide the path, from your host, to:

  • maps
  • vmaps
  • mmaps
  • dbc

Using docker-compose

Before creating the whole server, you will need to provide the path, from your host, to:

  • maps
  • vmaps
  • mmaps
  • dbc

This can be done editing the docker-compose.yml file.

Using Kubernetes

Before creating the whole server, you will need to provide the path, from your host, to:

  • maps
  • vmaps
  • mmaps
  • dbc

This can be done editing the kubernetes-deployment.yml file.

Using Helm

Host paths can be set by editing the values.yaml file.

How to handle maps on Windows.

  • Place your maps in some directory on Windows, for example
c:/mangos_maps/maps
c:/mangos_maps/vmaps
c:/mangos_maps/mmaps
c:/mangos_maps/dbc
  • If you're using docker-compose modify volumes section to look like this
 volumes:
       - c:/mangos_maps/maps:/etc/mangos/maps
       - c:/mangos_maps/vmaps:/etc/mangos/vmaps
       - c:/mangos_maps/mmaps:/etc/mangos/mmaps
       - c:/mangos_maps/dbc:/etc/mangos/dbc

Contributing

Feel free to create any issue or pull-request.

mangos-docker's People

Contributors

fly-man- avatar pastew avatar stephensorriaux avatar wizofgoz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mangos-docker's Issues

Add MangosZero

Add Docker images, docker-compose file and Kubernetes descriptor file for MangosZero.

[Issue] [mangos-two] Segmentation fault on line 39 [latest] [23/1/2020: 23:33]

Issue

./launch_mangosd.sh line 39
triggers a segmentation fault

command:

sudo docker run -e "LOGIN_DATABASE_INFO=192.168.1.37;3306;root;redacted;realmd" -e "WORLD_DATABASE_INFO=192.168.1.37;3306;root;redacted;mangos2" -e "CHARACTER_DATABASE_INFO=192.168.1.37;3306;root;redacted;character2" -p 8085:8085 -v /home/docker/worldofwarcraft/mangosd.conf:/mangosconf/mangosd.conf -v /home/docker/worldofwarcraft/maps:/etc/mangos/maps -v /home/docker/worldofwarcraft/mmaps:/etc/mangos/mmaps -v /home/docker/worldofwarcraft/vmaps:/etc/mangos/vmaps -v /home/docker/worldofwarcraft/dbc:/etc/mangos/dbc ssorriaux/mangostwo-server

Directory:

dir

Log:

mangos-terminal-log.log

Mangosd config file:

mangosd.conf.log

Maps

the maps are known working since i have tested a copy of them on the windows version of mangostwo.

How to run this on Windows

Hello,

is it possible to run it on Windows?
If so - where to put maps and how modify docker-compose.yml to use provided maps?

       - mangos_maps:/etc/mangos/maps
       - mangos_vmaps:/etc/mangos/vmaps
       - mangos_mmaps:/etc/mangos/mmaps
       - mangos_dbc:/etc/mangos/dbc

Add MangosThree

Add Docker images, docker-compose file and Kubernetes descriptor file for MangosThree.

/mangosconf/ahbot.conf not loading - easy fix

I added the mount to /mangosconf/ahbot.conf and was getting:
2019-07-14 07:47:37 Initialize AuctionHouseBot... 2019-07-14 07:47:37 AHBOT is Disabled. Unable to open configuration file /server/install/etc/ahbot.conf.

I checked and /mangosconf/ahbot.conf exists, I noticed the launch_mangosd.conf file has the following:
AHCONFIG=-a /mangosconf/ahbot.conf
I replaced it with:
AHCONFIG="-a /mangosconf/ahbot.conf"

This fixed it for me.

Kubernetes mangoszero Segmentation fault

Hi there!

Love the work!

I've ran a few tries on k8s with my own modification of the repo files to eg get AI BOT enabled during build, but somehow I keep getting this error in Mangosd pod:

./launch_mangosd.sh: line 39: 11 Segmentation fault (core dumped) ${BINDIR}/mangosd -c $CONFIGS/mangosd.conf ${AHCONFIG}

I've also tried the k8 deployment file found in mangoszero repo here and only change I've done is to remove the PVC (persistent volume claim) to map with my own and still getting same error:

What am I missing? Do I need to make sure that the configs already exist somewhere? Documentation doesnt state that (except for AHBOT)

Thanks in advance!

Add MangosFive

Add Docker images, docker-compose file and Kubernetes descriptor file for MangosFive.

Any suggested way to get a player bots mod working

Hi I have deployed this to my home k8s cluster but would love to get one of the bot add ons working so I can have bots running around, do you have any suggested way to do this or have you done it in the past?
Thanks for all the work.

Add documentation

Write the documentation explaining how to setup any Mangos server.

Add MangosFour

Add Docker images, docker-compose file and Kubernetes descriptor file for MangosFour.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.