Skip to content

Commit

Permalink
chore: use correct fqdn for upf
Browse files Browse the repository at this point in the history
Signed-off-by: Guillaume Belanger <[email protected]>
  • Loading branch information
gruyaume committed Feb 20, 2025
1 parent def6ddf commit 641f267
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 71 deletions.
4 changes: 2 additions & 2 deletions docs/tutorials/mastering.md
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ module "sdcore-user-plane" {
access-ip = "10.202.0.10/24"
core-gateway-ip = "10.203.0.1"
core-ip = "10.203.0.10/24"
external-upf-hostname = "upf.mgmt"
external-upf-hostname = "upf.mgmt.local"
access-interface-mac-address = "c2:c8:c7:e9:cc:18" # In this example, its the MAC address of access interface.
core-interface-mac-address = "e2:01:8e:95:cb:4d" # In this example, its the MAC address of core interface
enable-hw-checksum = "false"
Expand Down Expand Up @@ -860,7 +860,7 @@ In the Network Management System (NMS), create a network slice with the followin
- Name: `Tutorial`
- MCC: `001`
- MNC: `01`
- UPF: `upf.mgmt:8805`
- UPF: `upf.mgmt.local:8805`
- gNodeB: `gnbsim-gnbsim-gnbsim (tac:1)`

You should see the following network slice created.
Expand Down
8 changes: 4 additions & 4 deletions examples/terraform/mastering/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module "sdcore-user-plane" {
core-gateway-ip = "10.203.0.1"
core-interface = "core"
core-ip = "10.203.0.10/24"
external-upf-hostname = "upf.mgmt"
external-upf-hostname = "upf.mgmt.local"
gnb-subnet = "10.204.0.0/24"
}
}
Expand Down Expand Up @@ -102,9 +102,9 @@ module "cos-lite" {
model_name = "cos-lite"
deploy_cos_configuration = true
cos_configuration_config = {
git_repo = "https://github.com/canonical/sdcore-cos-configuration"
git_branch = "main"
grafana_dashboards_path = "grafana_dashboards/sdcore/"
git_repo = "https://github.com/canonical/sdcore-cos-configuration"
git_branch = "main"
grafana_dashboards_path = "grafana_dashboards/sdcore/"
}
}

Expand Down
130 changes: 65 additions & 65 deletions terraform/main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_providers {
lxd = {
source = "terraform-lxd/lxd"
source = "terraform-lxd/lxd"
version = "2.4.0"
}
}
Expand All @@ -23,11 +23,11 @@ resource "lxd_network" "sdcore-mgmt" {
"ipv4.address" = "10.201.0.1/24"
"ipv4.nat" = "true"
"ipv6.address" = "none"
"dns.mode" = "managed"
"dns.domain" = "mgmt"
"raw.dnsmasq" = <<-EOF
"dns.mode" = "managed"
"dns.domain" = "mgmt"
"raw.dnsmasq" = <<-EOF
host-record=amf.mgmt,10.201.0.52
host-record=upf.mgmt,10.201.0.200
host-record=upf.mgmt.local,10.201.0.200
EOF
}
}
Expand All @@ -40,7 +40,7 @@ resource "lxd_network" "sdcore-access" {
"ipv4.address" = "10.202.0.1/24"
"ipv4.nat" = "false"
"ipv6.address" = "none"
"dns.mode" = "none"
"dns.mode" = "none"
}
}

Expand All @@ -52,7 +52,7 @@ resource "lxd_network" "sdcore-core" {
"ipv4.address" = "10.203.0.1/24"
"ipv4.nat" = "true"
"ipv6.address" = "none"
"dns.mode" = "none"
"dns.mode" = "none"
}
}

Expand All @@ -64,7 +64,7 @@ resource "lxd_network" "sdcore-ran" {
"ipv4.address" = "10.204.0.1/24"
"ipv4.nat" = "false"
"ipv6.address" = "none"
"dns.mode" = "none"
"dns.mode" = "none"
}
}

