Skip to content

turtlemint argocd clickhouse config #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/clickhouse-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Sample installation is shown below.

```
argocd app create clickhouse-operator \
--repo https://github.com/Altinity/argocd-examples-clickhouse.git \
--repo https://github.com/rahularram1999/argocd-examples-clickhouse.git.git \
--path apps/clickhouse-operator \
--dest-server https://kubernetes.default.svc --dest-namespace ch
--dest-server https://kubernetes.default.svc --dest-namespace clickhouse
argocd app sync clickhouse-operator
```

Expand Down
2 changes: 2 additions & 0 deletions apps/clickhouse-operator/values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Values for ClickHouse operator
clickhouse-operator:
nodeSelector:
nodeType: clickhouse
# None. Add them at this level of indentation.
4 changes: 2 additions & 2 deletions apps/clickhouse/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Sample installation is shown below.

```
argocd app create clickhouse \
--repo https://github.com/Altinity/argocd-examples-clickhouse.git \
--repo https://github.com/rahularram1999/argocd-examples-clickhouse.git.git \
--path apps/clickhouse \
--dest-server https://kubernetes.default.svc --dest-namespace ch
--dest-server https://kubernetes.default.svc --dest-namespace clickhouse
argocd app sync clickhouse
```

Expand Down
31 changes: 22 additions & 9 deletions apps/clickhouse/demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ metadata:
spec:
configuration:
clusters:
- name: "demo"
- name: "prism"
layout:
shardsCount: 1
replicasCount: 2
replicasCount: 4
templates:
podTemplate: server
volumeClaimTemplate: storage
podTemplate: clickhouse-in-zone-ap-south-1b
volumeClaimTemplate: turtlemint-ch-storage-vc-template
users:
root/networks/ip: "::/0"
root/password: secretsecret
root/password: c1ickh0u$e
root/profile: default
root/access_management: 1
files:
Expand All @@ -32,18 +32,31 @@ spec:
- host: zookeeper
templates:
podTemplates:
- name: server
- name: clickhouse-in-zone-ap-south-1b
spec:
containers:
- name: clickhouse
image: altinity/clickhouse-server:22.3.15.34.altinitystable
image: clickhouse/clickhouse-server:23.5.3.24
resources:
requests:
memory: "5700Mi"
limits:
memory: "5922Mi"
nodeSelector:
nodeType: clickhouse
tolerations:
- key: namespace
operator: Equal
value: clickhouse
effect: NoSchedule
volumeClaimTemplates:
- name: storage
- name: turtlemint-ch-storage-vc-template
# Do not delete PVC if installation is dropped.
reclaimPolicy: Retain
spec:
storageClassName: gp2
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 50Gi
storage: 100Gi
4 changes: 2 additions & 2 deletions apps/cloudbeaver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ UI access.

```
argocd app create cloudbeaver \
--repo https://github.com/Altinity/argocd-examples-clickhouse.git \
--repo https://github.com/rahularram1999/argocd-examples-clickhouse.git.git \
--path apps/cloudbeaver \
--dest-server https://kubernetes.default.svc --dest-namespace ch
--dest-server https://kubernetes.default.svc --dest-namespace clickhouse
argocd app sync cloudbeaver
kubectl port-forward svc/cloudbeaver -n ch 8978:8978
```
Expand Down
7 changes: 7 additions & 0 deletions apps/cloudbeaver/cloudbeaver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ spec:
volumeMounts:
- name: workspace
mountPath: /opt/cloudbeaver/workspace
nodeSelector:
nodeType: clickhouse
tolerations:
- key: namespace
operator: Equal
value: clickhouse
effect: NoSchedule
# Storage for CloudBeaver workspace.
volumeClaimTemplates:
- metadata:
Expand Down
6 changes: 3 additions & 3 deletions apps/grafana-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ Sample installation is shown below.

```
argocd app create grafana-operator \
--repo https://github.com/Altinity/argocd-examples-clickhouse.git \
--repo https://github.com/rahularram1999/argocd-examples-clickhouse.git.git \
--path apps/grafana-operator \
--dest-server https://kubernetes.default.svc --dest-namespace ch
--dest-server https://kubernetes.default.svc --dest-namespace clickhouse
argocd app sync grafana-operator
```

Expand All @@ -25,7 +25,7 @@ The grafana-operator leverages the kustomize deployment in the
grafana-operator project. The kustomize.yaml in this directory selects
the version to use.

The namespace ch is hardwired in ns-patch.yaml.
The namespace clickhouse is hardwired in ns-patch.yaml.

## Acknowledgements and Further Information

Expand Down
4 changes: 2 additions & 2 deletions apps/grafana/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Sample installation is shown below.

```
argocd app create grafana \
--repo https://github.com/Altinity/argocd-examples-clickhouse.git \
--repo https://github.com/rahularram1999/argocd-examples-clickhouse.git.git \
--path apps/grafana \
--dest-server https://kubernetes.default.svc --dest-namespace ch
--dest-server https://kubernetes.default.svc --dest-namespace clickhouse
argocd app sync grafana
kubectl port-forward svc/grafana -n ch 3000:3000
```
Expand Down
7 changes: 7 additions & 0 deletions apps/grafana/grafana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ spec:
securityContext:
runAsUser: 472
fsGroup: 0
nodeSelector:
nodeType: clickhouse
tolerations:
- key: namespace
operator: Equal
value: clickhouse
effect: NoSchedule
volumeClaimTemplates:
- metadata:
name: grafana-persistent-storage
Expand Down
2 changes: 1 addition & 1 deletion apps/prometheus/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ appVersion: "1.0"
dependencies:
- name: prometheus
version: 23.1.0
repository: https://prometheus-community.github.io/helm-charts/
repository: https://prometheus-community.github.io/helm-charts/
4 changes: 2 additions & 2 deletions apps/prometheus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ Sample installation is shown below.

