Skip to content

Commit b5e6bc2

Browse files
committed
OU-1083: claude slash command to start monitoring-console-plugin + perses dev env
1 parent 851e288 commit b5e6bc2

2 files changed

Lines changed: 51 additions & 0 deletions

File tree

.claude/commands/run-perses-dev.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
name: run-perses-dev
3+
description: Setup a development environment for monitoring-console-plugin + perses
4+
parameters:
5+
- name: perses_path
6+
- description: The path on the local machine that points to a clone of https://github.com/perses/perses (e.g. /Users/bob/git_repos/perses)
7+
- required: true
8+
allowed-tools: Read, Grep, tmux, which, ls, lsof, oc
9+
---
10+
11+
0. perses_path
12+
- Go to the root and cd .claude/commands/configs/run-perses-dev-config.yaml
13+
- If not defined, create the file and fill out the perses path
14+
15+
1. Create a tmux session called 'monitoring-perses-dev' with 8 panes = 4 columns x 2 rows
16+
Split horitzontally, then split verically.
17+
Then go clockwise and split horitzontally.
18+
- Pane 0
19+
- Path: monitoring-plugin (root of this repo)
20+
- Label: monitoring-console-plugin-frontend
21+
- Run: make start-frontend
22+
- Pane 2
23+
- Path: monitoring-plugin (root of this repo)
24+
- Label: monitoring-console-plugin-console
25+
- Run: make start-feature-console
26+
- Pane 4
27+
- Path: monitoring-plugin (root of this repo)
28+
- Label: monitoring-console-plugin-backend
29+
- Run: make start-feature-backend
30+
- Pane 6
31+
- Path: monitoring-plugin (root of this repo)
32+
- Label: port-forward-promtheus-operator
33+
- Run: oc port-forward -n openshift-monitoring service/prometheus-operated 9090:9090
34+
- Pane 1
35+
- Path: `{perses_path}`
36+
- Label: perses-backend
37+
- Run: ./scripts/api_backend_dev.sh
38+
- Pane 3
39+
- Path: `{perses_path}/ui`
40+
- Label: perses-ui
41+
- Run: npm run start
42+
43+
2. Final checks
44+
- Check if all the processes in each pane is running without error. If there is a error diagnose and fix it.
45+
- In bold output, tell the user the name of the session and tmux session tips like how to attach to sessions, how to move around the panels using prefix + arrows, how to delete a session, how to list session
46+
- Navigate to `{perses_path}/dev/config.yaml`. The spec `security.enable_auth` should be `false`.
47+
- Tell user that openshift console platform is located at http://localhost:9000
48+
- Tell user that perses is located at http://localhost:3000
49+
50+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ node_modules/
1212
dist/
1313
.devspace
1414
web/po-files/
15+
.claude/commands/configs

0 commit comments

Comments
 (0)