Skip to content

Commit 5b2bff2

Browse files
[ONPREM-2020] Update docs on Helm repo and shorten chart name (#20)
* Update docs for the Helm repo * Shorten chart name
1 parent 5960b8d commit 5b2bff2

File tree

5 files changed

+49
-27
lines changed

5 files changed

+49
-27
lines changed

.circleci/config.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ jobs:
100100
echo "${SIGNING_KEY_PASSPHRASE}" | ./do package-chart sign --passphrase-file -
101101
- run:
102102
name: List contents of Helm package
103-
command: tar -tvf "./target/circleci-server-monitoring-stack-$(./do version).tgz"
103+
command: tar -tvf "./target/server-monitoring-stack-$(./do version).tgz"
104104
- when:
105105
condition:
106106
equal: [<< pipeline.git.branch >>, main]
@@ -125,7 +125,7 @@ jobs:
125125
name: Publish Helm chart
126126
command: |
127127
package_cloud push circleci/server-monitoring-stack/helm/v1 \
128-
./target/circleci-server-monitoring-stack-"$(./do version)".tgz
128+
./target/server-monitoring-stack-"$(./do version)".tgz
129129
- run:
130130
name: "Push failed: Have you bumped the chart version?"
131131
command: |
@@ -161,17 +161,17 @@ jobs:
161161
- run:
162162
name: Create namespace
163163
command: |
164-
kubectl create ns circleci-server-monitoring
165-
kubectl config set-context --current --namespace circleci-server-monitoring
164+
kubectl create ns server-monitoring
165+
kubectl config set-context --current --namespace server-monitoring
166166
- run: ./do package-chart
167167
- run:
168168
name: Install dependencies
169169
command: |
170-
helm install circleci-server-monitoring-stack ./target/circleci-server-monitoring-stack*.tgz \
171-
-n circleci-server-monitoring --set global.enabled=false --set prometheusOperator.installCRDs=true
170+
helm install server-monitoring-stack ./target/server-monitoring-stack*.tgz \
171+
-n server-monitoring --set global.enabled=false --set prometheusOperator.installCRDs=true
172172
- run:
173173
name: Install Helm chart
174-
command: helm upgrade --install circleci-server-monitoring-stack . --reset-values --timeout=2m -n circleci-server-monitoring
174+
command: helm upgrade --install server-monitoring-stack . --reset-values --timeout=2m -n server-monitoring
175175
- run:
176176
name: Watch Pods
177177
command: kubectl get pods -w
@@ -213,7 +213,7 @@ jobs:
213213
when: on_fail
214214
- run:
215215
name: Uninstall Helm chart
216-
command: helm uninstall circleci-server-monitoring-stack -n circleci-server-monitoring
216+
command: helm uninstall server-monitoring-stack -n server-monitoring
217217

218218
commands:
219219
notify_failing_main:

Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: v2
2-
name: circleci-server-monitoring-stack
2+
name: server-monitoring-stack
33
description: A reference Helm chart for setting up a monitoring stack for CircleCI server
44
version: 0.1.0-alpha.0
55
dependencies:

README.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ A reference for tools, configurations, and documentation used to monitor CircleC
55

66
This repository is currently under active development and is not yet a supported resource. Please refer to it at your own discretion until further notice.
77

8-
# circleci-server-monitoring-stack
8+
# server-monitoring-stack
99

1010
A reference Helm chart for setting up a monitoring stack for CircleCI server
1111

@@ -34,25 +34,32 @@ telegraf:
3434
listen: ":9273"
3535
```
3636
37-
### 2. Install Dependencies
37+
### 3. Add Helm Repository
38+
39+
First, add the CircleCI Server Monitoring Stack Helm repository:
40+
```bash
41+
$ helm repo add server-monitoring-stack https://packagecloud.io/circleci/server-monitoring-stack/helm
42+
$ helm repo update
43+
```
44+
45+
### 3. Install Dependencies
3846

3947
Before installing the full chart, you must first install the dependency subcharts, including the Prometheus Custom Resource Definitions (CRDs) and the Grafana operator chart. This assumes you are installing it in the same namespace as your CircleCI server installation:
4048

4149
```bash
42-
$ helm install circleci-server-monitoring-stack . --dependency-update --set global.enabled=false --set prometheusOperator.installCRDs=true -n <your-server-namespace>
50+
$ helm install server-monitoring-stack server-monitoring-stack/server-monitoring-stack --dependency-update --set global.enabled=false --set prometheusOperator.installCRDs=true --version 0.1.0-alpha.0 -n <your-server-namespace>
4351
```
44-
4552
> **_NOTE:_** It's possible to install the monitoring stack in a different namespace than the CircleCI server installation. If you do so, set the `prometheus.serviceMonitor.selectorNamespaces` value with the target namespace.
4653
47-
### 3. Install the Helm Chart
54+
### 4. Install the Helm Chart
4855

4956
Next, install the Helm chart using the following command:
5057

5158
```bash
52-
$ helm upgrade --install circleci-server-monitoring-stack . --reset-values -n <your-server-namespace>
59+
$ helm upgrade --install server-monitoring-stack server-monitoring-stack/server-monitoring-stack --reset-values --version 0.1.0-alpha.0 -n <your-server-namespace>
5360
```
5461

55-
### 4. Verify Prometheus Is Up and Targeting Telegraf
62+
### 5. Verify Prometheus Is Up and Targeting Telegraf
5663
To verify that Prometheus is working correctly and targeting Telegraf, use the following command to port-forward Prometheus:
5764

5865
```bash
@@ -63,7 +70,7 @@ Then visit http://localhost:9090/targets in your browser. Verify that Telegraf a
6370

6471
![Prometheus UI showing Telegraf target as up](docs/images/prometheus-telegraf-targets.png)
6572

66-
### 5. Verify Grafana Is Up and Connected to Prometheus
73+
### 6. Verify Grafana Is Up and Connected to Prometheus
6774

6875
To verify that Grafana is working correctly and connected to Prometheus, use the following command to port-forward Grafana:
6976
```bash
@@ -74,7 +81,7 @@ Then visit http://localhost:3000 in your browser. Once logged in with the defaul
7481

7582
![Prometheus UI showing Telegraf target as up](docs/images/grafana-dashboards.png)
7683

77-
### 6. Next Steps
84+
### 7. Next Steps
7885

7986
After ensuring both Prometheus and Grafana are operational, consider these enhancements:
8087

@@ -166,3 +173,7 @@ grafana:
166173
| prometheusOperator.prometheusConfigReloader.image.repository | string | `"quay.io/prometheus-operator/prometheus-config-reloader"` | Image repository for Prometheus Config Reloader. |
167174
| prometheusOperator.prometheusConfigReloader.image.tag | string | `"v0.80.1"` | Tag for the Prometheus Config Reloader image. |
168175
| prometheusOperator.replicas | int | `1` | Number of Prometheus Operator replicas to deploy. |
176+
177+
## Releasing
178+
179+
Releases are managed by the CI/CD pipeline on the main branch, with an approval job gate called `approve-deploy-chart`. Before releasing, increment the Helm chart version in `Chart.yaml` and regenerate the documentation using `./do helm-docs`. Once approved, the release will be available in the [package repository](https://packagecloud.io/circleci/server-monitoring-stack).

README.md.gotmpl

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,32 @@ telegraf:
2828
listen: ":9273"
2929
```
3030

31-
### 2. Install Dependencies
31+
### 3. Add Helm Repository
32+
33+
First, add the CircleCI Server Monitoring Stack Helm repository:
34+
```bash
35+
$ helm repo add {{ template "chart.name" . }} https://packagecloud.io/circleci/server-monitoring-stack/helm
36+
$ helm repo update
37+
```
38+
39+
### 3. Install Dependencies
3240

3341
Before installing the full chart, you must first install the dependency subcharts, including the Prometheus Custom Resource Definitions (CRDs) and the Grafana operator chart. This assumes you are installing it in the same namespace as your CircleCI server installation:
3442

3543
```bash
36-
$ helm install {{ template "chart.name" . }} . --dependency-update --set global.enabled=false --set prometheusOperator.installCRDs=true -n <your-server-namespace>
44+
$ helm install {{ template "chart.name" . }} {{ template "chart.name" . }}/{{ template "chart.name" . }} --dependency-update --set global.enabled=false --set prometheusOperator.installCRDs=true --version {{ template "chart.version" . }} -n <your-server-namespace>
3745
```
38-
3946
> **_NOTE:_** It's possible to install the monitoring stack in a different namespace than the CircleCI server installation. If you do so, set the `prometheus.serviceMonitor.selectorNamespaces` value with the target namespace.
4047

41-
### 3. Install the Helm Chart
48+
### 4. Install the Helm Chart
4249

4350
Next, install the Helm chart using the following command:
4451

4552
```bash
46-
$ helm upgrade --install {{ template "chart.name" . }} . --reset-values -n <your-server-namespace>
53+
$ helm upgrade --install {{ template "chart.name" . }} {{ template "chart.name" . }}/{{ template "chart.name" . }} --reset-values --version {{ template "chart.version" . }} -n <your-server-namespace>
4754
```
4855

49-
### 4. Verify Prometheus Is Up and Targeting Telegraf
56+
### 5. Verify Prometheus Is Up and Targeting Telegraf
5057
To verify that Prometheus is working correctly and targeting Telegraf, use the following command to port-forward Prometheus:
5158

5259
```bash
@@ -57,7 +64,7 @@ Then visit http://localhost:9090/targets in your browser. Verify that Telegraf a
5764

5865
![Prometheus UI showing Telegraf target as up](docs/images/prometheus-telegraf-targets.png)
5966

60-
### 5. Verify Grafana Is Up and Connected to Prometheus
67+
### 6. Verify Grafana Is Up and Connected to Prometheus
6168

6269
To verify that Grafana is working correctly and connected to Prometheus, use the following command to port-forward Grafana:
6370
```bash
@@ -68,7 +75,7 @@ Then visit http://localhost:3000 in your browser. Once logged in with the defaul
6875

6976
![Prometheus UI showing Telegraf target as up](docs/images/grafana-dashboards.png)
7077

71-
### 6. Next Steps
78+
### 7. Next Steps
7279

7380
After ensuring both Prometheus and Grafana are operational, consider these enhancements:
7481

@@ -108,3 +115,7 @@ grafana:
108115
> **_NOTE:_** Use a custom storage class with a 'Retain' policy to secure data integrity.
109116

110117
{{ template "chart.valuesSection" . }}
118+
119+
## Releasing
120+
121+
Releases are managed by the CI/CD pipeline on the main branch, with an approval job gate called `approve-deploy-chart`. Before releasing, increment the Helm chart version in `Chart.yaml` and regenerate the documentation using `./do helm-docs`. Once approved, the release will be available in the [package repository](https://packagecloud.io/circleci/server-monitoring-stack).

do

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ package-chart() {
7070
helm package --sign --key "${KEY:-<eng-on-prem@circleci.com>}" --keyring ${KEYRING:-~/.gnupg/secring.gpg} \
7171
--destination ./target . "$@"
7272
echo 'Verifying Helm chart signature'
73-
helm verify ./target/circleci-server-monitoring-stack-"$(version)".tgz
73+
helm verify ./target/server-monitoring-stack-"$(version)".tgz
7474
;;
7575
*)
7676
helm package --destination ./target .

0 commit comments

Comments
 (0)