Skip to content

Commit

Permalink
Added tfvars and readme file
Browse files Browse the repository at this point in the history
Signed-off-by: Punith Kenchappa <[email protected]>
  • Loading branch information
pkenchap committed May 20, 2024
1 parent a1aec9d commit 943dffe
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
43 changes: 43 additions & 0 deletions tf/add-powervm-workers/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Add PowerVM workers to Intel cluster

User need to uopdate required vales in data/vars.tfvars file such as username and password of IBM intranet credentials to get access to the PowerVC.
```
auth_url = "https://scnlonprema.pokprv.stglabs.ibm.com:5000/v3/"
user_name = "***@us.ibm.com"
password = "***"
```

### Use Terraform command to plan and apply .

```
terraform plan -var-file=data/vars.tfvars
```

```
terraform apply -var-file=data/vars.tfvars
```

### Configure the DHCP and restart the dhcpd service.

Get the MAC Address and IP Address of the VM created on PowerVC. Update /etc/dhcp/dhcpd.conf with the lease/addresses as shown below.

```
host workerp-0 { hardware ethernet fa:16:3e:0f:95:6b; fixed-address 10.20.177.243; }
```

* Restart the dhcpd.
```
systemctl restart dhcpd
```
* Restart the Worker node for ignition to start.

* Approve the CSR certificate to add the worker to intel cluster.
```
oc get csr
```
```
oc adm certificate approve <certificate-name>
```



20 changes: 20 additions & 0 deletions tf/add-powervm-workers/powervm.tfvars
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
################################################################
# Copyright 2024 - IBM Corporation. All rights reserved
# SPDX-License-Identifier: Apache-2.0
################################################################

auth_url = "https://scnlonprema.pokprv.stglabs.ibm.com:5000/v3/"
user_name = "***@us.ibm.com"
password = "***"
ignition_ip = "10.20.29.41"
resolver_ip = "10.20.29.41"
resolve_domain = ""
insecure = true
tenant_name = "base-ocp"
domain_name = "Default"
network_name = "vlan1337"
power_worker_prefix = "power-worker-"
flavor_id = "29fcd15b-c41c-4b9b-90b7-43bbf914c2df"
image_id = "3f877d0e-84e8-41fe-988d-318ea1521b0a"
openstack_availability_zone = "e980"
worker_count = 2

0 comments on commit 943dffe

Please sign in to comment.