diff --git a/README.md b/README.md index 36c8314..19806e4 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,15 @@ [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) # Spectro Cloud Tutorials + A collection of Spectro Cloud tutorials and their respective sample code.

drawing

- The following tutorial code is available: + - [hello-universe-tf](./terraform/hello-universe-tf/README.md) - Deploy the Hello Universe application into two Palette Virtual Clusters. [Link](https://docs.spectrocloud.com/devx/apps/deploy-app) to the tutorial. - [pack-tf](./terraform/pack-tf/README.md) - Learn how to create a custom pack. [Link](https://docs.spectrocloud.com/registries-and-packs/deploy-pack) @@ -19,9 +20,11 @@ The following tutorial code is available: - [Deploy an Edge cluster on VMware](./edge/vmware/README.md) - Learn how to deploy an Edge cluster on VMware. [Link](https://docs.spectrocloud.com/clusters/edge/site-deployment/deploy-cluster) +- [vmware-cluster-deployment-tf](./terraform/vmware-cluster-deployment-tf/README.md) - Learn how to deploy a VMware cluster and the Hello Universe application as a part of the Deploy App Workloads with a PCG tutorial. [Link](https://docs.spectrocloud.com/clusters/pcg/deploy-app-pcg) + ## Docker -All the tutorials are available in a Docker image that you can use to get started with the tutorials. +All the tutorials are available in a Docker image that you can use to get started with the tutorials. Review the [Docker steps](./docs/docker.md) to get started with the Docker image. ## Image Verification diff --git a/terraform/vmware-cluster-deployment-tf/README.md b/terraform/vmware-cluster-deployment-tf/README.md new file mode 100644 index 0000000..609bf27 --- /dev/null +++ b/terraform/vmware-cluster-deployment-tf/README.md @@ -0,0 +1,87 @@ +# Hello Universe TF + +This folder contains the demo code for the [Deploy App Workloads with a PCG](https://docs.spectrocloud.com/clusters/pcg/deploy-app-pcg) tutorial. Use the code in this directory with the tutorial. + +To get started, review the [prerequisites](#prerequisites). Next, follow the steps in the tutorial to deploy a VMware cluster and add-on pack. +Use the [terraform.tfvars](./terraform.tfvars) file to provide the required variables. + +## Prerequisites + +You will need the following items before getting started: + +1. A Palette API key. +2. A VMware PCG added to your Palette account. +3. A public SSH key that will be used to access the cluster nodes. If not provided, a new key pair will be generated. + +> [!NOTE] +> This Terraform code will deploy the resources specified in the template to **VMware vSphere**. + +## Requirements + +| Name | Version | +| --------------------------------------------------------------------------------- | --------- | +| [local](#requirement_local) | 2.4.1 | +| [spectrocloud](#requirement_spectrocloud) | >= 0.16.1 | +| [tls](#requirement_tls) | 4.0.4 | +| [vsphere](#requirement_vsphere) | >= 2.6.1 | + +## Providers + +| Name | Version | +| --------------------------------------------------------------------------- | ------- | +| [local](#provider_local) | 2.4.1 | +| [spectrocloud](#provider_spectrocloud) | 0.17.4 | +| [tls](#provider_tls) | 4.0.4 | + +## Modules + +No modules. + +## Resources + +| Name | Type | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------- | +| [local_file.public_key_file](https://registry.terraform.io/providers/hashicorp/local/2.4.1/docs/resources/file) | resource | +| [local_sensitive_file.private_key_file](https://registry.terraform.io/providers/hashicorp/local/2.4.1/docs/resources/sensitive_file) | resource | +| [spectrocloud_cluster_profile.profile](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/resources/cluster_profile) | resource | +| [spectrocloud_cluster_vsphere.cluster](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/resources/cluster_vsphere) | resource | +| [tls_private_key.tutorial_ssh_key](https://registry.terraform.io/providers/hashicorp/tls/4.0.4/docs/resources/private_key) | resource | +| [spectrocloud_cloudaccount_vsphere.account](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/cloudaccount_vsphere) | data source | +| [spectrocloud_pack.cni](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/pack) | data source | +| [spectrocloud_pack.csi](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/pack) | data source | +| [spectrocloud_pack.hellouniverse](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/pack) | data source | +| [spectrocloud_pack.k8s](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/pack) | data source | +| [spectrocloud_pack.metallb](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/pack) | data source | +| [spectrocloud_pack.ubuntu](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/pack) | data source | +| [spectrocloud_registry.community_registry](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/registry) | data source | +| [spectrocloud_registry.public_registry](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs/data-sources/registry) | data source | + +## Inputs + +| Name | Description | Type | Default | Required | +| ------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :------: | +| [cluster_name](#input_cluster_name) | The name of the cluster. | `string` | `"pcg-tutorial-cluster"` | no | +| [cluster_profile_description](#input_cluster_profile_description) | Provide a description of the cluster profile. | `string` | `"My cluster profile as part of the PCG tutorial."` | no | +| [cluster_profile_name](#input_cluster_profile_name) | The name of the cluster profile. | `string` | `"pcg-tutorial-profile"` | no | +| [datacenter_name](#input_datacenter_name) | The name of the datacenter in vSphere.. | `string` | n/a | yes | +| [datastore_name](#input_datastore_name) | The name of the vSphere datastore. | `string` | n/a | yes | +| [folder_name](#input_folder_name) | The name of the folder in vSphere. | `string` | n/a | yes | +| [metallb_ip](#input_metallb_ip) | The IP address range for your MetalLB Load Balancer. | `string` | n/a | yes | +| [network_name](#input_network_name) | The name of the vSphere network. | `string` | n/a | yes | +| [pcg_name](#input_pcg_name) | The name of the PCG. | `string` | n/a | yes | +| [resource_pool_name](#input_resource_pool_name) | The name of the vSphere resource pool. | `string` | n/a | yes | +| [search_domain](#input_search_domain) | The name of network search domain. | `string` | n/a | yes | +| [ssh_key](#input_ssh_key) | The path to the public key that will be added to the cluster nodes. If not provided, a new key pair will be generated. | `string` | n/a | yes | +| [ssh_key_private](#input_ssh_key_private) | The path to the private key that will be used to access the cluster nodes. If not provided, a new key pair will be generated. | `string` | n/a | yes | +| [tags](#input_tags) | The default tags to apply to Palette resources | `list(string)` |
[
"spectro-cloud-education",
"app:hello-universe",
"terraform_managed:true",
"repository:spectrocloud:tutorials",
"tutorial:DEPLOY_APP_WORKLOADS_WITH_A_PCG"
]
| no | +| [vsphere_cluster](#input_vsphere_cluster) | The name of your vSphere cluster. | `string` | n/a | yes | + +## Outputs + +| Name | Description | +| -------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | +| [Advisory](#output_Advisory) | n/a | +| [ssh_connection_command](#output_ssh_connection_command) | Command to use the generated private SSH key to access the nodes. | +| [ssh_connection_command_user](#output_ssh_connection_command_user) | Command to use the user's private SSH key to access the nodes. | +| [ssh_key_location](#output_ssh_key_location) | Location of the generated private SSH key file | +| [ssh_public_key_location](#output_ssh_public_key_location) | Location of the generated public SSH key file | diff --git a/terraform/vmware-cluster-deployment-tf/cluster.tf b/terraform/vmware-cluster-deployment-tf/cluster.tf new file mode 100644 index 0000000..38398f1 --- /dev/null +++ b/terraform/vmware-cluster-deployment-tf/cluster.tf @@ -0,0 +1,89 @@ +# Copyright (c) Spectro Cloud +# SPDX-License-Identifier: Apache-2.0 + +resource "spectrocloud_cluster_vsphere" "cluster" { + name = var.cluster_name + tags = var.tags + cloud_account_id = data.spectrocloud_cloudaccount_vsphere.account.id + depends_on = [spectrocloud_cluster_profile.profile] + + cloud_config { + ssh_key = local.ssh_public_key + datacenter = var.datacenter_name + folder = var.folder_name + static_ip = false # If true, the cluster will use static IP placement. If false, the cluster will use DDNS. + network_search_domain = var.search_domain + } + + cluster_profile { + id = spectrocloud_cluster_profile.profile.id + } + + scan_policy { + configuration_scan_schedule = "0 0 * * SUN" + penetration_scan_schedule = "0 0 * * SUN" + conformance_scan_schedule = "0 0 1 * *" + } + + ############################## + # control-plane-pool + ############################## + machine_pool { + name = "control-plane-pool" + count = 1 + control_plane = true + control_plane_as_worker = true + + instance_type { + cpu = 4 + disk_size_gb = 60 + memory_mb = 8000 + } + + placement { + cluster = var.vsphere_cluster + datastore = var.datastore_name + network = var.network_name + resource_pool = var.resource_pool_name + # Required for static IP placement. + #static_ip_pool_id = resource.spectrocloud_privatecloudgateway_ippool.ippool.id + } + + additional_labels = { + "owner" = "docs" + "purpose" = "tutorial" + "type" = "control-plane-node" + } + } + + ############################## + # worker-pool + ############################## + machine_pool { + name = "worker-pool" + count = 1 + control_plane = false + + instance_type { + cpu = 4 + disk_size_gb = 60 + memory_mb = 8000 + } + + placement { + cluster = var.vsphere_cluster + datastore = var.datastore_name + network = var.network_name + resource_pool = var.resource_pool_name + # Required for static IP placement. + #static_ip_pool_id = resource.spectrocloud_privatecloudgateway_ippool.ippool.id + } + + additional_labels = { + "owner" = "docs" + "purpose" = "tutorial" + "type" = "worker-node" + } + } + +} diff --git a/terraform/vmware-cluster-deployment-tf/data.tf b/terraform/vmware-cluster-deployment-tf/data.tf new file mode 100644 index 0000000..20ed4ac --- /dev/null +++ b/terraform/vmware-cluster-deployment-tf/data.tf @@ -0,0 +1,74 @@ +# Copyright (c) Spectro Cloud +# SPDX-License-Identifier: Apache-2.0 + +#################################### +# Data resources for the profile +#################################### +data "spectrocloud_registry" "public_registry" { + name = "Public Repo" +} + +data "spectrocloud_registry" "community_registry" { + name = "Palette Registry" +} + +#################################### +# Core Infrastructure Layers +# The following core infrastructure layers are configured for deployment to Vsphere. +# Change the name and version of the following core infrastructure layers if you want to create the profile for other cloud service providers. +#################################### +data "spectrocloud_pack" "ubuntu" { + name = "ubuntu-vsphere" + version = "22.04" + registry_uid = data.spectrocloud_registry.public_registry.id +} + +data "spectrocloud_pack" "k8s" { + name = "kubernetes" + version = "1.28.3" + registry_uid = data.spectrocloud_registry.public_registry.id +} + +data "spectrocloud_pack" "cni" { + name = "cni-calico" + version = "3.26.3" + registry_uid = data.spectrocloud_registry.public_registry.id +} + +data "spectrocloud_pack" "csi" { + name = "csi-vsphere-csi" + version = "3.0.2" + registry_uid = data.spectrocloud_registry.public_registry.id +} + +data "spectrocloud_pack" "metallb" { + name = "lb-metallb-helm" + version = "0.13.11" + registry_uid = data.spectrocloud_registry.public_registry.id +} + +#################################### +# Add-On Layers +#################################### + +data "spectrocloud_pack" "hellouniverse" { + name = "hello-universe" + version = "1.1.1" + registry_uid = data.spectrocloud_registry.community_registry.id +} + +#################################### +# Data resources for the cluster +#################################### +data "spectrocloud_cloudaccount_vsphere" "account" { + name = var.pcg_name +} + + +#################################### +# Data resources for the PCG +#################################### +# Required for static IP placement. +# data "spectrocloud_private_cloud_gateway" "pcg" { +# name = var.pcg_name +# } \ No newline at end of file diff --git a/terraform/vmware-cluster-deployment-tf/inputs.tf b/terraform/vmware-cluster-deployment-tf/inputs.tf new file mode 100644 index 0000000..0cf34eb --- /dev/null +++ b/terraform/vmware-cluster-deployment-tf/inputs.tf @@ -0,0 +1,173 @@ +# Copyright (c) Spectro Cloud +# SPDX-License-Identifier: Apache-2.0 + +#################################### +# Input resources for the profile +#################################### + +variable "cluster_profile_name" { + type = string + description = "The name of the cluster profile." + default = "pcg-tutorial-profile" +} + +variable "cluster_profile_description" { + type = string + description = "Provide a description of the cluster profile." + default = "My cluster profile as part of the PCG tutorial." +} + +# ToDo +# Provide a range of IP addresses for your Metallb Load Balancer. This range must be included in the PCG's static IP pool if using static IP placement. +variable "metallb_ip" { + type = string + description = "The IP address range for your MetalLB Load Balancer." +} + +#################################### +# Input resources for the cluster +#################################### + +variable "cluster_name" { + type = string + description = "The name of the cluster." + default = "pcg-tutorial-cluster" +} + +variable "tags" { + type = list(string) + description = "The default tags to apply to Palette resources" + # Value and key must be 63 characters or less, must start and end with an alphanumeric character, and can contain only alphanumeric characters, dots, dashes or underscores. + # Slashes `\` are not allowed. + default = ["spectro-cloud-education", "app:hello-universe", "terraform_managed:true", "repository:spectrocloud:tutorials", "tutorial:DEPLOY_APP_WORKLOADS_WITH_A_PCG"] +} + +################################################# +# Input resources for the cluster - Cloud config +################################################# + +# ToDo +# Provide the path to the public key that will be added to the cluster nodes. If not provided, a new key pair will be generated. +variable "ssh_key" { + type = string + description = "The path to the public key that will be added to the cluster nodes. If not provided, a new key pair will be generated." + + validation { + condition = var.ssh_key == "" ? true : fileexists(var.ssh_key) + error_message = "The provided SSH key file does not exist. Please, provide a valid path." + } + +} + +# ToDo +# Provide the path to the private key that will be used to access the cluster nodes. If not provided, a new key pair will be generated. +variable "ssh_key_private" { + type = string + description = "The path to the private key that will be used to access the cluster nodes. If not provided, a new key pair will be generated." + + validation { + condition = var.ssh_key_private == "" ? true : fileexists(var.ssh_key_private) + error_message = "The provided SSH key file does not exist. Please, provide a valid path." + } + +} + +# ToDo +# Provide the name of the datacenter in vSphere. +variable "datacenter_name" { + type = string + description = "The name of the datacenter in vSphere.." +} + +# ToDo +# Provide the name of the folder in vSphere. +variable "folder_name" { + type = string + description = "The name of the folder in vSphere." +} + +# ToDo +# Provide the name of the network search domain. +variable "search_domain" { + type = string + description = "The name of network search domain." +} + +################################################# +# Input resources for the cluster - Placement +################################################# + +# ToDo +# Provide the cluster name for the machine pool as it appears in vSphere. +variable "vsphere_cluster" { + type = string + description = "The name of your vSphere cluster." +} + +# ToDo +# Provide the datastore name for the machine pool as it appears in vSphere. +variable "datastore_name" { + type = string + description = "The name of the vSphere datastore." +} + +# ToDo +# Provide the network name for the machine pool as it appears in vSphere. +variable "network_name" { + type = string + description = "The name of the vSphere network." +} + +# ToDo +# Provide the resource pool name for the machine pool as it appears in vSphere. +variable "resource_pool_name" { + type = string + description = "The name of the vSphere resource pool." +} + +# ToDo +# Provide the name of the PCG that will be used to deploy the Palette cluster. +variable "pcg_name" { + type = string + description = "The name of the PCG." +} + +################################################# +# Input resources for the Static IP Pool +################################################# +# Required for static IP placement. +# # ToDo +# # Provide the IP address of the vSphere network gateway. +# variable "network_gateway" { +# type = string +# description = "The IP address of the vSphere network gateway." +# } + +# # ToDo +# # Provide the prefix of your vSphere network. +# # Valid values are network CIDR subnet masks from the range 0-32. Example: 18. +# variable "network_prefix" { +# type = number +# description = "The prefix of your vSphere network." +# } + +# # ToDo +# # Provide the first IP address of your PCG IP pool range. +# variable "ip_range_start" { +# type = string +# description = "The first IP address of your PCG IP pool range." +# } + +# # ToDo +# # Provide the second IP address of your PCG IP pool range. +# variable "ip_range_end" { +# type = string +# description = "The last IP address of your PCG IP pool range." +# } + +# # ToDo +# # Provide a comma-separated list of DNS name server IP addresses. +# variable "nameserver_addr" { +# type = set(string) +# description = "The DNS nameserver IP addresses of your network." +# } \ No newline at end of file diff --git a/terraform/vmware-cluster-deployment-tf/ippool.tf b/terraform/vmware-cluster-deployment-tf/ippool.tf new file mode 100644 index 0000000..042ef14 --- /dev/null +++ b/terraform/vmware-cluster-deployment-tf/ippool.tf @@ -0,0 +1,14 @@ +# Copyright (c) Spectro Cloud +# SPDX-License-Identifier: Apache-2.0 + +# Required for static IP placement. +# resource "spectrocloud_privatecloudgateway_ippool" "ippool" { +# gateway = var.network_gateway +# name = "${var.cluster_name}-ippool" +# network_type = "range" +# prefix = var.network_prefix +# private_cloud_gateway_id = data.spectrocloud_private_cloud_gateway.pcg.id +# ip_start_range = var.ip_range_start +# ip_end_range = var.ip_range_end +# nameserver_addresses = var.nameserver_addr +# } \ No newline at end of file diff --git a/terraform/vmware-cluster-deployment-tf/outputs.tf b/terraform/vmware-cluster-deployment-tf/outputs.tf new file mode 100644 index 0000000..f5711bd --- /dev/null +++ b/terraform/vmware-cluster-deployment-tf/outputs.tf @@ -0,0 +1,31 @@ +# Copyright (c) Spectro Cloud +# SPDX-License-Identifier: Apache-2.0 + +output "Advisory" { + value = <<-EOT + +We recommend waiting a few minutes before clicking on the service URL to prevent the browser from caching an unresolved DNS request. + + EOT +} + +output "ssh_key_location" { + description = "Location of the generated private SSH key file" + value = length(tls_private_key.tutorial_ssh_key) > 0 ? "This is the location of the generated private SSH key file: ${local_sensitive_file.private_key_file[0].filename}." : null +} + +output "ssh_public_key_location" { + description = "Location of the generated public SSH key file" + value = length(tls_private_key.tutorial_ssh_key) > 0 ? "This is the location of the generated public SSH key file: ${local_file.public_key_file[0].filename}." : null +} + +output "ssh_connection_command" { + description = "Command to use the generated private SSH key to access the nodes." + value = length(tls_private_key.tutorial_ssh_key) > 0 ? "To access your nodes, use the following command, replacing with the username and with the IP address of your node: ssh -i ${local_sensitive_file.private_key_file[0].filename} @" : null +} + +output "ssh_connection_command_user" { + description = "Command to use the user's private SSH key to access the nodes." + value = var.ssh_key != "" ? "To access your nodes, use the following command, replacing with the username and with the IP address of your node: ssh -i ${var.ssh_key_private} @" : null +} + diff --git a/terraform/vmware-cluster-deployment-tf/profile.tf b/terraform/vmware-cluster-deployment-tf/profile.tf new file mode 100644 index 0000000..9187d7c --- /dev/null +++ b/terraform/vmware-cluster-deployment-tf/profile.tf @@ -0,0 +1,63 @@ +# Copyright (c) Spectro Cloud +# SPDX-License-Identifier: Apache-2.0 + + +resource "spectrocloud_cluster_profile" "profile" { + name = var.cluster_profile_name + description = var.cluster_profile_description + tags = var.tags + cloud = "vsphere" + type = "cluster" + + ############################ + # Core layers + ############################ + # The packs listed below have a static name and tag value. Refer to the HubbleAPI collection before changing these values. + pack { + name = "ubuntu-vsphere" + tag = "LTS__22.4.x" + uid = data.spectrocloud_pack.ubuntu.id + values = data.spectrocloud_pack.ubuntu.values + } + + pack { + name = "kubernetes" + tag = "1.28.x" + uid = data.spectrocloud_pack.k8s.id + values = data.spectrocloud_pack.k8s.values + } + + pack { + name = "cni-calico" + tag = "3.26.x" + uid = data.spectrocloud_pack.cni.id + values = data.spectrocloud_pack.cni.values + } + + pack { + name = "csi-vsphere-csi" + tag = "3.0.x" + uid = data.spectrocloud_pack.csi.id + values = data.spectrocloud_pack.csi.values + } + + pack { + name = "lb-metallb-helm" + tag = "0.13.x" + uid = data.spectrocloud_pack.metallb.id + values = replace(data.spectrocloud_pack.metallb.values, "192.168.10.0/24", var.metallb_ip) + } + + ############################ + # Add-on layer + ############################ + + pack { + name = "hello-universe" + tag = "1.1.x" + uid = data.spectrocloud_pack.hellouniverse.id + values = data.spectrocloud_pack.hellouniverse.values + } + + +} \ No newline at end of file diff --git a/terraform/vmware-cluster-deployment-tf/provider.tf b/terraform/vmware-cluster-deployment-tf/provider.tf new file mode 100644 index 0000000..4353033 --- /dev/null +++ b/terraform/vmware-cluster-deployment-tf/provider.tf @@ -0,0 +1,31 @@ +# Copyright (c) Spectro Cloud +# SPDX-License-Identifier: Apache-2.0 + +terraform { + required_providers { + spectrocloud = { + version = ">= 0.17.4" + source = "spectrocloud/spectrocloud" + } + + vsphere = { + source = "hashicorp/vsphere" + version = ">= 2.6.1" + } + + tls = { + source = "hashicorp/tls" + version = "4.0.4" + } + + local = { + source = "hashicorp/local" + version = "2.4.1" + } + } +} + +provider "spectrocloud" { + # API key set through the environment variable SPECTROCLOUD_APIKEY + project_name = "Default" +} \ No newline at end of file diff --git a/terraform/vmware-cluster-deployment-tf/ssh-key.tf b/terraform/vmware-cluster-deployment-tf/ssh-key.tf new file mode 100644 index 0000000..6670bb2 --- /dev/null +++ b/terraform/vmware-cluster-deployment-tf/ssh-key.tf @@ -0,0 +1,25 @@ +# Copyright (c) Spectro Cloud +# SPDX-License-Identifier: Apache-2.0 + +resource "tls_private_key" "tutorial_ssh_key" { + count = var.ssh_key == "" && var.ssh_key_private == "" ? 1 : 0 + algorithm = "RSA" + rsa_bits = "4096" +} + +locals { + ssh_public_key = var.ssh_key != "" ? var.ssh_key : tls_private_key.tutorial_ssh_key[0].public_key_openssh +} + +resource "local_sensitive_file" "private_key_file" { + count = length(tls_private_key.tutorial_ssh_key) > 0 ? 1 : 0 + content = tls_private_key.tutorial_ssh_key[0].private_key_openssh + filename = "${path.module}/tutorial_ssh_key" + file_permission = "0600" +} + +resource "local_file" "public_key_file" { + count = length(tls_private_key.tutorial_ssh_key) > 0 ? 1 : 0 + content = tls_private_key.tutorial_ssh_key[0].public_key_openssh + filename = "${path.module}/tutorial_ssh_key.pub" +} \ No newline at end of file diff --git a/terraform/vmware-cluster-deployment-tf/terraform.tfvars b/terraform/vmware-cluster-deployment-tf/terraform.tfvars new file mode 100644 index 0000000..e8bd93b --- /dev/null +++ b/terraform/vmware-cluster-deployment-tf/terraform.tfvars @@ -0,0 +1,27 @@ +# Copyright (c) Spectro Cloud +# SPDX-License-Identifier: Apache-2.0 + +# Static IP Pool Variables +# Required for static IP placement only. +# network_gateway = "REPLACE ME" # Provide the IP address of the vSphere network gateway. +# network_prefix = "REPLACE ME" # Provide the prefix of your vSphere network. Valid values are network CIDR subnet masks from the range 0-32. Example: 18. +# ip_range_start = "REPLACE ME" # Provide the first IP address of your PCG IP pool range. +# ip_range_end = "REPLACE ME" # Provide the second IP address of your PCG IP pool range. +# nameserver_addr = ["REPLACE ME"] # Provide a comma-separated list of DNS name server IP addresses. + + +# Cluster Profile Variables +metallb_ip = "REPLACE ME" # Provide a range of IP addresses for your Metallb Load Balancer. This range must be included in the PCG's static IP pool range if using static IP placement. + + +# Cluster Variables +pcg_name = "REPLACE ME" # Provide the name of the PCG that will be used to deploy the Palette cluster. +datacenter_name = "REPLACE ME" # Provide the name of the datacenter in vSphere. +folder_name = "REPLACE ME" # Provide the name of the folder in vSphere. +search_domain = "REPLACE ME" # Provide the name of the network search domain. +vsphere_cluster = "REPLACE ME" # Provide the cluster name for the machine pool as it appears in vSphere. +datastore_name = "REPLACE ME" # Provide the datastore name for the machine pool as it appears in vSphere. +network_name = "REPLACE ME" # Provide the network name for the machine pool as it appears in vSphere. +resource_pool_name = "REPLACE ME" # Provide the resource pool name for the machine pool as it appears in vSphere. +ssh_key = "" # Provide the path to your public SSH key. If not provided, a new key pair will be created. +ssh_key_private = "" # Provide the path to your private SSH key. If not provided, a new key pair will be created. \ No newline at end of file