Skip to content

Commit efd7513

Browse files
authored
docs: Add how to create clusters (#602)
**What problem does this PR solve?**: **Which issue(s) this PR fixes**: Fixes # **How Has This Been Tested?**: <!-- Please describe the tests that you ran to verify your changes. Provide output from the tests and any manual steps needed to replicate the tests. --> **Special notes for your reviewer**: <!-- Use this to provide any additional information to the reviewers. This may include: - Best way to review the PR. - Where the author wants the most review attention on. - etc. -->
1 parent e42d887 commit efd7513

File tree

10 files changed

+178
-6
lines changed

10 files changed

+178
-6
lines changed

.goreleaser.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ release:
2727
- glob: release-metadata.yaml
2828
name_template: metadata.yaml
2929
- glob: runtime-extension-components.yaml
30+
- glob: ./charts/{{ .ProjectName }}/defaultclusterclasses/*.yaml
3031

3132
before:
3233
hooks:

cluster-api-runtime-extensions-nutanix.code-workspace

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,14 @@
1515
],
1616
"settings": {
1717
"go.buildTags": "e2e",
18-
}
18+
"json.schemaDownload.enable": true,
19+
"json.schemas": [
20+
{
21+
"fileMatch": [
22+
"/release-please-config.json"
23+
],
24+
"url": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
25+
},
26+
],
27+
},
1928
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
+++
2+
title = "Creating clusters"
3+
icon = "fa-solid fa-industry"
4+
weight = 2
5+
+++
6+
7+
CAREN currently supports clusters for the providers below (follow the links below to see instructions on how to use
8+
CAREN with these providers).
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
+++
2+
title = "AWS"
3+
icon = "fa-brands fa-aws"
4+
weight = 1
5+
+++
6+
7+
Cluster API requires that `ClusterClasses` referenced by a `Cluster` reside in the same namespace as the `Cluster`. To
8+
create the necessary `ClusterClass`, run:
9+
10+
```shell
11+
kubectl apply --server-side \
12+
-f https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/releases/download/v{{< param "version" >}}/aws-cluster-class.yaml
13+
```
14+
15+
You can then create your cluster. First, let's list the required variables:
16+
17+
```shell
18+
clusterctl generate cluster my-cluster \
19+
--from https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/releases/download/v{{< param "version" >}}/aws-cluster-cilium-helm-addon.yaml \
20+
--list-variables
21+
```
22+
23+
Export the required variables and any optional variables that you may want to set:
24+
25+
```shell
26+
export AMI_LOOKUP_BASEOS=<value> \
27+
AMI_LOOKUP_FORMAT=<value> \
28+
AMI_LOOKUP_ORG=<value>
29+
```
30+
31+
And create your cluster:
32+
33+
```shell
34+
clusterctl generate cluster my-cluster \
35+
--from https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/releases/download/v{{< param "version" >}}/aws-cluster-cilium-helm-addon.yaml | kubectl apply --server-side -f -
36+
```
37+
38+
To customize your cluster configuration prior to creation, generate the cluster definition to a file and edit it before applying:
39+
40+
```shell
41+
clusterctl generate cluster my-cluster \
42+
--from https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/releases/download/v{{< param "version" >}}/aws-cluster-cilium-helm-addon.yaml >mycluster.yaml
43+
44+
# EDIT mycluster.yaml
45+
46+
kubectl apply --server-side -f mycluster.yaml
47+
```
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
+++
2+
title = "Docker"
3+
icon = "fa-brands fa-docker"
4+
weight = 3
5+
+++
6+
7+
Cluster API requires that `ClusterClasses` referenced by a `Cluster` reside in the same namespace as the `Cluster`. To
8+
create the necessary `ClusterClass`, run:
9+
10+
```shell
11+
kubectl apply --server-side \
12+
-f https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/releases/download/v{{< param "version" >}}/docker-cluster-class.yaml
13+
```
14+
15+
You can then create your cluster. First, let's list the required variables:
16+
17+
```shell
18+
clusterctl generate cluster my-cluster \
19+
--from https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/releases/download/v{{< param "version" >}}/docker-cluster-cilium-helm-addon.yaml \
20+
--list-variables
21+
```
22+
23+
Export the required variables and any optional variables that you may want to set and then create your cluster:
24+
25+
```shell
26+
clusterctl generate cluster my-cluster \
27+
--from https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/releases/download/v{{< param "version" >}}/docker-cluster-cilium-helm-addon.yaml | kubectl apply --server-side -f -
28+
```
29+
30+
To customize your cluster configuration prior to creation, generate the cluster definition to a file and edit it before applying:
31+
32+
```shell
33+
clusterctl generate cluster my-cluster \
34+
--from https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/releases/download/v{{< param "version" >}}/docker-cluster-cilium-helm-addon.yaml >mycluster.yaml
35+
36+
# EDIT mycluster.yaml
37+
38+
kubectl apply --server-side -f mycluster.yaml
39+
```
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
+++
2+
title = "Nutanix"
3+
icon = "fa-solid fa-server"
4+
weight = 2
5+
+++
6+
7+
8+
Cluster API requires that `ClusterClasses` referenced by a `Cluster` reside in the same namespace as the `Cluster`. To
9+
create the necessary `ClusterClass`, run:
10+
11+
```shell
12+
kubectl apply --server-side \
13+
-f https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/releases/download/v{{< param "version" >}}/nutanix-cluster-class.yaml
14+
```
15+
16+
You can then create your cluster. First, let's list the required variables:
17+
18+
```shell
19+
clusterctl generate cluster my-cluster \
20+
--from https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/releases/download/v{{< param "version" >}}/nutanix-cluster-cilium-helm-addon.yaml \
21+
--list-variables
22+
```
23+
24+
Export the required variables and any optional variables that you may want to set:
25+
26+
```shell
27+
export CONTROL_PLANE_ENDPOINT_IP=<value> \
28+
DOCKER_HUB_PASSWORD=<value> \
29+
DOCKER_HUB_USERNAME=<value> \
30+
NUTANIX_ENDPOINT=<value> \
31+
NUTANIX_INSECURE=<value> \
32+
NUTANIX_MACHINE_TEMPLATE_IMAGE_NAME=<value> \
33+
NUTANIX_PASSWORD=<value> \
34+
NUTANIX_PORT=<value> \
35+
NUTANIX_PRISM_ELEMENT_CLUSTER_NAME=<value> \
36+
NUTANIX_STORAGE_CONTAINER_NAME=<value> \
37+
NUTANIX_SUBNET_NAME=<value> \
38+
NUTANIX_USER
39+
```
40+
41+
And create your cluster:
42+
43+
```shell
44+
clusterctl generate cluster my-cluster \
45+
--from https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/releases/download/v{{< param "version" >}}/nutanix-cluster-cilium-helm-addon.yaml | kubectl apply --server-side -f -
46+
```
47+
48+
To customize your cluster configuration prior to creation, generate the cluster definition to a file and edit it before applying:
49+
50+
```shell
51+
clusterctl generate cluster my-cluster \
52+
--from https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/releases/download/v{{< param "version" >}}/nutanix-cluster-cilium-helm-addon.yaml >mycluster.yaml
53+
54+
# EDIT mycluster.yaml
55+
56+
kubectl apply --server-side -f mycluster.yaml
57+
```
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
+++
22
title = "Deploying CAREN"
33
icon = "fa-solid fa-truck-fast"
4+
weight = 1
45
+++
56

67
CAREN is implemented as a CAPI runtime extension provider, which means it can be deployed alongside all other CAPI
78
providers in the same way [using `clusterctl`]({{< ref "via-clusterctl" >}}). However, as CAREN is not yet integrated
89
into `clusterctl`, it is necessary to first configure `clusterctl` to know about CAREN before we can deploy it.
910

10-
Alternatively you can install CAREN [via Helm]({{< ref "via-helm" >}}). Installing via Helm will provide default some
11-
default `ClusterClasses` and allow for further customization of the CAREN deployment.
11+
Alternatively, you can install CAREN [via Helm]({{< ref "via-helm" >}}). Installing via Helm will provide some default
12+
`ClusterClasses` and allow for further customization of the CAREN deployment.

docs/hugo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
baseURL = "https://nutanix-cloud-native.github.io/cluster-api-runtime-extensions-nutanix"
2-
title = "CAPI Runtime Extensions | D2iQ Labs"
2+
title = "Cluster API Runtime Extensions | Nutanix"
33

44
enableRobotsTXT = true
55

@@ -70,7 +70,7 @@ archived_version = false
7070
# The version number for the version of the docs represented in this doc set.
7171
# Used in the "version-banner" partial to display a version number for the
7272
# current doc set.
73-
version = "0.0"
73+
version = "0.8.1"
7474

7575
# A link to latest version of the docs. Used in the "version-banner" partial to
7676
# point people to the main doc site.

docs/layouts/shortcodes/param.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{{- $v := .Site.Params -}}
2+
{{- range (split (.Get 0) ".") }}{{ $v = index $v (.) }}{{- end -}}
3+
{{- $v -}}

release-please-config.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,14 @@
33
".": {
44
"release-type": "go",
55
"pull-request-title-pattern": "release${scope}: ${component} v${version}",
6-
"changelog-type": "github"
6+
"changelog-type": "github",
7+
"extra-files": [
8+
{
9+
"type": "toml",
10+
"path": "docs/hugo.toml",
11+
"jsonpath": "$.params.version"
12+
}
13+
]
714
}
815
}
916
}

0 commit comments

Comments
 (0)