Skip to content

Commit c25b346

Browse files
authored
Merge pull request #230808 from James-Green-Microsoft/powershell-commands
PowerShell and CLI deploy commands
2 parents 095422b + e57204f commit c25b346

File tree

6 files changed

+551
-0
lines changed

6 files changed

+551
-0
lines changed

articles/private-5g-core/create-a-site.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ ms.service: private-5g-core
88
ms.topic: how-to
99
ms.date: 01/27/2022
1010
ms.custom: template-how-to
11+
zone_pivot_groups: ap5gc-portal-powershell
1112
---
1213

1314
# Create a site using the Azure portal
Lines changed: 272 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,272 @@
1+
---
2+
title: Deploy a private mobile network and site - Azure CLI
3+
titleSuffix: Azure Private 5G Core
4+
description: Learn how to deploy a private mobile network and site using Azure Command-Line Interface (Azure CLI).
5+
author: James-Green-Microsoft
6+
ms.author: jamesgreen
7+
ms.service: private-5g-core
8+
ms.topic: quickstart
9+
ms.custom: devx-track-azurecli
10+
ms.date: 03/15/2023
11+
---
12+
13+
# Quickstart: Deploy a private mobile network and site - Azure CLI
14+
15+
Azure Private 5G Core is an Azure cloud service for deploying and managing 5G core network functions on an Azure Stack Edge device, as part of an on-premises private mobile network for enterprises. This quickstart describes how to use an Azure CLI to deploy the following.
16+
17+
- A private mobile network.
18+
- A site.
19+
- The default service and SIM policy (as described in [Default service and SIM policy](default-service-sim-policy.md)).
20+
- Optionally, one or more SIMs, and a SIM group.
21+
22+
[!INCLUDE [azure-cli-prerequisites-include.md](../../includes/azure-cli-prerequisites-include.md)]
23+
24+
## Prerequisite: Prepare to deploy a private mobile network and site
25+
26+
- [Complete the prerequisite tasks for deploying a private mobile network](complete-private-mobile-network-prerequisites.md) and [Commission the AKS cluster](commission-cluster.md).
27+
- Ensure you can sign in to the Azure portal using an account with access to the active subscription you identified in [Complete the prerequisite tasks for deploying a private mobile network](complete-private-mobile-network-prerequisites.md). This account must have the built-in Contributor or Owner role at the subscription scope.
28+
- [Collect the required information to deploy a private mobile network](collect-required-information-for-private-mobile-network.md). If you want to provision SIMs, you'll need to prepare a JSON file containing your SIM information, as described in [JSON file format for provisioning SIMs](collect-required-information-for-private-mobile-network.md#json-file-format-for-provisioning-sims).
29+
- Identify the names of the interfaces corresponding to ports 5 and 6 on the Azure Stack Edge Pro device in the site.
30+
- [Collect the required information for a site](collect-required-information-for-a-site.md).
31+
- Refer to the release notes for the current version of packet core, and whether it's supported by the version your Azure Stack Edge (ASE) is currently running. If your ASE version is incompatible with the latest packet core, [update your Azure Stack Edge Pro GPU](../databox-online/azure-stack-edge-gpu-install-update.md).
32+
33+
## Azure CLI commands used in this article
34+
35+
- [az mobile-network create](/cli/azure/mobile-network#az-mobile-network-create)
36+
- [az mobile-network site create](/cli/azure/mobile-network/site#az-mobile-network-site-create)
37+
- [az mobile-network pccp create](/cli/azure/mobile-network/pccp#az-mobile-network-pccp-create)
38+
- [az mobile-network pcdp create](/cli/azure/mobile-network/pcdp#az-mobile-network-pcdp-create)
39+
- [az mobile-network data-network create](/cli/azure/mobile-network/data-network#az-mobile-network-data-network-create)
40+
- [az mobile-network sim group create](/cli/azure/mobile-network/sim/group#az-mobile-network-sim-group-create)
41+
- [az mobile-network slice create](/cli/azure/mobile-network/slice#az-mobile-network-slice-create)
42+
- [az mobile-network service create](/cli/azure/mobile-network/service#az-mobile-network-service-create)
43+
- [az mobile-network sim policy create](/cli/azure/mobile-network/sim/policy#az-mobile-network-sim-policy-create)
44+
- [az mobile network sim create](/cli/azure/mobile-network/sim#az-mobile-network-sim-create)
45+
- [az mobile-network attached-data-network create](/cli/azure/mobile-network/attached-data-network#az-mobile-network-attached-data-network-create)
46+
47+
[!INCLUDE [cli-launch-cloud-shell-sign-in.md](../../includes/cli-launch-cloud-shell-sign-in.md)]
48+
49+
## Deploy a private mobile network, site and SIM
50+
51+
You must complete the following steps in order to successfully deploy a private mobile network, site and SIM. Each step must be fully complete before proceeding to the next.
52+
53+
### Create a Mobile Network resource
54+
55+
Use `az mobile-network create` to create a new **Mobile Network** resource. The example command uses the following placeholder values, replace them with the information gathered in [Prerequisite: Prepare to deploy a private mobile network and site](#prerequisite-prepare-to-deploy-a-private-mobile-network-and-site).
56+
57+
|Placeholder|Value|
58+
|-|-|
59+
| `<MOBILENETWORK>` | Enter a name for the private mobile network. |
60+
| `<RESOURCEGROUP>` | Enter the name of the resource group. |
61+
62+
```azurecli
63+
az mobile-network create --location eastus -n <MOBILENETWORK> -g <RESOURCEGROUP> --identifier mcc=001 mnc=01
64+
```
65+
66+
### Create a Site resource
67+
68+
Use `az mobile-network site` to create a new **Site** resource. The example command uses the following placeholder values, replace them with the information gathered in [Prerequisite: Prepare to deploy a private mobile network and site](#prerequisite-prepare-to-deploy-a-private-mobile-network-and-site).
69+
70+
|Placeholder|Value|
71+
|-|-|
72+
| `<MOBILENETWORK>` | Enter the name of the private mobile network you created. |
73+
| `<SITE>` | Enter the name for the site. |
74+
| `<RESOURCEGROUP>` | Enter the name of the resource group. |
75+
76+
```azurecli
77+
az mobile-network site create --mobile-network-name <MOBILENETWORK> -n <SITE> -g <RESOURCEGROUP>
78+
```
79+
80+
### Create a Packet Core Control Plane resource
81+
82+
Use `az mobile-network pccp create` to create a new **Packet Core Control Plane** resource. The example command uses the following placeholder values, replace them with the information gathered in [Prerequisite: Prepare to deploy a private mobile network and site](#prerequisite-prepare-to-deploy-a-private-mobile-network-and-site).
83+
84+
|Placeholder|Value|
85+
|-|-|
86+
| `<ASE>` | Enter the name of the ASE. |
87+
| `<CUSTOMLOCATION>` | Enter the name of the custom location. |
88+
| `<MOBILENETWORK>` | Enter the name of the mobile network. |
89+
| `<RESOURCEGROUP>` | Enter the name of the resource group. |
90+
| `<CONTROLPLANE>` | Enter the name for the packet core control plane. |
91+
| `<SITE>` | Enter the name of the site. |
92+
| `<IPV4ADDRESS>` | Enter the IPv4 address of the site. |
93+
94+
Obtain the ASE ID and assign it to a variable.
95+
96+
```azurecli
97+
ASE_ID=$(databoxedge device show --device-name <ASE> -g <RESOURCEGROUP> --query "id")
98+
```
99+
100+
Obtain the custom location ID and assign it to a variable.
101+
102+
```azurecli
103+
CUSTOM_LOCATION_ID=$(customlocation show --name <CUSTOMLOCATION> -g <RESOURCEGROUP> --query "id")
104+
```
105+
106+
Obtain the site ID and assign it to a variable.
107+
108+
```azurecli
109+
SITE_ID=$(mobile-network site show --mobile-network-name <MOBILENETWORK> -g <RESOURCEGROUP> -n <SITE> --query "id")
110+
```
111+
112+
Create the packet core control plane.
113+
114+
```azurecli
115+
az mobile-network pccp create -n <CONTROLPLANE> -g <RESOURCEGROUP> --access-interface name=N2 ipv4Address=<IPV4ADDRESS> --local-diagnostics authentication-type=Password --platform type=AKS-HCI azure-stack-edge-device="{id:$ASE_ID}" customLocation="{id:$CUSTOM_LOCATION_ID}" --sites "[{id:$SITE_ID}]" --sku G0 --location eastus
116+
```
117+
118+
### Create a Packet Core Data Plane resource
119+
120+
Use `az mobile-network pcdp create` to create a new **Packet Core Data Plane** resource. The example command uses the following placeholder values, replace them with the information gathered in [Prerequisite: Prepare to deploy a private mobile network and site](#prerequisite-prepare-to-deploy-a-private-mobile-network-and-site).
121+
122+
|Placeholder|Value|
123+
|-|-|
124+
| `<DATAPLANE>` | Enter the name for the data plane. |
125+
| `<RESOURCEGROUP>` | Enter the name of the resource group. |
126+
| `<CONTROLPLANE>` | Enter the name of the packet core control plane. |
127+
128+
```azurecli
129+
az mobile-network pcdp create -n <DATAPLANE> -g <RESOURCEGROUP> --pccp-name <CONTROLPLANE> --access-interface name=N3
130+
```
131+
132+
### Create a Data Network
133+
134+
Use `az mobile-network data-network create` to create a new **Data Network** resource. The example command uses the following placeholder values, replace them with the information gathered in [Prerequisite: Prepare to deploy a private mobile network and site](#prerequisite-prepare-to-deploy-a-private-mobile-network-and-site).
135+
136+
|Placeholder|Value|
137+
|-|-|
138+
| `<DATANETWORK>` | Enter the name for the data network. |
139+
| `<RESOURCEGROUP>` | Enter the name of the resource group. |
140+
| `<MOBILENETWORK>` | Enter the name of the private mobile network. |
141+
142+
```azurecli
143+
az mobile-network data-network create -n <DATANETWORK> -g <RESOURCEGROUP> --mobile-network-name <MOBILENETWORK> --location eastus
144+
```
145+
146+
### Create a SIM Group
147+
148+
Use `az mobile-network sim group create` to create a new **Packet Core Data Plane** resource. The example command uses the following placeholder values, replace them with the information gathered in [Prerequisite: Prepare to deploy a private mobile network and site](#prerequisite-prepare-to-deploy-a-private-mobile-network-and-site).
149+
Use `` to create a new **SIM Group**. The example command uses the following placeholder values, replace them with the information gathered in [Prerequisite: Prepare to deploy a private mobile network and site](#prerequisite-prepare-to-deploy-a-private-mobile-network-and-site).
150+
151+
|Variable|Placeholder|Value|
152+
|-|-|
153+
| `<MOBILENETWORK>` | Enter the name of the private mobile network. |
154+
| `<SIMGROUP>` | Enter the name for the sim group. |
155+
| `<RESOURCEGROUP>` | Enter the name of the resource group. |
156+
157+
Obtain the mobile network ID and assign it to a variable.
158+
159+
```azurecli
160+
NETWORK_ID=$(mobile-network show --mobile-network-name <MOBILENETWORK> -g <RESOURCEGROUP> --query "id")
161+
```
162+
163+
Create the SIM group.
164+
165+
```azurecli
166+
az mobile-network sim group create -n <SIMGROUP> -g <RESOURCEGROUP> --mobile-network "{id:$NETWORK_ID}"
167+
```
168+
169+
### Create a Slice
170+
171+
Use `az mobile-network slice create` to create a new **Slice**. The example command uses the following placeholder values, replace them with the information gathered in [Prerequisite: Prepare to deploy a private mobile network and site](#prerequisite-prepare-to-deploy-a-private-mobile-network-and-site).
172+
173+
|Placeholder|Value|
174+
|-|-|
175+
| `<MOBILENETWORK>` | Enter the name for the private mobile network. |
176+
| `<RESOURCEGROUP>` | Enter the name of the resource group. |
177+
| `<SLICE>` | Enter the name of the slice. |
178+
179+
```azurecli
180+
az mobile-network slice create --mobile-network-name <MOBILENETWORK> -n <SLICE> -g <RESOURCEGROUP> --snssai "{sst:1,sd:123abc}"
181+
```
182+
183+
### Create a Service
184+
185+
Use `az mobile-network service create` to create a new **Service**. The example command uses the following placeholder values, replace them with the information gathered in [Prerequisite: Prepare to deploy a private mobile network and site](#prerequisite-prepare-to-deploy-a-private-mobile-network-and-site).
186+
187+
|Placeholder|Value|
188+
|-|-|
189+
| `<SERVICE>` | Enter the name of the service. |
190+
| `<MOBILENETWORK>` | Enter the name for the private mobile network. |
191+
| `<RESOURCEGROUP>` | Enter the name of the resource group. |
192+
193+
```azurecli
194+
az mobile-network service create -n <SERVICE> -g <RESOURCEGROUP> --mobile-network-name <MOBILENETWORK> --pcc-rules "[{ruleName:default-rule,rulePrecedence:10,serviceDataFlowTemplates:[{templateName:IP-to-server,direction:Uplink,protocol:[ip],remoteIpList:[10.3.4.0/24]}]}]" --service-precedence 10
195+
```
196+
197+
### Create a SIM Policy
198+
199+
Use `az mobile-network sim policy create` to create a new **SIM Policy**. The example command uses the following placeholder values, replace them with the information gathered in [Prerequisite: Prepare to deploy a private mobile network and site](#prerequisite-prepare-to-deploy-a-private-mobile-network-and-site).
200+
201+
|Placeholder|Value|
202+
|-|-|
203+
| `<SLICE>` | Enter the name of the slice. |
204+
| `<DATANETWORK>` | Enter the name of the data network. |
205+
| `<SERVICE>` | Enter the name of the service. |
206+
| `<RESOURCEGROUP>` | Enter the name of the resource group. |
207+
| `<SIMPOLICY>` | Enter the name for the SIM policy. |
208+
| `<MOBILENETWORK>` | Enter the name for the private mobile network. |
209+
210+
Obtain the slice ID and assign it to a variable.
211+
212+
```azurecli
213+
SLICE_ID=$(mobile-network slice show --mobile-network-name <MOBILENETWORK> -g <RESOURCEGROUP> -n <SLICE> --query "id")
214+
```
215+
216+
Obtain the data network ID and assign it to a variable.
217+
218+
```azurecli
219+
DATANETWORK_ID=$(mobile-network data-network show -n <DATANETWORK> --mobile-network-name <MOBILENETWORK> -g <RESOURCEGROUP> --query "id")
220+
```
221+
222+
Obtain the service ID and assign it to a variable.
223+
224+
```azurecli
225+
SERVICE_ID=$(mobile-network service show -n <SERVICE> --mobile-network-name <MOBILENETWORK> -g <RESOURCEGROUP> --query "id")
226+
```
227+
228+
Create the SIM policy.
229+
230+
```azurecli
231+
az mobile-network sim policy create -g <RESOURCEGROUP> -n <SIMPOLICY> --mobile-network-name <MOBILENETWORK> --default-slice '{id:$SLICE_ID}' --slice-config "[{slice:{id:$SLICE_ID},defaultDataNetwork:{id:$DATANETWORK_ID},dataNetworkConfigurations:[{dataNetwork:{id:$DATANETWORK_ID},allowedServices:[{id:$SERVICE_ID}],sessionAmbr:{uplink:'500 Mbps',downlink:'1 Gbps'}}]}]" --ue-ambr "{uplink:'500 Mbps',downlink:'1 Gbps'}" --location eastus
232+
```
233+
234+
### Create a SIM
235+
236+
Use `` to create a new **SIM**. The example command uses the following placeholder values, replace them with the information gathered in [Prerequisite: Prepare to deploy a private mobile network and site](#prerequisite-prepare-to-deploy-a-private-mobile-network-and-site).
237+
238+
|Placeholder|Value|
239+
|-|-|
240+
| `<SIMGROUP>` | Enter the name of the SIM group. |
241+
| `<SIM> ` | Enter the name for the SIM. |
242+
| `<RESOURCEGROUP>` | Enter the name of the resource group. |
243+
244+
```azurecli
245+
az mobile-network sim create -g <RESOURCEGROUP> --sim-group-name <SIMGROUP> -n <SIM> --international-msi 0000000000 --operator-key-code 00000000000000000000000000000000 --authentication-key 00000000000000000000000000000000
246+
```
247+
248+
### Attach the Data Network
249+
250+
Use `az mobile-network attached-data-network create` to attach the **Data Network** you created. The example command uses the following placeholder values, replace them with the information gathered in [Prerequisite: Prepare to deploy a private mobile network and site](#prerequisite-prepare-to-deploy-a-private-mobile-network-and-site).
251+
252+
|Placeholder|Value|
253+
|-|-|
254+
| `<DATANETWORK>` | Enter the name for the data network. |
255+
| `<CONTROLPLANE>` | Enter the name of the packet core control plane. |
256+
| `<DATAPLANE>` | Enter the name of the packet core data plane. |
257+
| `<RESOURCEGROUP>` | Enter the name of the resource group. |
258+
259+
```azurecli
260+
az mobile-network attached-data-network create -n <DATANETWORK> -g <RESOURCEGROUP> --pccp-name <CONTROLPLANE> --pcdp-name <DATAPLANE> --dns-addresses "[1.1.1.1]" --data-interface name=N6 --address-pool 192.168.1.0/24
261+
```
262+
263+
## Clean up resources
264+
265+
If you do not want to keep your deployment, [delete the resource group](../azure-resource-manager/management/delete-resource-group.md?tabs=azure-portal#delete-resource-group).
266+
267+
## Next steps
268+
269+
If you have kept your deployment, you can either begin designing policy control to determine how your private mobile network handles traffic, or you can add more sites to your private mobile network.
270+
271+
- [Learn more about designing the policy control configuration for your private mobile network](policy-control.md).
272+
- [Collect the required information for a site](collect-required-information-for-a-site.md).

0 commit comments

Comments
 (0)