Skip to content

iits-consulting/terraform-opentelekomcloud-cce-gpu-node-pool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CCE gpu node pool Module

A module designed to create a cce gpu node pool.

Usage example:

# First you need to create a normal cce cluster
# https://github.com/iits-consulting/terraform-opentelekomcloud-project-factory/tree/master/modules/cce
module "cce" {
  source = "iits-consulting/cce-gpu-node-pool/opentelekomcloud"
  name   = "mycompany-dev-cluster"

  cluster_vpc_id            = module.vpc.vpc.id
  cluster_subnet_id         = values(module.vpc.subnets)[0].id
  cluster_high_availability = false
  cluster_enable_scaling    = false
  node_availability_zones   = ["eu-de-03"]
  node_count                = 3
  node_flavor               = "s3.large.8"
  node_storage_type         = "SSD"
  node_storage_size         = 100
}

module "cce_gpu_node_pool" {
  source = "iits-consulting/cce-gpu-node-pool/opentelekomcloud"

  name_prefix                     = module.cce.cluster_name
  cce_cluster_id                  = module.cce.cluster_id
  node_availability_zones         = ["eu-de-03"]
  node_flavor                     = "pi2.2xlarge.4"
  node_storage_type               = "SSD"
  node_storage_size               = 100
  node_count                      = 1
  autoscaler_node_max             = 1
  gpu_driver_url                  = "https://us.download.nvidia.com/tesla/535.129.03/NVIDIA-Linux-x86_64-535.129.03.run"
}

Notes

  • containernetwork_type of the cce needs to be _vpc-router

Requirements

Name Version
terraform >= 1.5.7
errorcheck 3.0.3
opentelekomcloud >= 1.36.34, ~>1.36
random ~> 3.0
tls ~> 4.0

Providers

Name Version
errorcheck 3.0.3
opentelekomcloud >= 1.36.34, ~>1.36
random ~> 3.0
tls ~> 4.0

Modules

No modules.

Resources

Name Type
errorcheck_is_valid.gpu_beta_version_availability resource
errorcheck_is_valid.gpu_driver_url resource
errorcheck_is_valid.node_availability_zones resource
opentelekomcloud_cce_addon_v3.gpu resource
opentelekomcloud_cce_node_pool_v3.cluster_node_pool resource
opentelekomcloud_compute_keypair_v2.cluster_keypair resource
opentelekomcloud_kms_key_v1.node_storage_encryption_key resource
random_id.cluster_keypair_id resource
random_id.id resource
tls_private_key.cluster_keypair resource
opentelekomcloud_cce_addon_templates_v3.gpu data source
opentelekomcloud_cce_cluster_v3.cluster data source
opentelekomcloud_identity_project_v3.current data source
opentelekomcloud_kms_key_v1.node_storage_encryption_existing_key data source

Inputs

Name Description Type Default Required
cce_cluster_id ID of the existing CCE cluster. string n/a yes
name_prefix Name prefix for provisioned resources. string n/a yes
node_availability_zones Availability zones for the node pools. Providing multiple availability zones creates one node pool in each zone. set(string) n/a yes
node_count Number of nodes to create number n/a yes
node_flavor Node specifications in otc flavor format string n/a yes
autoscaler_node_max Maximum limit of servers to create. (default: 10) number 10 no
autoscaler_node_min Lower bound of servers to always keep (default: <node_count>) number null no
gpu_beta_enabled Install GPU Beta Addon bool true no
gpu_beta_version Version of the GPU Beta Addon Template (CCE AI Suite) string "latest" no
gpu_driver_url Nvidia Driver download URL. Please refer to https://www.nvidia.com/Download/Find.aspx and ensure your driver is matching the GPU in your node flavor. string "" no
node_container_runtime The container runtime to use. Must be set to either containerd or docker. (default: containerd) string "containerd" no
node_k8s_tags (Optional, Map) Tags of a Kubernetes node, key/value pair format. map(string) {} no
node_os Operating system of worker nodes. string "EulerOS 2.9" no
node_postinstall Post install script for the node pool. string "" no
node_scaling_enabled Enable the scaling for the node pool. Please note that CCE cluster must have autoscaling addon installed. (default: 10) bool true no
node_storage_encryption_enabled Enable OTC KMS volume encryption for the node pool volumes. (default: false) bool false no
node_storage_encryption_kms_key_name If KMS volume encryption is enabled, specify a name of an existing kms key. Setting this disables the creation of a new kms key. (default: null) string null no
node_storage_size Size of the node data disk in GB (default: 100) number 100 no
node_storage_type Type of node storage SATA, SAS or SSD (default: SATA) string "SATA" no
node_taints Enable the scaling for the node pool. Please note that CCE cluster must have autoscaling addon installed. (default: 10)
list(object({
effect = string
key = string
value = string
}))
[
{
"effect": "PreferNoSchedule",
"key": "gpu-node",
"value": "true"
}
]
no
tags Common tags to add to resources that support them. map(string) null no

Outputs

No outputs.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages