Skip to content

Commit a73ee10

Browse files
authored
Refactor documentation (#1786)
* Refactor PowerVS cluster creation docs * Refactor VPC cluster creation docs * Simplify tilt and getting-started docs
1 parent a71c64a commit a73ee10

14 files changed

+168
-208
lines changed

docs/book/src/SUMMARY.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,9 @@
1010
- [Prerequisites](./topics/vpc/prerequisites.md)
1111
- [Uploading an image](topics/vpc/uploading-an-image.md)
1212
- [Creating a cluster](./topics/vpc/creating-a-cluster.md)
13-
- [Creating a cluster with Load Balancer and External Cloud Provider](./topics/vpc/load-balancer.md)
14-
- [Creating a cluster from ClusterClass](./topics/vpc/clusterclass-cluster.md)
1513
- [PowerVS Cluster](./topics/powervs/index.md)
1614
- [Prerequisites](./topics/powervs/prerequisites.md)
1715
- [Creating a cluster](./topics/powervs/creating-a-cluster.md)
18-
- [Creating a cluster with External Cloud Provider](./topics/powervs/external-cloud-provider.md)
19-
- [Creating a cluster from ClusterClass](./topics/powervs/clusterclass-cluster.md)
20-
- [Creating a cluster by auto creating required resources](./topics/powervs/create-resources.md)
2116
- [Using autoscaler with scaling from 0 machine](./topics/powervs/autoscaler-scalling-from-0.md)
2217
- [capibmadm CLI](./topics/capibmadm/index.md)
2318
- [PowerVS Commands](./topics/capibmadm/powervs/index.md)

docs/book/src/developer/tilt.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ podman machine start
5555

5656
## Create a kind cluster
5757

58-
First, make sure you have a kind cluster and that your `KUBECONFIG` is set up correctly:
58+
First, make sure you have a kind cluster and that your `KUBECONFIG` is set up correctly.
59+
> **Note:** Execute the following from the `cluster-api-provider-ibmcloud` respository.
5960
6061
``` bash
6162
make kind-cluster
@@ -97,11 +98,9 @@ extra_args:
9798
9899
> **Note:** Currently, both [ClusterClass](https://cluster-api.sigs.k8s.io/tasks/experimental-features/cluster-class/index.html) and [ClusterResourceset](https://cluster-api.sigs.k8s.io/tasks/experimental-features/cluster-resource-set.html) are experimental features.
99100
100-
### 1. Configuration to deploy PowerVS workload cluster with external cloud controller manager
101+
### 1. Configuration to deploy workload cluster with external cloud controller manager
101102
102-
To deploy workload cluster with [PowerVS cloud controller manager](/topics/powervs/external-cloud-provider.html)(experimental) or to deploy workload cluster with [cloud controller manager](/topics/vpc/load-balancer.html)(experimental), set `PROVIDER_ID_FORMAT` to `v2` and enable cluster resourceset feature gate under kustomize_substitutions.
103-
104-
This requires setting the feature gate `EXP_CLUSTER_RESOURCE_SET` to `true` under kustomize_substitutions.
103+
To deploy workload cluster with cloud controller manager, set `PROVIDER_ID_FORMAT` to `v2` and enable cluster resourceset feature gate by setting `EXP_CLUSTER_RESOURCE_SET` to `true under kustomize_substitutions.
105104

106105
```yaml
107106
default_registry: "gcr.io/you-project-name-here"
@@ -119,9 +118,7 @@ kustomize_substitutions:
119118

120119
### 2. Configuration to deploy workload cluster from ClusterClass template
121120

122-
To deploy workload cluster with [clusterclass-template](/topics/powervs/clusterclass-cluster.html), set the `PROVIDER_ID_FORMAT` to `v2` under kustomize_substitutions.
123-
124-
This requires setting the feature gates `EXP_CLUSTER_RESOURCE_SET` and `CLUSTER_TOPOLOGY` to `true` under kustomize_substitutions.
121+
To deploy workload cluster with [clusterclass-template](/topics/powervs/clusterclass-cluster.html), set the `PROVIDER_ID_FORMAT` to `v2` and enable the feature gates `EXP_CLUSTER_RESOURCE_SET` and `CLUSTER_TOPOLOGY` to `true`under kustomize_substitutions.
125122

126123
```yaml
127124
default_registry: "gcr.io/you-project-name-here"

docs/book/src/getting-started.md

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -87,29 +87,3 @@ it into a management cluster using `clusterctl`.
8787
```
8888

8989
6. Once the management cluster is ready with the required providers up and running, proceed to provisioning the workload cluster. Check the respective sections for [VPC](/topics/vpc/creating-a-cluster.html) and [PowerVS](/topics/powervs/creating-a-cluster.html) to deploy the cluster.
90-
91-
7. For deploying with your workload cluster with Cloud Controller manager or Cluster Class template, refer to [deploy with cloud controller manager](#deploy-with-cloud-controller-manager) and [deploy PowerVS cluster with cluster class template](#deploy-powervs-cluster-with-clusterclass-template) sections respectively.
92-
93-
94-
### Deploy with Cloud Controller manager
95-
96-
To deploy VPC workload cluster with [IBM cloud controller manager](/topics/vpc/load-balancer.html), or with [PowerVS cloud controller manager](/topics/powervs/external-cloud-provider.html), set the `PROVIDER_ID_FORMAT` environmental variable to `v2`.
97-
98-
```console
99-
export PROVIDER_ID_FORMAT=v2
100-
export EXP_CLUSTER_RESOURCE_SET=true
101-
```
102-
103-
> Note: `EXP_CLUSTER_RESOURCE_SET` should be set for deploying workload cluster with Cloud Controller manager.
104-
105-
### Deploy PowerVS cluster or VPC cluster with ClusterClass template
106-
107-
To deploy workload cluster with [PowerVS clusterclass-template](/topics/powervs/clusterclass-cluster.html) or [VPC clusterclass-template](/topics/VPC/clusterclass-cluster.html). Set the following environmental variables.
108-
109-
```console
110-
export PROVIDER_ID_FORMAT=v2
111-
export EXP_CLUSTER_RESOURCE_SET=true
112-
export CLUSTER_TOPOLOGY=true
113-
```
114-
115-
> Note: Currently, both [ClusterClass](https://cluster-api.sigs.k8s.io/tasks/experimental-features/cluster-class/index.html) and [ClusterResourceSet](https://cluster-api.sigs.k8s.io/tasks/experimental-features/cluster-resource-set.html) are experimental feature so we need to enable the feature gate by setting `EXP_CLUSTER_RESOURCE_SET`, `CLUSTER_TOPOLOGY` environmental variables.

docs/book/src/topics/powervs/autoscaler-scalling-from-0.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ go build .
4545
```
4646

4747
Note:
48-
1. autoscaler can be run in different ways the possible ways are described [here](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/clusterapi/README.md#connecting-cluster-autoscaler-to-cluster-api-management-and-workload-clusters).
49-
2. autoscaler supports various command line flags and more details about it can be found [here](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-the-parameters-to-ca).
48+
1. Autoscaler can be run in different ways, the possible ways are described [here](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/clusterapi/README.md#connecting-cluster-autoscaler-to-cluster-api-management-and-workload-clusters).
49+
2. Autoscaler supports various command line flags and more details about it can be found [here](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-the-parameters-to-ca).
5050

5151
## Use case of cluster-autoscaler
5252

@@ -97,17 +97,17 @@ busybox-deployment-7c87788568-t26bb 0/1 Pending 0 5s
9797
5. On the management cluster verify that the new machine creation is being triggered by autoscaler
9898
```
9999
NAME CLUSTER NODENAME PROVIDERID PHASE AGE VERSION
100-
karthik-ibm-powervs-control-plane-smvf7 karthik-ibm-powervs karthik-ibm-powervs-control-plane-pgwmz ibmpowervs://osa/osa21/3229a-af54-4212-bf60-6202b6fd0a07/809cd0f2-7502-4112-bf44-84d178020d8a Running 82m v1.24.2
101-
karthik-ibm-powervs-md-0-6b4d67ccf4-npdbm karthik-ibm-powervs karthik-ibm-powervs-md-0-qch8f ibmpowervs://osa/osa21/3229a-af54-4212-bf60-6202b6fd0a07/50f841e5-f58c-4569-894d-b40ba0d2696e Running 76m v1.24.2
102-
karthik-ibm-powervs-md-0-6b4d67ccf4-v7xv9 karthik-ibm-powervs Provisioning 3m19s v1.24.2
100+
ibm-powervs-control-plane-smvf7 ibm-powervs ibm-powervs-control-plane-pgwmz ibmpowervs://osa/osa21/3229a-af54-4212-bf60-6202b6fd0a07/809cd0f2-7502-4112-bf44-84d178020d8a Running 82m v1.24.2
101+
ibm-powervs-md-0-6b4d67ccf4-npdbm ibm-powervs ibm-powervs-md-0-qch8f ibmpowervs://osa/osa21/3229a-af54-4212-bf60-6202b6fd0a07/50f841e5-f58c-4569-894d-b40ba0d2696e Running 76m v1.24.2
102+
ibm-powervs-md-0-6b4d67ccf4-v7xv9 ibm-powervs Provisioning 3m19s v1.24.2
103103
```
104104
6. After sometime verify that the new node being added to the cluster and pod is in running state
105105
```
106106
kubectl get nodes
107107
NAME STATUS ROLES AGE VERSION
108-
karthik-ibm-powervs-control-plane-pgwmz Ready control-plane 92m v1.24.2
109-
karthik-ibm-powervs-md-0-n8c6d Ready <none> 42s v1.24.2
110-
karthik-ibm-powervs-md-0-qch8f Ready <none> 85m v1.24.2
108+
ibm-powervs-control-plane-pgwmz Ready control-plane 92m v1.24.2
109+
ibm-powervs-md-0-n8c6d Ready <none> 42s v1.24.2
110+
ibm-powervs-md-0-qch8f Ready <none> 85m v1.24.2
111111
112112
kubectl get pods
113113
NAME READY STATUS RESTARTS AGE
@@ -120,7 +120,7 @@ kubectl delete deployment/busybox-deployment
120120
121121
kubectl get nodes
122122
NAME STATUS ROLES AGE VERSION
123-
karthik-ibm-powervs-control-plane-pgwmz Ready control-plane 105m v1.24.2
124-
karthik-ibm-powervs-md-0-qch8f Ready <none> 98m v1.24.2
123+
ibm-powervs-control-plane-pgwmz Ready control-plane 105m v1.24.2
124+
ibm-powervs-md-0-qch8f Ready <none> 98m v1.24.2
125125
```
126126

docs/book/src/topics/powervs/clusterclass-cluster.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

docs/book/src/topics/powervs/create-resources.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

docs/book/src/topics/powervs/creating-a-cluster.md

Lines changed: 108 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
### Provision workload cluster in IBM Cloud PowerVS
22

3+
> **Note:**
4+
> A PowerVS cluster can be deployed with different customisations. Pick one of the following templates as per your need and fulfill the [prerequisites](prerequisites.md) before proceeding with cluster creation.
5+
> - [PowerVS cluster with user provided resources](#deploy-a-powervs-cluster-with-user-provided-resources)
6+
> - [PowerVS cluster with infrastructure creation](#deploy-a-powervs-cluster-with-infrastructure-creation)
7+
> - [PowerVS cluster with external cloud provider](#deploy-a-powervs-cluster-with-external-cloud-provider)
8+
> - [PowerVS cluster with cluster class](#deploy-a-powervs-cluster-with-cluster-class)
9+
310
Now that we have a management cluster ready, you can create your workload cluster by
411
following the steps below.
512

@@ -29,11 +36,11 @@ following the steps below.
2936
capi-test-port 163.68.65.6 192.168.167.6 fa:16:3e:89:c8:80 c7e7b6e0-0b0d-4a11-a90b-6ea293deb5ac DOWN
3037
```
3138

32-
2. Use clusterctl to render the yaml through templates and deploy the cluster
33-
34-
**Note:** To deploy workload cluster with PowerVS cloud controller manager which is currently in experimental stage follow [these](/topics/powervs/external-cloud-provider.html) steps.
39+
2. Use clusterctl to render the yaml through templates and deploy the cluster.
40+
**Replace the following snippet with the template of your choice.**
3541

36-
**Note:** the `IBMPOWERVS_IMAGE_ID` value below should reflect the ID of the custom qcow2 image, the `kubernetes-version` value below should reflect the kubernetes version of the custom qcow2 image.
42+
> **Note:**
43+
> The `IBMPOWERVS_IMAGE_ID` value below should reflect the ID of the custom image and the `kubernetes-version` value below should reflect the kubernetes version of the custom image.
3744

3845
```console
3946
IBMPOWERVS_SSHKEY_NAME="my-pub-key" \
@@ -123,4 +130,100 @@ following the steps below.
123130
ibm-powervs-1-control-plane-rg6xv Ready master 41h v1.26.2
124131
ibm-powervs-1-md-0-4dc5c Ready <none> 41h v1.26.2
125132
ibm-powervs-1-md-0-dbxb7 Ready <none> 20h v1.26.2
126-
```
133+
134+
### Deploy a PowerVS cluster with user provided resources
135+
136+
```
137+
IBMPOWERVS_SSHKEY_NAME="my-pub-key" \
138+
IBMPOWERVS_VIP="192.168.167.6" \
139+
IBMPOWERVS_VIP_EXTERNAL="163.68.65.6" \
140+
IBMPOWERVS_VIP_CIDR="29" \
141+
IBMPOWERVS_IMAGE_NAME="capibm-powervs-centos-streams8-1-26-2" \
142+
IBMPOWERVS_SERVICE_INSTANCE_ID="3229a94c-af54-4212-bf60-6202b6fd0a07" \
143+
IBMPOWERVS_NETWORK_NAME="capi-test" \
144+
clusterctl generate cluster ibm-powervs-1 --kubernetes-version v1.26.2 \
145+
--target-namespace default \
146+
--control-plane-machine-count=3 \
147+
--worker-machine-count=1 \
148+
--flavor=powervs | kubectl apply -f -
149+
```
150+
151+
### Deploy a PowerVS cluster with infrastructure creation
152+
153+
#### Prerequisites:
154+
- Set `EXP_CLUSTER_RESOURCE_SET` to true as the cluster will be deployed with external cloud provider which will create the resources to run the cloud controller manager.
155+
- Set the `provider-id-fmt` [flag](https://github.com/kubernetes-sigs/cluster-api-provider-ibmcloud/blob/5e7f80878f2252c6ab13c16102de90c784a2624d/main.go#L168-L173) to `v2` via `PROVIDER_ID_FORMAT` environment variable.
156+
- Already existing infrasturcture resources can be used for cluster creation by setting either the ID or name in spec. If neither are specified, the cluster name will be used for constructing the resource name. For example, if cluster name is `capi-powervs`, PowerVS workspace will be created with name `capi-powervs-serviceInstance`.
157+
```
158+
```
159+
160+
```
161+
IBMCLOUD_API_KEY=XXXXXXXXXXXX \
162+
IBMPOWERVS_SSHKEY_NAME="my-ssh-key" \
163+
COS_BUCKET_REGION="us-south" \
164+
COS_BUCKET_NAME="power-oss-bucket" \
165+
COS_OBJECT_NAME=capibm-powervs-centos-streams8-1-28-4-1707287079.ova.gz \
166+
IBMACCOUNT_ID="<account_id>" \
167+
IBMPOWERVS_REGION="wdc" \
168+
IBMPOWERVS_ZONE="wdc06" \
169+
IBMVPC_REGION="us-east" \
170+
IBM_RESOURCE_GROUP="ibm-resource-group" \
171+
BASE64_API_KEY=$(echo -n $IBMCLOUD_API_KEY | base64) \
172+
clusterctl generate cluster capi-powervs --kubernetes-version v1.28.4 \
173+
--target-namespace default \
174+
--control-plane-machine-count=3 \
175+
--worker-machine-count=1 \
176+
--flavor=powervs-create-infra | kubectl apply -f -
177+
```
178+
179+
### Deploy a PowerVS cluster with external cloud provider
180+
181+
#### Prerequisites:
182+
- Set `EXP_CLUSTER_RESOURCE_SET` to true as the cluster will be deployed with external cloud provider which will create the resources to run the cloud controller manager.
183+
- Set the `provider-id-fmt` [flag](https://github.com/kubernetes-sigs/cluster-api-provider-ibmcloud/blob/5e7f80878f2252c6ab13c16102de90c784a2624d/main.go#L168-L173) to `v2` via `PROVIDER_ID_FORMAT` environment variable.
184+
185+
```
186+
IBMPOWERVS_SSHKEY_NAME="my-pub-key" \
187+
IBMPOWERVS_VIP="192.168.167.6" \
188+
IBMPOWERVS_VIP_EXTERNAL="163.68.65.6" \
189+
IBMPOWERVS_VIP_CIDR="29" \
190+
IBMPOWERVS_IMAGE_NAME="capibm-powervs-centos-streams8-1-26-2" \
191+
IBMPOWERVS_SERVICE_INSTANCE_ID="3229a94c-af54-4212-bf60-6202b6fd0a07" \
192+
IBMPOWERVS_NETWORK_NAME="capi-test" \
193+
IBMACCOUNT_ID="ibm-accountid" \
194+
IBMPOWERVS_REGION="osa" \
195+
IBMPOWERVS_ZONE="osa21" \
196+
BASE64_API_KEY=$(echo -n $IBMCLOUD_API_KEY | base64) \
197+
clusterctl generate cluster ibm-powervs-1 --kubernetes-version v1.26.2 \
198+
--target-namespace default \
199+
--control-plane-machine-count=3 \
200+
--worker-machine-count=1 \
201+
--flavor=powervs-cloud-provider | kubectl apply -f -
202+
```
203+
204+
### Deploy a PowerVS cluster with cluster class
205+
206+
#### Prerequisites:
207+
- To deploy a cluster using [ClusterClass](https://cluster-api.sigs.k8s.io/tasks/experimental-features/cluster-class/index.html), set `CLUSTER_TOPOLOGY` environment variable to `true`.
208+
- Set `EXP_CLUSTER_RESOURCE_SET` to true as the cluster will be deployed with external cloud provider which will create the resources to run the cloud controller manager.
209+
- Set the `provider-id-fmt` [flag](https://github.com/kubernetes-sigs/cluster-api-provider-ibmcloud/blob/5e7f80878f2252c6ab13c16102de90c784a2624d/main.go#L168-L173) to `v2` via `PROVIDER_ID_FORMAT` environment variable.
210+
211+
```
212+
IBMPOWERVS_CLUSTER_CLASS_NAME="powervs-cc" \
213+
IBMPOWERVS_SSHKEY_NAME="my-pub-key" \
214+
IBMPOWERVS_VIP="192.168.167.6" \
215+
IBMPOWERVS_VIP_EXTERNAL="163.68.65.6" \
216+
IBMPOWERVS_VIP_CIDR="29" \
217+
IBMPOWERVS_IMAGE_NAME="capibm-powervs-centos-streams8-1-26-2" \
218+
IBMPOWERVS_SERVICE_INSTANCE_ID="3229a94c-af54-4212-bf60-6202b6fd0a07" \
219+
IBMPOWERVS_NETWORK_NAME="capi-test" \
220+
IBMACCOUNT_ID="ibm-accountid" \
221+
IBMPOWERVS_REGION="osa" \
222+
IBMPOWERVS_ZONE="osa21" \
223+
BASE64_API_KEY=$(echo -n $IBMCLOUD_API_KEY | base64) \
224+
clusterctl generate cluster ibm-powervs-1 --kubernetes-version v1.26.2 \
225+
--target-namespace default \
226+
--control-plane-machine-count=3 \
227+
--worker-machine-count=1 \
228+
--flavor=powervs-clusterclass | kubectl apply -f -
229+
```

0 commit comments

Comments
 (0)