This is the TL;DR version.
For more details/background/links, see:
- Intro to Game On! (GitBook)
- Working with Game On! Locally for details.
- Obtain the source for this repository:
- HTTPS:
git clone https://github.com/gameontext/gameon.git - SSH:
git clone [email protected]:gameontext/gameon.git
-
Change to the gameon directory
cd gameon -
(Optional) Use Vagrant for your development environment
- Install Vagrant
vagrant up(likley with--provider=virtualbox)vagrant ssh- use
pwdto ensure you're in the/vagrantdirectory.
- Notes:
- the Vagrantfile updates the .bashrc for the vagrant user to set
DOCKER_MACHINE_NAME=vagrantto tweak script behavior for use with vagrant. - VM provisioning will perform the next two steps on your behalf.
- the Vagrantfile updates the .bashrc for the vagrant user to set
-
Set up required keystores and environment variables. This step also pulls the initial images required for running the system. (This action only needs to be run once).
./go-admin.sh setup
- This script uses
DEPLOYMENTto choose between using Docker Compose or Kubernetes for deployment.DEPLOYMENT=docker-compose-- Scripts related to provisioning with Docker Compose are in thedockerdirectory.- Coming Soon:
DEPLOYMENT=kubernetes-- Scripts related to provisioning with helm and kubernetes are in thekubernetesdirectory.
-
Start the game (supporting platform and core services):
./go-admin.sh up -
Wait for the game to start. This will vary between Docker Compose and Kubernetes approaches.
./go-admin.sh upwill tell you what to try next. -
Carry on with building your rooms!
-
Stop / Clean up
./go-admin.sh down
If you want to contribute to the game's core services, no worries! Assuming you've performed the steps above at least once (and using the map service as an example):
-
Change to the gameon directory
cd gameon -
Set some aliases to save typing:
eval $(./docker/go-run.sh env) go-run -
Obtain the source for the project that you want to change. The easiest way is to take advantage of git submodules.
git submodule init map git submodule update map -
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. -
Build the project(s) (includes building wars and creating keystores required for local development) to be deployed. You may have different requirements per service (e.g. most require Java 8):
go-run rebuild map -
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 all
3rd party authentication (twitter, github, etc.) will not work locally, but the anonymous/dummy user will. If you want to test with one of the 3rd party authentication providers, you'll need to set up your own tokens to do so (see gameon.env)
Want to help! Pile On!
