Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Debian 11 machine image #195

Merged
merged 17 commits into from
Aug 19, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update build.sh for Debian 11
Generated from `build.yaml`.
  • Loading branch information
tenthirtyam committed Apr 13, 2022
commit 6e503c1a20e840b04c40603be5b952d942aed05d
115 changes: 74 additions & 41 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,37 @@ menu_option_1() {
}

menu_option_2() {
INPUT_PATH="$SCRIPT_PATH"/builds/linux/debian/11/
echo -e "\nCONFIRM: Build a Debian 11 Template for VMware vSphere?"
echo -e "\nContinue? (y/n)"
read -r REPLY
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
exit 1
fi

### Build a Debian 11 Template for VMware vSphere. ###
echo "Building a Debian 11 Template for VMware vSphere..."

### Initialize HashiCorp Packer and required plugins. ###
echo "Initializing HashiCorp Packer and required plugins..."
packer init "$INPUT_PATH"

### Start the Build. ###
echo "Starting the build...."
packer build -force \
-var-file="$CONFIG_PATH/vsphere.pkrvars.hcl" \
-var-file="$CONFIG_PATH/build.pkrvars.hcl" \
-var-file="$CONFIG_PATH/ansible.pkrvars.hcl" \
-var-file="$CONFIG_PATH/proxy.pkrvars.hcl" \
-var-file="$CONFIG_PATH/common.pkrvars.hcl" \
"$INPUT_PATH"

### All done. ###
echo "Done."
}

