Building and Running MicroShift
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:
The available community documentation is not currently compatible with the latest MicroShift source code. To build the latest MicroShift binary, follow the instructions in the openshift/microshift GitHub repository.
Otherwise, use the developer preview RPMs by following the instructions in the MicroShift developer preview documentation, using one of the no-cost Red Hat Developer subscriptions.
git clone -b 4.8.0-microshift-2022-04-20-141053 https://github.com/openshift/microshift.git
cd microshift
Build MicroShift:
# release build (without debug symbols)
make
# 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.
-
To install OpenShift and Kubernetes clients, follow Getting Started: Install Clients.
-
To configure the kubeconfig, follow Getting Started: Copy Kubeconfig.
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/cleanup.sh