Skip to content

PeterYurkovich/monitoring-plugin

 
 

Repository files navigation

monitoring-plugin

This plugin adds the monitoring UI to the OpenShift web console.

Docker image

Before you can deploy the plugin on a cluster, you must build an image and push it to an image registry.

  1. Build the image:

    docker build -t quay.io/my-repositroy/my-plugin:latest .
  2. Run the image:

    docker run -it --rm -d -p 9001:80 quay.io/my-repository/my-plugin:latest
  3. Push the image:

    docker push quay.io/my-repository/my-plugin:latest

NOTE: If you have a Mac with Apple silicon, you will need to add the flag --platform=linux/amd64 when building the image to target the correct platform to run in-cluster.

Deployment on cluster

A Helm chart is available to deploy the plugin to an OpenShift environment.

The following Helm parameters are required:

plugin.image: The location of the image containing the plugin that was previously pushed

Additional parameters can be specified if desired. Consult the chart values file for the full set of supported parameters.

Installing the Helm Chart

Install the chart into a new namespace or an existing namespace as specified by the my-plugin-namespace parameter and providing the location of the image within the plugin.image parameter by using the following command:

helm upgrade -i monitoring-plugin charts/openshift-console-plugin -n my-plugin-namespace --create-namespace --set plugin.image=my-plugin-image-location

Local Development

Dependencies

  1. Node.js and npm are required
  2. oc
  3. podman 3.2.0+ or Docker
  4. An OpenShift cluster

Running Locally

# Login to an OpenShift cluster
$ oc login <clusterAddress> -u <username> -p <password>

# Start podman (or Docker)
$ podman machine init
$ podman machine start

# Install dependencies
$ make install

# Run the application
$ make start-frontend
# In a separate terminal
$ make start-console

The application will be running at localhost:9000.

Local Development Troubleshooting

  1. Disable cache. Select 'disable cache' in your browser's DevTools > Network > 'disable cache'. Or use private/incognito mode in your browser.
  2. Enable higher log verbosity by setting -log-level=trace when starting the plugin backend. For more options to set log level see logrus documentation.

ACM Development

Dependencies

  1. Local Development Dependencies
  2. yq
  3. sed (gnu-sed for mac, with sed being aliased to that gnu-sed)

Due to the extensive number of items which would need to be run to locally run the ACM perspective, the suggested development pattern is instead repeat installations with helm. A small number of scripts have been put together to help you deploy the monitoring-plugin in its acm configuration. REGISTRY_ORG and TAG variables are available to adjust the quay image generated and used for deployment. Certain build time changes to the codebase are created when running these scripts. On Mac's these changes are not only run with the Dockerfiles, so it is not suggested to cancel the exection of this scipt part way through

make deploy-acm

About

Monitoring plugin for OpenShift console

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 85.1%
  • Go 6.1%
  • JavaScript 3.8%
  • SCSS 2.7%
  • Shell 1.1%
  • Smarty 0.5%
  • Other 0.7%