I am constantly creating and deleting virtual machines. These virtual machines often are RHEL systems, and need to be registered with Red Hat’s CDN. While In the past I had a Role that was wrapped into other provisioning playbooks to perform this task, I find that there are enough one-offs to make it useful to do this as a stand alone playbook. Here is how I set it up, including my rational.
Continue readingCategory Archives: Provisioning
PXE Lessons learned
When provisioning goes wrong, it can eat up a lot of time. I need to install and configure a RHEL 8 machine to act as an HA proxy for an OpenShift install, and it was somewhat resistant to my efforts. I learned a couple things worth recording:
- The minimum size of a VM for a PXE install is roughtly 3 GB now, as that is what it takes to properly handle the initrd. If you make the VM too small, the Filesystem in the initrd gets corrupted.
- If the kickstart fails, you can change “graphical” or “cmdline” to text and get an interactive install, which should set you up with a properly formatted kickstart config in the VM /root/anaconda-ks.conf file when you are done.
- You are going to want to keep an index file based on the MAC addresses of the Hardware you are provisioning. Right now, I am using the symlinks in the tftp directory to play that role. The script I use to set the symlinks is below.
- I really should be using Cobbler to manage all this. I’ll learn it some day.
#!/bin/sh function reset_link(){ MACHINE=$1 TARGET=$2 echo --------------------------------------- echo reset $MACHINE rm $MACHINE ln -s $TARGET $MACHINE } r610s='01-00-21-9b-93-d0-90 01-00-21-9b-98-a3-1f 01-00-21-9b-9b-c4-21' kvms='01-52-54-00-2d-74-f1 01-52-54-00-dc-37-cb 01-52-54-00-52-fa-3d' LB=01-52-54-00-b1-5b-16 BOOTSTRAP=01-52-54-00-29-0b-bf for MACHINE in $r610s do reset_link $MACHINE rhel8.2-r610 done for MACHINE in $kvms do reset_link $MACHINE rhcoreos-4.4.3-kvm-control done reset_link $BOOTSTRAP rhcoreos-4.4.3-kvm-bootstrap reset_link $LB rhel8.2-kvm |
This is obviously ripe for a YAML type config file.
To convert a MAC to the appropriate form for pxelinux.cfg use this bash. note that I prepended 01: to the mac address so that it is ends up in the right place in the final file name:
echo 01:52:54:00:e0:f0:fd | sed 's!:!-!g |
PXE Boot different OS images
I can now PXE Boot both RHEL 7.8 and RHEL 8.1 OS images for virtual machines. Here is what works.
Continue readingPXE and Kickstart: repos
My last PXE boot attempt got into the Kickstart stage and then failed due to the repo set up. The VM SCreen looked like this.
Continue readingPXE Setup: Debugging Kickstart
Once I re-enabled DHCPD and TFTP, my Machines got through the basics of PXE, but then failed Kickstart. Here’s the debugging:
Continue readingPXE Setup Part the First
PXE is conglomeration of tools used to get a new operating system onto a computer. It is based on two protocols: DHCP and TFPT. I used PXER a long time ago at Penguin and have always wanted to set it up for my home personal use. I’m doing that now for my lab. My goal is to first be able to provision virtual machines, and then to provision physical boxes. I need to do a full install of RHEL 7 and RHEL 8, which means I also need Kickstart to automate the install process. I had it working, but after rebooting the NUC it is running on it broke. Here’s my debugging.
Continue readingSelf Service Speedbumps
The OpenShift installer is fairly specific in what it requires, and will not install into a virtual machine that does not have sufficient resources. These limits are:
- 16 GB RAM
- 4 Virtual CPUs
- 25 GB Disk Space
Deleting Trunks in OpenStack before Deleting Ports
Cloud is easy. It is networking that is hard.
Red Hat supports installing OpenShift on OpenStack. As a Cloud SA, I need to be able to demonstrate this, and make it work for customers. As I was playing around with it, I found I could not tear down clusters due to a dependency issue with ports.
Continue readingPackage Management Domain Model
Many years ago, when I first started working at Red Hat, I worked up a package management domain model diagram. I’ve referred to it many times over the years, but have never posted or explained it in detail. Recently, discussions over image building software caused me to refer to it a few times. Here it is, with annotations below.
Continue readingSuccessful OpenShift 4.1 Disconnected install
This one is going to be a little light on details, as we are still working through it, but I’d just like to share what I’ve been working on the past couple weeks. Note that this is for a proof-of-concept cluster, and is not for production.
Continue reading