In my previous post I showed how to install automaticaly a virtual machine with pfSense. The automation I reached was around 90%, as I didn’t know how to automate the installation of the software. Thanks to Michael Zenzmaier who suggested me the Set-VMKeystrokes function created by William Lam I was able to also automate the installation. This solution is also a great example to automate every situation where we need to send keystrokes to a vSphere VM.
Category: Tech
Everything tech: deepdive on the most important technologies, tips and tricks for everyday’s work, tutorial, step-by-step guides, videos and manuals.
Automatically deploy pfSense with Terraform and Ansible
My vSphere Lab has multiple networks, and even if I have NSX available, I usually prefer the simplicity of a small virtual appliance that acts as the firewall to securely connect all those networks, simulating a secure environment. I always used pfSense for this scope, as it is very powerful and yet very simple to use. I need to focus my lab time on things I need for my job, so the quickness of pfSense has always been an advantage. From time to time I need to rebuild my lab, and even if I have some configuration backups to restore pfSense, I wanted to see if I could automate the deployment and configuration of my pfSense appliance.
I was able to automate 99% of the process. Here’s how.
My Automated Lab project: #6 Create a S3 Bucket with Terraform
To complete my setup, once I deployed all my virtual machines in the previous articles, I also need a S3 bucket to be later used in Veeam as an object storage. And obviously, I can also automated this part with Terraform.
My Automated Lab project: #5 Deploy a Linux vSphere VM with Terraform and custom disks
After deploying a Windows VM in the previous article, this time I will deploy a Linux VM to be used as a Veeam Hardened Repository. Since I need some more space for storing the backup, I will use this opportunity to create the VM with a additional disks.
My Automated Lab project: #4 Deploy the VMs from templates using Terraform
After I have created my templates with Packer in the previous posts, I can now use them every time as a quick source for creating my own virtual machines. Thanks to Terraform, I’ll be able to deploy each new vm in a matter of minutes, and also to customize each of them as I need.
My Automated Lab project: #3 Create a Windows Server 2019 template in VMware vSphere with Packer
In my previous post I’ve created a Ubuntu template into VMware vSphere using Packer. Time to build now a Microsoft Windows template.
My Automated Lab project: #2 Create a Ubuntu template in VMware vSphere with Packer
In my previous post I explained the tools I use in my lab automation. Today, we’ll talk about creating Ubuntu templates into VMware vSphere. For this, I will use Packer.
My Automated Lab project: #1 Install and configure the needed tools
Raise your hand if you love to rebuild everytime your home lab manually! Noone, right? you either end up trying to not breaking it, thus defeating the purpose of the lab, or you spend insame amount of hours to fix it everytime, or to rebuilding it from scratch. So, automation in our home labs has always been a huge topic, and there are around many posts in these regards. So, why my own version? Because I found around some posts that I used to create my own automation, but none of them was perfect for my needs. I love beers, so let me use this example: like an home brewer (which I’m not, by the way) during this year I made my own recipe. It may not be the best one around, but it’s my own personal recipe. If you find it useful too, be my guest!