How to Install DIVOC
- Use a Debian-based Linux distribution (preferably Ubuntu)
- Experience in running simple shell and bash commands
- Debian-based OS (Ubuntu)
- List of servers and ability to access them using key-based authentication
- Server map to list servers against software
- Access to the DIVOC installer repository
- Access to the implementation-specific DIVOC code
The sizing and count of the servers can change based on the load requirements. However, for a truly HA setup, the following are the minimum requirements:
3 servers for HA setup: one master and 2 replicas. The etcd cluster can also be set up on the same servers.
6 servers: 3 for control plane (or master node can be relatively smaller sized instances) and 3 worker nodes (for deploying the application).
3 servers containing both Zookeeper and Kafka (Ideally Zookeeper and Kafka need to be installed on separate servers but we should be fine to install both on the same machine).
There are three scripts that need to be run to complete the DIVOC installation process:
- 1.Installing the prerequisites and setting various hardware clusters as detailed above.
- 2.Building the pushing the docker images to the appropriate registry.
- 3.Deploying code from the registry into Kubernetes cluster.
- 2.Create an inventory file from the sample inventory file located at https://github.com/egovernments/divoc-installer/blob/master/inventory.example.ini.
- 3.Add the inventory details as per the comments present in the file.
- 4.Run the install.sh present within the divoc-installer with the elevated privileges (we can also use nohup for running in the background):
sudo sh install.sh -i <path to inventory file>
- It will install the dependencies like python3, ansible, etc.
- It will install the applications and configure them on the servers mentioned in the inventory file.
- Run the build.sh file with elevated privileges.
sudo sh build.sh -d <IP Address of Docker Registry> -r <GIT REPO URL>
- Default values for the Docker repository are from dockerhub.
- The Default value for the GIT repo is the master branch of the https://github.com/egovernments/DIVOC.git.
- 1.The sample default Kubernetes deployment files are available at https://github.com/egovernments/divoc-installer/tree/master/kube-deployment-config-example.
- 2.Make a copy of the folder and change the internal script files to have the following configurations. It is recommended that you maintain your own configuration in a separate Github repository so that you have version control and backup (you require only the example folder, not the full repository).
a. Within the divoc-installer director, open the divoc-config.yaml file present within the deployment configuration directory and make the following changes:
b. Modify registry-deployment.yaml to change the following:
c. Modify keycloak-deployment.yaml to add the following information:
3. Run the deploy script to deploy the application on Kubernetes.
sudo sh deploy.sh -i <path to inventory file> -p <Directory containing Kubernetes Config files> -d <Private Docker Registry IP> -k <Kube Master Node IP> -s <Key file to access Kube Master>
The indexes for efficient querying of the database tables do not get automatically created and hence need to be created manually. Execute registry_index.sql is present within the DIVOC codebase on the database. A restart of the registry service is required for this change to reflect.
Note: Database tables are only created when the first API request is received.
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.