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

IBMCloud-Powervs docs and pre-req update #1942

Merged
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
19 changes: 12 additions & 7 deletions src/cloud-api-adaptor/ibmcloud-powervs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,31 +30,36 @@ pvsadm image qcow2ova --prep-template-default > image-prep.template

Add the following snippet to `image-prep.template`
```
yum install -y gcc gcc-c++ git make
git clone -b main https:/kata-containers/kata-containers.git
yum install -y gcc gcc-c++ git make wget perl
wget https:/mikefarah/yq/releases/download/v4.42.1/yq_linux_ppc64le
chmod +x yq_linux_ppc64le && mv yq_linux_ppc64le /usr/local/bin/yq
git clone https:/confidential-containers/cloud-api-adaptor.git
cd cloud-api-adaptor/ibmcloud-powervs/image
cd cloud-api-adaptor/src/cloud-api-adaptor/ibmcloud-powervs/image
make build
```

> 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`
> PowerVS provider, you need to additionally add this to `image-prep.template` and setup a DHCP server.
> ```
> 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. Setup a DHCP server using pvsadm
> ```
> pvsadm dhcpserver create --workspace-id <workspace-id> -k <api-key>
> ```
> 3. 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
```
pvsadm image qcow2ova --image-name <name> --image-dist centos --image-url https://cloud.centos.org/centos/8-stream/ppc64le/images/CentOS-Stream-GenericCloud-8-latest.ppc64le.qcow2 --prep-template image-prep.template
pvsadm image qcow2ova --image-name <name> --image-dist centos --image-url https://cloud.centos.org/centos/9-stream/ppc64le/images/CentOS-Stream-GenericCloud-9-latest.ppc64le.qcow2 --prep-template image-prep.template --image-size 20
```


> Qcow2 CentOS images for ppc64le can be found [here](https://cloud.centos.org/centos/8-stream/ppc64le/images/)
> Qcow2 CentOS images for ppc64le can be found [here](https://cloud.centos.org/centos/9-stream/ppc64le/images/)

## Import image to PowerVS

Expand Down
9 changes: 7 additions & 2 deletions src/cloud-api-adaptor/ibmcloud-powervs/image/prereq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@
# FIXME to pickup these values from versions.yaml
GO_VERSION="1.21.12"
RUST_VERSION="1.75.0"
SKOPEO_VERSION="1.5.0"

# Install dependencies
yum install -y curl protobuf-compiler libseccomp-devel openssl openssl-devel perl skopeo-${SKOPEO_VERSION}
yum install -y curl libseccomp-devel openssl openssl-devel skopeo clang clang-devel

wget https://rpmfind.net/linux/centos-stream/9-stream/CRB/ppc64le/os/Packages/protobuf-compiler-3.14.0-13.el9.ppc64le.rpm
yum install -y protobuf-compiler-3.14.0-13.el9.ppc64le.rpm

wget https://www.rpmfind.net/linux/centos-stream/9-stream/CRB/ppc64le/os/Packages/device-mapper-devel-1.02.197-2.el9.ppc64le.rpm
yum install -y device-mapper-devel-1.02.197-2.el9.ppc64le.rpm

# Install Golang
curl https://dl.google.com/go/go${GO_VERSION}.linux-ppc64le.tar.gz -o go${GO_VERSION}.linux-ppc64le.tar.gz && \
Expand Down
Loading