This repository delivers two OpenShift Console dynamic plugins:
- ACM (
frontend/plugins/acm) — Red Hat Advanced Cluster Management features - MCE (
frontend/plugins/mce) — MultiCluster Engine features
For a quick-start guide, see the Running section in README.md.
From the root of the console repository, make sure your kubecontext is set to a hub cluster, then run:
npm run setup
npm run pluginsThis concurrently starts the backend server, frontend webpack development server, and a local OpenShift Console container.
The console will be running at http://localhost:9000 (or the value of CONSOLE_PORT).
If you are running kubevirt-plugin, odf-console, or gitops-plugin, you can have them loaded into the OpenShift Console as well by specifying the port they are served on with the KUBEVIRT_PORT, ODF_PORT, or GITOPS_PORT environment variables, respectively.
KUBEVIRT_PORT=9001 npm run pluginsThe default OpenShift Console version is the oldest officially supported by the current release, as defined by CONSOLE_VERSION in start-ocp-console.sh. To override it, set the CONSOLE_VERSION environment variable.
CONSOLE_VERSION=4.21 npm run pluginsIf you need to test against a locally-built OpenShift Console (instead of the container image), use:
npm run setup
npm run plugins-devThis starts the backend server and frontend webpack development server, but does not start the OpenShift Console container. You are responsible for building and running the OCP Console bridge yourself.
Clone and build the OCP Console repository. Ensure that its dependencies are met in your local environment.
git clone git@github.com:openshift/console.git
cd console
./build.shStart the OCP Console bridge with the ACM and MCE plugins registered:
source ./contrib/oc-environment.sh
./bin/bridge \
-plugins mce=http://localhost:3001 \
-plugins acm=http://localhost:3002 \
--plugin-proxy='{"services":[{"consoleAPIPath":"/api/proxy/plugin/mce/console/","endpoint":"https://localhost:4000","authorize":true},{"consoleAPIPath":"/api/proxy/plugin/acm/console/","endpoint":"https://localhost:4000","authorize":true}]}'The console will be running at http://localhost:9000.
Bridge variables can also be passed as environment variables:
BRIDGE_PLUGIN_PROXY='{"services":[{"consoleAPIPath":"/api/proxy/plugin/mce/console/","endpoint":"https://localhost:4000","authorize":true},{"consoleAPIPath":"/api/proxy/plugin/acm/console/","endpoint":"https://localhost:4000","authorize":true}]}'Note: With recent post-4.10 builds, you need to run OpenShift Console with authentication for authorization to work with the proxied services. Follow these instructions. Alternatively, you can revert a commit that regressed the ability to use proxies that require authorization when running without authentication and continue with the instructions above:
git revert 1230920afbcd7cbc1d2f0c6b1e48744c72eb60be -m 1 -n- OpenShift Console Dynamic Plugin SDK — comprehensive documentation on building dynamic plugins, shared modules, webpack configuration, and i18n
- ACM ConsolePlugin manifest — the Helm template used by the ACM installer
- MCE ConsolePlugin manifest — the Helm template used by the MCE installer
- Multicluster SDK — APIs for multicluster-aware dynamic plugins