Expand All @@ -76,14 +76,14 @@ resource "tls_private_key" "juju-key" {
resource "lxd_instance" "control-plane" {
name = "control-plane"
image = "ubuntu:24.04"
type = "virtual-machine"
type = "virtual-machine"

config = {
"boot.autostart" = true
}

limits = {
cpu = 4
cpu = 4
memory = "8GB"
}

Expand All @@ -103,7 +103,7 @@ resource "lxd_instance" "control-plane" {
name = "eth0"

properties = {
network = "sdcore-mgmt"
network = "sdcore-mgmt"
"ipv4.address" = "10.201.0.101"
}
}
Expand All @@ -115,25 +115,25 @@ resource "lxd_instance" "control-plane" {
}

resource "lxd_instance_file" "control-plane-pubkey" {
instance = lxd_instance.control-plane.name
content = tls_private_key.juju-key.public_key_openssh
instance = lxd_instance.control-plane.name
content = tls_private_key.juju-key.public_key_openssh
target_path = "/home/ubuntu/.ssh/authorized_keys"
uid = 1000
gid = 1000
mode = "0600"
uid = 1000
gid = 1000
mode = "0600"

depends_on = [
lxd_instance.control-plane
]
}

resource "lxd_instance_file" "control-plane-privkey" {
instance = lxd_instance.control-plane.name
content = tls_private_key.juju-key.private_key_openssh
instance = lxd_instance.control-plane.name
content = tls_private_key.juju-key.private_key_openssh
target_path = "/home/ubuntu/.ssh/id_rsa"
uid = 1000
gid = 1000
mode = "0600"
uid = 1000
gid = 1000
mode = "0600"

depends_on = [
lxd_instance.control-plane
Expand All @@ -143,14 +143,14 @@ resource "lxd_instance_file" "control-plane-privkey" {
resource "lxd_instance" "juju-controller" {
name = "juju-controller"
image = "ubuntu:24.04"
type = "virtual-machine"
type = "virtual-machine"

config = {
"boot.autostart" = true
}

limits = {
cpu = 4
cpu = 4
memory = "6GB"
}

Expand All @@ -170,7 +170,7 @@ resource "lxd_instance" "juju-controller" {
name = "eth0"

properties = {
network = "sdcore-mgmt"
network = "sdcore-mgmt"
"ipv4.address" = "10.201.0.104"
}
}
Expand All @@ -182,25 +182,25 @@ resource "lxd_instance" "juju-controller" {
}

resource "lxd_instance_file" "juju-controller-pubkey" {
instance = lxd_instance.juju-controller.name
content = tls_private_key.juju-key.public_key_openssh
instance = lxd_instance.juju-controller.name
content = tls_private_key.juju-key.public_key_openssh
target_path = "/home/ubuntu/.ssh/authorized_keys"
uid = 1000
gid = 1000
mode = "0600"
uid = 1000
gid = 1000
mode = "0600"

depends_on = [
lxd_instance.juju-controller
]
}

resource "lxd_instance_file" "juju-controller-privkey" {
instance = lxd_instance.juju-controller.name
content = tls_private_key.juju-key.private_key_openssh
instance = lxd_instance.juju-controller.name
content = tls_private_key.juju-key.private_key_openssh
target_path = "/home/ubuntu/.ssh/id_rsa"
uid = 1000
gid = 1000
mode = "0600"
uid = 1000
gid = 1000
mode = "0600"

depends_on = [
lxd_instance.juju-controller
Expand All @@ -210,15 +210,15 @@ resource "lxd_instance_file" "juju-controller-privkey" {
resource "lxd_instance" "gnbsim" {
name = "gnbsim"
image = "ubuntu:24.04"
type = "virtual-machine"
type = "virtual-machine"

config = {
"boot.autostart" = true
"boot.autostart" = true
"cloud-init.network-config" = file("gnbsim-network-config.yml")
}

limits = {
cpu = 2
cpu = 2
memory = "3GB"
}

Expand All @@ -238,7 +238,7 @@ resource "lxd_instance" "gnbsim" {
name = "eth0"

properties = {
network = "sdcore-mgmt"
network = "sdcore-mgmt"
"ipv4.address" = "10.201.0.103"
}
}
Expand All @@ -248,7 +248,7 @@ resource "lxd_instance" "gnbsim" {
name = "eth1"

properties = {
network = "sdcore-ran"
network = "sdcore-ran"
"ipv4.address" = "10.204.0.100"
}
}
Expand All @@ -261,25 +261,25 @@ resource "lxd_instance" "gnbsim" {
}

resource "lxd_instance_file" "gnbsim-pubkey" {
instance = lxd_instance.gnbsim.name
content = tls_private_key.juju-key.public_key_openssh
instance = lxd_instance.gnbsim.name
content = tls_private_key.juju-key.public_key_openssh
target_path = "/home/ubuntu/.ssh/authorized_keys"
uid = 1000
gid = 1000
mode = "0600"
uid = 1000
gid = 1000
mode = "0600"

depends_on = [
lxd_instance.gnbsim
]
}

resource "lxd_instance_file" "gnbsim-privkey" {
instance = lxd_instance.gnbsim.name
content = tls_private_key.juju-key.private_key_openssh
instance = lxd_instance.gnbsim.name
content = tls_private_key.juju-key.private_key_openssh
target_path = "/home/ubuntu/.ssh/id_rsa"
uid = 1000
gid = 1000
mode = "0600"
uid = 1000
gid = 1000
mode = "0600"

depends_on = [
lxd_instance.gnbsim
Expand All @@ -289,15 +289,15 @@ resource "lxd_instance_file" "gnbsim-privkey" {
resource "lxd_instance" "user-plane" {
name = "user-plane"
image = "ubuntu:24.04"
type = "virtual-machine"
type = "virtual-machine"

config = {
"boot.autostart" = true
"boot.autostart" = true
"cloud-init.network-config" = file("user-plane-network-config.yml")
}

limits = {
cpu = 4
cpu = 4
memory = "12GB"
}

Expand All @@ -317,7 +317,7 @@ resource "lxd_instance" "user-plane" {
name = "eth0"

properties = {
network = "sdcore-mgmt"
network = "sdcore-mgmt"
"ipv4.address" = "10.201.0.102"
}
}
Expand All @@ -327,7 +327,7 @@ resource "lxd_instance" "user-plane" {
name = "eth1"

properties = {
network = "sdcore-core"
network = "sdcore-core"
"ipv4.address" = "10.203.0.100"
}
}
Expand All @@ -337,7 +337,7 @@ resource "lxd_instance" "user-plane" {
name = "eth2"

properties = {
network = "sdcore-access"
network = "sdcore-access"
"ipv4.address" = "10.202.0.100"
#"ipv4.routes" = "10.204.0.0/24"
}
Expand All @@ -352,25 +352,25 @@ resource "lxd_instance" "user-plane" {
}

resource "lxd_instance_file" "user-plane-pubkey" {
instance = lxd_instance.user-plane.name
content = tls_private_key.juju-key.public_key_openssh
instance = lxd_instance.user-plane.name
content = tls_private_key.juju-key.public_key_openssh
target_path = "/home/ubuntu/.ssh/authorized_keys"
uid = 1000
gid = 1000
mode = "0600"
uid = 1000
gid = 1000
mode = "0600"

depends_on = [
lxd_instance.user-plane
]
}

resource "lxd_instance_file" "user-plane-privkey" {
instance = lxd_instance.user-plane.name
content = tls_private_key.juju-key.private_key_openssh
instance = lxd_instance.user-plane.name
content = tls_private_key.juju-key.private_key_openssh
target_path = "/home/ubuntu/.ssh/id_rsa"
uid = 1000
gid = 1000
mode = "0600"
uid = 1000
gid = 1000
mode = "0600"

depends_on = [
lxd_instance.user-plane
Expand Down

0 comments on commit 641f267

Please sign in to comment.