Kubernetes based SaaS platform.
To develop Jenca cloud - you need as OSX or Linux machine.
First you need to install:
Pull the repo
$ git pullTo start the jenca development environment:
$ vagrant up
$ vagrant ssh
$ cd /vagrantAfter doing a vagrant up - check it's installed by doing
$ docker infoIf it is not, exit from the VM and do
$ vagrant halt
$ vagrant up --provisionEach service in jenca cloud uses it's own repository under the jenca-cloud/ namespace. This repo is the glue between all of these service repos. In order to enable the repos to appear inside the development environment, you need to git clone the various repos inside the repos folder (which is git ignored).
$ make updateThis allows the development VM to see the various service repos and for the developer to still use their git credentials on the host to git commit/git push.
Each service will have a Makefile inside the repo that will have an images make step. This will use docker build to create the jenca images from the various repos. The version of these images is controlled by the VERSION variable at the top of each Makefile.
Then you need to build to code into the Docker images:
$ make imagesOnce the images are built - you can run the tests:
$ make testTo start the Kubernetes cluster:
$ make k8s.startTo stop the Kubernetes cluster:
$ make k8s.stopTo start the jenca containers on k8s:
$ make jenca.start
$ make jenca.stopFor the router service (replace this with the service you want to re-deploy):
$ SERVICE=router make jenca.refresh$ kubectl get pods
$ docker psTo open up a random port on the Vagrant VM that points at the router:
$ make jenca.exposeTo close that port:
$ make jenca.hide$ kubectl expose pod <podname> --port=<port> --target-port=<port> --name=<name> --type=NodePort
$ kubectl get svc <servicename> -o jsonthen look for:
ports": [
{
"protocol": "TCP",
"port": <port>,
"targetPort": <targetPort>,
"nodePort": <nodePort>
}
],connect to IP:<nodePort> on your laptop, where IP is in the Vagrantfile (btw - we have mapped the current IP to dev.jenca.org)
$ make k8s.start
$ sleep 15
$ make jenca.start
$ sleep 15
$ make jenca.expose
$ bash scripts/tests.sh acceptanceWe deploy on the Google container engine
You need access to the jenca-cloud project.
Follow the instructions here
The values required for the settings are listed here (the output of gcloud config list)
[compute]
region = europe-west1
zone = europe-west1-b
[container]
cluster = test-cluster
[core]
account = <XXX your google account email here>
disable_usage_reporting = True
project = jenca-cloud
To set the container cluster:
$ gcloud config set container/cluster test-cluster
To configure kubectl to see that cluster:
$ gcloud container clusters get-credentials test-cluster