```
argocd app create prometheus \
--repo https://github.com/Altinity/argocd-examples-clickhouse.git \
--repo https://github.com/rahularram1999/argocd-examples-clickhouse.git.git \
--path apps/prometheus \
--dest-server https://kubernetes.default.svc --dest-namespace ch
--dest-server https://kubernetes.default.svc --dest-namespace clickhouse
argocd app sync prometheus
```

Expand Down
4 changes: 4 additions & 0 deletions apps/prometheus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ prometheus:
server:
persistentVolume:
size: 16Gi
service:
port: 9200
nodeSelector:
nodeType: clickhouse
4 changes: 2 additions & 2 deletions apps/zookeeper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Sample installation is shown below.

```
argocd app create zookeeper \
--repo https://github.com/Altinity/argocd-examples-clickhouse.git \
--repo https://github.com/rahularram1999/argocd-examples-clickhouse.git.git \
--path apps/zookeeper \
--dest-server https://kubernetes.default.svc --dest-namespace ch
--dest-server https://kubernetes.default.svc --dest-namespace clickhouse
argocd app sync zookeeper
```

Expand Down
7 changes: 7 additions & 0 deletions apps/zookeeper/zookeeper-1-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,13 @@ spec:
securityContext:
runAsUser: 1000
fsGroup: 1000
nodeSelector:
nodeType: clickhouse
tolerations:
- key: namespace
operator: Equal
value: clickhouse
effect: NoSchedule
volumeClaimTemplates:
- metadata:
name: datadir-volume
Expand Down
6 changes: 3 additions & 3 deletions appsets/backend/appset-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ spec:
prune: true
selfHeal: true
source:
repoURL: https://github.com/Altinity/argocd-examples-clickhouse
targetRevision: main
repoURL: https://github.com/rahularram1999/argocd-examples-clickhouse.git
targetRevision: feature/turtlemint_argocd_clickhouse
path: '{{path}}'
destination:
server: https://kubernetes.default.svc
namespace: ch
namespace: clickhouse
20 changes: 13 additions & 7 deletions create-stack.sh
Original file line number Diff line number Diff line change
@@ -1,31 +1,37 @@
#!/bin/bash
NS=${NAMESPACE:-ch}
NS=${NAMESPACE:-clickhouse}
echo "This command will install the analytic stack in namespace ${NS}"
echo -n "Press enter or ^c to cancel: "
read
set -x
argocd app create clickhouse-operator \
--repo https://github.com/Altinity/argocd-examples-clickhouse.git \
--repo https://github.com/rahularram1999/argocd-examples-clickhouse.git \
--revision feature/turtlemint_argocd_clickhouse \
--path apps/clickhouse-operator \
--dest-server https://kubernetes.default.svc --dest-namespace ${NS}
argocd app create prometheus \
--repo https://github.com/Altinity/argocd-examples-clickhouse.git \
--repo https://github.com/rahularram1999/argocd-examples-clickhouse.git \
--revision feature/turtlemint_argocd_clickhouse \
--path apps/prometheus \
--dest-server https://kubernetes.default.svc --dest-namespace ${NS}
argocd app create grafana \
--repo https://github.com/Altinity/argocd-examples-clickhouse.git \
--repo https://github.com/rahularram1999/argocd-examples-clickhouse.git \
--revision feature/turtlemint_argocd_clickhouse \
--path apps/grafana \
--dest-server https://kubernetes.default.svc --dest-namespace ${NS}
argocd app create zookeeper \
--repo https://github.com/Altinity/argocd-examples-clickhouse.git \
--repo https://github.com/rahularram1999/argocd-examples-clickhouse.git \
--revision feature/turtlemint_argocd_clickhouse \
--path apps/zookeeper \
--dest-server https://kubernetes.default.svc --dest-namespace ${NS}
argocd app create clickhouse \
--repo https://github.com/Altinity/argocd-examples-clickhouse.git \
--repo https://github.com/rahularram1999/argocd-examples-clickhouse.git \
--revision feature/turtlemint_argocd_clickhouse \
--path apps/clickhouse \
--dest-server https://kubernetes.default.svc --dest-namespace ${NS}
argocd app create cloudbeaver \
--repo https://github.com/Altinity/argocd-examples-clickhouse.git \
--repo https://github.com/rahularram1999/argocd-examples-clickhouse.git \
--revision feature/turtlemint_argocd_clickhouse \
--path apps/cloudbeaver \
--dest-server https://kubernetes.default.svc --dest-namespace ${NS}
argocd app sync clickhouse-operator
Expand Down
2 changes: 1 addition & 1 deletion forward-stack.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
NS=${NAMESPACE:-ch}
NS=${NAMESPACE:-clickhouse}
echo "This command will forward ports on the analytic stack in namespace ${NS}"
echo -n "Press enter or ^c to cancel: "
read
Expand Down