From 5896e2d5990c668e4d3ce9e368bf7fc75220a063 Mon Sep 17 00:00:00 2001 From: Lenny Chen Date: Wed, 29 May 2024 16:26:20 -0700 Subject: [PATCH 1/5] docs: add bind mount info --- .../edgeforge-workflow/prepare-user-data.md | 30 +++ docs/docs-content/integrations/calico.md | 195 +++++++++++++++++- docs/docs-content/integrations/rook-ceph.md | 9 + 3 files changed, 227 insertions(+), 7 deletions(-) diff --git a/docs/docs-content/clusters/edge/edgeforge-workflow/prepare-user-data.md b/docs/docs-content/clusters/edge/edgeforge-workflow/prepare-user-data.md index 7311bd2374..9fbae9ba8a 100644 --- a/docs/docs-content/clusters/edge/edgeforge-workflow/prepare-user-data.md +++ b/docs/docs-content/clusters/edge/edgeforge-workflow/prepare-user-data.md @@ -272,6 +272,36 @@ stages: passwd: kairos ``` +### Create Bind Mounts + +Palette Edge allows you to create bind mounts from your Edge host to your cluster through the installer configuration +file named **user-data**, which allows your cluster to use directories or files from your Edge host directly within your +Kubernetes cluster. This setup is useful for scenarios where your applications running in the cluster need direct access +to files or directories on the Edge host. + +Several packs require you set up bind mounts in order to function. For example, the Calico pack requires the folder +`/var/lib/calico` to be mounted. You can use the `install.bind_mounts` parameter to specify folders to be mounted. For +example, the following user data mounts the `/var/lib/calico` folder. + +```yaml +#cloud-config +stylus: + site: + debug: true + insecureSkipVerify: false + paletteEndpoint: api.console.spectrocloud.com + name: edge-appliance-1 + caCerts: + - | + -----BEGIN CERTIFICATE----- + + -----END CERTIFICATE----- + +install: + bind_mounts: + - /var/lib/calico +``` + ## Multiple User Data Use Case If you don't need to apply any unique configurations on the device once it arrives at the physical site, then your site diff --git a/docs/docs-content/integrations/calico.md b/docs/docs-content/integrations/calico.md index beeabcf456..6bfbb970e4 100644 --- a/docs/docs-content/integrations/calico.md +++ b/docs/docs-content/integrations/calico.md @@ -43,28 +43,152 @@ Limitations: AWS, VMWare supports IP-in-IP encapsulation type. Azure supports VX +### Prerequisites + +- You have created a bind mount for the `/var/lib/calico` folder on the Edge host. For more information, refer to + [Create Bind Mounts](#create-bind-mounts). + +### Parameters + +| Name | Supported Values | Default value | Description | +| ------------------------ | ----------------------------------------------- | ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | +| calico.encapsulationType | `CALICO_IPV4POOL_IPIP`, `CALICO_IPV4POOL_VXLAN` | `CALICO_IPV4POOL_IPIP` - AWS, VMware clouds | The encapsulation type to be used for networking (depends on the cloud) | +| | | `CALICO_IPV4POOL_VXLAN` - Azure cloud | | +| calico.encapsulationMode | `Always, CrossSubnet, Never` | Always | The mode to use the IPv4 POOL created at start up | +| calico.calicoNetworkCIDR | CIDR range | `192.168.0.0/16` | CIDR range to be assigned for Pods. This range should match the `podCIDR` range specified in the Kubernetes layer | + +### Usage + +#### Create Bind Mounts + +Calico requires a bind mount on the host machine. Without the bind mount, it's possible for the Calico pods to be stuck +in the init state. Use the following example to create a bind mount from `/var/lib/calico` on the Edge host. When you +build an installer ISO with the `bind_mounts` block, the folders specified in the block will be mounted. For more +information about building the installer ISO, refer to +[Build Installer ISO](../clusters/edge/edgeforge-workflow/palette-canvos/build-installer-iso.md). + +```yaml +#cloud-config +stylus: + site: + debug: true + insecureSkipVerify: false + paletteEndpoint: api.console.spectrocloud.com + name: edge-appliance-1 + caCerts: + - | + -----BEGIN CERTIFICATE----- + + -----END CERTIFICATE----- + +install: + bind_mounts: + - /var/lib/calico +``` + +### Prerequisites + +- You have created a bind mount for the `/var/lib/calico` folder on the Edge host. For more information, refer to + [Create Bind Mounts](#create-bind-mounts). + +### Parameters + +| Name | Supported Values | Default value | Description | +| ------------------------ | ----------------------------------------------- | ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | +| calico.encapsulationType | `CALICO_IPV4POOL_IPIP`, `CALICO_IPV4POOL_VXLAN` | `CALICO_IPV4POOL_IPIP` - AWS, VMware clouds | The encapsulation type to be used for networking (depends on the cloud) | +| | | `CALICO_IPV4POOL_VXLAN` - Azure cloud | | +| calico.encapsulationMode | `Always, CrossSubnet, Never` | Always | The mode to use the IPv4 POOL created at start up | +| calico.calicoNetworkCIDR | CIDR range | `192.168.0.0/16` | CIDR range to be assigned for Pods. This range should match the `podCIDR` range specified in the Kubernetes layer | + +### Usage + +#### Create Bind Mounts + +Calico requires a bind mount on the host machine. Without the bind mount, it's possible for the Calico pods to be stuck +in the init state. Use the following example to create a bind mount from `/var/lib/calico` on the Edge host. When you +build an installer ISO with the `bind_mounts` block, the folders specified in the block will be mounted. For more +information about building the installer ISO, refer to +[Build Installer ISO](../clusters/edge/edgeforge-workflow/palette-canvos/build-installer-iso.md). + +```yaml +#cloud-config +stylus: + site: + debug: true + insecureSkipVerify: false + paletteEndpoint: api.console.spectrocloud.com + name: edge-appliance-1 + caCerts: + - | + -----BEGIN CERTIFICATE----- + + -----END CERTIFICATE----- + +install: + bind_mounts: + - /var/lib/calico +``` + - +### Prerequisites - +- You have created a bind mount for the `/var/lib/calico` folder on the Edge host. For more information, refer to + [Create Bind Mounts](#create-bind-mounts). - +### Parameters - +| Name | Supported Values | Default value | Description | +| ------------------------ | ----------------------------------------------- | ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | +| calico.encapsulationType | `CALICO_IPV4POOL_IPIP`, `CALICO_IPV4POOL_VXLAN` | `CALICO_IPV4POOL_IPIP` - AWS, VMware clouds | The encapsulation type to be used for networking (depends on the cloud) | +| | | `CALICO_IPV4POOL_VXLAN` - Azure cloud | | +| calico.encapsulationMode | `Always, CrossSubnet, Never` | Always | The mode to use the IPv4 POOL created at start up | +| calico.calicoNetworkCIDR | CIDR range | `192.168.0.0/16` | CIDR range to be assigned for Pods. This range should match the `podCIDR` range specified in the Kubernetes layer | -All versions below version 3.23.x are deprecated. +### Usage + +#### Create Bind Mounts + +Calico requires a bind mount on the host machine. Without the bind mount, it's possible for the Calico pods to be stuck +in the init state. Use the following example to create a bind mount from `/var/lib/calico` on the Edge host. When you +build an installer ISO with the `bind_mounts` block, the folders specified in the block will be mounted. For more +information about building the installer ISO, refer to +[Build Installer ISO](../clusters/edge/edgeforge-workflow/palette-canvos/build-installer-iso.md). + +```yaml +#cloud-config +stylus: + site: + debug: true + insecureSkipVerify: false + paletteEndpoint: api.console.spectrocloud.com + name: edge-appliance-1 + caCerts: + - | + -----BEGIN CERTIFICATE----- + + -----END CERTIFICATE----- + +install: + bind_mounts: + - /var/lib/calico +``` - + + +### Prerequisites -## Parameters +- You have created a bind mount for the `/var/lib/calico` folder on the Edge host. For more information, refer to + [Create Bind Mounts](#create-bind-mounts). + +### Parameters | Name | Supported Values | Default value | Description | | ------------------------ | ----------------------------------------------- | ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | @@ -73,11 +197,68 @@ All versions below version 3.23.x are deprecated. | calico.encapsulationMode | `Always, CrossSubnet, Never` | Always | The mode to use the IPv4 POOL created at start up | | calico.calicoNetworkCIDR | CIDR range | `192.168.0.0/16` | CIDR range to be assigned for Pods. This range should match the `podCIDR` range specified in the Kubernetes layer | +### Usage + +#### Create Bind Mounts + +Calico requires a bind mount on the host machine. Without the bind mount, it's possible for the Calico pods to be stuck +in the init state. Use the following example to create a bind mount from `/var/lib/calico` on the Edge host. When you +build an installer ISO with the `bind_mounts` block, the folders specified in the block will be mounted. For more +information about building the installer ISO, refer to +[Build Installer ISO](../clusters/edge/edgeforge-workflow/palette-canvos/build-installer-iso.md). + +```yaml {14-16} +#cloud-config +stylus: + site: + debug: true + insecureSkipVerify: false + paletteEndpoint: api.console.spectrocloud.com + name: edge-appliance-1 + caCerts: + - | + -----BEGIN CERTIFICATE----- + + -----END CERTIFICATE----- + +install: + bind_mounts: + - /var/lib/calico +``` + + + + + +All versions below version 3.23.x are deprecated. + + + + + ## Troubleshooting - A daemon set is installed and so a calico-node pod should run on all the nodes in the cluster to provide networking. - For any issues with networking, check calico-node and calico-kube-controller pods on the cluster. +## Terraform + +Use the following Terraform snippet to reference the Calico CNI pack in your Terraform template. + +```hcl + +data "spectrocloud_registry" "public_registry" { + name = "Public Repo" +} + +data "spectrocloud_pack_simple" "calico" { + name = "cni-calico" + version = "3.26.0" + type = "helm" + registry_uid = data.spectrocloud_registry.public_registry.id +} +``` + ## References - [Calico Documentation](https://docs.tigera.io/calico/latest/reference) diff --git a/docs/docs-content/integrations/rook-ceph.md b/docs/docs-content/integrations/rook-ceph.md index c38b44da4a..0f1bb6e644 100644 --- a/docs/docs-content/integrations/rook-ceph.md +++ b/docs/docs-content/integrations/rook-ceph.md @@ -39,6 +39,9 @@ The pack has two presets that provide the following two configurations: - If you are using Rook on Edge, the Edge host needs to be created with at least two hard disks. +- You have created a bind mount for the `/var/lib/rook` folder on the Edge host. For more information, refer to + [Create Bind Mounts](../clusters/edge/edgeforge-workflow/prepare-user-data.md#create-bind-mounts). + ## Parameters | Parameter | Description | Default | @@ -142,6 +145,9 @@ clusters. - If you are using Rook on Edge, the Edge host needs to be created with at least two hard disks. The actual required number of disks depend on your cluster configuration. +- You have created a bind mount for the `/var/lib/rook` folder on the Edge host. For more information, refer to + [Create Bind Mounts](../clusters/edge/edgeforge-workflow/prepare-user-data.md#create-bind-mounts). + ## Parameters | Parameter | Description | Default | @@ -245,6 +251,9 @@ clusters. - If you are using Rook on Edge, the Edge host needs to be created with at least two hard disks. The actual required number of disks depend on your cluster configuration. +- You have created a bind mount for the `/var/lib/rook` folder on the Edge host. For more information, refer to + [Create Bind Mounts](../clusters/edge/edgeforge-workflow/prepare-user-data.md#create-bind-mounts). + ## Parameters | Parameter | Description | Default | From 97733e73887cd6cacccfbad6b9386afea7bab990 Mon Sep 17 00:00:00 2001 From: Lenny Chen Date: Thu, 30 May 2024 15:02:59 -0700 Subject: [PATCH 2/5] docs: clarify edge requirements --- docs/docs-content/integrations/calico.md | 40 ++++++++++----------- docs/docs-content/integrations/rook-ceph.md | 9 +++-- 2 files changed, 26 insertions(+), 23 deletions(-) diff --git a/docs/docs-content/integrations/calico.md b/docs/docs-content/integrations/calico.md index 6bfbb970e4..cca8282973 100644 --- a/docs/docs-content/integrations/calico.md +++ b/docs/docs-content/integrations/calico.md @@ -59,12 +59,12 @@ Limitations: AWS, VMWare supports IP-in-IP encapsulation type. Azure supports VX ### Usage -#### Create Bind Mounts +#### Create Bind Mounts for Edge Deployments -Calico requires a bind mount on the host machine. Without the bind mount, it's possible for the Calico pods to be stuck -in the init state. Use the following example to create a bind mount from `/var/lib/calico` on the Edge host. When you -build an installer ISO with the `bind_mounts` block, the folders specified in the block will be mounted. For more -information about building the installer ISO, refer to +In Edge deployments, Calico requires a bind mount on the host machine. Without the bind mount, it's possible for the +Calico pods to be stuck in the init state. Use the following example to create a bind mount from `/var/lib/calico` on +the Edge host. When you build an installer ISO with the `bind_mounts` block, the folders specified in the block will be +mounted. For more information about building the installer ISO, refer to [Build Installer ISO](../clusters/edge/edgeforge-workflow/palette-canvos/build-installer-iso.md). ```yaml @@ -105,12 +105,12 @@ install: ### Usage -#### Create Bind Mounts +#### Create Bind Mounts for Edge Deployments -Calico requires a bind mount on the host machine. Without the bind mount, it's possible for the Calico pods to be stuck -in the init state. Use the following example to create a bind mount from `/var/lib/calico` on the Edge host. When you -build an installer ISO with the `bind_mounts` block, the folders specified in the block will be mounted. For more -information about building the installer ISO, refer to +In Edge deployments, Calico requires a bind mount on the host machine. Without the bind mount, it's possible for the +Calico pods to be stuck in the init state. Use the following example to create a bind mount from `/var/lib/calico` on +the Edge host. When you build an installer ISO with the `bind_mounts` block, the folders specified in the block will be +mounted. For more information about building the installer ISO, refer to [Build Installer ISO](../clusters/edge/edgeforge-workflow/palette-canvos/build-installer-iso.md). ```yaml @@ -152,12 +152,12 @@ install: ### Usage -#### Create Bind Mounts +#### Create Bind Mounts for Edge Deployments -Calico requires a bind mount on the host machine. Without the bind mount, it's possible for the Calico pods to be stuck -in the init state. Use the following example to create a bind mount from `/var/lib/calico` on the Edge host. When you -build an installer ISO with the `bind_mounts` block, the folders specified in the block will be mounted. For more -information about building the installer ISO, refer to +In Edge deployments, Calico requires a bind mount on the host machine. Without the bind mount, it's possible for the +Calico pods to be stuck in the init state. Use the following example to create a bind mount from `/var/lib/calico` on +the Edge host. When you build an installer ISO with the `bind_mounts` block, the folders specified in the block will be +mounted. For more information about building the installer ISO, refer to [Build Installer ISO](../clusters/edge/edgeforge-workflow/palette-canvos/build-installer-iso.md). ```yaml @@ -199,12 +199,12 @@ install: ### Usage -#### Create Bind Mounts +#### Create Bind Mounts for Edge Deployments -Calico requires a bind mount on the host machine. Without the bind mount, it's possible for the Calico pods to be stuck -in the init state. Use the following example to create a bind mount from `/var/lib/calico` on the Edge host. When you -build an installer ISO with the `bind_mounts` block, the folders specified in the block will be mounted. For more -information about building the installer ISO, refer to +In Edge deployments, Calico requires a bind mount on the host machine. Without the bind mount, it's possible for the +Calico pods to be stuck in the init state. Use the following example to create a bind mount from `/var/lib/calico` on +the Edge host. When you build an installer ISO with the `bind_mounts` block, the folders specified in the block will be +mounted. For more information about building the installer ISO, refer to [Build Installer ISO](../clusters/edge/edgeforge-workflow/palette-canvos/build-installer-iso.md). ```yaml {14-16} diff --git a/docs/docs-content/integrations/rook-ceph.md b/docs/docs-content/integrations/rook-ceph.md index 0f1bb6e644..e36eca9b65 100644 --- a/docs/docs-content/integrations/rook-ceph.md +++ b/docs/docs-content/integrations/rook-ceph.md @@ -39,7 +39,8 @@ The pack has two presets that provide the following two configurations: - If you are using Rook on Edge, the Edge host needs to be created with at least two hard disks. -- You have created a bind mount for the `/var/lib/rook` folder on the Edge host. For more information, refer to +- If you are using Rook on Edge, you must have create a bind mount for the `/var/lib/rook` folder on the Edge host. For + more information, refer to [Create Bind Mounts](../clusters/edge/edgeforge-workflow/prepare-user-data.md#create-bind-mounts). ## Parameters @@ -145,7 +146,8 @@ clusters. - If you are using Rook on Edge, the Edge host needs to be created with at least two hard disks. The actual required number of disks depend on your cluster configuration. -- You have created a bind mount for the `/var/lib/rook` folder on the Edge host. For more information, refer to +- If you are using Rook on Edge, you must have create a bind mount for the `/var/lib/rook` folder on the Edge host. For + more information, refer to [Create Bind Mounts](../clusters/edge/edgeforge-workflow/prepare-user-data.md#create-bind-mounts). ## Parameters @@ -251,7 +253,8 @@ clusters. - If you are using Rook on Edge, the Edge host needs to be created with at least two hard disks. The actual required number of disks depend on your cluster configuration. -- You have created a bind mount for the `/var/lib/rook` folder on the Edge host. For more information, refer to +- If you are using Rook on Edge, you must have create a bind mount for the `/var/lib/rook` folder on the Edge host. For + more information, refer to [Create Bind Mounts](../clusters/edge/edgeforge-workflow/prepare-user-data.md#create-bind-mounts). ## Parameters From 9d6b079a597fc26278255b03ca70d9e81b73c346 Mon Sep 17 00:00:00 2001 From: Lenny Chen Date: Thu, 30 May 2024 15:19:14 -0700 Subject: [PATCH 3/5] docs: fix broken anchor --- docs/docs-content/integrations/calico.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/docs-content/integrations/calico.md b/docs/docs-content/integrations/calico.md index cca8282973..3ec0a4370c 100644 --- a/docs/docs-content/integrations/calico.md +++ b/docs/docs-content/integrations/calico.md @@ -46,7 +46,7 @@ Limitations: AWS, VMWare supports IP-in-IP encapsulation type. Azure supports VX ### Prerequisites - You have created a bind mount for the `/var/lib/calico` folder on the Edge host. For more information, refer to - [Create Bind Mounts](#create-bind-mounts). + [Create Bind Mounts](#create-bind-mounts-for-edge-deployments). ### Parameters @@ -92,7 +92,7 @@ install: ### Prerequisites - You have created a bind mount for the `/var/lib/calico` folder on the Edge host. For more information, refer to - [Create Bind Mounts](#create-bind-mounts). + [Create Bind Mounts](#create-bind-mounts-for-edge-deployments). ### Parameters @@ -139,7 +139,7 @@ install: ### Prerequisites - You have created a bind mount for the `/var/lib/calico` folder on the Edge host. For more information, refer to - [Create Bind Mounts](#create-bind-mounts). + [Create Bind Mounts](#create-bind-mounts-for-edge-deployments). ### Parameters @@ -186,7 +186,7 @@ install: ### Prerequisites - You have created a bind mount for the `/var/lib/calico` folder on the Edge host. For more information, refer to - [Create Bind Mounts](#create-bind-mounts). + [Create Bind Mounts](#create-bind-mounts-for-edge-deployments). ### Parameters From 53dbf09a1d69e40c62265a24a38c016ed12540e5 Mon Sep 17 00:00:00 2001 From: Lenny Chen <55669665+lennessyy@users.noreply.github.com> Date: Thu, 30 May 2024 16:06:01 -0700 Subject: [PATCH 4/5] Apply suggestions from code review Co-authored-by: Karl Cardenas --- .../clusters/edge/edgeforge-workflow/prepare-user-data.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs-content/clusters/edge/edgeforge-workflow/prepare-user-data.md b/docs/docs-content/clusters/edge/edgeforge-workflow/prepare-user-data.md index 9fbae9ba8a..0706ec3a00 100644 --- a/docs/docs-content/clusters/edge/edgeforge-workflow/prepare-user-data.md +++ b/docs/docs-content/clusters/edge/edgeforge-workflow/prepare-user-data.md @@ -276,7 +276,7 @@ stages: Palette Edge allows you to create bind mounts from your Edge host to your cluster through the installer configuration file named **user-data**, which allows your cluster to use directories or files from your Edge host directly within your -Kubernetes cluster. This setup is useful for scenarios where your applications running in the cluster need direct access +Kubernetes cluster. This setup is useful for scenarios where your applications are active in the cluster and need direct access to files or directories on the Edge host. Several packs require you set up bind mounts in order to function. For example, the Calico pack requires the folder From f8592986d0a875211ea6c029d9669da2c8c312cb Mon Sep 17 00:00:00 2001 From: Lenny Chen Date: Fri, 31 May 2024 09:08:35 -0700 Subject: [PATCH 5/5] docs: change example --- .../edge/edgeforge-workflow/prepare-user-data.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/docs-content/clusters/edge/edgeforge-workflow/prepare-user-data.md b/docs/docs-content/clusters/edge/edgeforge-workflow/prepare-user-data.md index 0706ec3a00..639bbadea0 100644 --- a/docs/docs-content/clusters/edge/edgeforge-workflow/prepare-user-data.md +++ b/docs/docs-content/clusters/edge/edgeforge-workflow/prepare-user-data.md @@ -276,12 +276,13 @@ stages: Palette Edge allows you to create bind mounts from your Edge host to your cluster through the installer configuration file named **user-data**, which allows your cluster to use directories or files from your Edge host directly within your -Kubernetes cluster. This setup is useful for scenarios where your applications are active in the cluster and need direct access -to files or directories on the Edge host. +Kubernetes cluster. This setup is useful for scenarios where your applications are active in the cluster and need direct +access to files or directories on the Edge host. -Several packs require you set up bind mounts in order to function. For example, the Calico pack requires the folder -`/var/lib/calico` to be mounted. You can use the `install.bind_mounts` parameter to specify folders to be mounted. For -example, the following user data mounts the `/var/lib/calico` folder. +Several packs require you set up bind mounts in order to function. For example, the +[Portworx pack](../../../integrations/portworx.md) requires several folders to be mounted on Edge deployments. You can +use the `install.bind_mounts` parameter to specify folders to be mounted. For example, the following user data mounts +three folders required by Portworx from the Edge host to the cluster. ```yaml #cloud-config @@ -299,7 +300,9 @@ stylus: install: bind_mounts: - - /var/lib/calico + - /etc/pwx + - /var/lib/osd + - /var/cores ``` ## Multiple User Data Use Case