// 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 
ifndef::openshift-rosa-hcp,openshift-rosa[]
an {product-title} 
endif::openshift-rosa-hcp,openshift-rosa[]
ifdef::openshift-rosa-hcp[]
a {rosa-short} 
endif::openshift-rosa-hcp[]
ifdef::openshift-rosa[]
a {rosa-classic-short} 
endif::openshift-rosa[]
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 
ifndef::openshift-rosa-hcp,openshift-rosa[]
{product-title} 
endif::openshift-rosa-hcp,openshift-rosa[]
ifdef::openshift-rosa-hcp[]
{rosa-short} 
endif::openshift-rosa-hcp[]
ifdef::openshift-rosa[]
{rosa-classic-short} 
endif::openshift-rosa[]
through the CLI.
+
[source,terminal]
----
$ oc login
----

. Run the
ifndef::openshift-rosa-hcp,openshift-rosa[]
{product-title} 
endif::openshift-rosa-hcp,openshift-rosa[]
ifdef::openshift-rosa-hcp[]
{rosa-short} 
endif::openshift-rosa-hcp[]
ifdef::openshift-rosa[]
{rosa-classic-short} 
endif::openshift-rosa[]
web console in a container connected to the cluster you have logged in to 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.