Skip to content

docs: Add how to deploy CAREN #599

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 2 commits into from
May 1, 2024
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
2 changes: 1 addition & 1 deletion .markdownlint.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"heading-style": { "style": "atx" },
"ul-style": { "style": "dash" },
"line-length": { "line_length": 120, "stern": true },
"line-length": { "line_length": 120, "code_blocks": false },
"hr-style": { "style": "---" }
}
13 changes: 7 additions & 6 deletions docs/content/_index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
+++
title = "CAPI Runtime Extensions"
title = "Cluster API Runtime Extensions - Nutanix (CAREN)"

# [[cascade]]
# type = "blog"
Expand All @@ -23,11 +23,12 @@ templating by introducing variables specified with an OpenAPI schema that can th
via patches.

The [Runtime SDK] feature provides an extensibility mechanism to hook into `ClusterClass` managed Kubernetes clusters'
lifecycle. This project, CAPI Runtime Extensions, provides implementations of various runtime hooks that can be used in
`ClusterClasses` across providers. This includes variables and patches that can be used across any provider to configure
generic Kubernetes capabilities, such as configuring audit policy or HTTP proxy configuration. These capabilities are
not provider-specific and delivering these capabilities in code instead of directly embedded in `ClusterClass`
definitions leads to a much more robust experience via fast-feedback unit tests, as opposed to long running e2e tests.
lifecycle. This project, Cluster API Runtime Extensions - Nutanix (CAREN), provides implementations of various runtime
hooks that can be used in `ClusterClasses` across providers. This includes variables and patches that can be used across
any provider to configure generic Kubernetes capabilities, such as configuring audit policy or HTTP proxy configuration.
These capabilities are not provider-specific and delivering these capabilities in code instead of directly embedded in
`ClusterClass` definitions leads to a much more robust experience via fast-feedback unit tests, as opposed to long
running e2e tests.

In addition to cluster resource customizations, this project enables management of essential cluster addons (e.g. CNI)
via variable definitions, e.g. selecting a CNI provider via variables defined on the `Cluster` resource itself. The goal
Expand Down
2 changes: 1 addition & 1 deletion docs/content/addons/_index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
+++
title = "Addons"
weight = 2
weight = 3
icon = "fa-solid fa-cubes"
+++
1 change: 1 addition & 0 deletions docs/content/addons/cluster-autoscaler.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
+++
title = "Cluster Autoscaler"
icon = "fa-solid fa-up-right-and-down-left-from-center"
+++

By leveraging CAPI cluster lifecycle hooks, this handler deploys [Cluster Autoscaler][cluster-autoscaler]
Expand Down
2 changes: 1 addition & 1 deletion docs/content/contributing/_index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
+++
title = "Contributing"
weight = 99
icon = "fa-solid fa-gift"
icon = "fa-solid fa-hand-holding-heart"
+++
1 change: 1 addition & 0 deletions docs/content/contributing/e2e_tests.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
+++
title = "End-to-end tests"
icon = "fa-solid fa-bugs"
+++

This project uses [Ginkgo] to run end-to-end tests. Tests are labelled to make running targeted or specific tests
Expand Down
9 changes: 5 additions & 4 deletions docs/content/contributing/releasing.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
+++
title = "Releasing"
icon = "fa-solid fa-gift"
+++

This project uses [release-please] to automate changelog updates per release. Due to security restrictions[^1] in the
Expand All @@ -9,7 +10,7 @@ This project uses [release-please] to automate changelog updates per release. Du
When a release has been cut, a new release PR can be created manually using the `release-please` CLI locally. This needs
to be run by someone with write permissions to the repository. Create the `release-please` branch and PR:

```bash
```shell
make release-please
```

Expand All @@ -20,19 +21,19 @@ date).
When a release is ready, the commits in the release PR will need to be signed (again, this is a security requirement).
To do this, check out the PR branch locally:

```bash
```shell
gh pr checkout <RELEASE_PR_NUMBER>
```

Sign the previous commit:

```bash
```shell
git commit --gpg-sign --amend
```

And force push:

```bash
```shell
git push --force-with-lease
```

Expand Down
2 changes: 1 addition & 1 deletion docs/content/customization/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
+++
title = "Cluster customizations"
weight = 1
weight = 2
icon = "fa-solid fa-screwdriver-wrench"
+++

Expand Down
2 changes: 1 addition & 1 deletion docs/content/customization/nutanix/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
+++
title = "Nutanix"
icon = "fa-brands fa-nutanix"
icon = "fa-solid fa-server"
+++

