This server was developed as part of a bachelor thesis at NTNU Ålesund. The application used with this server can be found here.
To build the services, maven (linux win osx) is used. Docker is used as the kubernetes container runtime, remember the post installation steps (I always forget).
For controlling the cluster, kubectl is needed (if you user microk8s(which you should) than it's not needed because it is bundled with the install microk8s kubectl).
You will need a Kubernetes cluster to run on. If you are only testing locally, minikube can be used, but i would recommend using Microk8s given that mikrokube does not have all the features required.
The project is currently using microk8s. These are the steps to run the project:
- /kubernetes/development/MicroK8s/init_node.sh
- /kubernetes/development/MicroK8s/build_dev_db.sh
- /kubernetes/development/MicroK8s/build_containers.sh
- Then all the
*.env.examplefiles in thekubernetes/secretsneeds to have the.example-suffix removed. sTthe default values shold work for dev with the exeption of the api key for the chekout module. You can still run the cluster, but most calls to the chekout modul will return500 - somthing somthing server error. A free test acount can be created here.
The server is meant to run on a Kubernets cluster in production. Given the nature of kubernetes some level of tweaking to whatever deployment enviorment is required. But the key things to change is:
- the
kubernetes/volumes.yamlfile should be changed to use whatever volumes you want to use in prod. All volumes are currently set up viaPersistentVolumeClaim's so changing the underlying volume should be trivial. - the development database is not set up to persist data over restarts. This is intentionally, so the "dev" db does not
suddenly become the "prod" db, through the power of laziness and convenience. The service's db access is configured
individually either through the
services/<service>/core/config/server.envand be included in the war, or by overwriting the variables when running the image, whichever is more convenient. (the latter can be done with kubernetes secrets) - the service images are currently fetched locally, if you have the images hosted elswhere this has to change
- The all the
*.env.examplefiles in thekubernetes/secretshas to be filled in and had the.examplesuffix removed.