From 0445a833b1dd7072936749d218a8bd426c1dafa0 Mon Sep 17 00:00:00 2001 From: Rita Watson Date: Fri, 15 Dec 2023 13:12:52 -0800 Subject: [PATCH] Add info to Register - some will move to PCG --- .../data-center/nutanix/install-pcg.md | 10 +- .../nutanix/register-nutanix-cloud.md | 156 +++++++++++++++++- 2 files changed, 159 insertions(+), 7 deletions(-) diff --git a/docs/docs-content/clusters/data-center/nutanix/install-pcg.md b/docs/docs-content/clusters/data-center/nutanix/install-pcg.md index 7901e6b689..b5840371a2 100644 --- a/docs/docs-content/clusters/data-center/nutanix/install-pcg.md +++ b/docs/docs-content/clusters/data-center/nutanix/install-pcg.md @@ -19,11 +19,11 @@ A Private Cloud Gateway (PCG) is required to connect your Nutanix cloud with Pal - A Kubernetes cluster in Nutanix with version 1.19.x or higher, outbound internet connectivity, and DNS configured to resolve public internet domain names. - + +## Setup + +create kind cluster - bootstraps workload cluster - used to deploy PCG. + ## Install PCG diff --git a/docs/docs-content/clusters/data-center/nutanix/register-nutanix-cloud.md b/docs/docs-content/clusters/data-center/nutanix/register-nutanix-cloud.md index 56f1a7b592..9a49b711a5 100644 --- a/docs/docs-content/clusters/data-center/nutanix/register-nutanix-cloud.md +++ b/docs/docs-content/clusters/data-center/nutanix/register-nutanix-cloud.md @@ -13,13 +13,143 @@ A System Administrator registers the Nutanix cloud in Palette by invoking system ## Prerequisites -- A Nutanix Prism Central account. +- A Nutanix Prism Central account. <<< move to PCG?>>> + +- A Nutanix subnet created in Nutanix Prism Central. <<< move to PCG?>>> - A Palette account with system-level access. - A valid Palette authentication token. To learn how to acquire an authentication token, review the [Authorization Token](https://docs.spectrocloud.com/user-management/authentication/authorization-token) guide. -- Downloaded infrastructure-components.yaml and cluster-template.yaml files from the [Nutanix Cluster API Provider](https://github.com/nutanix-cloud-native/cluster-api-provider-nutanix) repository. The YAML contains all the Custom Resource Definitions (CRDs) required for Nutanix cluster resources. +- A Nutanix Cluster API (CAPI) OS image. For guidance on creating the image, refer to [Image](https://image-builder.sigs.k8s.io/capi/providers/nutanix.html#building-capi-images-for-nutanix-cloud-platform-ncp). <<< move to PCG?>>> + +- The following applications installed: Docker, kind, kubectl, and clusterctl. <<< move to PCG?>>> EXport vars section goes to PCG setup. + + + + +## Setup + +Use the following steps to prepare for registering your cloud with Palette. + +### Create Bootstrap Cluster + +1. Log in to your Nutanix Prism account. + +2. Create a local kind cluster that will be used to provision a target cluster. + +```bash +kind create cluster +``` + +3. + + +### Export Variables and Deploy Workload Cluster + +4. Copy the following required variables and export them to your terminal. Replace variables with your environment-specific information. For more information, visit the [Nutanix Getting Started](https://opendocs.nutanix.com/capx/v1.1.x/getting_started/) guide. + + + + + +```bash + export NUTANIX_ENDPOINT="" # IP or FQDN of Prism Central + export NUTANIX_USER="" # Prism Central user + export NUTANIX_PASSWORD="" # Prism Central password + export NUTANIX_INSECURE=false # or true + + export KUBERNETES_VERSION="v1.22.9" + export WORKER_MACHINE_COUNT=1 + export NUTANIX_SSH_AUTHORIZED_KEY="" + + export NUTANIX_PRISM_ELEMENT_CLUSTER_NAME="" + export NUTANIX_MACHINE_TEMPLATE_IMAGE_NAME="" + export NUTANIX_SUBNET_NAME="" +``` + +7. Initantiate Nutanix Cluster API by issuing the following command: + +```bash + clusterctl init -i nutanix +``` +8. Deploy a workload cluster on Nutanix cloud infrastructure by issuing the following command. Replace `mytestcluster` with your cluster name and `mytestnamespace` and with your namespace. Provide your control plane endpoint IP address. + +```bash + export TEST_CLUSTER_NAME=mytestcluster + export TEST_NAMESPACE=mytestnamespace + CONTROL_PLANE_ENDPOINT_IP=x.x.x.x clusterctl generate cluster ${TEST_CLUSTER_NAME} \ + -i nutanix \ + --target-namespace ${TEST_NAMESPACE} \ + > ./cluster.yaml + kubectl create ns ${TEST_NAMESPACE} + kubectl apply -f ./cluster.yaml -n ${TEST_NAMESPACE} +``` + + +### Install CNI on Workload Cluster + +9. Deploy a Container Network Interface (CNI) pod network to enable pod-to-pod communication by issuing the following command: + + + +### Customize YAML Configuration Files + +10. Download the following YAML files from the Nutanix GitHub repository: + - infrastructure-components.yaml + - cluster-template.yaml + +11. Create two copies of cluster-template.yaml and rename them so you have these three files in addition to the infrastructure-components.yaml: + - cloudClusterTemplate.yaml + - controlPlanePoolTemplate.yaml + - workerPoolTemplate.yaml + +12. Open the cloudClusterTemplate.yaml, controlPlanePoolTemplate.yaml, workerPoolTemplate.yaml files in the editor of your choice. + +13. Modify the YAML files to remove sections so that only the sections listed in the table below remain in each file. + + :::tip + + When editing the YAMLs, it is helpful to collapse the `spec` section. + + ::: + + <<< TABLE PLACEHOLDER >>> + +14. Edit parameters in the `cloudClusterTemplate.yaml` YAML as follows: + - Remove `namespace.${NAMESPACE} throughout the file. + - In `NutanixMachineTemplate`, change the `providerID` to `providerID.nutanix.//$CLUSTER_NAME}-m1-cp-0.` + +15. Edit parameters in the `controlPlanePoolTemplate.yaml` YAML as follows: + - Remove `namespace.${NAMESPACE} throughout the file. + +16. Edit parameters in the `workerPoolTemplate.yaml` YAML as follows: + - Remove `namespace.${NAMESPACE} throughout the file. + - In `NutanixMachineTemplate`, change the `providerID` to `providerID.nutanix.//$CLUSTER_NAME}-m1-cp-0.` + + +## Validate + +Use the following steps to validate your environment and ... + +1. In the Nutanix web console navigate to **VM**. In the **Table** tab, verify there are two VMs listed. <<< We have to explain why there are two. >>> + +2. Echo variable name in terminal. echo $CLUSTER_NAME + +3. @@ -27,6 +157,28 @@ A System Administrator registers the Nutanix cloud in Palette by invoking system Use the following steps to register a Nutanix cloud. +1. Curl commands ->APIs.... + + + + +## Validate + + + + + + + + + + + + + + + + 1. Access the [Nutanix Cluster API infrastructure provider](https://github.com/nutanix-cloud-native/cluster-api-provider-nutanix) page on GitHub. | **Template** | **Objects** |