Skip to content

Commit 51cb1dd

Browse files
docs: updated docs
1 parent a05df0c commit 51cb1dd

File tree

3 files changed

+46
-23
lines changed

3 files changed

+46
-23
lines changed

CONTRIBUTING.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,33 @@ If you find a bug while working with the Compage, please [open an issue on GitHu
88
You are more than welcome to open issues in this project to [suggest new features](https://github.com/intelops/compage/issues/new?labels=kind%2Ffeature&template=feature-request.md&title=Feature%20Request:).
99

1010
## Contributing Code
11-
This project is written in Golang, NodeJs(TypeScript) and ReactJs(TypeScript).
11+
This project is written in Golang, Node.js(TypeScript) and ReactJs(TypeScript).
1212

1313
![block-diagram.png](images/architecture-high.png)
1414

15-
To contribute code,
15+
To contribute code.
1616
1. Ensure you are running golang version 1.11.4 or greater for go module support
1717
2. Set the following environment variables:
1818
```
1919
GO111MODULE=on
2020
GOFLAGS=-mod=vendor
2121
```
22-
3. Ensure you have NodeJs(LTS >= 18.12.0) installed for Core and UI part of the compage.
23-
4. Ensure you have access to any Kubernetes(tested on KinD) cluster to store the compage projects and users related data on it.
22+
3. Ensure you have Node.js(LTS >= 18.12.0) installed for Core and UI part of the compage.
23+
4. Ensure you have access to any Kubernetes (tested on KinD) cluster to store the compage projects and users related data on it.
2424
#### KinD
2525
- Install KinD from https://kind.sigs.k8s.io/docs/user/quick-start/#installing-from-release-binaries
26-
- Create KinD cluster https://kind.sigs.k8s.io/docs/user/quick-start/#creating-a-cluster
26+
- Create KinD cluster using below command
27+
```shell
28+
cd deploy
29+
./create-kind-cluster.sh
30+
```
2731
- Check if you can access the cluster created in previous step, and you are able to list down the pods.
2832
5. Fork the project.
2933
6. Clone the project: `git clone https://github.com/[YOUR_USERNAME]/compage && cd compage`
3034
7. kindly refer compage.md file to know the structure of the project.
31-
8. The Compage has 3 servers (subprojects) which need to be started to run the compage on local
35+
8. The Compage has three servers (subprojects) which need to be started to run the compage on local
3236
- core (Golang), navigate to core directory and follow its [core README](./core/README.md)
33-
- app (NodeJs), navigate to app directory and follow its [app README](./app/README.md)
37+
- app (Node.js), navigate to app directory and follow its [app README](./app/README.md)
3438
- ui (ReactJs), navigate to ui directory and follow its [ui README](./ui/README.md)
3539
9. Commit changes *([Please refer the commit message conventions](https://www.conventionalcommits.org/en/v1.0.0/))*
3640
10. Push commits.
@@ -49,9 +53,9 @@ The documentation is contained within `./docs` and made with Docusaurus. See the
4953
```shell
5054
export PATH="$PATH:$(go env GOPATH)/bin"
5155
```
52-
- Download buf binary from this link - https://github.com/bufbuild/buf/releases and fire the command from core directory of compage.
56+
- Download buf binary from this linkhttps://github.com/bufbuild/buf/releases and fire the command from core directory of compage.
5357
```shell
5458
buf generate
5559
```
56-
## How K8s and GitHub are interacted with above 3 components?
60+
## How are K8s and GitHub interacted with above three components?
5761
![architecture-med.png](images/architecture-med.png)

deploy/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@
4343

4444
## Different shell scripts in deploy directory.
4545
### create-kind-cluster.sh
46-
- creates KinD cluster, creates `compage` namespace on it and sets `compage` namespace as default. It later extracts KinD cluster's node ip as well and sets it to KIND_NODE_IP environment variable.
46+
- This script creates KinD cluster, creates `compage` namespace on it and sets `compage` namespace as default. It later extracts KinD cluster's node ip as well and sets it to KIND_NODE_IP environment variable.
4747
4848
### delete-kind-cluster.sh
49-
- deletes the KinD cluster.
49+
- This script deletes the KinD cluster.
5050
5151
### load-on-kind.sh
5252
- creates KinD cluster, builds docker images for core, app and ui components of compage. The images are then loaded on to KinD cluster.
5353
5454
### push-docker-images-to-github.sh
55-
- builds docker images for core, app and ui components of compage. The images are then pushed to configured docker registry.
55+
- This script builds docker images for core, app and ui components of compage. The images are then pushed to configured docker registry.

deploy/steps.md

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,66 @@
1-
### Steps to create a cassandra cluster on k8s using k8ssandra operator
1+
### Steps to install compage with local cassandra cluster on k8s using k8ssandra operator
2+
```shell
23
./create-kind-cluster.sh
34

4-
helm repo add k8ssandra https://helm.k8ssandra.io/stable
5-
helm repo update
5+
### install cert-manager
66
helm repo add jetstack https://charts.jetstack.io
77
helm repo update
88
helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --set installCRDs=true
9+
10+
### install k8ssandra operator
11+
helm repo add k8ssandra https://helm.k8ssandra.io/stable
12+
helm repo update
913
helm install k8ssandra-operator k8ssandra/k8ssandra-operator -n k8ssandra-operator --set global.clusterScoped=true --create-namespace
1014

15+
### create cassandra cluster
1116
kubectl apply -n k8ssandra-operator -f k8sc.yml
1217
kubectl get pods -n k8ssandra-operator
1318
kubectl describe k8cs test -n k8ssandra-operator
19+
20+
### Get cassandra username and password
1421
CASS_USERNAME=$(kubectl get secret test-superuser -n k8ssandra-operator -o=jsonpath='{.data.username}' | base64 --decode)
1522
echo $CASS_USERNAME
1623
CASS_PASSWORD=$(kubectl get secret test-superuser -n k8ssandra-operator -o=jsonpath='{.data.password}' | base64 --decode)
1724
echo $CASS_PASSWORD
25+
26+
### Connect to cassandra cluster
1827
kubectl exec -it test-dc1-default-sts-0 -n k8ssandra-operator -- /bin/bash
1928
cqlsh -u test-superuser -p $CASS_PASSWORD
2029

2130
### Fire ddl commands in ddl.sql
31+
```
2232
### Fire below commands to install ingress controller
33+
```shell
2334
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
2435
kubectl wait --namespace ingress-nginx --for=condition=ready pod --selector=app.kubernetes.io/component=controller --timeout=90s
36+
```
2537

2638
### Create namespace
39+
```shell
2740
kubectl create ns compage
2841
kubens compage
29-
30-
### Create docker images
42+
```
43+
### Create docker images [optional if you are installing public chart, you can skip this step. You just need to build the ui docker image and load it into kind cluster]
44+
```shell
3145
./build-docker-images.sh
46+
```
3247

3348
### Load docker images into kind cluster
49+
```shell
3450
kind load docker-image --name compage ghcr.io/intelops/compage/app:v1Next
3551
kind load docker-image --name compage ghcr.io/intelops/compage/core:v1Next
3652
kind load docker-image --name compage ghcr.io/intelops/compage/ui:v1Next
53+
```
3754

3855
### Update image tags and cassandra password in values.yaml
39-
### Install compage helm chart from compage root directory
56+
#### Install compage helm chart from compage root directory
57+
```shell
4058
helm install compage charts/compage --values charts/compage/values.yaml
41-
42-
### wait for pods to be ready
59+
```
60+
#### wait for pods to be ready
61+
```shell
4362
watch kubectl get pods -n compage
44-
63+
```
4564
## Common issues
46-
https://www.scmgalaxy.com/tutorials/kubernetes-error-1-no-preemption-victims-found-for-incoming-pod/#:~:text=The%20error%20message%20%E2%80%9C0%2F1,to%20meet%20the%20pod's%20requirements.
47-
https://kind.sigs.k8s.io/docs/user/known-issues/#pod-errors-due-to-too-many-open-files
65+
- https://www.scmgalaxy.com/tutorials/kubernetes-error-1-no-preemption-victims-found-for-incoming-pod/
66+
- https://kind.sigs.k8s.io/docs/user/known-issues/#pod-errors-due-to-too-many-open-files

0 commit comments

Comments
 (0)