menu_option_3() {
INPUT_PATH="$SCRIPT_PATH"/builds/linux/ubuntu/22-04-lts/
echo -e "\nCONFIRM: Build a Ubuntu Server 22.04 LTS Beta Template for VMware vSphere?"
echo -e "\nContinue? (y/n)"
Expand Down Expand Up @@ -81,7 +112,7 @@ menu_option_2() {
echo "Done."
}

menu_option_3() {
menu_option_4() {
INPUT_PATH="$SCRIPT_PATH"/builds/linux/ubuntu/20-04-lts/
echo -e "\nCONFIRM: Build a Ubuntu Server 20.04 LTS Template for VMware vSphere?"
echo -e "\nContinue? (y/n)"
Expand Down Expand Up @@ -112,7 +143,7 @@ menu_option_3() {
echo "Done."
}

menu_option_4() {
menu_option_5() {
INPUT_PATH="$SCRIPT_PATH"/builds/linux/ubuntu/18-04-lts/
echo -e "\nCONFIRM: Build a Ubuntu Server 18.04 LTS Template for VMware vSphere?"
echo -e "\nContinue? (y/n)"
Expand Down Expand Up @@ -143,7 +174,7 @@ menu_option_4() {
echo "Done."
}

menu_option_5() {
menu_option_6() {
INPUT_PATH="$SCRIPT_PATH"/builds/linux/rhel/8/
echo -e "\nCONFIRM: Build a Red Hat Enterprise Linux 8 Template for VMware vSphere?"
echo -e "\nContinue? (y/n)"
Expand Down Expand Up @@ -175,7 +206,7 @@ menu_option_5() {
echo "Done."
}

menu_option_6() {
menu_option_7() {
INPUT_PATH="$SCRIPT_PATH"/builds/linux/rhel/7/
echo -e "\nCONFIRM: Build a Red Hat Enterprise Linux 7 Template for VMware vSphere?"
echo -e "\nContinue? (y/n)"
Expand Down Expand Up @@ -207,7 +238,7 @@ menu_option_6() {
echo "Done."
}

menu_option_7() {
menu_option_8() {
INPUT_PATH="$SCRIPT_PATH"/builds/linux/almalinux/8/
echo -e "\nCONFIRM: Build an AlmaLinux OS 8 Template for VMware vSphere?"
echo -e "\nContinue? (y/n)"
Expand Down Expand Up @@ -238,7 +269,7 @@ menu_option_7() {
echo "Done."
}

menu_option_8() {
menu_option_9() {
INPUT_PATH="$SCRIPT_PATH"/builds/linux/rocky/8/
echo -e "\nCONFIRM: Build a Rocky Linux 8 Template for VMware vSphere?"
echo -e "\nContinue? (y/n)"
Expand Down Expand Up @@ -269,7 +300,7 @@ menu_option_8() {
echo "Done."
}

menu_option_9() {
menu_option_10() {
INPUT_PATH="$SCRIPT_PATH"/builds/linux/centos/8-stream/
echo -e "\nCONFIRM: Build a CentOS Stream 8 Template for VMware vSphere?"
echo -e "\nContinue? (y/n)"
Expand Down Expand Up @@ -300,7 +331,7 @@ menu_option_9() {
echo "Done."
}

menu_option_10() {
menu_option_11() {
INPUT_PATH="$SCRIPT_PATH"/builds/linux/centos/8/
echo -e "\nCONFIRM: Build a CentOS Linux 8 Template for VMware vSphere?"
echo -e "\nContinue? (y/n)"
Expand Down Expand Up @@ -331,7 +362,7 @@ menu_option_10() {
echo "Done."
}

menu_option_11() {
menu_option_12() {
INPUT_PATH="$SCRIPT_PATH"/builds/linux/centos/7/
echo -e "\nCONFIRM: Build a CentOS Linux 7 Template for VMware vSphere?"
echo -e "\nContinue? (y/n)"
Expand Down Expand Up @@ -363,7 +394,7 @@ menu_option_11() {
}


menu_option_12() {
menu_option_13() {
INPUT_PATH="$SCRIPT_PATH"/builds/windows/server/2022/
echo -e "\nCONFIRM: Build all Windows Server 2022 Templates for VMware vSphere?"
echo -e "\nContinue? (y/n)"
Expand Down Expand Up @@ -392,7 +423,7 @@ menu_option_12() {
echo "Done."
}

menu_option_13() {
menu_option_14() {
INPUT_PATH="$SCRIPT_PATH"/builds/windows/server/2022/
echo -e "\nCONFIRM: Build Microsoft Windows Server 2022 Standard Templates for VMware vSphere?"
echo -e "\nContinue? (y/n)"
Expand Down Expand Up @@ -422,7 +453,7 @@ menu_option_13() {
echo "Done."
}

menu_option_14() {
menu_option_15() {
INPUT_PATH="$SCRIPT_PATH"/builds/windows/server/2022/
echo -e "\nCONFIRM: Build Microsoft Windows Server 2022 Datacenter Templates for VMware vSphere?"
echo -e "\nContinue? (y/n)"
Expand Down Expand Up @@ -452,7 +483,7 @@ menu_option_14() {
echo "Done."
}

menu_option_15() {
menu_option_16() {
INPUT_PATH="$SCRIPT_PATH"/builds/windows/server/2019/
echo -e "\nCONFIRM: Build all Windows Server 2019 Templates for VMware vSphere?"
echo -e "\nContinue? (y/n)"
Expand Down Expand Up @@ -481,7 +512,7 @@ menu_option_15() {
echo "Done."
}

menu_option_16() {
menu_option_17() {
INPUT_PATH="$SCRIPT_PATH"/builds/windows/server/2019/
echo -e "\nCONFIRM: Build Microsoft Windows Server 2019 Standard Templates for VMware vSphere?"
echo -e "\nContinue? (y/n)"
Expand Down Expand Up @@ -511,7 +542,7 @@ menu_option_16() {
echo "Done."
}

menu_option_17() {
menu_option_18() {
INPUT_PATH="$SCRIPT_PATH"/builds/windows/server/2019/
echo -e "\nCONFIRM: Build Microsoft Windows Server 2019 Datacenter Templates for VMware vSphere?"
echo -e "\nContinue? (y/n)"
Expand Down Expand Up @@ -541,7 +572,7 @@ menu_option_17() {
echo "Done."
}

menu_option_18() {
menu_option_19() {
INPUT_PATH="$SCRIPT_PATH"/builds/windows/server/2016/
echo -e "\nCONFIRM: Build all Windows Server 2016 Templates for VMware vSphere?"
echo -e "\nContinue? (y/n)"
Expand Down Expand Up @@ -570,7 +601,7 @@ menu_option_18() {
echo "Done."
}

menu_option_19() {
menu_option_20() {
INPUT_PATH="$SCRIPT_PATH"/builds/windows/server/2016/
echo -e "\nCONFIRM: Build Microsoft Windows Server 2016 Standard Templates for VMware vSphere?"
echo -e "\nContinue? (y/n)"
Expand Down Expand Up @@ -600,7 +631,7 @@ menu_option_19() {
echo "Done."
}

menu_option_20() {
menu_option_21() {
INPUT_PATH="$SCRIPT_PATH"/builds/windows/server/2016/
echo -e "\nCONFIRM: Build Microsoft Windows Server 2016 Datacenter Templates for VMware vSphere?"
echo -e "\nContinue? (y/n)"
Expand Down Expand Up @@ -630,7 +661,7 @@ menu_option_20() {
echo "Done."
}

menu_option_21() {
menu_option_22() {
INPUT_PATH="$SCRIPT_PATH"/builds/windows/desktop/11/
echo -e "\nCONFIRM: Build a Windows 11 Template for VMware vSphere?"
echo -e "\nContinue? (y/n)"
Expand Down Expand Up @@ -659,7 +690,7 @@ menu_option_21() {
echo "Done."
}

menu_option_22() {
menu_option_23() {
INPUT_PATH="$SCRIPT_PATH"/builds/windows/desktop/10/
echo -e "\nCONFIRM: Build a Windows 10 Template for VMware vSphere?"
echo -e "\nContinue? (y/n)"
Expand Down Expand Up @@ -722,30 +753,31 @@ until [ "$selection" = "0" ]; do
echo " Linux Distribution:"
echo ""
echo " 1 - VMware Photon OS 4"
echo " 2 - Ubuntu Server 22.04 LTS Beta"
echo " 3 - Ubuntu Server 20.04 LTS"
echo " 4 - Ubuntu Server 18.04 LTS"
echo " 5 - Red Hat Enterprise Linux 8"
echo " 6 - Red Hat Enterprise Linux 7"
echo " 7 - AlmaLinux OS 8"
echo " 8 - Rocky Linux 8"
echo " 9 - CentOS Stream 8"
echo " 10 - CentOS Linux 8"
echo " 11 - CentOS Linux 7"
echo " 2 - Debian 11"
echo " 3 - Ubuntu Server 22.04 LTS Beta"
echo " 4 - Ubuntu Server 20.04 LTS"
echo " 5 - Ubuntu Server 18.04 LTS"
echo " 6 - Red Hat Enterprise Linux 8"
echo " 7 - Red Hat Enterprise Linux 7"
echo " 8 - AlmaLinux OS 8"
echo " 9 - Rocky Linux 8"
echo " 10 - CentOS Stream 8"
echo " 11 - CentOS Linux 8"
echo " 12 - CentOS Linux 7"
echo ""
echo " Microsoft Windows:"
echo ""
echo " 12 - Windows Server 2022 - All"
echo " 13 - Windows Server 2022 - Standard Only"
echo " 14 - Windows Server 2022 - Datacenter Only"
echo " 15 - Windows Server 2019 - All"
echo " 16 - Windows Server 2019 - Standard Only"
echo " 17 - Windows Server 2019 - Datacenter Only"
echo " 18 - Windows Server 2016 - All"
echo " 19 - Windows Server 2016 - Standard Only"
echo " 20 - Windows Server 2016 - Datacenter Only"
echo " 21 - Windows 11"
echo " 22 - Windows 10"
echo " 13 - Windows Server 2022 - All"
echo " 14 - Windows Server 2022 - Standard Only"
echo " 15 - Windows Server 2022 - Datacenter Only"
echo " 16 - Windows Server 2019 - All"
echo " 17 - Windows Server 2019 - Standard Only"
echo " 18 - Windows Server 2019 - Datacenter Only"
echo " 19 - Windows Server 2016 - All"
echo " 20 - Windows Server 2016 - Standard Only"
echo " 21 - Windows Server 2016 - Datacenter Only"
echo " 22 - Windows 11"
echo " 23 - Windows 10"
echo ""
echo " Other:"
echo ""
Expand Down Expand Up @@ -777,6 +809,7 @@ until [ "$selection" = "0" ]; do
20 ) clear ; menu_option_20 ; press_enter ;;
21 ) clear ; menu_option_21 ; press_enter ;;
22 ) clear ; menu_option_22 ; press_enter ;;
23 ) clear ; menu_option_23 ; press_enter ;;
I ) clear ; info ; press_enter ;;
Q ) clear ; exit ;;
* ) clear ; incorrect_selection ; press_enter ;;
Expand Down