forklift-console-plugin
v0.0.4
Published
<img src="icons/forklift-logo-lightbg.svg" alt="Logo" width="100" />
Downloads
9
Readme
OpenShift Console Plugin For Forklift
Forklift is a suite of migration tools that facilitate the migration of VM workloads to OpenShift Virtualization.
Prerequisites
Development
[ See the docs folder for more information ]
Start forklift operator server without authentication:
Start the forklift-operator inventory server on http://localhost:8080
withut authentication.
Using forklift-operator development code, login into the cluster and run the server without authentication:
oc login
(requires oc and an OpenShift cluster)AUTH_REQUIRED=false make run
Start the UI:
Using forklift console plugin code.
In one terminal window, run:
yarn install
yarn start
In another terminal window, run:
oc login # if not loggedin
(requires oc and an OpenShift cluster)yarn run start:console
(requires docker or podman 3.2.0+)
See below for how to run start:console
on Apple silicon ARM based machine.
This will run the OpenShift console in a container connected to the cluster you've logged into. The plugin HTTP server runs on port 9001 with CORS enabled.
Deployment on cluster
After pushing an image with your changes to a registry, you can deploy the plugin to a cluster by using helm.
# Add the forklift helm repo
helm repo add forklift https://yaacov.github.io/forklift-console-plugin
# Install the forklift console plugin using current namespace
helm install forklift-console-plugin forklift/forklift-console-plugin
Helm templates optional values:
| parameter | description | default value | |-----------|-------------|---------------| | plugin | name of "app" label used for objects | forklift-console-plugin | name | the deployment name | forklift-console-plugin | image | the plugin container image | quay.io/yaacov/forklift-console-plugin:latest | forkliftNamespace | forklift-operator namespace | konveyor-forklift
# for example, if forklift-operator is not installed in konveyor-forklift namespace,
# set "forkliftNamespace" value to the currect namespace:
helm install forklift-console-plugin \
forklift/forklift-console-plugin \
--set forkliftNamespace=openshift-mtv
Once deployed, patch the Console operator config to enable the plugin.
oc patch consoles.operator.openshift.io cluster \
--patch '{ "spec": { "plugins": ["forklift-console-plugin"] } }' --type=merge
Build and push podman image
Before you can deploy your plugin on a cluster, you must build an image and push it to an image registry.
- Build the image:
podman build -t quay.io/yaacov/forklift-console-plugin:latest .
- Run the image:
podman run -it --rm -p 9001:8080 quay.io/yaacov/forklift-console-plugin:latest
- Push the image:
podman push quay.io/yaacov/forklift-console-plugin:latest
Creating container images with Apple silicon and podman
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.
Running start-console with Apple silicon and podman
If you are using podman on a Mac with Apple silicon, yarn run start-console
might fail since it runs an amd64 image. You can workaround the problem with
qemu-user-static by running
these commands:
podman machine ssh
sudo -i
rpm-ostree install qemu-user-static
systemctl reboot