kitch / satellite-host

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

satellite-host

This repo provides some rough guidelines on the IBM Cloud Satellite deployment from this video https://youtu.be/8WNjwlN5gMk

In the video Intel NUC9VXQNX systems were used.

System Configuration

Hardware

Prereq, an 8 core (16 thread) 32GB x86 system with 1TB HD.

Network Bridge

You'll need to configure the primary network adapter of the host in bridge mode. The following network configs are an example of public bridge mode. Details gathered from: https://www.linux-kvm.org/page/Networking#Public_Bridge

# /etc/sysconfig/network-scripts/ifcfg-br0

# Generated by parse-kickstart
IPV6INIT="yes"
BRIDGING_OPTS="priority=32768"
NAME="Bridge connection br0"
IPV6_AUTOCONF="yes"
BOOTPROTO="dhcp"
STP="yes"
DEVICE="br0"
TYPE="Bridge"
ONBOOT="yes"
# /etc/sysconfig/network-scripts/ifcfg-eno1

# Generated by parse-kickstart
BRIDGE="br0"
NAME="br0 slave 1"
# Assumes linked adapter is eno1. Be sure you remove the ifcfg-eno1 config as well
DEVICE="eno1"
TYPE="Ethernet"
ONBOOT="yes"

Network access

you will need outbound access to the public internet

Host Virtualization and Setup

You will need to download rhel-server-7.9-x86_64-kvm.qcow2 and place a copy of it named sat-base.qcow2 in the /host/satellite directory. Once you have that image in place then you will also need to place a copy of your satellite host attach script in /home/satellite/host-attach.sh Make sure that you modify the host attach script to include:

subscription-manager register --force --username=<RH Username> --password=<RH Password>
subscription-manager attach --auto
subscription-manager refresh
subscription-manager repos --enable rhel-server-rhscl-7-rpms
subscription-manager repos --enable rhel-7-server-optional-rpms
subscription-manager repos --enable rhel-7-server-rh-common-rpms
subscription-manager repos --enable rhel-7-server-supplementary-rpms
subscription-manager repos --enable rhel-7-server-extras-rpms
rpm --import /etc/pki/rpm-gpg/*

Right after

API_URL="https://origin.us-east.containers.cloud.ibm.com/"

Future

I have some scripting that I am working on that will bake all of this voodoo into a bootable image that you can run on any hardware of the right spec and it will automatically image RHEL onto the baremetal and virtualize it.

Creating custom DVD image

Process is largely based on https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/installation_guide/sect-simple-install-kickstart

  1. put your src RHEL DVD and KVM images in /root/ such as: -rwxr-x---. 1 root root 4526702592 Dec 1 11:30 rhel-server-7.9-x86_64-dvd.iso -rwxr-x---. 1 root root 827777024 Dec 2 23:25 rhel-server-7.9-x86_64-kvm.qcow2
  2. mount the DVD image mount -o loop /root/rhel-server-7.9-x86_64-dvd.iso /mnt/
  3. create working directory:
mkdir /root/rhel-install/
shopt -s dotglob
cp -avRf /mnt/* /root/rhel-install/
  1. umount /mnt/
  2. cp /root/anaconda-ks.cfg /root/rhel-install/
  3. mkdir /root/rhel-install/satellite
  4. Edit satellite-host.sh to include your Red hat username/password
  5. copy runonce.sh and satellite-host.sh into /root/rhel-install/satellite
  6. copy your kvm RH image to /root/rhel-install/satellite/sat-base.qcow2
  7. copy you satellie addHost.sh script to /root/rhel-install/satellite/host-attach.sh (dont forget to add the rh subscription manager updates to this script)
  8. run
mkisofs -untranslated-filenames -volid "RHEL-7.9 Server.x86_64" -J -joliet-long -rational-rock -translation-table -input-charset utf-8 -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e images/efiboot.img -no-emul-boot -o /root/rhel-ks.iso -graft-points /root/rhel-install/
  1. run isohybrid --uefi /root/rhel-ks.iso
  2. run
findmnt /dev/sdb
umount /mnt/iso

dd if=/root/rhel-ks.iso of=/dev/sdb bs=1M

About


Languages

Language:Shell 100.0%