[go: up one dir, main page]

Skip to content
This repository has been archived by the owner on Apr 26, 2020. It is now read-only.
/ jenca-cloud Public archive

Please see the trello board for work. If you need to be added to the team and board, please request: https://trello.com/b/clWQd0u9/jenca-cloud-core License: MIT

License

Notifications You must be signed in to change notification settings

bigdoods/jenca-cloud

Repository files navigation

Build Status

jenca cloud

Kubernetes based SaaS platform.

Development

To develop Jenca cloud - you need as OSX or Linux machine.

install

First you need to install:

Pull the repo

$ git pull

Boot VM

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

Repos

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.

Images

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

run tests

Once the images are built - you can run the tests:

$ make test

Start and stop the cluster and stack

start/stop cluster

To start the Kubernetes cluster:

$ make k8s.start

To stop the Kubernetes cluster:

$ make k8s.stop

start/stop stack

To start the jenca containers on k8s:

$ make jenca.start
$ make jenca.stop

Make a change to a jenca service - rebuild it and redeploy it:

For the router service (replace this with the service you want to re-deploy):

$ SERVICE=router make jenca.refresh

Check that everythings up

$ kubectl get pods
$ docker ps

Expose the router onto the VM to test

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

Expose a single pod to test

$ 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)

run acceptance tests

$ make k8s.start
$ sleep 15
$ make jenca.start
$ sleep 15
$ make jenca.expose
$ bash scripts/tests.sh acceptance

production deployment

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

About

Please see the trello board for work. If you need to be added to the team and board, please request: https://trello.com/b/clWQd0u9/jenca-cloud-core License: MIT

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published