Skip to content

Commit

Permalink
update microshift example
Browse files Browse the repository at this point in the history
  • Loading branch information
cdrage committed Sep 20, 2024
1 parent 0408c9c commit 80240d7
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 22 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ Below is a general overview (with instructions) on each Docker container I use.

After following the above "Running" steps, you can now interact with the OpenShift server using `kubectl` or `oc` commands. This can also be done from your local machine if you
copy the kubeconfig file from `/var/lib/microshift/resources/kubeadmin/kubeconfig` to `~/.kube/config` on your local machine. You may need to edit the file to change the remote server IP address.
RUN echo -e ' OpenShift 4.17 release\n\
Dependencies\n\

## [bootc-nvidia-base-centos](/bootc-nvidia-base-centos/Containerfile)

Expand Down
4 changes: 2 additions & 2 deletions bootc-k3s-master-amd64/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@

#! Use the below base image if you want to use GPU (you'll have to built it yourself FYI!)
#! FROM ghcr.io/cdrage/bootc-nvidia-base-centos
#! Or other base images such as rhel10
#! FROM registry.stage.redhat.io/rhel10-beta/rhel-bootc:rhel-10.0-beta
#! Or other base images such as rhel9
#! FROM registry.redhat.io/rhel9/rhel-bootc:9.4
#! We use Fedora 40 as we find it the most stable for Kubernetes
FROM quay.io/fedora/fedora-bootc:40

Expand Down
4 changes: 2 additions & 2 deletions bootc-k3s-node-amd64/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@

#! Use the below base image if you want to use GPU (you'll have to built it yourself FYI!)
#! FROM ghcr.io/cdrage/bootc-nvidia-base-centos
#! Or other base images such as rhel10
#! FROM registry.stage.redhat.io/rhel10-beta/rhel-bootc:rhel-10.0-beta
#! Or other base registry images such as rhel9
#! FROM registry.redhat.io/rhel9/rhel-bootc:9.4
#! We use Fedora 40 as we find it the most stable for Kubernetes
FROM quay.io/fedora/fedora-bootc:40

Expand Down
27 changes: 20 additions & 7 deletions bootc-microshift-centos/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
# After following the above "Running" steps, you can now interact with the OpenShift server using `kubectl` or `oc` commands. This can also be done from your local machine if you
# copy the kubeconfig file from `/var/lib/microshift/resources/kubeadmin/kubeconfig` to `~/.kube/config` on your local machine. You may need to edit the file to change the remote server IP address.

FROM quay.io/centos-bootc/centos-bootc:stream9
#! RHEL 9 is the only OS supported by microshift (for now)
FROM registry.redhat.io/rhel9/rhel-bootc:9.4

#! Used for adding your SSH public key for easy access
#! Add the SSH key from SSH_PUBLIC_KEY so we can actually get the kubeconfig file
Expand All @@ -32,12 +33,21 @@ RUN set -eu; mkdir -p /usr/ssh && \
echo ${SSH_PUBLIC_KEY} > /usr/ssh/root.keys && chmod 0600 /usr/ssh/root.keys

#! Add the MicroShift repos
ADD etc etc
RUN echo -e '# OpenShift 4.17 release\n\
[ocp]\n\
name=OpenShift 4.17\n\
baseurl=https://mirror.openshift.com/pub/openshift-v4/$basearch/microshift/ocp/latest-4.17/el9/os/\n\
enabled=1\n\
gpgcheck=0\n\
\n\
# Dependencies\n\
[ocp-deps]\n\
name=OpenShift 4.17 dependencies\n\
baseurl=https://mirror.openshift.com/pub/openshift-v4/$basearch/dependencies/rpms/4.17-el9-beta/\n\
enabled=1\n\
gpgcheck=0' > /etc/yum.repos.d/minishift.repo

#! Temporary workaround for /opt/cni being a symlink
#! xref https://github.com/CentOS/centos-bootc-dev/pull/27 which will make `/opt` not be a symlink anymore
RUN rm -rf /opt && \
mkdir -p /opt/cni
RUN cat /etc/yum.repos.d/minishift.repo

#! Install microshift
RUN dnf install -y microshift && systemctl enable microshift
Expand All @@ -46,4 +56,7 @@ RUN dnf install -y microshift && systemctl enable microshift
#! Echo ARG OPENSHIFT_PULL_SECRET to /etc/crio/openshift-pull-secret so we can pull images from the OpenShift registry
ARG OPENSHIFT_PULL_SECRET
RUN echo $OPENSHIFT_PULL_SECRET > /etc/crio/openshift-pull-secret
RUN chmod 600 /etc/crio/openshift-pull-secret
RUN chmod 600 /etc/crio/openshift-pull-secret

#! REMOVE AFTER
#! RUN echo "root:root" | chpasswd
2 changes: 2 additions & 0 deletions bootc-microshift-centos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@

After following the above "Running" steps, you can now interact with the OpenShift server using `kubectl` or `oc` commands. This can also be done from your local machine if you
copy the kubeconfig file from `/var/lib/microshift/resources/kubeadmin/kubeconfig` to `~/.kube/config` on your local machine. You may need to edit the file to change the remote server IP address.
RUN echo -e ' OpenShift 4.17 release\n\
Dependencies\n\
11 changes: 0 additions & 11 deletions bootc-microshift-centos/etc/yum.repos.d/microshift.repo

This file was deleted.

0 comments on commit 80240d7

Please sign in to comment.