The customizations in this section are applicable only to Nutanix clusters. They will only be applied to clusters that
Expand Down
8 changes: 8 additions & 0 deletions docs/content/getting-started/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
+++
title = "Getting started"
icon = "fa-solid fa-forward-fast"
weight = 1
+++

To deploy CAREN, follow the docs on how to deploy CAREN using either
[clusterctl]({{< ref "deployment/via-clusterctl" >}}) or [Helm]({{< ref "deployment/via-helm" >}}).
11 changes: 11 additions & 0 deletions docs/content/getting-started/deployment/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
+++
title = "Deploying CAREN"
icon = "fa-solid fa-truck-fast"
+++

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

Alternatively you can install CAREN [via Helm]({{< ref "via-helm" >}}). Installing via Helm will provide default some
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Late to the party, but maybe next one, just a nit for a comma here:

Alternatively, you can install CAREN ...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

default `ClusterClasses` and allow for further customization of the CAREN deployment.
35 changes: 35 additions & 0 deletions docs/content/getting-started/deployment/via-clusterctl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
+++
title = "Via clusterctl"
icon = "fa-solid fa-circle-nodes"
weight = 1
+++

Add the following to your `clusterctl.yaml` file, which is normally found at
`${XDG_CONFIG_HOME}/cluster-api/clusterctl.yaml` (or `${HOME}/cluster-api/clusterctl.yaml`). See [clusterctl
configuration file] for more details. If the `providers` section already exists, add the entry and omit the `providers`
key from this block below:

```yaml
providers:
- name: "caren"
url: "https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/releases/latest/runtime-extension-components.yaml"
type: "RuntimeExtensionProvider"
```

Now we can deploy CAREN and other necessary providers (update infrastructure providers for your needs), leaving all
configuration values blank as we will specify these when creating clusters:

```shell
env CLUSTER_TOPOLOGY=true \
EXP_RUNTIME_SDK=true \
EXP_CLUSTER_RESOURCE_SET=true \
NUTANIX_ENDPOINT= NUTANIX_PASSWORD= NUTANIX_USER= \
AWS_B64ENCODED_CREDENTIALS= \
clusterctl init \
--infrastructure docker,nutanix:v1.4.0-alpha.2,aws \
--addon helm \
--runtime-extension caren \
--wait-providers
```

[clusterctl configuration file]: https://cluster-api.sigs.k8s.io/clusterctl/configuration.html?highlight=clusterctl%20config#variables
33 changes: 33 additions & 0 deletions docs/content/getting-started/deployment/via-helm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
+++
title = "Via Helm"
icon = "fa-solid fa-helmet-safety"
weight = 2
+++

When installing CAREN via Helm, we need to deploy Cluster API core providers and any other required infrastructure
providers to our management cluster via `clusterctl`:

```shell
env CLUSTER_TOPOLOGY=true \
EXP_RUNTIME_SDK=true \
EXP_CLUSTER_RESOURCE_SET=true \
NUTANIX_ENDPOINT= NUTANIX_PASSWORD= NUTANIX_USER= \
AWS_B64ENCODED_CREDENTIALS= \
clusterctl init \
--infrastructure docker,nutanix:v1.4.0-alpha.2,aws \
--addon helm \
--wait-providers
```

We can then deploy CAREN via Helm by adding the Helm repo and installing in the usual way via Helm:
Add the CAREN Helm repo:

```shell
helm repo add caren https://nutanix-cloud-native.github.io/cluster-api-runtime-extensions-nutanix/helm
helm repo update caren
helm upgrade --install caren caren/cluster-api-runtime-extensions-nutanix \
--namespace cluster-api-runtime-extensions-nutanix-system \
--create-namespace \
--wait \
--wait-for-jobs
```
2 changes: 1 addition & 1 deletion docs/content/lifecycle/_index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
+++
title = "Lifecycle handlers"
weight = 3
weight = 4
icon = "fa-solid fa-seedling"
+++
4 changes: 2 additions & 2 deletions docs/hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ sidebar_cache_limit = 1000
[params.ui.feedback]
enable = true
# The responses that the user sees after clicking "yes" (the page was helpful) or "no" (the page was not helpful).
yes = 'Glad to hear it! Please <a href="https://github.com/USERNAME/REPOSITORY/issues/new">tell us how we can improve</a>.'
no = 'Sorry to hear that. Please <a href="https://github.com/USERNAME/REPOSITORY/issues/new">tell us how we can improve</a>.'
yes = 'Glad to hear it! Please <a href="https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/issues/new">tell us how we can improve</a>.'
no = 'Sorry to hear that. Please <a href="https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/issues/new">tell us how we can improve</a>.'

# Adds a reading time to the top of each doc.
# If you want this feature, but occasionally need to remove the Reading time from a single page,
Expand Down
Loading