The procedure to install terraform on MAC is exactly same, with slight differences. If you have homebrew tool installed on your mac, then installing terraform is just one command away. Brew install terraform. If you do not have brew & admin permission on your MAC, then I would recommend the below method to install terraform. To use Terraform for Oracle Cloud Infrastructure, you must download two components - Terraform from HashiCorp, and then the Oracle Cloud Infrastructure Terraform provider. Download and Install Terraform Download Terraform from the HashiCorp download page. Ensure that you download the correct binary file for your system.
Terraform is an automation tool created by HashiCorp. It focuses on deploying cloud infrastructure in an automatic fashion. It supports a lot of cloud providers like AWS, DigitalOcean, Google Cloud Platform, OpenStack, VMware vSphere, and more. Terraform is developed in GoLang, which makes the installation really easy to perform, and allows for a lot of operating systems to be supported.
In this lab, we will see how to create a Ubuntu 18.04 Terraform template for VMware vSphere.
1- Create a new virtual machine.
2- Choose a name for your virtual machine template.
3- Select a temporary compute resource for the virtual machine.
4- Select a datastore for the virtual machine.
5- Select the vSphere compatibility for the virtual machine.
6- Select 'Ubuntu Linux (64-bit)' as guest OS for the virtual machine.
7- Change the type of the SCSI controller to 'VMware Paravirtual'.
8- Choose a temporary network for the virtual machine.
9- Add the Ubuntu 18.04 ISO to the CD/DVD drive of the virtual machine.
10- Connect the CD/DVD drive at boot.
11- Finish the hardware customization of the virtual machine.
12- Validate the creation of the virtual machine.
13- Power on the virtual machine.
14- Launch the vSphere web console.
1- Select the language of the Ubuntu installer.
2- Select the keyboard layout for the Ubuntu installation.
3- Start the Ubuntu installation.
4- Configure the network card of the virtual machine with a temporary configuration.
5- Configure a proxy if you use one.
6- Choose the partition layout for the disk.
7- Choose the installation disk.
8- Configure a user for the virtual machine.
![Install Install](/uploads/1/2/4/6/124627866/362709519.png)
9- Reboot the virtual machine.
10- SSH to the new Ubuntu virtual machine.
11- Upgrade the Ubuntu packages.
1- Download the VMware tools on your laptop (you have to create an account if you don't already have one).
2- Uncompress the archive.
3- Copy the VMware tools ISO to the template virtual machine.
4- SSH to the template virtual machine.
5- Mount the VMware tools ISO.
6- Extract the VMware tools installer.
7- Unmount the VMware tools ISO.
8- Remove the open-vm-tools package.
9- Install the VMware tools (leave all the options by default).
10- Reboot the machine.
1- Remove the temporary network configuration.
Download Terraform Windows
2- Prevent cloud config from preserving the hostname.
3- Power off the Ubuntu virtual machine.
4- Edit the settings of the virtual machine.
5- Set the network card back to 'VM Network'.
6- Set the CD/DVD drive back to 'Client Device'.
7- Validate the modification.
1- Convert the virtual machine to a vSphere template.
https://blog.inkubate.io/ghosthttps:/start.fedoraproject.org/
Install Terraform
This is an example on how to install Terraform on your Linux desktop. Terraform is also available for Mac OSX and Windows.
1- Download Terraform.
2- Unzip the archive.
3- Copy the binary into your path.
Launch a new virtual machine based on the template
1- Clone the Terraform script repository.
2- Initialise Terraform.
3- Configure the deployment (modify accordingly).
4- Deploy the virtual machine.
5- Test to access the virtual machine.
6- Destroy the virtual machine.
Congratulations! You can now use this Ubuntu 18.04 template to deploy vSphere virtual machines with Terraform.
- 3Homebrew (Option 1)
- 5Verify Install
Purpose
This article gives a couple options on how to install or setup Terraform on a macOS Sierra system. The first optional way is to use HomeBrew. Which simplifies the install process and makes updating easy too.
Prerequisites
- Homebrew (IF going Homebrew way instead of downloading zip.)
Homebrew (Option 1)
The easiest and quickest way to install Terraform is using Homebrew.
Install Example
A symlink will be created for the binary /usr/local/bin/terraform -> ../Cellar/terraform/0.9.1/bin/terraform
Upgrading
Manually (Option 2)
The versions seem to be bottled up very quickly with HomeBrew so I see little reason why to do a manual install, but this is how you do it.
- Download binary zip from HashiCorp
- https://www.terraform.io/downloads.html
- Unzip
- Copy binary to a place in the path such as /usr/local/bin/terraform
Verify Install
A simple test that the binary is in the path and such is to call the version.
Example
Sources
Terraform Free Download For Windows
Retrieved from 'https://www.bonusbits.com/index.php?title=HowTo:Install_Terraform_on_macOS&oldid=9579'