This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Create k8s cluster on first VM | |
# setup KIND bootstrap cluster | |
https://github.com/jianzzha/sylva-poc/tree/main/kind-metal3-deploy | |
# create k8s BMH resource | |
kubectl apply -f k8s-bmh.yaml | |
# install capi | |
clusterctl init --infrastructure metal3 | |
#create k8s cluster | |
kubectl apply -f k8s-cluster.yaml | |
# get k8s kubeconfig file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cat /etc/sysconfig/phc2sys | |
OPTIONS="-a -r -r -n 24" | |
[root@53Y9R53 ~]# systemctl status phc2sys | |
● phc2sys.service - Synchronize system clock or PTP hardware clock (PHC) | |
Loaded: loaded (/usr/lib/systemd/system/phc2sys.service; enabled; preset: disabled) | |
Active: active (running) since Fri 2023-12-08 19:43:28 EST; 32min ago | |
Main PID: 672234 (phc2sys) | |
Tasks: 1 (limit: 1120505) | |
Memory: 472.0K |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
# important: download the minimum iso image, not the full image iso | |
export MEMORY=16384 | |
export VCPUS=4 | |
export MASTER_MAC_BASE=52:54:00:f9:8e:2 | |
export WORKER_MAC=52:54:00:f9:8e:30 | |
export CDROM=/var/www/html/discovery_image_test.iso | |
export QCOWS=/var/lib/libvirt/images | |
mkdir -p /mnt/ai | |
umount /mnt/ai |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
step 1: apply the subscription | |
cat <<EOF | oc create -f - | |
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
labels: | |
openshift.io/run-level: "1" | |
name: openshift-performance-addon | |
--- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Download the discovery iso image, small size bootable is ok, no need to download the full image | |
2) mkdir -p /mnt/iso && mount -o ro,loop *iso /mnt/iso && mkdir -p /mnt/efiboot | |
&& mount -o loop,ro /mnt/iso/images/efiboot.img /mnt/efiboot | |
3) optionally install web server if downloading from openshift mirror is slow. Assume the http root directory is /var/www/html, | |
curl -L -o /var/www/html/rhcos-live-rootfs.x86_64.img https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.9/4.9.0/rhcos-live-rootfs.x86_64.img | |
4) install dnsmasq and tftp service. Assume tftp root is /var/lib/tftpboot | |
/bin/cp -f /mnt/iso/images/*.img /var/lib/tftpboot | |
/bin/cp -f /mnt/iso/images/pxeboot/{initrd.img,vmlinuz} /var/lib/tftpboot | |
/bin/cp -f /mnt/efiboot/EFI/redhat/{shimx64.efi,grubx64.efi} /var/lib/tftpboot | |
cat <<EOF > /var/lib/tftpboot/grub.cfg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
oc delete -f create-fec-vf.yaml | |
sriovfecclusterconfig.sriovfec.intel.com "config" deleted | |
lspci | grep acc | |
b5:00.0 Processing accelerators: Intel Corporation Device 0d5c | |
Capacity: | |
intel.com/intel_fec_acc100: 5 | |
Allocatable: | |
intel.com/intel_fec_acc100: 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### update /etc/pki/tls/openssl.cnf and update this section | |
[ v3_ca ] | |
subjectAltName=IP:192.168.222.1 | |
### create self cert | |
sudo mkdir -p /opt/registry/{auth,certs,data} | |
host_fqdn=192.168.222.1 | |
cert_c="US" | |
cert_s="Massachussets" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
subscription-manager register | |
subscription-manager attach --auto | |
subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms | |
yum groupinstall -y 'Development Tools' | |
yum install -y git patch tar zip unzip python3 cmake3 libstdc++-static elfutils-libelf-devel zlib-devel numactl-devel libhugetlbfs-devel | |
pip3 install meson && pip3 install ninja | |
mkdir -p /opt && cd /opt && git clone git://dpdk.org/dpdk-stable dpdk | |
cd /opt/dpdk && git checkout 20.11 && patch -p1 < dpdk_20.11_20.11.5.patch | |
cd /opt && tar zxvf system_studio_2019_update_5_ultimate_edition.tar.gz | |
cd /opt/system_studio_2019_update_5_ultimate_edition && sed -i -r -e 's/^ACCEPT_EULA=.*/ACCEPT_EULA=accept/' -e 's/^ACTIVATION_TYPE=.*/ACTIVATION_TYPE=license_file/' -e 's%^#?ACTIVATION_LICENSE_FILE=.*%ACTIVATION_LICENSE_FILE=/opt/flexran_license.lic%' silent.cfg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function wait_pods_in_namespace () { | |
ns=${1:-default} | |
echo "wait pods in ${ns} ready" | |
while true; do | |
sleep 3s | |
count=$(oc get pods -n ${ns} | egrep -v 'Running|Complete|found' | wc -l) | |
if ((count == 1)); then | |
break; | |
fi | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function wait_pods_in_namespace () { | |
ns=${1:-default} | |
echo "wait pods in ${ns} ready" | |
while true; do | |
sleep 3s | |
count=$(oc get pods -n ${ns} | egrep -v 'Running|Complete|found' | wc -l) | |
if ((count == 1)); then | |
break; | |
fi | |
done |
NewerOlder