Underkube
As a geek, I use Home Assistant to simplify my home automation tasks (running in a container, of course!). Home Assistant is a really nice project and I recommend you to take a look at it if you want to get started in home automation.
One of the things I wanted to have was temperature and humidity sensors spread across the rooms in order to be able to see the current status and historical data… and it turns out it is supported out of the box using the mitemp_bt module.
UPDATE: I submitted a PR to the MetalLB docs on how to deploy MetalLB on OpenShift 4 and it has been merged \o/ so hopefully it will be live soon.
ORIGINAL BLOG POST: –8<–
This blog post illustrates my steps to deploy metallb on OCP4 running on baremetal.
Environment 🔗I have an OCP4 environment running in a Red Hat lab using 3 baremetal hosts as masters + workers deployed using openshift-metal3/dev-scripts
In this blog post, I’m going to try to explain in my own words a high level overview of what Metal3 is, the motivation behind it and some concepts related to a ‘baremetal operator’.
Let’s have some definitions!
Custom Resource Definition 🔗The k8s API provides some out-of-the-box objects such as pods, services, etc. There are a few methods of extending the k8s API (such as API extensions) but since a few releases back, the k8s API can be extended easily with custom resources definitions (CRDs).
Do you want to deploy an OCP4 cluster without using PXE and using static IPs?
I’ve got you covered. See my unsupported step by step instructions on how to doing it, including:
No PXE (pretty common scenario in big companies) Avoid installing stuff and use containers instead (instead yum/dnf install httpd, haproxy,… use containers) Use rootless containers if possible Use Fedora29/RHEL8 stuff (nmcli, firewalld, etc.) Enjoy!
I personally use those commands with the gsconnect GNOME extension and KDE Connect on my Android phone:
Lock 🔗gdbus call --session --dest org.gnome.ScreenSaver --object-path /org/gnome/ScreenSaver --method org.gnome.ScreenSaver.Lock Unlock 🔗loginctl unlock-session && xset dpms force on
Bash variable with the content of a file 🔗NTPFILECONTENT=$(cat /etc/chrony.conf) This will store the ‘\n’ characters as well.
Display bash variable with the content of a file 🔗echo "${NTPFILECONTENT}" Beware the quotes
Append content to a bash variable with a new line 🔗NTPFILECONTENT="${NTPFILECONTENT}"$'\n'"pool ${ntp} iburst" Create files with heredocs 🔗cat << EOF > /your/file mycontent even with spaces EOF Some details:
You can use EOF or whatever you want. The EOF needs to be as it is, no whitespace before it.
Show all rules 🔗sudo firewall-cmd --list-all Redirect ports 🔗sudo firewall-cmd --zone="$(firewall-cmd --get-default-zone)" \ --add-forward-port=port=443:proto=tcp:toport=8443 --permanent sudo firewall-cmd --zone="$(firewall-cmd --get-default-zone)" \ --add-forward-port=port=80:proto=tcp:toport=8080 --permanent
Ignition configuration explained 🔗https://coreos.com/ignition/docs/latest/configuration-v2_2.html
Notes:
file mode is decimal!!! file append = false to overwrite (otherwise it will be appended…)
I’ve migrated the content of this post to openshift.tips
2019 new year resolutions include to try to keep a blog updated… so far, I’ve:
tweaked the config to use the basics theme imported the old ghost based blog posts using ghostToHugo let’s see how it goes :)