Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instruction to build DHCP configured images #1455

Merged
merged 1 commit into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 18 additions & 13 deletions docs/book/src/capi/providers/ibmcloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,27 @@ In addition to the configuration found in `images/capi/packer/config`, the `powe

This table lists several common options that a user may want to set via `PACKER_VAR_FILES` to customize their build behavior.

| Variable | Description | Default |
|----------|-------------|---------|
| `account_id` | IBM Cloud account id. | `""` |
| `apikey` | IBM Cloud API key. | `""` |
| `capture_cos_access_key` | The Cloud Object Storage access key. | `""` |
| `capture_cos_bucket` | The Cloud Object Storage bucket to upload the image within. | `""` |
| `capture_cos_region` | The Cloud Object Storage region to upload the image within. | `""` |
| `capture_cos_secret_key` | The Cloud Object Storage secret key. | `""` |
| `key_pair_name` | The name of the SSH key pair provided to the server for authenticating users (looked up in the tenant's list of keys). | `""` |
| `region` | The PowerVS service instance region to build the image within. | `""` |
| `service_instance_id` | The PowerVS service instance id to build the image within. | `""` |
| `ssh_private_key_file` | The absolute path to the SSH key file. | `""` |
| `zone` | The PowerVS service instance zone to build the image within. | `""` |
| Variable | Description | Default |
|--------------------------|------------------------------------------------------------------------------------------------------------------------|---------|
| `account_id` | IBM Cloud account id. | `""` |
| `apikey` | IBM Cloud API key. | `""` |
| `capture_cos_access_key` | The Cloud Object Storage access key. | `""` |
| `capture_cos_bucket` | The Cloud Object Storage bucket to upload the image within. | `""` |
| `capture_cos_region` | The Cloud Object Storage region to upload the image within. | `""` |
| `capture_cos_secret_key` | The Cloud Object Storage secret key. | `""` |
| `key_pair_name` | The name of the SSH key pair provided to the server for authenticating users (looked up in the tenant's list of keys). | `""` |
| `region` | The PowerVS service instance region to build the image within. | `""` |
| `service_instance_id` | The PowerVS service instance id to build the image within. | `""` |
| `ssh_private_key_file` | The absolute path to the SSH key file. | `""` |
| `zone` | The PowerVS service instance zone to build the image within. | `""` |
| `dhcp_network` | The PowerVS image with DHCP support. | `false` |

The parameters can be set via a variable file and passed via `PACKER_VAR_FILES`. See [Customization](../capi.md#customization) for examples.


Note: When setting `dhcp_network: true`, make sure to customize the network settings while building OS using [pvsadm tool](https://github.com/ppc64le-cloud/pvsadm/blob/main/docs/Build%20DHCP%20enabled%20Centos%20Images.md).
Also run the image-builder from system from where the DHCP private IP can be reached and SSH able.

## CAPIBM - VPC

### Hypervisor
Expand Down
2 changes: 1 addition & 1 deletion images/capi/hack/ensure-powervs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ if ! (${SED} --version 2>&1 | grep -q GNU); then
exit 1
fi

_version="0.2.1"
_version="0.2.4"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to latest release which contains the dhcp related changed.

_chkfile="packer-plugin-powervs_v${_version}_SHA256SUMS"
_chk_url="https://github.com/ppc64le-cloud/packer-plugin-powervs/releases/download/v${_version}/${_chkfile}"
_bin_url="https://github.com/ppc64le-cloud/packer-plugin-powervs/releases/download/v${_version}/packer-plugin-powervs_v${_version}_x5.0_${HOSTOS}_${HOSTARCH}.zip"
Expand Down
2 changes: 2 additions & 0 deletions images/capi/packer/powervs/packer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
},
"name": "capibm-powervs-{{user `build_name`}}-{{user `kubernetes_rpm_version` | clean_resource_name}}-{{user `build_timestamp`}}"
},
"dhcp_network": "{{user `dhcp_network`}}",
"instance_name": "capibm-{{user `build_name`}}-{{user `build_timestamp`}}",
"key_pair_name": "{{user `key_pair_name`}}",
"region": "{{user `region`}}",
Expand Down Expand Up @@ -78,6 +79,7 @@
"containerd_version": null,
"crictl_url": null,
"crictl_version": null,
"dhcp_network": "false",
"existing_ansible_ssh_args": "{{env `ANSIBLE_SSH_ARGS`}}",
"key_pair_name": "",
"kubernetes_cni_deb_version": null,
Expand Down