You need a Softlayer account and be aware that applying this template may incur charges to your Softlayer account.
This terraform template perform the following tasks:
- Provision Softlayer environment for IBM Cloud Private
- Call ICP Provisioning Module
- Login to IBM Cloud
- Navigate to
Infrastructure
- On the IBM CLoud Infrastructure dashboard, find Account Snapshot section and click Users
- On user record row, click Actions dropdown to Create/Show API Key
- Clone this repository:
git clone https://github.com/pjgunadi/ibm-cloud-private-terraform-softlayer.git
- Download terraform if you don't have one
- Download and install IBM terraform plugin
- Download the plugin for your workstation OS (Windows/MacOS/Linux)
- Extract the plugin to your local executable directory. Example:
/usr/local/bin/terraform-provider-ibm
- Update the $HOME/.terraformrc to reference the IBM Provider:
providers {
ibm = "/usr/local/bin/terraform-provider-ibm"
}
- Login to IBM Cloud Infrastructure (SoftLayer) and create an API Username and API Key
- Rename terraform_tfvars.sample file as
terraform.tfvars
and update the input values as needed.
Refer to Softlayer API fordatacenter
andos_reference
variable. - Initialize Terraform to download and update the dependencies
terraform init -upgrade
- Review Terraform plan
terraform plan
- Apply Terraform template
terraform apply
- Edit existing deployed terraform variable e.g.
terraform.tfvars
- Increase/decrease the
nodes
under theworker
map variable. Example:
worker = {
nodes = "4"
name = "worker"
cpu_cores = "2"
disk_size = "25" // GB
kubelet_lv = "10"
docker_lv = "89"
local_disk = false
memory = "8192"
network_speed = "1000"
private_network_only = false
hourly_billing = true
}
- Re-apply terraform template:
terraform plan
terraform apply -auto-approve
Note:
- The data disk size is the sum of LV variables + 1 (e.g kubelet_lv + docker_lv + 1).
- The block storage size that can be ordered from IBM Cloud Infrastructure, should match to one of the following: 10GB, 20GB, 25GB, 30GB, 40GB, 50GB, 75GB, 100GB, 125GB, 150GB, 175GB, 200GB, 250GB, 300GB, 350GB, 400GB, 500GB, 750GB, 1TB, 1.5TB, and 2TB.
The ICP and GlusterFS Installation is performed by ICP Provisioning module