mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
71 lines
2.2 KiB
Plaintext
71 lines
2.2 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * web_console/dynamic-plugin/dynamic-plugins-get-started.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="dynamic-plugin-development_{context}"]
|
|
= Dynamic plugin development
|
|
|
|
You can run the plugin using a local development environment. The {product-title} web console runs in a container connected to the cluster you have logged into.
|
|
|
|
.Prerequisites
|
|
* You must have cloned the link:https://github.com/openshift/console-plugin-template[`console-plugin-template`] repository, which contains a template for creating plugins.
|
|
+
|
|
[IMPORTANT]
|
|
====
|
|
Red{nbsp}Hat does not support custom plugin code. Only link:https://access.redhat.com/solutions/5893251[Cooperative community support] is available for your plugin.
|
|
====
|
|
* You must have an {product-title} cluster running.
|
|
* You must have the {oc-first} installed.
|
|
* You must have link:https://yarnpkg.com/[`yarn`] installed.
|
|
* You must have link:https://www.docker.com/[Docker] v3.2.0 or later or link:https://podman.io/[Podman] v3.2.0 or later installed and running.
|
|
|
|
.Procedure
|
|
|
|
. Open two terminal windows.
|
|
|
|
. In one terminal window, run the following command to install the dependencies for your plugin using yarn.
|
|
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ yarn install
|
|
----
|
|
|
|
. After installing, run the following command to start yarn.
|
|
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ yarn run start
|
|
----
|
|
|
|
. In another terminal window, login to the {product-title} through the CLI.
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc login
|
|
----
|
|
|
|
. Run the {product-title} web console in a container connected to the cluster you have logged into by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ yarn run start-console
|
|
----
|
|
+
|
|
[NOTE]
|
|
====
|
|
The `yarn run start-console` command runs an `amd64` image and might fail when run with Apple Silicon and Podman. You can work around it with `qemu-user-static` by running the following commands:
|
|
|
|
[source,terminal]
|
|
----
|
|
$ podman machine ssh
|
|
$ sudo -i
|
|
$ rpm-ostree install qemu-user-static
|
|
$ systemctl reboot
|
|
----
|
|
====
|
|
|
|
.Verification
|
|
* Visit link:http://localhost:9000/example[localhost:9000] to view the running plugin. Inspect the value of `window.SERVER_FLAGS.consolePlugins` to see the list of plugins which load at runtime. |