Building and Running MicroShift

Building and running the MicroShift binary for local development

System Requirements

For building MicroShift you need a system with a minimum of

  • a supported 64-bit CPU architecture (amd64/x86_64, arm64, or riscv64)
  • a supported Linux OS (RHEL 8, CentOS Stream, or Fedora 34+)
  • 2 CPU cores
  • 3GB of RAM
  • 1GB of free storage space for MicroShift

Building MicroShift

Install the build-time dependencies:

sudo dnf install -y git make golang

sudo dnf install -y git make golang

Clone the repository and cd into it:

git clone -b 4.8.0-microshift-2022-04-20-141053
cd microshift

Build MicroShift:

# release build (without debug symbols)

# development build (with debug symbols)
make DEBUG=true

Running MicroShift

MicroShift requires CRI-O to be installed and running on the host.
Refer to Getting Started: Install CRI-O

Install the SELinux policies from RPM or build and install them from source:

# from RPM
sudo dnf copr enable -y @redhat-et/microshift
sudo dnf install -y microshift-selinux

# from source
(cd packaging/selinux && sudo make install)

Run MicroShift using

sudo ./microshift run

Now switch to a new terminal to access and use this development MicroShift cluster.

It is now possible to run oc or kubectl commands against the MicroShift environment.

Verify that MicroShift is running:

oc get pods -A

Refer to the MicroShift user documentation

Cleaning Up

To stop all MicroShift processes and wipe its state run:

sudo hack/
Last modified March 27, 2023 at 1:17 PM PST : Redirect to project repo docs (0c61240)
Last modified March 27, 2023 at 1:17 PM PST : Redirect to project repo docs (0c61240)