Deployment

Once you have configured your resources package and you have OpenCRVS running locally, you are ready to provision and deploy OpenCRVS.

The OpenCRVS Core contains a deployment script run via yarn commands in package.json to deploy to a staging, QA or production cluster here.

yarn deploy:qa <Your host> <Dockerhub hash for your OpenCRVS version, git hash or "latest"> <path to your resources package>

OpenCRVS should be deployed on a minimum cluster of 3 nodes, each with the following specifications:

8 GB Memory (preferably 16 GB) / 160 GB Disk / Ubuntu 18.04.3 (LTS) x64

How can I install and manage an OpenCRVS server cluster of nodes?

An Ansible playbook script is provided here to automate the vast majority of your server cluster setup.

To prepare your server cluster, some pre-requisites and instructions are documented here.

How can I set up continuous integration and delivery?

We provide an example Travis configuration to automate unit testing, end-to-end testing, Docker compose / push to Dockerhub and deployment to a staging environment.

Why Docker Swarm? ...and is there Kubernetes support?

Docker Swarm was chosen for it's simplicity, so that previously unskilled system administrators can quickly up-skill in the techniques of private and public cloud infrastructure management. We wanted to democratise the containerisation benefits of AWS/Kubernetes style public cloud deployments for developing nations.

Some nations may be located far from a developed world datacentre. Many nations may not be able to legally support international data storage of citizen data. Often getting the legal approval requires regulatory change which obviously can take some time. In the short term, these nations may not have access to the development skills necessary to manage a complicated distributed cloud deployment, so ease-of-use is paramount.

Docker Swarm makes it easy to commence service distribution privately and then migrate publicly when an organisation is ready to do so. Docker Swarm automatically configures a "round robin" load balanced cluster, and provides Service Discovery out-the-box.

How do I build my containers and push a version to Dockerhub?

There are a number of docker scripts available via yarn. If you need to manage the docker containers, some of these scripts may be useful.

The yarn compose:push:version script will version and push your containers.

How do I manage a Docker Swarm?

A number of other useful Docker commands you will need in order to manage the swarm cluster are accessible here.

Coming soon

We are working on a Kubernetes implementation, so that smaller nations can have the option to hand over swarm system administration to a 3rd party such as AWS / Google.