Skip to content

docs: Add how to create clusters #602

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

Merged
merged 3 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ release:
- glob: ./examples/capi-quick-start/*.yaml
- glob: metadata.yaml
- glob: runtime-extension-components.yaml
- glob: ./charts/{{ .ProjectName }}/defaultclusterclasses/*.yaml

before:
hooks:
Expand Down
11 changes: 10 additions & 1 deletion cluster-api-runtime-extensions-nutanix.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,14 @@
],
"settings": {
"go.buildTags": "e2e",
}
"json.schemaDownload.enable": true,
"json.schemas": [
{
"fileMatch": [
"/release-please-config.json"
],
"url": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
},
],
},
}
8 changes: 8 additions & 0 deletions docs/content/getting-started/create-cluster/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
+++
title = "Creating clusters"
icon = "fa-solid fa-industry"
weight = 2
+++

CAREN currently supports clusters for the providers below (follow the links below to see instructions on how to use
CAREN with these providers).
47 changes: 47 additions & 0 deletions docs/content/getting-started/create-cluster/aws.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
+++
title = "AWS"
icon = "fa-brands fa-aws"
weight = 1
+++

Cluster API requires that `ClusterClasses` referenced by a `Cluster` reside in the same namespace as the `Cluster`. To
create the necessary `ClusterClass`, run:

```shell
kubectl apply --server-side \
-f https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/releases/download/v{{< param "version" >}}/aws-cluster-class.yaml
```

You can then create your cluster. First, let's list the required variables:

```shell
clusterctl generate cluster my-cluster \
--from https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/releases/download/v{{< param "version" >}}/aws-cluster-cilium-helm-addon.yaml \
--list-variables
```

Export the required variables and any optional variables that you may want to set:

```shell
export AMI_LOOKUP_BASEOS=<value> \
AMI_LOOKUP_FORMAT=<value> \
AMI_LOOKUP_ORG=<value>
```

And create your cluster:

```shell
clusterctl generate cluster my-cluster \
--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 -
```

To customize your cluster configuration prior to creation, generate the cluster definition to a file and edit it before applying:

```shell
clusterctl generate cluster my-cluster \
--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

# EDIT mycluster.yaml

kubectl apply --server-side -f mycluster.yaml
```
39 changes: 39 additions & 0 deletions docs/content/getting-started/create-cluster/docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
+++
title = "Docker"
icon = "fa-brands fa-docker"
weight = 3
+++

Cluster API requires that `ClusterClasses` referenced by a `Cluster` reside in the same namespace as the `Cluster`. To
create the necessary `ClusterClass`, run:

```shell
kubectl apply --server-side \
-f https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/releases/download/v{{< param "version" >}}/docker-cluster-class.yaml
```

You can then create your cluster. First, let's list the required variables:

```shell
clusterctl generate cluster my-cluster \
--from https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/releases/download/v{{< param "version" >}}/docker-cluster-cilium-helm-addon.yaml \
--list-variables
```

Export the required variables and any optional variables that you may want to set and then create your cluster:

```shell
clusterctl generate cluster my-cluster \
--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 -
```

To customize your cluster configuration prior to creation, generate the cluster definition to a file and edit it before applying:

```shell
clusterctl generate cluster my-cluster \
--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

# EDIT mycluster.yaml

kubectl apply --server-side -f mycluster.yaml
```
57 changes: 57 additions & 0 deletions docs/content/getting-started/create-cluster/nutanix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
+++
title = "Nutanix"
icon = "fa-solid fa-server"
weight = 2
+++


Cluster API requires that `ClusterClasses` referenced by a `Cluster` reside in the same namespace as the `Cluster`. To
create the necessary `ClusterClass`, run:

```shell
kubectl apply --server-side \
-f https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/releases/download/v{{< param "version" >}}/nutanix-cluster-class.yaml
```

You can then create your cluster. First, let's list the required variables:

```shell
clusterctl generate cluster my-cluster \
--from https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/releases/download/v{{< param "version" >}}/nutanix-cluster-cilium-helm-addon.yaml \
--list-variables
```

Export the required variables and any optional variables that you may want to set:

```shell
export CONTROL_PLANE_ENDPOINT_IP=<value> \
DOCKER_HUB_PASSWORD=<value> \
DOCKER_HUB_USERNAME=<value> \
NUTANIX_ENDPOINT=<value> \
NUTANIX_INSECURE=<value> \
NUTANIX_MACHINE_TEMPLATE_IMAGE_NAME=<value> \
NUTANIX_PASSWORD=<value> \
NUTANIX_PORT=<value> \
NUTANIX_PRISM_ELEMENT_CLUSTER_NAME=<value> \
NUTANIX_STORAGE_CONTAINER_NAME=<value> \
NUTANIX_SUBNET_NAME=<value> \
NUTANIX_USER
```

And create your cluster:

```shell
clusterctl generate cluster my-cluster \
--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 -
```

To customize your cluster configuration prior to creation, generate the cluster definition to a file and edit it before applying:

```shell
clusterctl generate cluster my-cluster \
--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

# EDIT mycluster.yaml

kubectl apply --server-side -f mycluster.yaml
```
1 change: 1 addition & 0 deletions docs/content/getting-started/deployment/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
+++
title = "Deploying CAREN"
icon = "fa-solid fa-truck-fast"
weight = 1
+++

CAREN is implemented as a CAPI runtime extension provider, which means it can be deployed alongside all other CAPI
Expand Down
4 changes: 2 additions & 2 deletions docs/hugo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
baseURL = "https://nutanix-cloud-native.github.io/cluster-api-runtime-extensions-nutanix"
title = "CAPI Runtime Extensions | D2iQ Labs"
title = "Cluster API Runtime Extensions | Nutanix"

enableRobotsTXT = true

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

# A link to latest version of the docs. Used in the "version-banner" partial to
# point people to the main doc site.
Expand Down
3 changes: 3 additions & 0 deletions docs/layouts/shortcodes/param.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{- $v := .Site.Params -}}
{{- range (split (.Get 0) ".") }}{{ $v = index $v (.) }}{{- end -}}
{{- $v -}}
9 changes: 8 additions & 1 deletion release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
".": {
"release-type": "go",
"pull-request-title-pattern": "release${scope}: ${component} v${version}",
"changelog-type": "github"
"changelog-type": "github",
"extra-files": [
{
"type": "toml",
"path": "docs/hugo.toml",
"jsonpath": "$.params.version"
}
]
}
}
}
Loading