Skip to content

Commit 4494aba

Browse files
feat: add devspace docs
1 parent 79dfae6 commit 4494aba

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

README.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,21 @@ The monitoring-plugin is currently in a transitionary state as the remaining pag
5656

5757
Changes to the store must be completed in the `openshift/console` codebase and are not backwards compatible unless cherry-picked with purpose.
5858

59+
### Running using Devspace
60+
61+
Install the [devspace](https://www.devspace.sh/docs/getting-started/installation) cli.
62+
63+
1. Install the frontend dependencies running `make install-frontend`.
64+
2. Start the frontend `make start-feature-frontend`.
65+
4. Select the namespace the monitoring-plugin is located in `devspace use namespace openshift-monitoring`.
66+
5. In a different terminal start the devspace sync `devspace dev`.
67+
68+
When running the `devspace dev` command, the pipeline will run the `scale_down_cmo` function to prevent CMO from fighting over control of the pod. After CMO has been scaled down, devspace will "take over" the monitoring-plugin pod, grabbing all of the certificates and backend binary and configuration to run in the devspace pod. The backend will stay the same as what is built in the Dockerfile.devspace file, only the frontend changes will be reflected live in cluster.
69+
70+
After the pod has been "taken over" Devspace begins a sync process which will mirror changes from you local `./web/dist` folder into the `/opt/app-root/web/dist` folder in the devspace pod. You can then make changes to your frontend files locally which will trigger the locally running webpack dev server to rebuild the `./web/dist` folder, which will trigger Devspace to re-synced. You can then reload your console webpage to see your local changes running in the cluster.
71+
72+
After development you can run `devspace purge` which will cleanup and then call the `scale_up_cmo` pipeline.
73+
5974
### Local Development
6075

6176
#### Dependencies
@@ -192,6 +207,4 @@ oc port-forward -n openshift-monitoring service/prometheus-operated 9090:9090
192207
curl "http://localhost:9090/api/v1/query?query=up"
193208
```
194209

195-
Adjust Perses local instance http://localhost:8080/ to use the a proxy to http://localhost:9090/ instead of http://demo.prometheus.io.
196-
197-
210+
Adjust Perses local instance http://localhost:8080/ to use the a proxy to http://localhost:9090/ instead of http://demo.prometheus.io.

0 commit comments

Comments
 (0)