Flatcar Container Linux is an open-source operating system designed and optimized for containerized applications. This operating system is based on the Linux kernel and is developed by Kinvolk, a software engineering company that specializes in cloud-native infrastructure. It is based on the Chromium OS project and is designed to be simple, secure, and reliable.
Some of the key features of Flatcar Container Linux include:
- Simplicity: Flatcar Container Linux is designed to be simple to use and maintain, with minimal dependencies and a focus on ease of use.
- Container-optimized: Flatcar Container Linux is optimized for running containerized applications, with support for popular container orchestration platforms such as Kubernetes and Docker.
- Scalability: Flatcar Container Linux can be easily scaled up or down to meet the needs of your containerized workloads.
- Immutable infrastructure: Flatcar Container Linux uses an immutable infrastructure model, which means that the operating system is built and deployed as a single, static image that cannot be modified. This helps to improve security and reduce the risk of configuration drift.
- Security: Flatcar Container Linux includes a number of security features such as AppArmor and SELinux to help protect against vulnerabilities and attacks.
- Automatic updates: Flatcar Container Linux includes automatic updates to ensure that systems are always running the latest security patches and updates.
If you are interested in using Flatcar Container Linux on a VMware infrastructure then this article is for you. We will demonstrate how to download the latest version from the Flatcar Container Linux website and perform an installation using vSphere Web Client / vCenter Web console.
What we’ll cover in this article.
- Install and Configure DHCP / TFTP / PXE Server
- Download Flatcar Container Linux files for PXE
- Configure HTTP server
- Create Ignition JSON files and upload to HTTP server
- Install Flatcar Container Linux on VMware using PXE booting
Step 1: Install and Configure DHCP / TFTP / PXE Server
Dynamic Host Configuration Protocol (DHCP) is a networking protocol that is used to automatically assign IP addresses and other network configuration parameters to devices on a network. On the other hand Preboot Execution Environment (PXE) is a specification that allows a device to boot from a network rather than from a local disk.
PXE allows a device to boot an operating system over the network by downloading boot files and system images from a PXE server. This can be useful in situations where it is not practical or desirable to install an operating system on a local disk, such as in a large-scale deployment of devices or in a virtualized environment.
Both DHCP and PXE are commonly used in enterprise networks to manage the configuration and deployment of devices. They can help simplify the process of setting up and maintaining networked devices by automating many of the tasks involved.
In our environment we’re using the following operating system to run DHCP / TFTP / PXE Server.
[root@pxe ~]# cat /etc/os-release
NAME="Rocky Linux"
VERSION="8.6 (Green Obsidian)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="8.6"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Rocky Linux 8.6 (Green Obsidian)"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:rocky:rocky:8:GA"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
ROCKY_SUPPORT_PRODUCT="Rocky Linux"
ROCKY_SUPPORT_PRODUCT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8"Install DHCP and TFTP server packages.
sudo dnf -y install tmux tftp-server dhcp-serverInstall syslinux package.
sudo dnf -y install syslinux
sudo cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/
sudo cp /usr/share/syslinux/{menu.c32,vesamenu.c32,ldlinux.c32,libcom32.c32,libutil.c32} /var/lib/tftpboot/
sudo mkdir /var/lib/tftpboot/pxelinux.cfgEnable the services to start at system boot.
sudo systemctl enable dhcpd tftp.socketCreate a directory that will host your flatcar PXE files.
sudo mkdir /var/lib/tftpboot/flatcar/Enable tftp in firewall
sudo firewall-cmd --add-service=tftp --permanent
sudo firewall-cmd --reloadStep 2: Download Flatcar Container Linux files for PXE
Navigate to the directory we created.
sudo su -
cd /var/lib/tftpboot/flatcar/Download the two required files.
wget https://stable.release.flatcar-linux.net/amd64-usr/current/flatcar_production_pxe.vmlinuz
wget https://stable.release.flatcar-linux.net/amd64-usr/current/flatcar_production_pxe_image.cpio.gzFile details can be checked using file command
# file flatcar_production_pxe.vmlinuz
flatcar_production_pxe.vmlinuz: Linux kernel x86 boot executable bzImage, version 5.15.77-flatcar ([email protected]) #1 SMP Tue Dec 6 22:49:50 -00 2022, RO-rootFS, swap_dev 0x36, Normal VGA
# file flatcar_production_pxe_image.cpio.gz
flatcar_production_pxe_image.cpio.gz: gzip compressed data, from Unix, original size 309101056Step 3: Configure web server and create Ignition files
Install httpd server package using your package manager.
yum -y install httpdRemove welcome page.
mv /etc/httpd/conf.d/welcome.conf /etc/httpd/conf.d/welcome.conf.orgStart and enable httpd to start at system boot.
systemctl enable --now httpdIf you have firewalld active allow port 80
firewall-cmd --add-service=http --permanent
firewall-cmd --reloadLet’s also have SELinux in permissive mode.
setenforce 0
sed -i 's/^SELINUX=.*/SELINUX=permissive/g' /etc/selinux/config
cat /etc/selinux/config | grep SELINUX=Create a directory named files inside apache root dir.
mkdir /var/www/html/files/Our Apache web server IP address is 192.168.1.7