From f8a5a1c66d8ac7f2279d6bb740384b70a2e549f5 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 12 Sep 2024 10:40:51 +0700 Subject: [PATCH] Initial Commit --- .mac-lists.csv.swp | Bin 0 -> 12288 bytes .txt | 10 +++++ Readme.md | 10 +++++ csr-approve.sh | 2 + mac-lists.csv | 10 +++++ pxeconfigs/01-00-50-56-bb-f8-6d | 40 ++++++++++++++++++++ pxeconfigs/01-52-54-00-1b-15-29 | 40 ++++++++++++++++++++ pxeconfigs/01-52-54-00-47-1a-1b | 40 ++++++++++++++++++++ pxeconfigs/01-52-54-00-5e-7c-d6 | 40 ++++++++++++++++++++ pxeconfigs/01-52-54-00-70-f5-db | 40 ++++++++++++++++++++ pxeconfigs/01-52-54-00-84-b1-11 | 40 ++++++++++++++++++++ pxeconfigs/01-52-54-00-a1-55-1a | 40 ++++++++++++++++++++ pxeconfigs/01-52-54-00-c0-d0-de | 40 ++++++++++++++++++++ pxeconfigs/01-52-54-00-f1-d1-63 | 40 ++++++++++++++++++++ pxeconfigs/01-ac-1f-6b-ef-83-74 | 40 ++++++++++++++++++++ pxelinux-generator.sh | 64 ++++++++++++++++++++++++++++++++ update-netra-token.sh | 15 ++++++++ 17 files changed, 511 insertions(+) create mode 100644 .mac-lists.csv.swp create mode 100644 .txt create mode 100644 Readme.md create mode 100755 csr-approve.sh create mode 100644 mac-lists.csv create mode 100644 pxeconfigs/01-00-50-56-bb-f8-6d create mode 100644 pxeconfigs/01-52-54-00-1b-15-29 create mode 100644 pxeconfigs/01-52-54-00-47-1a-1b create mode 100644 pxeconfigs/01-52-54-00-5e-7c-d6 create mode 100644 pxeconfigs/01-52-54-00-70-f5-db create mode 100644 pxeconfigs/01-52-54-00-84-b1-11 create mode 100644 pxeconfigs/01-52-54-00-a1-55-1a create mode 100644 pxeconfigs/01-52-54-00-c0-d0-de create mode 100644 pxeconfigs/01-52-54-00-f1-d1-63 create mode 100644 pxeconfigs/01-ac-1f-6b-ef-83-74 create mode 100755 pxelinux-generator.sh create mode 100755 update-netra-token.sh diff --git a/.mac-lists.csv.swp b/.mac-lists.csv.swp new file mode 100644 index 0000000000000000000000000000000000000000..7cb788f538fdcd420a842e5e493233b6aa966f77 GIT binary patch literal 12288 zcmeI&zfQtX6bA5vqyM9$3+f8e+tL=#rkjJK?(J=Bh>|wF4Q@K==99RXIQtGJExmdIi=OF+A z2tWV=5P$##AOL|S5-73;-OKZ?RL{Ix?Tuf1^%5HdAOHafKmY;|fB*y_009U<00K)W z5JW_$n?#Q?ojM5m_h_^n|SP!$R^tAxFf + KERNEL fcos-37-pxe/fcos-live-kernel.x86_64 + APPEND initrd=fcos-37-pxe/fcos-initramfs.x86_64.img,fcos-37-pxe/fcos-live-rootfs.x86_64.img coreos.inst.install_dev=/dev/sda coreos.inst.image_url=http://192.168.22.1:8080/images/fcos-37 coreos.inst.insecure=yes coreos.inst.ignition_url=http://192.168.22.1:8080/okd-inf/worker.ign ignition.firstboot ignition.platform.id=metal + +label localboot + menu label Boot from Local Drive + localboot 0 +menu end + diff --git a/pxeconfigs/01-52-54-00-1b-15-29 b/pxeconfigs/01-52-54-00-1b-15-29 new file mode 100644 index 0000000..4d05b7c --- /dev/null +++ b/pxeconfigs/01-52-54-00-1b-15-29 @@ -0,0 +1,40 @@ +#52:54:00:1b:15:29 + +timeout 1200 +ui vesamenu.c32 +menu title Infidel's PXE boot Manager +# Background image *must* be the same resolution as the resolution here. +MENU RESOLUTION 640 480 +MENU BACKGROUND bg.png + +# White on a black/transparent background. +MENU COLOR screen * #ffffffff #00000000 std + +# Blue borders on a black/transparent background. +# Borders have padding, so that background matters. +MENU COLOR border * #ff0000ff #00000000 std + +# Title bar is cyan on a black/transparent background. +MENU COLOR title * #ff00ffff #00000000 std + +# Selection bar is white on a magenta/opaque background. +MENU COLOR sel * #ffffffff #ffff00ff none + +# Unselected menu items are white on black/transparent. +MENU COLOR unsel * #ffffffff #00000000 std +# menu resolution 604 455 +# menu background bg.png +# default master +default localboot +prompt 0 + +label master + menu label Ignite Openshift: master < 52:54:00:1b:15:29 > + KERNEL fcos-37-pxe/fcos-live-kernel.x86_64 + APPEND initrd=fcos-37-pxe/fcos-initramfs.x86_64.img,fcos-37-pxe/fcos-live-rootfs.x86_64.img coreos.inst.install_dev=/dev/vda coreos.inst.image_url=http://192.168.22.1:8080/images/fcos-37 coreos.inst.insecure=yes coreos.inst.ignition_url=http://192.168.22.1:8080/okd-inf/master.ign ignition.firstboot ignition.platform.id=metal + +label localboot + menu label Boot from Local Drive + localboot 0 +menu end + diff --git a/pxeconfigs/01-52-54-00-47-1a-1b b/pxeconfigs/01-52-54-00-47-1a-1b new file mode 100644 index 0000000..587474d --- /dev/null +++ b/pxeconfigs/01-52-54-00-47-1a-1b @@ -0,0 +1,40 @@ +#52:54:00:47:1a:1b + +timeout 1200 +ui vesamenu.c32 +menu title Infidel's PXE boot Manager +# Background image *must* be the same resolution as the resolution here. +MENU RESOLUTION 640 480 +MENU BACKGROUND bg.png + +# White on a black/transparent background. +MENU COLOR screen * #ffffffff #00000000 std + +# Blue borders on a black/transparent background. +# Borders have padding, so that background matters. +MENU COLOR border * #ff0000ff #00000000 std + +# Title bar is cyan on a black/transparent background. +MENU COLOR title * #ff00ffff #00000000 std + +# Selection bar is white on a magenta/opaque background. +MENU COLOR sel * #ffffffff #ffff00ff none + +# Unselected menu items are white on black/transparent. +MENU COLOR unsel * #ffffffff #00000000 std +# menu resolution 604 455 +# menu background bg.png +# default master +default localboot +prompt 0 + +label master + menu label Ignite Openshift: master < 52:54:00:47:1a:1b > + KERNEL fcos-37-pxe/fcos-live-kernel.x86_64 + APPEND initrd=fcos-37-pxe/fcos-initramfs.x86_64.img,fcos-37-pxe/fcos-live-rootfs.x86_64.img coreos.inst.install_dev=/dev/vda coreos.inst.image_url=http://192.168.22.1:8080/images/fcos-37 coreos.inst.insecure=yes coreos.inst.ignition_url=http://192.168.22.1:8080/okd-inf/master.ign ignition.firstboot ignition.platform.id=metal + +label localboot + menu label Boot from Local Drive + localboot 0 +menu end + diff --git a/pxeconfigs/01-52-54-00-5e-7c-d6 b/pxeconfigs/01-52-54-00-5e-7c-d6 new file mode 100644 index 0000000..4145c37 --- /dev/null +++ b/pxeconfigs/01-52-54-00-5e-7c-d6 @@ -0,0 +1,40 @@ +#52:54:00:5e:7c:d6 + +timeout 1200 +ui vesamenu.c32 +menu title Infidel's PXE boot Manager +# Background image *must* be the same resolution as the resolution here. +MENU RESOLUTION 640 480 +MENU BACKGROUND bg.png + +# White on a black/transparent background. +MENU COLOR screen * #ffffffff #00000000 std + +# Blue borders on a black/transparent background. +# Borders have padding, so that background matters. +MENU COLOR border * #ff0000ff #00000000 std + +# Title bar is cyan on a black/transparent background. +MENU COLOR title * #ff00ffff #00000000 std + +# Selection bar is white on a magenta/opaque background. +MENU COLOR sel * #ffffffff #ffff00ff none + +# Unselected menu items are white on black/transparent. +MENU COLOR unsel * #ffffffff #00000000 std +# menu resolution 604 455 +# menu background bg.png +# default worker +default localboot +prompt 0 + +label worker + menu label Ignite Openshift: worker < 52:54:00:5e:7c:d6 > + KERNEL fcos-37-pxe/fcos-live-kernel.x86_64 + APPEND initrd=fcos-37-pxe/fcos-initramfs.x86_64.img,fcos-37-pxe/fcos-live-rootfs.x86_64.img coreos.inst.install_dev=/dev/vda coreos.inst.image_url=http://192.168.22.1:8080/images/fcos-37 coreos.inst.insecure=yes coreos.inst.ignition_url=http://192.168.22.1:8080/okd-inf/worker.ign ignition.firstboot ignition.platform.id=metal + +label localboot + menu label Boot from Local Drive + localboot 0 +menu end + diff --git a/pxeconfigs/01-52-54-00-70-f5-db b/pxeconfigs/01-52-54-00-70-f5-db new file mode 100644 index 0000000..bc1923f --- /dev/null +++ b/pxeconfigs/01-52-54-00-70-f5-db @@ -0,0 +1,40 @@ +#52:54:00:70:f5:db + +timeout 1200 +ui vesamenu.c32 +menu title Infidel's PXE boot Manager +# Background image *must* be the same resolution as the resolution here. +MENU RESOLUTION 640 480 +MENU BACKGROUND bg.png + +# White on a black/transparent background. +MENU COLOR screen * #ffffffff #00000000 std + +# Blue borders on a black/transparent background. +# Borders have padding, so that background matters. +MENU COLOR border * #ff0000ff #00000000 std + +# Title bar is cyan on a black/transparent background. +MENU COLOR title * #ff00ffff #00000000 std + +# Selection bar is white on a magenta/opaque background. +MENU COLOR sel * #ffffffff #ffff00ff none + +# Unselected menu items are white on black/transparent. +MENU COLOR unsel * #ffffffff #00000000 std +# menu resolution 604 455 +# menu background bg.png +# default master +default localboot +prompt 0 + +label master + menu label Ignite Openshift: master < 52:54:00:70:f5:db > + KERNEL fcos-37-pxe/fcos-live-kernel.x86_64 + APPEND initrd=fcos-37-pxe/fcos-initramfs.x86_64.img,fcos-37-pxe/fcos-live-rootfs.x86_64.img coreos.inst.install_dev=/dev/vda coreos.inst.image_url=http://192.168.22.1:8080/images/fcos-37 coreos.inst.insecure=yes coreos.inst.ignition_url=http://192.168.22.1:8080/okd-inf/master.ign ignition.firstboot ignition.platform.id=metal + +label localboot + menu label Boot from Local Drive + localboot 0 +menu end + diff --git a/pxeconfigs/01-52-54-00-84-b1-11 b/pxeconfigs/01-52-54-00-84-b1-11 new file mode 100644 index 0000000..7b88ae8 --- /dev/null +++ b/pxeconfigs/01-52-54-00-84-b1-11 @@ -0,0 +1,40 @@ +#52:54:00:84:b1:11 + +timeout 1200 +ui vesamenu.c32 +menu title Infidel's PXE boot Manager +# Background image *must* be the same resolution as the resolution here. +MENU RESOLUTION 640 480 +MENU BACKGROUND bg.png + +# White on a black/transparent background. +MENU COLOR screen * #ffffffff #00000000 std + +# Blue borders on a black/transparent background. +# Borders have padding, so that background matters. +MENU COLOR border * #ff0000ff #00000000 std + +# Title bar is cyan on a black/transparent background. +MENU COLOR title * #ff00ffff #00000000 std + +# Selection bar is white on a magenta/opaque background. +MENU COLOR sel * #ffffffff #ffff00ff none + +# Unselected menu items are white on black/transparent. +MENU COLOR unsel * #ffffffff #00000000 std +# menu resolution 604 455 +# menu background bg.png +# default worker +default localboot +prompt 0 + +label worker + menu label Ignite Openshift: worker < 52:54:00:84:b1:11 > + KERNEL fcos-37-pxe/fcos-live-kernel.x86_64 + APPEND initrd=fcos-37-pxe/fcos-initramfs.x86_64.img,fcos-37-pxe/fcos-live-rootfs.x86_64.img coreos.inst.install_dev=/dev/vda coreos.inst.image_url=http://192.168.22.1:8080/images/fcos-37 coreos.inst.insecure=yes coreos.inst.ignition_url=http://192.168.22.1:8080/okd-inf/worker.ign ignition.firstboot ignition.platform.id=metal + +label localboot + menu label Boot from Local Drive + localboot 0 +menu end + diff --git a/pxeconfigs/01-52-54-00-a1-55-1a b/pxeconfigs/01-52-54-00-a1-55-1a new file mode 100644 index 0000000..141d9e0 --- /dev/null +++ b/pxeconfigs/01-52-54-00-a1-55-1a @@ -0,0 +1,40 @@ +#52:54:00:a1:55:1a + +timeout 1200 +ui vesamenu.c32 +menu title Infidel's PXE boot Manager +# Background image *must* be the same resolution as the resolution here. +MENU RESOLUTION 640 480 +MENU BACKGROUND bg.png + +# White on a black/transparent background. +MENU COLOR screen * #ffffffff #00000000 std + +# Blue borders on a black/transparent background. +# Borders have padding, so that background matters. +MENU COLOR border * #ff0000ff #00000000 std + +# Title bar is cyan on a black/transparent background. +MENU COLOR title * #ff00ffff #00000000 std + +# Selection bar is white on a magenta/opaque background. +MENU COLOR sel * #ffffffff #ffff00ff none + +# Unselected menu items are white on black/transparent. +MENU COLOR unsel * #ffffffff #00000000 std +# menu resolution 604 455 +# menu background bg.png +# default worker +default localboot +prompt 0 + +label worker + menu label Ignite Openshift: worker < 52:54:00:a1:55:1a > + KERNEL fcos-37-pxe/fcos-live-kernel.x86_64 + APPEND initrd=fcos-37-pxe/fcos-initramfs.x86_64.img,fcos-37-pxe/fcos-live-rootfs.x86_64.img coreos.inst.install_dev=/dev/vda coreos.inst.image_url=http://192.168.22.1:8080/images/fcos-37 coreos.inst.insecure=yes coreos.inst.ignition_url=http://192.168.22.1:8080/okd-inf/worker.ign ignition.firstboot ignition.platform.id=metal + +label localboot + menu label Boot from Local Drive + localboot 0 +menu end + diff --git a/pxeconfigs/01-52-54-00-c0-d0-de b/pxeconfigs/01-52-54-00-c0-d0-de new file mode 100644 index 0000000..4597820 --- /dev/null +++ b/pxeconfigs/01-52-54-00-c0-d0-de @@ -0,0 +1,40 @@ +#52:54:00:c0:d0:de + +timeout 1200 +ui vesamenu.c32 +menu title Infidel's PXE boot Manager +# Background image *must* be the same resolution as the resolution here. +MENU RESOLUTION 640 480 +MENU BACKGROUND bg.png + +# White on a black/transparent background. +MENU COLOR screen * #ffffffff #00000000 std + +# Blue borders on a black/transparent background. +# Borders have padding, so that background matters. +MENU COLOR border * #ff0000ff #00000000 std + +# Title bar is cyan on a black/transparent background. +MENU COLOR title * #ff00ffff #00000000 std + +# Selection bar is white on a magenta/opaque background. +MENU COLOR sel * #ffffffff #ffff00ff none + +# Unselected menu items are white on black/transparent. +MENU COLOR unsel * #ffffffff #00000000 std +# menu resolution 604 455 +# menu background bg.png +# default worker +default localboot +prompt 0 + +label worker + menu label Ignite Openshift: worker < 52:54:00:c0:d0:de > + KERNEL fcos-37-pxe/fcos-live-kernel.x86_64 + APPEND initrd=fcos-37-pxe/fcos-initramfs.x86_64.img,fcos-37-pxe/fcos-live-rootfs.x86_64.img coreos.inst.install_dev=/dev/vda coreos.inst.image_url=http://192.168.22.1:8080/images/fcos-37 coreos.inst.insecure=yes coreos.inst.ignition_url=http://192.168.22.1:8080/okd-inf/worker.ign ignition.firstboot ignition.platform.id=metal + +label localboot + menu label Boot from Local Drive + localboot 0 +menu end + diff --git a/pxeconfigs/01-52-54-00-f1-d1-63 b/pxeconfigs/01-52-54-00-f1-d1-63 new file mode 100644 index 0000000..097cccd --- /dev/null +++ b/pxeconfigs/01-52-54-00-f1-d1-63 @@ -0,0 +1,40 @@ +#52:54:00:f1:d1:63 + +timeout 1200 +ui vesamenu.c32 +menu title Infidel's PXE boot Manager +# Background image *must* be the same resolution as the resolution here. +MENU RESOLUTION 640 480 +MENU BACKGROUND bg.png + +# White on a black/transparent background. +MENU COLOR screen * #ffffffff #00000000 std + +# Blue borders on a black/transparent background. +# Borders have padding, so that background matters. +MENU COLOR border * #ff0000ff #00000000 std + +# Title bar is cyan on a black/transparent background. +MENU COLOR title * #ff00ffff #00000000 std + +# Selection bar is white on a magenta/opaque background. +MENU COLOR sel * #ffffffff #ffff00ff none + +# Unselected menu items are white on black/transparent. +MENU COLOR unsel * #ffffffff #00000000 std +# menu resolution 604 455 +# menu background bg.png +# default bootstrap +default localboot +prompt 0 + +label bootstrap + menu label Ignite Openshift: bootstrap < 52:54:00:f1:d1:63 > + KERNEL fcos-37-pxe/fcos-live-kernel.x86_64 + APPEND initrd=fcos-37-pxe/fcos-initramfs.x86_64.img,fcos-37-pxe/fcos-live-rootfs.x86_64.img coreos.inst.install_dev=/dev/vda coreos.inst.image_url=http://192.168.22.1:8080/images/fcos-37 coreos.inst.insecure=yes coreos.inst.ignition_url=http://192.168.22.1:8080/okd-inf/bootstrap.ign ignition.firstboot ignition.platform.id=metal + +label localboot + menu label Boot from Local Drive + localboot 0 +menu end + diff --git a/pxeconfigs/01-ac-1f-6b-ef-83-74 b/pxeconfigs/01-ac-1f-6b-ef-83-74 new file mode 100644 index 0000000..a91a927 --- /dev/null +++ b/pxeconfigs/01-ac-1f-6b-ef-83-74 @@ -0,0 +1,40 @@ +#ac:1f:6b:ef:83:74 + +timeout 1200 +ui vesamenu.c32 +menu title Infidel's PXE boot Manager +# Background image *must* be the same resolution as the resolution here. +MENU RESOLUTION 640 480 +MENU BACKGROUND bg.png + +# White on a black/transparent background. +MENU COLOR screen * #ffffffff #00000000 std + +# Blue borders on a black/transparent background. +# Borders have padding, so that background matters. +MENU COLOR border * #ff0000ff #00000000 std + +# Title bar is cyan on a black/transparent background. +MENU COLOR title * #ff00ffff #00000000 std + +# Selection bar is white on a magenta/opaque background. +MENU COLOR sel * #ffffffff #ffff00ff none + +# Unselected menu items are white on black/transparent. +MENU COLOR unsel * #ffffffff #00000000 std +# menu resolution 604 455 +# menu background bg.png +# default worker +default localboot +prompt 0 + +label worker + menu label Ignite Openshift: worker < ac:1f:6b:ef:83:74 > + KERNEL fcos-37-pxe/fcos-live-kernel.x86_64 + APPEND initrd=fcos-37-pxe/fcos-initramfs.x86_64.img,fcos-37-pxe/fcos-live-rootfs.x86_64.img coreos.inst.install_dev=/dev/sda coreos.inst.image_url=http://192.168.22.1:8080/images/fcos-37 coreos.inst.insecure=yes coreos.inst.ignition_url=http://192.168.22.1:8080/okd-inf/worker.ign ignition.firstboot ignition.platform.id=metal + +label localboot + menu label Boot from Local Drive + localboot 0 +menu end + diff --git a/pxelinux-generator.sh b/pxelinux-generator.sh new file mode 100755 index 0000000..9956fc9 --- /dev/null +++ b/pxelinux-generator.sh @@ -0,0 +1,64 @@ +#!/bin/bash + +echo "Generating pxelinux for your configs" +rm pxeconfigs/* +rm /var/lib/tftpboot/pxelinux/pxelinux.cfg/01* + +function gen_file_config { +role=$1 +mac=$(echo $2 | sed 's/\:/\-/g') +arp_type="01" +image=$3 +disk_type=$4 + +echo "#$2 + +timeout 1200 +ui vesamenu.c32 +menu title Infidel's PXE boot Manager +# Background image *must* be the same resolution as the resolution here. +MENU RESOLUTION 640 480 +MENU BACKGROUND bg.png + +# White on a black/transparent background. +MENU COLOR screen * #ffffffff #00000000 std + +# Blue borders on a black/transparent background. +# Borders have padding, so that background matters. +MENU COLOR border * #ff0000ff #00000000 std + +# Title bar is cyan on a black/transparent background. +MENU COLOR title * #ff00ffff #00000000 std + +# Selection bar is white on a magenta/opaque background. +MENU COLOR sel * #ffffffff #ffff00ff none + +# Unselected menu items are white on black/transparent. +MENU COLOR unsel * #ffffffff #00000000 std +# menu resolution 604 455 +# menu background bg.png +# default $role +default localboot +prompt 0 + +label $role + menu label Ignite Openshift: $role < $2 > + KERNEL fcos-37-pxe/fcos-live-kernel.x86_64 + APPEND initrd=fcos-37-pxe/fcos-initramfs.x86_64.img,fcos-37-pxe/fcos-live-rootfs.x86_64.img coreos.inst.install_dev=/dev/$disk_type coreos.inst.image_url=http://192.168.22.1:8080/images/$image coreos.inst.insecure=yes coreos.inst.ignition_url=http://192.168.22.1:8080/okd-inf/$role.ign ignition.firstboot ignition.platform.id=metal + +label localboot + menu label Boot from Local Drive + localboot 0 +menu end + " > pxeconfigs/$arp_type'-'$mac +} + +while IFS="," read -r role mac image disk_type +do + echo $role ' ---> ' $mac ' Finished ' + gen_file_config $role $mac $image $disk_type +done < <( cat mac-lists.csv ) + +cp -R pxeconfigs/* /var/lib/tftpboot/pxelinux/pxelinux.cfg/ + + diff --git a/update-netra-token.sh b/update-netra-token.sh new file mode 100755 index 0000000..bb4ca40 --- /dev/null +++ b/update-netra-token.sh @@ -0,0 +1,15 @@ +#!/bin/sh -x + +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin/ +/bin/sh /etc/profile + +podNameDjango=`oc get pods -l app=netra-django -n operational -o name` +podNameCli=`oc get pods -l app=inf-cli -n operational -o name` + +oc exec $podNameCli -n operational -- /usr/bin/bash butterfly/run.sh +oc exec $podNameDjango -n operational -- /usr/bin/bash src/run.sh +oc exec $podName -n operational -- /usr/bin/bash -c 'echo "Auth at $(date)" >> src/auth.log' + +#oc exec $pod-name -n operational -- echo "Testing" >> hello.txt + +