Install
Install Cockpit MicroShift on the Cockpit host that will drive the MicroShift workflow. Use the RPM path when you want package ownership. Use the source path when you are developing or testing local plugin changes.
Prerequisites
- Cockpit is installed on the machine hosting this plugin
- the Cockpit host can SSH to the target host with key auth
- the SSH user has
sudo -non the target host - the target host is RHEL 9 or RHEL 10
- the operator has valid registry authentication data
Additional prerequisites for create-host:
- libvirt/KVM is available on the Cockpit host
- a supported libvirt storage pool exists, or the host can use
/var/lib/libvirt/images - a bridge interface exists on the Cockpit host
- a usable RHEL qcow2 cloud image is available locally, or a direct qcow2 URL is reachable by the Cockpit host
- static guest IP, gateway, and DNS servers are prepared
Install Methods
- RPM package
- Source install
- Build only
Build the RPM from the project directory and install the generated package:
sudo dnf install -y rpm-build
cd /path/to/cockpit-microshift
./build-rpm.sh
sudo dnf install -y ./rpmbuild/RPMS/noarch/cockpit-microshift-*.noarch.rpm
The exact RPM filename depends on the build host distribution suffix.
Run these commands from the repository root:
sudo mkdir -p /usr/share/cockpit/cockpit-microshift
sudo install -m 0644 src/cockpit-microshift/manifest.json /usr/share/cockpit/cockpit-microshift/
sudo install -m 0644 src/cockpit-microshift/index.html /usr/share/cockpit/cockpit-microshift/
sudo install -m 0644 src/cockpit-microshift/create.html /usr/share/cockpit/cockpit-microshift/
sudo install -m 0644 src/cockpit-microshift/overview.html /usr/share/cockpit/cockpit-microshift/
sudo install -m 0644 src/cockpit-microshift/cockpit-microshift.css /usr/share/cockpit/cockpit-microshift/
sudo install -m 0644 src/cockpit-microshift/cockpit-microshift.js /usr/share/cockpit/cockpit-microshift/
sudo install -m 0644 src/cockpit-microshift/cluster-list.js /usr/share/cockpit/cockpit-microshift/
sudo install -m 0644 src/cockpit-microshift/cluster-overview.js /usr/share/cockpit/cockpit-microshift/
sudo install -m 0755 src/cockpit-microshift/microshift_backend.py /usr/share/cockpit/cockpit-microshift/
Install the packaging tool once on the build host:
sudo dnf install -y rpm-build
Build from the project directory:
cd /path/to/cockpit-microshift
./build-rpm.sh
Build output:
rpmbuild/RPMS/noarch/cockpit-microshift-*.noarch.rpm
rpmbuild/SRPMS/cockpit-microshift-*.src.rpm
Open The Plugin
Start Cockpit if it is not already running:
sudo systemctl enable --now cockpit.socket
Open https://<host>:9090 and navigate to MicroShift.
Cockpit discovers the plugin on page load. If the plugin files are installed
under /usr/share/cockpit/cockpit-microshift/, the Cockpit navigation exposes
it as MicroShift.