Skip to content

Commit

Permalink
grub fixes, enable serial over lan, check improvements, dns / resolve…
Browse files Browse the repository at this point in the history
…r fixes, cloud-init mods
  • Loading branch information
ajanis committed Sep 6, 2024
1 parent cc4174c commit a533631
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 34 deletions.
42 changes: 42 additions & 0 deletions harmonic/scripts/harmonic-install-scripts/autoinstall.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#cloud-config
autoinstall:
version: 1
early-commands:
- echo "====================================================================================="
- echo "Harmonic Installer: Setup"
- echo "====================================================================================="
- echo "Harmonic Installer: Download 'harmonic-installer.sh' from Artifactory"
- sudo wget https://artifactory.charterlab.com:443/artifactory/upload/harmonic/scripts/harmonic-installer.sh -O /opt/harmonic-installer.sh
- sudo chmod +x /opt/harmonic-installer.sh
- echo "====================================================================================="
- echo "Harmonic Installer: Running"
- sudo /opt/harmonic-installer.sh -vip
- echo "====================================================================================="
- echo "Harmonic Installer: Complete"
- echo "====================================================================================="
- echo "Harmonic Installer: Rebooting System"
- sudo systemctl --message="Harmonic Post-Install Reboot" reboot
- ping -c1 198.162.1.1
locale: en_US
network:
version: 2
ethernets:
# opaque ID for physical interfaces, only referred to by other stanzas
eno1:
dhcp4: true
dhcp6: true
nameservers:
search: [charterlab.com, spoc.charterlab.com]
addresses: [172.22.73.19, '2605:1c00:50f2:2800:172:22:73:19']
proxy: http://proxy4.spoc.charterlab.com:8080
identity:
password: $6$canonical.$0zWaW71A9ke9ASsaOcFTdQ2tx1gSmLxMPrsH0rF0Yb.2AEKNPV1lrF94n6YuPJmnUy2K2/JSDtxuiBDey6Lpa/
ssh:
install-server: yes
authorized-keys:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMeG6n43ekQdEDQAIH4ItQkuCO8KUt10EiIr1Z1psCjG
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF3ooNAnBljFn8SV9XkwrLA2NNtlnmcY3LUews317oGu
allow-pw: yes
user-data:
disable_root: false
preserve_hostname: false
10 changes: 5 additions & 5 deletions harmonic/scripts/harmonic-install-scripts/harmonic-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@ export proxyURI="http://proxy4.spoc.charterlab.com:8080"
export proxyIgnore="localhost,44.10.4.101,44.10.4.200,172.22.31.150,10.41.64.0/24,spoc.charterlab.com,nfv.charterlab.com,.svc,172.22.73.0/24,35.135.192.0/24,10.240.72.0/22,44.0.0.0/8,[2600:6ce6:4410:803/64],[2605:1c00:50f2:2800/64],[2605:1c00:50f3:70/64]"
export workingDir="/opt"
export isoDir="/data"
export physicalDisk="/dev/sda"
export harmonicPV="${physicalDisk}3"
export harmonicVG=${cos-slice-vg}
export proxy=0
export download=0
export install=0
physicalDiskDetected=$(lsblk | grep -Eo '^sd[a-z]')
export physicalDisk="/dev/${physicalDiskDetected}"
export harmonicPV="${physicalDisk}3"
export harmonicVG=${cos-slice-vg}

