gameon
gameon copied to clipboard
The root repository provides mechanics to set up a local environment for building and testing rooms.
gameon: The Root Repository / Quick start developers guide.
This is the TL;DR version.
- Local room development
- Core game development
- Additional notes
For more details/background/links, see:
- Intro to Game On! (GitBook)
- Working with Game On! Locally for details.
Local Room Development
- 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 # cd into the project directory -
(Optional / Docker Compose only) Use Vagrant for your development environment
- Install Vagrant
vagrant up(likely 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 (applicable) steps on your behalf.
- the Vagrantfile updates the .bashrc for the vagrant user to set
-
(Kubernetes only) Create or retrieve credentials for your cluster.
-
Set up required keystores and environment variables. This step also pulls the initial images required for running the system.
$ ./go-admin.sh choose # choose Docker Compose or Kubernetes $ eval $(./go-admin.sh env) # set aliases for admin scripts $ alias go-run # confirm path (docker or kubernetes) $ go-admin setupNote: it is safe to run
setupagain, e.g. to check dependencies or regenerate files if IP addresses change -
Start the game (supporting platform and core services):
$ go-admin upNote: Services in Kubernetes will start in the
gameon-systemnamespace, which will need to be specified on the command line:kubectl -n gameon-system .... A shortcut for this has been created in thego-runscript:go-run k get all, for example. A similar shortcut exists foristioctl:go-run i get all. For more details on Game On! and Kubernetes, see the Kubernetes README -
Wait for the game to start. This will vary between Docker Compose and Kubernetes approaches. The result of
go-admin upwill tell you what to try next. -
Carry on with building your rooms!
-
Stop / Clean up
$ go-admin down
Core Service Development (Optional)
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, set aliases to save typing
$ cd gameon # cd into the project directory $ eval $(./go-admin.sh env) # set aliases for admin scripts $ alias go-run # confirm path (docker or kubernetes) -
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
Updating the game environment once you've made changes varies by deployment:
- Iterative development with Docker Compose
- Iterative development with Kubernetes
Notes
Supporting 3rd party auth
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.
- Docker:
./docker/gameon.env - Kubernetes (files present after setup):
./kubernetes/kubectl/configmap.yaml- Using helm:
./kubernetes/chart/gameon-system/values.yaml
Contributing
Want to help! Pile On!