For the following instructions, we'll assume you've either cloned the repo or downloaded and extracted a zip of its contents.
Start with:
$ cd gameon # cd into the project directory
$ ./go-admin.sh choose 1 # choose Docker Compose
$ eval $(./go-admin.sh env) # set aliases for admin scripts
$ alias go-run # confirm docker/go-run.sh
Instructions below will reference go-run, the alias created above. Feel free to invoke ./docker/go-run.sh directly if you prefer.
The go-run.sh and docker-functions scripts encapsulate setup and deployment of core game services using Docker Compose. Please do open the scripts to see what they do! We opted for readability over shell script-fu for that reason.
-
Setup
$ go-run setupThis will ensure you have the right versions of applications we use, and create a cerficate for signing JWTs.
-
Start the game
$ go-run upThis step will also create a
gameon-systemname space and a generic kubernetes secret containing that certificate. -
Wait for services to be available
$ go-run wait -
Visit your external cluster IP address
-
Stop the game
$ go-run down
If you're messing with core game services locally (we love you!), follow the instructions below.
-
Copy the
docker/docker-compose.override.yml.examplefile todocker/docker-compose.override.yml, and uncomment the section for the service you want to change:map: build: context: map/map-wlpcfg volumes: - '$HOME:$HOME' - 'keystore:/opt/ibm/wlp/usr/servers/defaultServer/resources/security'The volume mapping in the
$HOMEdirectory is optional. If you're using a runtime like Liberty that supports incremental publish / hot swap, using this volume ensures paths will resolve properly.This project is set up to help rebuild initialized git submodules. If you don't want to work with git submodules, update the paths in the
docker/docker-compose.override.ymlto reference where the projects have been extracted. You will have to build the project on your own. Docker Compose will see the updated image in the following steps. -
Build the project(s) (includes building wars and creating keystores required for local development). You may have different requirements per service (e.g. most require Java 8):
$ go-run rebuild mapThis will build the project artifacts and the docker container, and will replace the container in the running system.
-
Iterate!
-
For subsequent code changes to the same project:
$ go-run rebuild map -
To rebuild multiple projects, specify multiple projects as arguments, e.g.
$ go-run rebuild map player auth -
To rebuild all projects, use either:
$ go-run rebuildor
$ go-run rebuild
-