runPrint() {
cat << EOF
Expand Down Expand Up @@ -67,7 +68,6 @@ diskSetup() {
partprobe "${physicalDisk}"
}


# Script Help Function
showHelp() {
cat << EOH
Expand All @@ -88,7 +88,7 @@ EOH
}

if ! (lsblk "${physicalDisk}" >/dev/null 2>&1); then
runPrint "Physical disk ${physicalDisk} not found. Can not proceed with Harmonic installation ..."
runPrint "Physical disk not found. Can not proceed with Harmonic installation ..."
exit 1
else
runPrint "Physical disk ${physicalDisk} detected. Performing pre-install disk preparation ..."
Expand Down
1 change: 1 addition & 0 deletions harmonic/scripts/harmonic-install-scripts/harmonic.service
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Wants=network-online.target

[Service]
Type=oneshot
Environment="http_proxy=http://proxy4.spoc.charterlab.com:8080" "https_proxy=http://proxy4.spoc.charterlab.com:8080"
ExecStart=/opt/harmonic.service.sh
RemainAfterExit=true
KillMode=process
Expand Down
35 changes: 20 additions & 15 deletions harmonic/scripts/harmonic-install-scripts/harmonic.service.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
#!/bin/bash -x

echo "====================================================================================="
#!/bin/bash
echo "==================================================================="
echo "Harmonic Installer: Setup"
echo "====================================================================================="
echo "Harmonic Installer: Download 'harmonic-installer.sh' from Artifactory"
wget https://artifactory.charterlab.com:443/artifactory/upload/harmonic/scripts/harmonic-installer.sh -O /opt/harmonic-installer.sh
chmod +x /opt/harmonic-installer.sh
echo "====================================================================================="
echo "Harmonic Installer: Running"
/opt/harmonic-installer.sh -vip
echo "====================================================================================="
echo "Harmonic Installer: Complete"
echo "====================================================================================="
echo "Harmonic Installer: Rebooting System"
systemctl --message="Harmonic Post-Install Reboot" reboot
echo "==================================================================="
echo "Harmonic Installer: Downloading 'harmonic-installer.sh'"
echo "==================================================================="
if (sudo wget https://artifactory.charterlab.com:443/artifactory/upload/harmonic/scripts/harmonic-installer.sh -O /opt/harmonic-installer.sh && sudo chmod +x /opt/harmonic-installer.sh); then
echo "Harmonic Installer: Running"
else
echo "Harmonic Installer: Failed to download 'harmonic-installer.sh'"
exit 1
fi
echo "==================================================================="
if (sudo /opt/harmonic-installer.sh -ip); then
echo "==================================================================="
echo "Harmonic Installer: Installation Complete"
else
echo "==================================================================="
echo "Harmonic Installer: Installation Failed"
exit 1
fi
29 changes: 15 additions & 14 deletions harmonic/scripts/harmonic-install-scripts/user-data-runcmd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@ users:
disable_root: False
preserve_hostname: False
runcmd:
- echo "====================================================================================="
- echo "Harmonic Installer: Setup"
- echo "====================================================================================="
- echo "Harmonic Installer: Download 'harmonic-installer.sh' from Artifactory"
- sudo wget https://artifactory.charterlab.com:443/artifactory/upload/harmonic/scripts/harmonic-installer.sh -O /opt/harmonic-installer.sh
- sudo chmod +x /opt/harmonic-installer.sh
- echo "====================================================================================="
- echo "Harmonic Installer: Running"
- sudo /opt/harmonic-installer.sh -vip
- echo "====================================================================================="
- echo "Harmonic Installer: Complete"
- echo "====================================================================================="
- echo "Harmonic Installer: Rebooting System"
- sudo systemctl --message="Harmonic Post-Install Reboot" reboot
- |
echo "=====================================================================================" \
&& echo "Harmonic Installer: Setup" \
&& echo "=====================================================================================" \
&& echo "Harmonic Installer: Download 'harmonic-installer.sh' from Artifactory" \
&& sudo wget https://artifactory.charterlab.com:443/artifactory/upload/harmonic/scripts/harmonic-installer.sh -O /opt/harmonic-installer.sh \
&& sudo chmod +x /opt/harmonic-installer.sh \
&& echo "=====================================================================================" \
&& echo "Harmonic Installer: Running" \
&& sudo /opt/harmonic-installer.sh -vip \
&& echo "=====================================================================================" \
&& echo "Harmonic Installer: Complete" \
&& echo "=====================================================================================" \
&& echo "Harmonic Installer: Rebooting System" \
&& sudo systemctl --message="Harmonic Post-Install Reboot" reboot

0 comments on commit a533631

Please sign in to comment.