Kubernetes based SaaS platform.
To develop Jenca cloud - you need as OSX or Linux machine.
First you need to install:
Pull the repo
$ git pull
To start the jenca development environment:
$ vagrant up
$ vagrant ssh
$ cd /vagrant
After doing a vagrant up - check it's installed by doing
$ docker info
If it is not, exit from the VM and do
$ vagrant halt
$ vagrant up --provision
Each 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 update
This 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 images
Once the images are built - you can run the tests:
$ make test
To start the Kubernetes cluster:
$ make k8s.start
To stop the Kubernetes cluster:
$ make k8s.stop
To start the jenca containers on k8s:
$ make jenca.start
$ make jenca.stop
For the router service (replace this with the service you want to re-deploy):
$ SERVICE=router make jenca.refresh
$ kubectl get pods
$ docker ps
To open up a random port on the Vagrant VM that points at the router:
$ make jenca.expose
To close that port:
$ make jenca.hide
$ kubectl expose pod <podname> --port=<port> --target-port=<port> --name=<name> --type=NodePort
$ kubectl get svc <servicename> -o json
then 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 acceptance
We 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