Skip to content

Commit

Permalink
Updates for release v21.09. (vmware-samples#30)
Browse files Browse the repository at this point in the history
Updates for release v21.09.
  • Loading branch information
tenthirtyam committed Sep 7, 2021
1 parent 2d6d9a5 commit 2c57355
Show file tree
Hide file tree
Showing 72 changed files with 1,756 additions and 3,507 deletions.
17 changes: 15 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

![Rainpole](icon.png)

## Release: `21.09`
September 7, 2021
* Added support for Microsoft Windows Server 2022 machine image builds.
* Refactored configuration files to be generated using templates. Reduces the number of files and passes variables into the `.pkrtpl.hcl` content.
* Refactored builds for Linux distributions to use `http_content` instead of `http_directory` and `http_file`.
* Refactored builds for Microsoft Windows to use `cd_content` instead of `floppy_files`, which allows for use generated configuration files. A Packer compatible `.iso `command-line tool is required and noted in the [README.md](README.md#Requirements).
* Added disclaimers and updated descriptions in script files.
* Added [NOTICE](NOTICE).
* Updated the `packer init` commands run in `build.sh`.
* Updated MAINTAINERS.md.
* Updated CONTRIBUTING.md.
* Updated README.md.

## Release: `21.08`
August 18, 2021
* Moved `vsphere.pkrvars.hcl` and `rhsm.pkrvars.hcl` to the `builds` directory.
Expand All @@ -15,9 +28,9 @@ August 18, 2021
* Added the `required_plugins` to the Packer block for all builds to use the `vsphere` plugin `version = ">= v1.0.1"`.
* Updated the Packer block for Windows builds with `required_plugins` and `version = "0.14.0"` for the [Windows-Update plugin](https://github.com/rgl/packer-plugin-windows-update).
* All builds automatically run `packer init` to initialize required plugins before running a build with `build.sh`.
* Updated Microsoft Windows `autounattend.xml` files to use the attached VMware Tools `.iso` for PVSCSI driver.
* Updated Microsoft Windows `autounattend.xml` files to use the attached VMware Tools `.iso` for PVSCSI driver.
* Simplified and reduced the script files used by provisioners.
* Patched the script for VNware PhotoN OS 4 due to an issue performing updates with `tdnf`.
* Patched the script for VNware Photon OS 4 due to an issue performing updates with `tdnf`.
* Patched the script for Ubuntu Server 20.04 LTS to remove cloud-init and remove all netplan configurations before GuestOS customization.
* Removed support for VMware Photon OS 3 machine image builds.
* Removed support for Red Hat Enterprise Linux 7 machine image builds.
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ GitHub provides additional document on [forking a repository](https://help.githu
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).


## Finding contributions to work on
## Finding contributions to Work On
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start.

## Licensing
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
2 changes: 1 addition & 1 deletion MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

The following are active maintainers of this repository.

* [Ryan Johnson](https://github.com/tenthirtyam), VMware, Inc.
* [Ryan Johnson](https://github.com/tenthirtyam), Staff Solutions Architect, VMware, Inc.

See CONTRIBUTING.md for general contribution guidelines.
5 changes: 5 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Copyright 2020-2021 VMware, Inc.

This work is licensed to you under the Apache License 2.0 (the "License"). You may not use this work except in compliance with the Apache License 2.0.

This work may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file.
424 changes: 121 additions & 303 deletions README.md

Large diffs are not rendered by default.

134 changes: 114 additions & 20 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ menu_option_7() {
-var-file="../../ansible.pkrvars.hcl" \
-var-file="../../common.pkrvars.hcl" .


### All done. ###
echo "Done."
}
Expand Down Expand Up @@ -241,6 +240,95 @@ menu_option_8() {
}

menu_option_9() {
cd builds/windows/windows-server-2022/
echo -e "\nCONFIRM: Build all Microsoft Windows Server 2022 Templates for VMware vSphere."
echo -e "\nContinue? (y/n)"
read REPLY
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
exit 1
fi

### Build Microsoft Windows Server 2022 Templates for VMware vSphere ###
echo "Building all Microsoft Windows Server 2022 Templates for VMware vSphere ..."
rm -f output-vmware-iso/*.ova

### Initialize Hashicorp Packer and required plugins ###
echo "Initializing Hashicorp Packer and required plugins ..."
packer init .

### Apply the HashiCorp Packer Build ###
echo "Starting the HashiCorp Packer build ..."
packer build -force \
-var-file="../../vsphere.pkrvars.hcl" \
-var-file="../../build.pkrvars.hcl" \
-var-file="../../common.pkrvars.hcl" .

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

menu_option_10() {
cd builds/windows/windows-server-2022/
echo -e "\nCONFIRM: Build Microsoft Windows Server 2022 Templates for VMware vSphere."
echo -e "\nContinue? (y/n)"
read REPLY
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
exit 1
fi

### Build Microsoft Windows Server 2022 Standard Templates for VMware vSphere ###
echo "Building Microsoft Windows Server 2022 Standard Templates for VMware vSphere ..."
rm -f output-vmware-iso/*.ova

### Initialize Hashicorp Packer and required plugins ###
echo "Initializing Hashicorp Packer and required plugins ..."
packer init .

### Apply the HashiCorp Packer Build ###
echo "Starting the HashiCorp Packer build ..."
packer build -force \
--only vsphere-iso.windows-server-standard-dexp,vsphere-iso.windows-server-standard-core \
-var-file="../../vsphere.pkrvars.hcl" \
-var-file="../../build.pkrvars.hcl" \
-var-file="../../common.pkrvars.hcl" .

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

menu_option_11() {
cd builds/windows/windows-server-2022/
echo -e "\nCONFIRM: Build Microsoft Windows Server 2022 Datacenter Templates for VMware vSphere."
echo -e "\nContinue? (y/n)"
read REPLY
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
exit 1
fi

### Build Microsoft Windows Server 2022 Datacenter Templates for VMware vSphere ###
echo "Building Microsoft Windows Server 2022 Datacenter Templates for VMware vSphere ..."
rm -f output-vmware-iso/*.ova

### Initialize Hashicorp Packer and required plugins ###
echo "Initializing Hashicorp Packer and required plugins ..."
packer init .

### Apply the HashiCorp Packer Build ###
echo "Starting the HashiCorp Packer build ..."
packer build -force \
--only vsphere-iso.windows-server-datacenter-dexp,vsphere-iso.windows-server-datacenter-core \
-var-file="../../vsphere.pkrvars.hcl" \
-var-file="../../build.pkrvars.hcl" \
-var-file="../../common.pkrvars.hcl" .

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

menu_option_12() {
cd builds/windows/windows-server-2019/
echo -e "\nCONFIRM: Build all Microsoft Windows Server 2019 Templates for VMware vSphere."
echo -e "\nContinue? (y/n)"
Expand Down Expand Up @@ -269,9 +357,9 @@ menu_option_9() {
echo "Done."
}

menu_option_10() {
menu_option_13() {
cd builds/windows/windows-server-2019/
echo -e "\nCONFIRM: Build a Microsoft Windows Server 2019 Templates for VMware vSphere."
echo -e "\nCONFIRM: Build Microsoft Windows Server 2019 Templates for VMware vSphere."
echo -e "\nContinue? (y/n)"
read REPLY
if [[ ! $REPLY =~ ^[Yy]$ ]]
Expand All @@ -280,7 +368,7 @@ menu_option_10() {
fi

### Build Microsoft Windows Server 2019 Standard Templates for VMware vSphere ###
echo "Building a Microsoft Windows Server 2019 Standard Templates for VMware vSphere ..."
echo "Building Microsoft Windows Server 2019 Standard Templates for VMware vSphere ..."
rm -f output-vmware-iso/*.ova

### Initialize Hashicorp Packer and required plugins ###
Expand All @@ -299,9 +387,9 @@ menu_option_10() {
echo "Done."
}

menu_option_11() {
menu_option_14() {
cd builds/windows/windows-server-2019/
echo -e "\nCONFIRM: Build a Microsoft Windows Server 2019 Datacenter Templates for VMware vSphere."
echo -e "\nCONFIRM: Build Microsoft Windows Server 2019 Datacenter Templates for VMware vSphere."
echo -e "\nContinue? (y/n)"
read REPLY
if [[ ! $REPLY =~ ^[Yy]$ ]]
Expand All @@ -310,7 +398,7 @@ menu_option_11() {
fi

### Build Microsoft Windows Server 2019 Datacenter Templates for VMware vSphere ###
echo "Building a Microsoft Windows Server 2019 Datacenter Templates for VMware vSphere ..."
echo "Building Microsoft Windows Server 2019 Datacenter Templates for VMware vSphere ..."
rm -f output-vmware-iso/*.ova

### Initialize Hashicorp Packer and required plugins ###
Expand All @@ -329,7 +417,7 @@ menu_option_11() {
echo "Done."
}

menu_option_12() {
menu_option_15() {
cd builds/windows/windows-server-2016/
echo -e "\nCONFIRM: Build all Microsoft Windows Server 2016 Templates for VMware vSphere."
echo -e "\nContinue? (y/n)"
Expand All @@ -353,14 +441,14 @@ menu_option_12() {
-var-file="../../vsphere.pkrvars.hcl" \
-var-file="../../build.pkrvars.hcl" \
-var-file="../../common.pkrvars.hcl" .

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

menu_option_13() {
menu_option_16() {
cd builds/windows/windows-server-2016/
echo -e "\nCONFIRM: Build a Microsoft Windows Server Standard 2016 Templates for VMware vSphere."
echo -e "\nCONFIRM: Build Microsoft Windows Server 2016 Templates for VMware vSphere."
echo -e "\nContinue? (y/n)"
read REPLY
if [[ ! $REPLY =~ ^[Yy]$ ]]
Expand All @@ -369,7 +457,7 @@ menu_option_13() {
fi

### Build Microsoft Windows Server 2016 Standard Templates for VMware vSphere ###
echo "Building a Microsoft Windows Server 2016 Standard Templates for VMware vSphere ..."
echo "Building Microsoft Windows Server 2016 Standard Templates for VMware vSphere ..."
rm -f output-vmware-iso/*.ova

### Initialize Hashicorp Packer and required plugins ###
Expand All @@ -388,9 +476,9 @@ menu_option_13() {
echo "Done."
}

menu_option_14() {
menu_option_17() {
cd builds/windows/windows-server-2016/
echo -e "\nCONFIRM: Build a Microsoft Windows Server 2016 Datacenter Templates for VMware vSphere."
echo -e "\nCONFIRM: Build Microsoft Windows Server 2016 Datacenter Templates for VMware vSphere."
echo -e "\nContinue? (y/n)"
read REPLY
if [[ ! $REPLY =~ ^[Yy]$ ]]
Expand Down Expand Up @@ -467,12 +555,15 @@ until [ "$selection" = "0" ]; do
echo ""
echo " Microsoft Windows:"
echo ""
echo " 9 - Windows Server 2019 - All"
echo " 10 - Windows Server 2019 - Standard Only"
echo " 11 - Windows Server 2019 - Datacenter Only"
echo " 12 - Windows Server 2016 - All"
echo " 13 - Windows Server 2016 - Standard Only"
echo " 14 - Windows Server 2016 - Datacenter Only"
echo " 9 - Windows Server 2022 - All"
echo " 10 - Windows Server 2022 - Standard Only"
echo " 11 - Windows Server 2022 - Datacenter Only"
echo " 12 - Windows Server 2019 - All"
echo " 13 - Windows Server 2019 - Standard Only"
echo " 14 - Windows Server 2019 - Datacenter Only"
echo " 15 - Windows Server 2016 - All"
echo " 16 - Windows Server 2016 - Standard Only"
echo " 17 - Windows Server 2016 - Datacenter Only"
echo ""
echo " Other:"
echo ""
Expand All @@ -496,6 +587,9 @@ until [ "$selection" = "0" ]; do
12 ) clear ; menu_option_12 ; press_enter ;;
13 ) clear ; menu_option_13 ; press_enter ;;
14 ) clear ; menu_option_14 ; press_enter ;;
15 ) clear ; menu_option_15 ; press_enter ;;
16 ) clear ; menu_option_16 ; press_enter ;;
17 ) clear ; menu_option_17 ; press_enter ;;
I ) clear ; info ; press_enter ;;
Q ) clear ; exit ;;
* ) clear ; incorrect_selection ; press_enter ;;
Expand Down
11 changes: 5 additions & 6 deletions builds/ansible.pkrvars.hcl
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Maintainer: [email protected]
# Ansible for Linux builds.

##################################################################################
# VARIABLES
##################################################################################
/*
DESCRIPTION:
Ansible credential variables used for Linux builds.
- Variables are passed to and used by configuration scripts.
*/

// Ansible Credentials
ansible_username = "ansible"
Expand Down
21 changes: 11 additions & 10 deletions builds/build.pkrvars.hcl
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Maintainer: [email protected]
# Communicator variables for all builds.
/*
DESCRIPTION:
Build account variables used for all builds.
- Variables are passed to and used by guest operationg system configuration files (e.g., ks.cfg, autounattend.xml).
- Variables are passed to and used by configuration scripts.
*/

##################################################################################
# VARIABLES
##################################################################################

// Communicator Credentials
build_username = "rainpole"
build_password = "R@in!$aG00dThing."
build_key = "ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBADwXV3rbRCWwhSr6aMkHukV5O7OGAEyUtAerj2anJHm3mwbOxlBU/uO4f0ELqo2GJcTALMC0aFrbvu9qonIH5VF7wBBfCP1cS5B92sUagVV9ldI/uo89e/7dVYC9maPsFaZq2G0/PLU0hZKOohq99Oxc2RMSiJaaenX/hNqx5xYSaK+CA== [email protected]"
// Default Account Credentials
build_username = "rainpole"
build_password = "R@in!$aG00dThing."
build_password_encrypted = "$6$jqoxlQyW2ROxsLK4$P3gGp2Bf0FCSLAZTNaE/LZBqSsvVAYZNPNwTehXZbMAhRJdKOjNqqyUWVUTwql9CnhHUlpiluWzHlR2DpUKD4/"
build_key = "ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBADwXV3rbRCWwhSr6aMkHukV5O7OGAEyUtAerj2anJHm3mwbOxlBU/uO4f0ELqo2GJcTALMC0aFrbvu9qonIH5VF7wBBfCP1cS5B92sUagVV9ldI/uo89e/7dVYC9maPsFaZq2G0/PLU0hZKOohq99Oxc2RMSiJaaenX/hNqx5xYSaK+CA== [email protected]"
11 changes: 5 additions & 6 deletions builds/common.pkrvars.hcl
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Maintainer: [email protected]
# Common variables for all builds.

##################################################################################
# VARIABLES
##################################################################################
/*
DESCRIPTION:
Common variables used for all builds.
- Variables are use by the source blocks.
*/

// Virtual Machine Settings
common_vm_version = 18
Expand Down
Loading

0 comments on commit 2c57355

Please sign in to comment.