Skip to content

Commit 32600af

Browse files
author
Vadym Mudryi
committed
Updated README
1 parent 19cedfb commit 32600af

File tree

1 file changed

+117
-24
lines changed

1 file changed

+117
-24
lines changed

README.md

Lines changed: 117 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,128 @@
1-
# !!! Work in progress
21

3-
Not all features available in docker swarm solution are supported now.
2+
# 🚧 Work in Progress
43

5-
Limitations:
6-
- Only manual helm installation and upgrade
7-
- Manual initial users configuration for minio, mongodb, elastic search
8-
- No data reset feature
4+
Please note that not all features from the Docker Swarm solution are supported yet.
95

10-
# General information
6+
**Limitations:**
7+
- Manual Helm installation and upgrade only
8+
- Manual initial user configuration for MinIO, MongoDB, Elasticsearch
9+
- No data reset feature available
1110

12-
Repository to store infrastructure code for OpenCRVS deployment
11+
---
1312

13+
# General Information
1414

15-
# OpenCRVS on Kubernetes
16-
17-
## Kubernetes cluster Prerequisites
18-
19-
### Storage
20-
21-
Storage class with encryption or respective encryption is implemented at filesystem level:
22-
- For existing OpenCRVS installations make sure cluster has at least `hostpath` storage class configured and directories on file system are pointed to encrypted partitions. `hostpath` is the best option for drop-in replacement docker swarm to kubernetes, data will not be touched in that case. Later data can be migrated to more robust storage, e/g `local` or `nfs` volumes.
23-
- For new installations please check available options at official documentation [[1]](https://kubernetes.io/docs/concepts/storage/volumes/), [[2]](https://kubernetes.io/docs/concepts/storage/storage-classes/#provisioner). Recommended storage class for new installations is NFS.
24-
25-
Please also check all available options for CSI at: https://github.com/kubernetes-csi/
26-
27-
**NOTE:** Depending on available hardware resources it is also possible to optimize installation by splitting data into different types of volumes, e/g `hostpath` works better for Elasticsearch, while `NFS` is best option for `minio` and `mongo` (`postgres`)
15+
This repository is used to store infrastructure code for deploying OpenCRVS.
2816

17+
---
2918

19+
# OpenCRVS on Kubernetes
3020

31-
# Links
21+
## Prerequisites for Kubernetes Cluster
3222

33-
[1] https://kubernetes.io/docs/concepts/storage/volumes/
23+
### Storage
3424

35-
[2] https://kubernetes.io/docs/concepts/storage/storage-classes/#provisioner
25+
Ensure your cluster has a storage class with encryption, or encryption is implemented at the filesystem level:
26+
27+
- **For existing OpenCRVS installations:**
28+
Make sure the cluster has at least the `hostpath` storage class configured and directories on the filesystem should point to encrypted partitions.
29+
`hostpath` is the best option for migration from Docker Swarm to Kubernetes; it allows data to remain untouched. Data can be migrated to more robust storage later, such as `local` or `nfs` volumes after OpenCRVS migration to Kubernetes.
30+
31+
- **For new installations:**
32+
- Please check the available storage options in the official documentation: [Kubernetes Volumes Documentation](https://kubernetes.io/docs/concepts/storage/volumes/) and [Kubernetes Storage Classes Documentation](https://kubernetes.io/docs/concepts/storage/storage-classes/#provisioner).
33+
- The recommended storage class for new installations is NFS.
34+
35+
Additionally, explore all possible options for CSI (Container Storage Interface) at the [CSI GitHub repository](https://github.com/kubernetes-csi/).
36+
37+
**NOTE:** Depending on your available hardware resources, you may optimize the installation by splitting data across different types of volumes. For example:
38+
- `Hostpath` works better for Elasticsearch.
39+
- `NFS` is the best option for MinIO and Mongo (or Postgres).
40+
41+
---
42+
43+
# Development with Kubernetes
44+
45+
## Prerequisites
46+
47+
Ensure you have one of the following solutions installed on your laptop:
48+
- Docker Desktop (with Kubernetes enabled): https://www.docker.com/products/docker-desktop/
49+
- MicroK8s: https://microk8s.io/
50+
- Minikube: https://minikube.sigs.k8s.io/docs/
51+
52+
You will also need the following tools for running the local development environment:
53+
- Git: https://git-scm.com/downloads
54+
- Helm: https://helm.sh/
55+
- Kubectl: https://kubernetes.io/docs/tasks/tools/
56+
- Tilt: https://tilt.dev/
57+
58+
**NOTE:** This guide does not cover the installation of these prerequisites.
59+
60+
---
61+
62+
## For OpenCRVS Core Developers
63+
64+
You need to clone the [opencrvs-core](https://github.com/opencrvs/opencrvs-core) and [infrastructure](https://github.com/opencrvs/infrastructure) repositories. If these repositories are already on your laptop, ensure they are in the same folder.
65+
66+
1. Create a new folder or use an existing folder to store the repositories.
67+
2. Open a terminal (command line) and navigate to the folder.
68+
3. Clone the OpenCRVS Core repository:
69+
```bash
70+
git clone [email protected]:opencrvs/opencrvs-core.git
71+
```
72+
4. Clone the Infrastructure repository:
73+
```bash
74+
git clone [email protected]:opencrvs/infrastructure.git
75+
```
76+
5. Change directory to the OpenCRVS Core repository:
77+
```bash
78+
cd opencrvs-core
79+
```
80+
6. [Temporary Step] Switch to the k8s-version branch:
81+
```bash
82+
git checkout k8s-version
83+
```
84+
7. Run Tilt:
85+
```bash
86+
tilt up
87+
```
88+
8. Navigate to [http://localhost:10350/](http://localhost:10350/)
89+
9. Once all container images are up and running your environment will be available at https://opencrvs.localhost
90+
91+
---
92+
93+
## [🚧 Coming soon] For OpenCRVS Country Configuration Developers
94+
95+
You need to fork the [opencrvs-countryconfig](https://github.com/opencrvs/opencrvs-countryconfig) repository and clone the [infrastructure](https://github.com/opencrvs/infrastructure) repository. If these repositories are already on your laptop, ensure they are in the same folder.
96+
97+
1. Create a new folder or use an existing folder to store the repositories.
98+
2. Open a terminal (command line) and navigate to the folder.
99+
3. Clone your fork of the OpenCRVS Country Configuration repository:
100+
```bash
101+
git clone [email protected]:<your-github-account>/<your-repository>.git
102+
```
103+
4. Clone the Infrastructure repository:
104+
```bash
105+
git clone [email protected]:opencrvs/infrastructure.git
106+
```
107+
5. Change directory to your forked repository:
108+
```bash
109+
cd <your-repository>
110+
```
111+
6. [Temporary Step] Switch to the k8s-version branch:
112+
```bash
113+
git checkout k8s-version
114+
```
115+
7. Run Tilt:
116+
```bash
117+
tilt up
118+
```
119+
8. Navigate to [http://localhost:10350/](http://localhost:10350/)
120+
9. Once all container images are up and running your environment will be available at https://opencrvs.localhost
121+
122+
---
123+
124+
125+
# Useful Links
126+
127+
- [Kubernetes Volumes Documentation](https://kubernetes.io/docs/concepts/storage/volumes/)
128+
- [Kubernetes Storage Classes Documentation](https://kubernetes.io/docs/concepts/storage/storage-classes/#provisioner)

0 commit comments

Comments
 (0)