Skip to content

Commit

Permalink
powervs: add forwarder_port variable to configure it to a specific port
Browse files Browse the repository at this point in the history
Adds option to configure port for agent-protocol-forwarder.

Fixes: #1457

Signed-off-by: Amulyam24 <amulmek1@in.ibm.com>
  • Loading branch information
Amulyam24 committed Dec 14, 2023
1 parent 589511c commit b523374
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ibmcloud-powervs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,16 @@ cd cloud-api-adaptor/ibmcloud-powervs/image
make build
```

> If you intend to use DHCP network type for creating peer pod VMs with
> NOTE:
> 1. If you intend to use DHCP network type for creating peer pod VMs with
> PowerVS provider, you need to additionally add this to `image-prep.template`
> ```
> mkdir -p /etc/cloud/cloud.cfg.d
> cat <<EOF >> /etc/cloud/cloud.cfg.d/99-custom-networking.cfg
> network: {config: disabled}
> EOF
> ```
> 2. To use a specific port or address for agent-protocol-forwarder, pass `FORWARDER_PORT=<port-number>` to the `make` command.
2. Download the qcow2 image and converts into ova type
```
Expand Down
2 changes: 2 additions & 0 deletions ibmcloud-powervs/image/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
SKOPEO_SRC =
SKOPEO_BIN = /usr/bin/skopeo

export FORWARDER_PORT ?=

ROOT_DIR := $(dir $(lastword $(MAKEFILE_LIST)))../../
include $(ROOT_DIR)podvm/Makefile.inc

Expand Down
7 changes: 7 additions & 0 deletions ibmcloud-powervs/image/copy-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ PODVM_DIR=${REPO_ROOT}/podvm
sudo mkdir -p /etc/containers
sudo cp ${PODVM_DIR}/files/etc/agent-config.toml /etc/agent-config.toml
sudo cp /tmp/files/etc/aa-offline_fs_kbc-keys.json /etc/aa-offline_fs_kbc-keys.json

if [ -n "${FORWARDER_PORT}" ]; then
cat <<END >> /etc/default/agent-protocol-forwarder
OPTIONS=-listen 0.0.0.0:${FORWARDER_PORT}
END
fi

sudo cp -a ${PODVM_DIR}/files/etc/containers/* /etc/containers/
sudo cp -a ${PODVM_DIR}/files/etc/systemd/* /etc/systemd/
if [ -e ${PODVM_DIR}/files/etc/aa-offline_fs_kbc-resources.json ]; then
Expand Down

0 comments on commit b523374

Please sign in to comment.