Skip to main content

Posts

Showing posts from March, 2022

Kubernetes - Installing Metallb

By default, kubernetes does not come with a loadbalancer which would not restrict you to using only ports 30000-32767 to expose services. The easiest way go being able deploy services on port 80 or 443 without going through a reverse proxy is a project called metallb. The installation is fairly simple. First, apply the two provided manifests. I'm going to use version 0.12.1 [archy@kube01 ~]$ kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.12.1/manifests/namespace.yaml [archy@kube01 ~]$ kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.12.1/manifests/metallb.yaml Metallb requires a configmap to work. I'm going to use layer2 and give the controller a complete subnet: [archy@kube01 ~]$ vim /var/tmp/metallb-config.yml --- apiVersion: v1 kind: ConfigMap metadata: namespace: metallb-system name: config data: config: | address-pools: - name: default protocol: layer2 add

Foreman - Upgrade to Foreman 3.1 and Katello 4.3

I'm using foreman for my infrastructure and it's time to upgrade it from v3.0 to v3.1. When checking the documentation, I've found the documentation at the official site  to be missing a few steps for the full upgrade path. Although they can arguably be gathered from the install documentation and some from older documentation. I would recommend executing all of these commands in a tmux session so that your session will remain on the server in case anything happens to your workstation. First, check for running tasks that would prohibit an update: [root@katello01 ~]# foreman-rake katello:upgrade_check Next, update the katello host and reboot it if yum tells you to [root@katello01 ~]# yum -d 2 -y update [root@katello01 ~]# yum -d 2 needs-restarting -r When the katello service is reachable again, upgrade the repository [root@katello01 ~]# yum -d 2 -y install https://yum.theforeman.org/releases/3.1/el7/x86_64/foreman-release.rpm [root@katello01 ~]# yum -d 2 -y insta

Zabbix - Migrate zabbix to a new server and major version

My original installation of Zabbix (v4.0) has been installed on centos7 and it's time to migrate it to a new el8 (v5.0) installation. I will use almalinux8 here but these steps should be identical for rockylinux or any other rhel8 clone. I'll use postgresql and nginx for my setup, so the steps might vary when using mysql or httpd. First, enable the postgresql module stream. Version 10 is enabled by default but I'll go for the latest available which is version 13 as of writing this. [root@zabbix-new ~]# yum -d 2 -y module enable postgresql:13 Now that the module stream is enabled, install the required packages: [root@zabbix-new ~]# yum -d 2 -y install postgresql postgresql-server postgresql-contrib Initialize the database and start it: [root@zabbix-new ~]# su - postgres -c 'initdb' [root@zabbix-new ~]# systemctl enable --now postgresql.service Create the zabbix user and database in postgresql (creating the user will prompt for a password): [root@zabbix-n