Skip to content

Commit

Permalink
Merge pull request #25 from pkenchap/tfvars-file
Browse files Browse the repository at this point in the history
Added tfvars and readme file
  • Loading branch information
prb112 authored May 20, 2024
2 parents a1aec9d + c4216f3 commit 39636f3
Show file tree
Hide file tree
Showing 2 changed files with 66 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://host.net: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>
```



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

auth_url = "https://<PowerVC-Host>:5000/v3/"
user_name = "<EMAIL>"
password = "<PASSWORD>"
insecure = true
tenant_name = "<PROJECT>"
domain_name = "<DOMAIN>"

network_name = "<NETWORK>"
ignition_ip = "<IP>"
resolver_ip = "<IP>"
resolve_domain = "<domain for resolver dns>"
power_worker_prefix = "<prefix-for-power-workers>"
flavor_id = "<flavor_id>"
image_id = "<image_id>"
openstack_availability_zone = "<host group>"

# the number of workers to create
worker_count = 2

0 comments on commit 39636f3

Please sign in to comment.