project-faros / cluster-manager

The meat and potatoes behind farosctl
GNU General Public License v3.0
13 stars 6 forks source link

Change from UPI deployment to IPI #128

Open rmkraus opened 3 years ago

rmkraus commented 3 years ago

IPI brings many benefits and simplifications to the existing install process.

Docs here: https://docs.openshift.com/container-platform/4.7/installing/installing_bare_metal_ipi/ipi-install-overview.html

rmkraus commented 3 years ago

WIP Manual Procedure

# create kni user
sudo su -
user add kni
echo "kni ALL=(root) NOPASSWD:ALL" | tee -a /etc/sudoers.d/kni
chmod 0440 /etc/sudoers.d/kni
su - kni -c "ssh-keygen -t ed25519 -f /home/kni/.ssh/id_rsa -N ''"
usermod --append --groups libvirt <user>

# install dependencies
dnf install -y libvirt qemu-kvm mkisofs python3-devel jq ipmitool

## HYPERVISOR MUST BE SETUP BEFORE CONTINUING

## Downloading installer and client
sudo su - kni
echo > pull_secret.txt
export VERSION=latest-4.7
export RELEASE_IMAGE=$(curl -s https://mirror.openshift.com/pub/openshift-v4/clients/ocp/$VERSION/release.txt | grep 'Pull From: quay.io' | awk -F ' ' '{print $3}')
export cmd=openshift-baremetal-install
export pullsecret_file=~/pull_secret.txt
export extract_dir=$(pwd)
curl -s https://mirror.openshift.com/pub/openshift-v4/clients/ocp/$VERSION/openshift-client-linux.tar.gz | tar zxvf - oc
sudo mv oc /usr/local/bin
sudo mv openshift-baremetal-install /usr/local/bin

## APACHE SERVER MUST BE UP BEFORE CONTINUING

# download correct coreos images
sudo su - 
export COMMIT_ID=$(/usr/local/bin/openshift-baremetal-install version | grep '^built from commit' | awk '{print $4}')
export RHCOS_OPENSTACK_URI=$(curl -s -S https://raw.githubusercontent.com/openshift/installer/$COMMIT_ID/data/data/rhcos.json  | jq .images.openstack.path | sed 's/"//g')
export RHCOS_QEMU_URI=$(curl -s -S https://raw.githubusercontent.com/openshift/installer/$COMMIT_ID/data/data/rhcos.json  | jq .images.qemu.path | sed 's/"//g')
export RHCOS_PATH=$(curl -s -S https://raw.githubusercontent.com/openshift/installer/$COMMIT_ID/data/data/rhcos.json | jq .baseURI | sed 's/"//g')
export RHCOS_QEMU_SHA_UNCOMPRESSED=$(curl -s -S https://raw.githubusercontent.com/openshift/installer/$COMMIT_ID/data/data/rhcos.json  | jq -r '.images.qemu["uncompressed-sha256"]')
export RHCOS_OPENSTACK_SHA_COMPRESSED=$(curl -s -S https://raw.githubusercontent.com/openshift/installer/$COMMIT_ID/data/data/rhcos.json  | jq -r '.images.openstack.sha256')
mkdir -p /var/www/html/rhcos
curl -L ${RHCOS_PATH}${RHCOS_QEMU_URI} -o /var/www/html/rhcos/${RHCOS_QEMU_URI}
curl -L ${RHCOS_PATH}${RHCOS_OPENSTACK_URI} -o /var/www/html/rhcos/${RHCOS_OPENSTACK_URI}
chmod 644 /var/www/html/rhcos/*

# deploy
openshift-baremetal-install create manifests
openshift-baremetal-install create cluster
rmkraus commented 3 years ago

Infra changes:

romfreiman commented 3 years ago

@rmkraus are you familiar with the assisted installer?