Skip to main content

Posts

Showing posts from September, 2022

Foreman - upgrade from el7 to el8 using leapp

Since Foreman 3.3 and Katello 4.5 are the last supported versions on EL7, I decided to do an in-place upgrade from CentOS 7 to Almalinux 8 using leapp. I'm using a fully up-to-date (as of 19th September 2022) installation of Foreman 3.3, Katello 4.5. So first, make sure you're up to date with your installation: [root@katello01 ~]# yum -y clean all [root@katello01 ~]# rm -rf /var/cache/yum [root@katello01 ~]# yum -y makecache fast [root@katello01 ~]# yum -y update If any foreman-packages have been updated, go ahead and ensure that your foreman-installation is consistent: [root@katello01 ~]# foreman-maintain service stop [root@katello01 ~]# foreman-installer --scenario katello Make sure that the installer runs without errors before continuing. Check if you need to reboot the server and reboot it if package updates require it [root@katello01 ~]# yum needs-restarting -r [root@katello01 ~]# reboot The foreman team is hosting a patched version of the leapp upg

Kubernetes - Create a (default) StorageClass using the nfs-subdir provisioner

Using a default storage class will allow you to deploy volumes as they are claimed / requested without any manual intervention. Kubernetes provides multiple built-in storage provisioners but most of them are focused on cloud environments and since I run my cluster on-prem with nfs as shared storage, I will have to use the nfs-subdir external provisioner ( github ).  This will allow me to share one directory and the provisioner will create a directory on the nfs share for each volume that is being allocated. For more documentation, check the link above. First, clone the git repository: [ 17:25:09 ] - archy ~> git clone https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner.git git/kubernetes/prod/nfs-subdir-external-provisioner [ 17:25:10 ] - archy ~> cd git/kubernetes/prod/nfs-subdir-external-provisioner Create the RBAC Bindings required for the provisioner to work: [ 17:25:24 ] - archy ~/git/kubernetes/prod/nfs-subdir-external-provisioner - master> kubectl

Rsync - Setting up a basic rsyncd server on EL8

Rsync is a very easy way to transfer large amounts of files between servers with low resource usage which also makes for a great backup target due to its speed and flexibility. Here's a small write-up on how to set up a basic rsyncd server: First, install the required packages: [archy@mirror01~]$ sudo yum -y --refresh install rsync rsync-daemon Create the rsync root directory, I'll place all my sub-modules (folders) in '/var/rsync' [archy@mirror01 ~]$ mkdir -p /var/rsync/{rpms,backup} Setting the SELinux boolean and file context: [archy@mirror01 ~]$ sudo semanage boolean -m -1 rsync_full_access [archy@mirror01 ~]$ sudo semanage fcontext -a -t 'public_content_t' '/var/rsync(/.*)?' [archy@mirror01 ~]$ sudo restorecon -Rv /var/rsync Creating /etc/rsyncd.conf: [archy@mirror01 ~]$ sudo vim /etc/rsyncd.conf pid file = /var/run/rsyncd.pid log file = /var/log/rsyncd.log lock file = /var/run/rsyncd.lock address = 0.0.0.0 port = 873