Terraform Template for ICP Deployment in VMware
Before you start
Install your VMware cluster environment
Summary
This terraform template perform the following tasks:
- Provision IBM Cloud Private VMs in VMWare Cluster
- Provision ICP and GlusterFS from external module
Prerequsite - vSphere Preparation
Before deploying ICP in your vSphere Cluster environment, verify the following checklist:
- Ensure you have a valid username and password to access vCenter
- For ICP Enterprise edition, download the ICP installer from IBM Passport Advantage and save it in a local SFTP Server
- Internet connection to download ICP (Community Edition) and OS package dependencies
- Create Linux VM template with the supported OS of your choice (Ubuntu/RHEL).
- The VM template should have:
- minimum disk size of 20GB
- configured with Ubuntu package manager or Red Hat subscription manager. If there is no internet connection, ensure that the VM template has all the pre-requisites pre-installed as defined in Knowledge Center
Deployment step from Terraform CLI
- Clone this repository:
git clone https://github.com/pjgunadi/ibm-cloud-private-terraform-vmware.git
- Download terraform if you don't have one
- Rename terraform_tfvars.sample file as
terraform.tfvars
and update the input values as needed. - Initialize Terraform to download and update the dependencies
terraform init -upgrade
- Review Terraform plan
terraform plan
- Apply Terraform template
terraform apply
Note:
You can also limit the concurrency with: terraform apply -parallelism=x
where x=number of concurrency
Add/Remove Worker Nodes
- Edit existing deployed terraform variable e.g.
terraform.tfvars
- Increase/decrease the
nodes
and add/removeipaddresses
under theworker
map variable. Example:
worker = {
nodes = "4"
name = "worker"
cpu_cores = "8"
kubelet_lv = "10"
docker_lv = "90"
memory = "8192"
ipaddresses = "192.168.1.90,192.168.1.91,192.168.1.92,192.168.1.93"
netmask = "24"
gateway = "192.168.1.1"
}
Note: The data disk size is the sume of LV variables + 1 (e.g kubelet_lv + docker_lv + 1).
2. Re-apply terraform template:
terraform plan
terraform apply -auto-approve
ICP and Gluster Provisioning Module
The ICP and GlusterFS Installation is performed by ICP Provisioning module