This year at VMworld SFO and BCN I was involved in organizing a couple of great hackathons with the @VMwareCode guys and William Lam, these were highly successful and I have to say the highlight of both my VMworlds. The teams were great, the end projects were fantastic and most of all, everyone that attended told me they learned something, this if you ask me was the main objective for the hackathon.
If you attended I do want to extend a huge thanks for joining in, having fun and learning with us.
To put the hacakthon together we needed to build up some environments for people to use, William came up with the idea of using Intel NUCs as these were easily transportable and packed a punch for their size, the equipment we purchased is listed below:
|Crucial 16GB Single DDR4 2133 MT/s (PC4-17000) SODIMM 260-Pin Memory – CT16G4SFD8213
|Intel NUC Kit NUC6i3SYH BOXNUC6I3SYH Silver/Black
|Samsung 850 EVO 500GB 2.5-Inch SATA III Internal SSD (MZ-75E500B/AM) (For Capacity)
|Samsung SM951 128 GB Internal Solid State Drive MZHPV128HDGM-00000 (For Performance)
For the hackathon we needed to build a lot of these units, whilst we did some parts of it manually William and I recently took the time to complete the automated deployment of these units, in fact the script is not specific to these units, it will work on any ESXi host with 2 disks, one for performance and 1 for capacity. Of course you can also adjust the script to use more disks if you have them!
Once you have ESXi on a USB insert it into the machine and configure it to boot from the USB, after the ESXi machine is on the network you can alter the configuration settings in the start of the script and run the script in the Deployment Script section of this blog to automate the following:
- Configure VSAN in a single node configuration (Unsupported)
- Use the smaller SSD for performance
- Use the larger SSD for Capacity
- Configure NTP on the ESXi Host
- Enable SSH on the ESXi Host for debugging
- Configure the Syslog settings on the ESXi Host
- Deploy the VCSA on the ESXi Host
- Enable VSAN Traffic on the Management Network
- Create a Datacenter
- Create a Cluster
- Create a subscribed content library for William Lams Nested ESXi Library
- Enable Autostart so the VCSA VM starts when the ESXi machine powers on
- Enable SSH on the VCSA Server
Once run it should look something like this:
Of course this script can be extended or modified as needed, if you want to contribute then please do check out the script or add a pull request to the PowerCLI-Example-Scripts repo here.
Deleting the configuration
Of course sometimes people do not always edit the configuration variables before they hit deploy to make it how they want it so sometimes it fails to build, if this is the case you will want to make sure the ESXi host is back to normal before trying again.
BEWARE: this will remove the VMs and destroy the VSAN datastore, make sure you want to do this and are not connected to more than one host in PowerCLI, I suggest a fresh PowerShell console.