The following environments are ready to use.
Environment | Intended Use | Install Location | Debug Mode | Users |
---|---|---|---|---|
development |
development | localhost | ✔️ | self only |
integration |
development | localhost | ❌ | self only |
staging |
quality assurance | upstream | ❌ | selected few users |
production |
production | upstream | ❌ | real users |
The following gates are ready to use.
Gate | Domain | production |
staging |
Use |
---|---|---|---|---|
core |
- | not deployed | not deployed | Code shared by all gates |
You need to make sure that these conditions are met:
- Setup a local kubernetes cluster (instructions are in their official documentation)
- If your local kubernetes setup didn't ship with it, you'll also need to install
kubectl
to control that cluster - Install
helm
(instructions are in their official documentation) - If you want to test the changes on your Android phone without rooting it, you will need to set up a proxy on your development machine and follow the instructions here.
You might want to make yourself familiar with the technologies used.
The general deployment is done with:
Other infrastructure consists of:
Service Type | General | Infrastructure | Development |
---|---|---|---|
Frontgate | |
|
|
Backgate / Micro | |
|
|
Backgate |
The folder structure is as follows:
.github
CI related configuration - documentationbackend
The code for the backgates and microservices. They are grouped by gate. Onedjango
project per service - documentationdata
Lists of things (e.g. services, environments etc.) in json formatsdocumentation
A bunch of markdown files to document everythingfrontgate
The code for the frontgates. Onereact
project per frontgate - documentationkubernetes
Kubernetes related configuration - documentationproto
Protobuf definitionsscripts
Utility scripts - documentationtemplates
Templates used when creating new services - documentation
Build and deploy changes by running the following commands (for local deployments, the environment will be either development
or integration
):
./scripts/operations/setup_cluster.sh
will add the necessary controllers to the cluster./scripts/operations/setup_environment.sh <ENVIRONMENT>
will set up resources for the chosen environment./scripts/operations/deploy.sh <ENVIRONMENT>
will start up all gates and services for that environment
If self-signed TLS certificates are required, make sure that the following files exist:
- Private key:
letsencrypt/live/live/<ENVIRONMENT>.khaleesi.ninja/privkey.pem
- Certificate:
letsencrypt/live/live/<ENVIRONMENT>.khaleesi.ninja/fullchain.pem
This happens ideally before step 2, otherwise, simply repeat step 2.
Execute the tests by running ./scripts/development/test.sh
- For local development, it is typical to work on a single service for a lengthy amount of time.
To make this more user friendly, it is possible to pass the argument
current_service
to both./scripts/development/test.sh
as well as./scripts/operations/deploy.sh
(in front of all optional arguments). The first timecurrent_service
is passed, an interactive prompt will require choosing the service to be worked on. When it is time to switch work to a different service, simply call./scripts/development/switch_current_service.sh
.