Skip to content

Commit

Permalink
Merge pull request #22 from junior/5G-example
Browse files Browse the repository at this point in the history
5G NF Infra example shape adjustments
  • Loading branch information
junior authored Dec 5, 2022
2 parents 8d6369b + ad38db4 commit 087634c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 52 deletions.
8 changes: 4 additions & 4 deletions examples/5G-NF-Infra/networking.tf
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ locals {
icmp_options = null
}, {
description = "Allow 5G RAN to pod communication"
source = lookup(local.network_cidrs, "SUBNET-5G-RAN-CIDR ")
source = lookup(local.network_cidrs, "SUBNET-5G-RAN-CIDR")
source_type = "CIDR_BLOCK"
protocol = local.security_list_ports.all_protocols
stateless = false
Expand All @@ -90,7 +90,7 @@ locals {
icmp_options = null
}, {
description = "Allow 5G EPC to pod communication"
source = lookup(local.network_cidrs, "SUBNET-5G-EPC-CIDR ")
source = lookup(local.network_cidrs, "SUBNET-5G-EPC-CIDR")
source_type = "CIDR_BLOCK"
protocol = local.security_list_ports.all_protocols
stateless = false
Expand Down Expand Up @@ -141,7 +141,7 @@ locals {
}]
temp_all_vcn_security_list_ingress_rules = [{
description = "Allow all from VCN"
source = lookup(local.network_cidrs, "ALL-CIDR")
source = lookup(local.network_cidrs, "VCN-MAIN-CIDR")
source_type = "CIDR_BLOCK"
protocol = local.security_list_ports.all_protocols
stateless = false
Expand All @@ -151,7 +151,7 @@ locals {
}]
temp_all_vcn_security_list_egress_rules = [{
description = "Allow all to VCN"
destination = lookup(local.network_cidrs, "ALL-CIDR")
destination = lookup(local.network_cidrs, "VCN-MAIN-CIDR")
destination_type = "CIDR_BLOCK"
protocol = local.security_list_ports.all_protocols
stateless = false
Expand Down
14 changes: 7 additions & 7 deletions examples/5G-NF-Infra/oke.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ module "oke-quickstart" {
extra_subnets = local.extra_subnets

# OKE Node Pool 1 arguments
node_pool_cni_type_1 = "OCI_VCN_IP_NATIVE" # Use "FLANNEL_OVERLAY" for overlay network or "OCI_VCN_IP_NATIVE" for VCN Native PODs Network. If the node pool 1 uses the OCI_VCN_IP_NATIVE, the cluster will also be configured with same cni
cluster_autoscaler_enabled = true
node_pool_name_1 = "pool1"
node_pool_initial_num_worker_nodes_1 = 5 # Minimum number of nodes in the node pool
node_pool_max_num_worker_nodes_1 = 10 # Maximum number of nodes in the node pool
node_pool_instance_shape_1 = var.node_pool_instance_shape_1
extra_security_list_name_for_nodes = "5g_for_pods_security_list"
node_pool_cni_type_1 = "OCI_VCN_IP_NATIVE" # Use "FLANNEL_OVERLAY" for overlay network or "OCI_VCN_IP_NATIVE" for VCN Native PODs Network. If the node pool 1 uses the OCI_VCN_IP_NATIVE, the cluster will also be configured with same cni
cluster_autoscaler_enabled = true
node_pool_name_1 = "pool1"
node_pool_initial_num_worker_nodes_1 = 5 # Minimum number of nodes in the node pool
node_pool_max_num_worker_nodes_1 = 10 # Maximum number of nodes in the node pool
node_pool_instance_shape_1 = var.node_pool_instance_shape_1
extra_security_list_name_for_nodes = "5g_for_pods_security_list"
extra_security_list_name_for_vcn_native_pod_networking = "5g_for_pods_security_list"

# Cluster Tools
Expand Down
45 changes: 4 additions & 41 deletions examples/5G-NF-Infra/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,46 +34,9 @@ variable "vcn_cidr_blocks" {
variable "node_pool_instance_shape_1" {
type = map(any)
default = {
"instanceShape" = "VM.Standard.E4.Flex"
"ocpus" = 4
"memory" = 64
"instanceShape" = "VM.Standard3.Flex"
"ocpus" = 6
"memory" = 96
}
description = "Default Node Pool: A shape is a template that determines the number of OCPUs, amount of memory, and other resources allocated to a newly created instance for the Worker Node. Select at least 2 OCPUs and 16GB of memory if using Flex shapes"
description = "Pooll: A shape is a template that determines the number of OCPUs, amount of memory, and other resources allocated to a newly created instance for the Worker Node. Select at least 2 OCPUs and 16GB of memory if using Flex shapes"
}
variable "node_pool_instance_shape_turn" {
type = map(any)
default = {
"instanceShape" = "VM.Standard.E4.Flex"
"ocpus" = 4
"memory" = 64
}
description = "Turn Node Pool: A shape is a template that determines the number of OCPUs, amount of memory, and other resources allocated to a newly created instance for the Worker Node. Select at least 2 OCPUs and 16GB of memory if using Flex shapes"
}
variable "node_pool_instance_shape_gpu" {
type = map(any)
default = {
"instanceShape" = "BM.GPU.A10.4"
"ocpus" = 64
"memory" = 1024
}
description = "GPU Node Pool: A shape is a template that determines the number of OCPUs, amount of memory, and other resources allocated to a newly created instance for the Worker Node. Select at least 2 OCPUs and 16GB of memory if using Flex shapes"
}
variable "node_pool_shape_specific_ad_gpu" {
description = "The number of the AD to get the shape for the node pool"
type = number
default = 0

validation {
condition = var.node_pool_shape_specific_ad_gpu >= 0 && var.node_pool_shape_specific_ad_gpu <= 3
error_message = "Invalid AD number, should be 0 to get all ADs or 1, 2 or 3 to be a specific AD."
}
}

################################################################################
# Variables: Unreal Pixel Streaming
################################################################################
variable "unreal_pixel_streaming_demo" {
type = bool
default = true
description = "Deploys Unreal Pixel Streaming Demo deployment helm chart - demo.yaml"
}

0 comments on commit 087634c

Please sign in to comment.