aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md15
-rw-r--r--templates/bootcblade.containerfile.j218
2 files changed, 25 insertions, 8 deletions
diff --git a/README.md b/README.md
index 72ada18..84bea14 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,13 @@
# BootcBlade
-Ansible automation for deploying a KVM hypervisor using bootc and Fedora Server.
+Ansible automation for deploying a KVM hypervisor using bootc and CentOS Stream.
![BootcBlade](docs/images/logo.png)
This Ansible automation uses bootc to create "the perfect" KVM hypervisor with ZFS, NFS + Samba, Cockpit, and Sanoid + Syncoid.
## Usage - deploy on top of existing system
-1. Install a fresh Fedora Server or CentOS Stream to the desired host - use the latest minimal install to save disk space on the resulting deployed machine
+1. Install a fresh CentOS Stream to the desired host - use the latest minimal install to save disk space on the resulting deployed machine
2. Install ```podman``` on the host
3. Generate an SSH key
4. Create inventory using the example in the ```docs``` folder
@@ -58,11 +58,20 @@ will need to be run, either remotely or as localhost, and the required variables
### ```/root/bootcblade.containerfile``` is gone:
You can use ```update.yml``` to recreate this, assuming you have the correct inventory.
+### Cockpit wont work
+Currently there is a known issue, ```cockpit-ws``` is having issues installing properly inside the container during the build. On a reboot, you will have to do the following commands as sudo:
+```$ bootc usr-overlay ; dnf -y reinstall cockpit-ws ; systemctl restart cockpit.socket```
+
### BootcBlade will no longer build
-By default the ```latest``` tag is used for ```fedora-bootc``` - its possible that there was a kernel update, or a release update, that breaks ZFS. Usually these issues are transient and resolve on their own. If you need a build now (perhaps for a fresh system) you can try and see if there is an older release (tag) from the upstream repo, and adjust it using the ```bootc_image_tag``` variable.
+The default tag used for ```centos-bootc``` is referenced in ```templates/bootcblade.containerfile.j2``` - its possible that there was a kernel update, or a release update, that breaks ZFS. Usually these issues are transient and resolve on their own. If you need a build now (perhaps for a fresh system) you can try and see if there is an older release (tag) from the upstream repo, and adjust it using the ```bootc_image_tag``` variable.
+[https://quay.io/repository/centos-bootc/centos-bootc?tab=tags&tag=latest](https://quay.io/repository/centos-bootc/centos-bootc?tab=tags&tag=latest)
[https://quay.io/repository/fedora/fedora-bootc?tab=tags](https://quay.io/repository/fedora/fedora-bootc?tab=tags)
+## Tweaking
+### Fedora
+You can use the branch ```fedora``` to deploy or build Fedora Server.
+
## Variable Usage
This is a description of each variable, what it does, and a table to determine when it is needed.
diff --git a/templates/bootcblade.containerfile.j2 b/templates/bootcblade.containerfile.j2
index c63b76a..5de9db7 100644
--- a/templates/bootcblade.containerfile.j2
+++ b/templates/bootcblade.containerfile.j2
@@ -1,11 +1,12 @@
-FROM quay.io/fedora/fedora-bootc:{{ bootc_image_tag if bootc_image_tag is defined else 'latest' }}
+FROM quay.io/centos-bootc/centos-bootc:{{ bootc_image_tag if bootc_image_tag is defined else 'stream9' }}
# Create root homedir
RUN mkdir /var/roothome
# ZFS
-RUN dnf -y install git && \
- dnf -y install https://zfsonlinux.org/fedora/zfs-release-2-5$(rpm --eval "%{dist}").noarch.rpm && \
+RUN dnf -y install epel-release git && \
+ dnf -y install https://zfsonlinux.org/fedora/zfs-release-2-4.fc38.noarch.rpm && \
+ sed -i s/\$releasever/38/g /etc/yum.repos.d/zfs.repo && \
dnf -y install kernel-devel-$(ls /usr/lib/modules) && \
dnf -y install zfs && \
dkms build zfs/$(rpm -q --qf '%{VERSION}' zfs) -k $(ls /usr/lib/modules) && \
@@ -14,13 +15,20 @@ RUN dnf -y install git && \
# KVM & Cockpit
RUN echo "qemu:x:107:107:qemu user:/:/sbin/nologin" >> /etc/passwd && \
dnf -y install qemu-kvm libvirt virt-install virt-viewer && \
- dnf -y install cockpit cockpit-bridge cockpit-machines cockpit-pcp cockpit-podman cockpit-storaged cockpit-system cockpit-navigator cockpit-selinux && \
+ dnf -y install cockpit cockpit-bridge cockpit-machines cockpit-pcp cockpit-podman cockpit-storaged cockpit-system cockpit-navigator cockpit-selinux cockpit-ostree && \
systemctl enable cockpit.socket
# Cockpit ZFS Manager
RUN git clone https://github.com/45drives/cockpit-zfs-manager.git /root/cockpit-zfs-manager && \
cp -r /root/cockpit-zfs-manager/zfs /usr/share/cockpit && \
- rm -r /root/cockpit-zfs-manager
+ rm -r /root/cockpit-zfs-manager && \
+# Fix cockpit fonts/icons https://github.com/45Drives/scripts/blob/main/cockpit_font_fix/fix-cockpit.sh
+ mkdir -p /usr/share/cockpit/base1/fonts && \
+ curl -sSL https://scripts.45drives.com/cockpit_font_fix/fonts/fontawesome.woff -o /usr/share/cockpit/base1/fonts/fontawesome.woff && \
+ curl -sSL https://scripts.45drives.com/cockpit_font_fix/fonts/glyphicons.woff -o /usr/share/cockpit/base1/fonts/glyphicons.woff && \
+ curl -sSL https://scripts.45drives.com/cockpit_font_fix/fonts/patternfly.woff -o /usr/share/cockpit/base1/fonts/patternfly.woff && \
+ mkdir -p /usr/share/cockpit/static/fonts && \
+ curl -sSL https://scripts.45drives.com/cockpit_font_fix/fonts/OpenSans-Semibold-webfont.woff -o /usr/share/cockpit/static/fonts/OpenSans-Semibold-webfont.woff
# Cockpit file sharing, and Samba users
RUN dnf -y install https://github.com/45Drives/cockpit-identities/releases/download/v0.1.12/cockpit-identities-0.1.12-1.el8.noarch.rpm \