|
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 |
2 | 3 | ./create-kind-cluster.sh |
3 | 4 |
|
4 | | -helm repo add k8ssandra https://helm.k8ssandra.io/stable |
5 | | -helm repo update |
| 5 | +### install cert-manager |
6 | 6 | helm repo add jetstack https://charts.jetstack.io |
7 | 7 | helm repo update |
8 | 8 | 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 |
9 | 13 | helm install k8ssandra-operator k8ssandra/k8ssandra-operator -n k8ssandra-operator --set global.clusterScoped=true --create-namespace |
10 | 14 |
|
| 15 | +### create cassandra cluster |
11 | 16 | kubectl apply -n k8ssandra-operator -f k8sc.yml |
12 | 17 | kubectl get pods -n k8ssandra-operator |
13 | 18 | kubectl describe k8cs test -n k8ssandra-operator |
| 19 | + |
| 20 | +### Get cassandra username and password |
14 | 21 | CASS_USERNAME=$(kubectl get secret test-superuser -n k8ssandra-operator -o=jsonpath='{.data.username}' | base64 --decode) |
15 | 22 | echo $CASS_USERNAME |
16 | 23 | CASS_PASSWORD=$(kubectl get secret test-superuser -n k8ssandra-operator -o=jsonpath='{.data.password}' | base64 --decode) |
17 | 24 | echo $CASS_PASSWORD |
| 25 | + |
| 26 | +### Connect to cassandra cluster |
18 | 27 | kubectl exec -it test-dc1-default-sts-0 -n k8ssandra-operator -- /bin/bash |
19 | 28 | cqlsh -u test-superuser -p $CASS_PASSWORD |
20 | 29 |
|
21 | 30 | ### Fire ddl commands in ddl.sql |
| 31 | +``` |
22 | 32 | ### Fire below commands to install ingress controller |
| 33 | +```shell |
23 | 34 | kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml |
24 | 35 | kubectl wait --namespace ingress-nginx --for=condition=ready pod --selector=app.kubernetes.io/component=controller --timeout=90s |
| 36 | +``` |
25 | 37 |
|
26 | 38 | ### Create namespace |
| 39 | +```shell |
27 | 40 | kubectl create ns compage |
28 | 41 | 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 |
31 | 45 | ./build-docker-images.sh |
| 46 | +``` |
32 | 47 |
|
33 | 48 | ### Load docker images into kind cluster |
| 49 | +```shell |
34 | 50 | kind load docker-image --name compage ghcr.io/intelops/compage/app:v1Next |
35 | 51 | kind load docker-image --name compage ghcr.io/intelops/compage/core:v1Next |
36 | 52 | kind load docker-image --name compage ghcr.io/intelops/compage/ui:v1Next |
| 53 | +``` |
37 | 54 |
|
38 | 55 | ### 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 |
40 | 58 | 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 |
43 | 62 | watch kubectl get pods -n compage |
44 | | - |
| 63 | +``` |
45 | 64 | ## 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