Skip to content

Commit a67eb76

Browse files
committed
WIP
1 parent d77a257 commit a67eb76

1 file changed

Lines changed: 91 additions & 0 deletions

File tree

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# GNP-Stack
2+
3+
This directory contains Kubernetes manifests for deploying the GNP-Stack to a Kubernetes cluster via Helm.
4+
5+
6+
## Setup Demo Cluster
7+
8+
Using [talosctl](https://docs.siderolabs.com/talos/v1.11/getting-started/talosctl), you can quickly set up a local Kubernetes cluster for testing and development purposes.
9+
```bash
10+
talosctl cluster create --cidr 192.168.60.0/24 --name gnp-stack_gnp-mgmt --wait=false --config-patch '{"cluster":{"network":{"cni":{"name":"none"}},"proxy":{"disabled":true}}}' --cpus-workers 12.0 --memory-workers 12000
11+
talosctl kubeconfig -n 192.168.60.2 .
12+
kubectl config view --flatten --kubeconfig ./kubeconfig > ~/.kube/config
13+
```
14+
15+
Cilium installation:
16+
```bash
17+
helm repo add cilium https://helm.cilium.io
18+
helm repo update
19+
helm upgrade --install cilium cilium/cilium \
20+
--version 1.18.3 \
21+
--namespace kube-system \
22+
--values - <<'EOF'
23+
ipam:
24+
mode: kubernetes
25+
kubeProxyReplacement: true
26+
securityContext:
27+
capabilities:
28+
ciliumAgent: [CHOWN, KILL, NET_ADMIN, NET_RAW, IPC_LOCK, SYS_ADMIN, SYS_RESOURCE, DAC_OVERRIDE, FOWNER, SETGID, SETUID]
29+
cleanCiliumState: [NET_ADMIN, SYS_ADMIN, SYS_RESOURCE]
30+
cgroup:
31+
autoMount:
32+
enabled: false
33+
hostRoot: /sys/fs/cgroup
34+
k8sServiceHost: localhost
35+
k8sServicePort: 7445
36+
EOF
37+
```
38+
39+
## New helm install full stack
40+
Install CRDs:
41+
```bash
42+
helm upgrade -i prometheus-crds oci://ghcr.io/prometheus-community/charts/prometheus-operator-crds --version 23.0.0
43+
```
44+
Install gnp-stack:
45+
```bash
46+
helm upgrade --install gnp-stack ./gnp-stack --namespace gnp-stack --create-namespace
47+
```
48+
49+
## Old install all components separately
50+
Setup namespace:
51+
```bash
52+
kubectl create namespace gnp-stack
53+
```
54+
Setup local-path-provisioner for dynamic PVCs:
55+
```bash
56+
kubectl apply -f local-path/local-path-provisioner.yaml
57+
```
58+
Prometheus CRDs and Operator:
59+
```bash
60+
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
61+
helm repo update
62+
helm upgrade --install prometheus-operator prometheus-community/kube-prometheus-stack --namespace gnp-stack --version 77.14.0 -f prometheus/values.yaml
63+
kubectl apply -f prometheus/scrape-configs.yaml
64+
```
65+
66+
Grafana:
67+
```bash
68+
helm repo add grafana https://grafana.github.io/helm-charts
69+
helm repo update
70+
helm upgrade --install grafana grafana/grafana --namespace gnp-stack --version 10.1.4 -f grafana/values.yaml
71+
kubectl apply -f grafana/dashboards/
72+
```
73+
74+
Nats:
75+
```bash
76+
helm repo add nats https://nats-io.github.io/k8s/helm/charts/
77+
helm repo update
78+
helm upgrade --install nats nats/nats --namespace gnp-stack --version 2.12.1 -f nats/values.yaml
79+
```
80+
81+
GNMIC Ingestor and Emitter:
82+
```bash
83+
kubectl apply -f gnmic-ingestor
84+
kubectl apply -f gnmic-emitter
85+
```
86+
87+
88+
## Cleanup demo cluster
89+
```bash
90+
talosctl cluster destroy --name gnp-stack_gnp-mgmt
91+
```

0 commit comments

Comments
 (0)