Skip to content

Commit

Permalink
Add info to Register - some will move to PCG
Browse files Browse the repository at this point in the history
  • Loading branch information
ritawatson committed Dec 15, 2023
1 parent ae2f4b6 commit 0445a83
Show file tree
Hide file tree
Showing 2 changed files with 159 additions and 7 deletions.
10 changes: 5 additions & 5 deletions docs/docs-content/clusters/data-center/nutanix/install-pcg.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<!-- - If you install the PCG from your local environment using Clusterctl instead of using Palette, you need to install the following applications. To install Clusterctl, refer to [The Cluster API Book](https://cluster-api.sigs.k8s.io/user/quick-start.html#install-clusterctl).
- Docker
- Kind
- Kubectl
- Clusterctl -->

## Setup

create kind cluster - bootstraps workload cluster - used to deploy PCG.



## Install PCG
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,172 @@ 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.

<!-- - 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. These YAML files contain all the Custom Resource Definitions (CRDs) required for Nutanix cluster resources. -->


## 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.

<!-- To initialize the Nutanix infrastructure, `clsuterctl` requires certain variables. -->

<!-- ```bash
NUTANIX_ENDPOINT: "" # IP or FQDN of Prism Central
NUTANIX_USER: "" # Prism Central user
NUTANIX_PASSWORD: "" # Prism Central password
NUTANIX_INSECURE: false # or true
KUBERNETES_VERSION: "v1.22.9"
WORKER_MACHINE_COUNT: 1
NUTANIX_SSH_AUTHORIZED_KEY: ""
NUTANIX_PRISM_ELEMENT_CLUSTER_NAME: ""
NUTANIX_MACHINE_TEMPLATE_IMAGE_NAME: ""
NUTANIX_SUBNET_NAME: ""
``` -->

```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.



## Register the Cloud

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** |
Expand Down

0 comments on commit 0445a83

Please sign in to comment.