This script streamlines and automates the process of preparing Azure Stack Edge (ASE) for use with Azure Private 5G Core ('AP5GC'). The script supports Azure Stack Edge Pro and Azure Stack Edge Pro 2, running ASE software versions 2309, 2312 and 2403 only. It supports singleton installations of AP5GC. Also, this does not support any Trunk vlan configuration on the ASE.
- Takes in all input parameters (IP's, number of DNN's, subID, tenantID, ASE password, MTU, vlan, interface names etc) in a single Excel file from the 'Datafill' worksheet.
- A 'Diagram' worksheet in the same Excel is populated with the values from 'Datafill' worksheet to provide a pictoral view of the Private Network core infrastructure.
- Sets up the ASE with all the IP commissioning in Advanced Networking (vswitches, vnetworks) and Kubernetes sections.
- Adds the OID for your subscription to the ASE.
- Creates the Microsoft K8s cluster (Azure Kubernetes Service).
- Connects the Kubernetes cluster to Azure via Arc (Azure Kubernetes Arc).
- Adds the required extensions of networkfunction-operator and packet-core-monitor.
- Creates a custom location for the ASE.
- Creates an empty new Resource Group as a placeholder for AP5GC resources.
- Applies the steps in Azure Private 5G Core documentation: Commission the AKS cluster via automation.
- The inputs to be given in excel format & validations of input will be done as part of the script.
-
A Windows laptop. You will need Administrator rights over your machine. Make sure that Excel is installed.
-
PowerShell 5.x. (Other versions of PowerShell are not supported.) You may already have it installed: run PowerShell from the Start menu and use the
$PSVersionTable
command to verify the version. -
The ImportExcel and Azure Resources (az.Resources) Powershell modules. To verify, run PowerShell as an Administrator and then execute the following:
Get-Module -Name Az.Resources -list Get-Module -Name ImportExcel -list
If the module is installed, the version will be displayed; otherwise, no output is produced. To install them, run PowerShell as an Administrator and then execute the following, exiting and restarting your PowerShell session afterwards:
Install-Module -Name Az.Resources -AllowClobber -Scope CurrentUser Install-Module -Name ImportExcel -AllowClobber -Scope CurrentUser
-
Remote execution support between your PC and ASE. Run PowerShell as an Administrator and execute:
winrm quickconfig
. If remote execution support is not already enabled, you will be prompted to enable it.If
winrm
returns errors regarding Public interfaces being used, change them to private: from your Powershell console run:Get-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory Private
Note: after using this script, you can disable remote execution via the commands:
Stop-Service winrm Set-Service -Name winrm -StartupType Disabled
-
Install the Azure CLI tools on your PC, following the instructions to install Azure CLI on Windows. We suggest choosing the 64-bit MSI installation.
-
Azure: You will need access to the subscription used for your Azure Stack Edge device. You must have Ownership privileges on this subscription.
-
Your Azure subscription should have been explicitly authorized by Microsoft for AP5GC usage, so that you can later deploy AP5GC (outside of scope here).
-
You should create a Resource Group (RG) for the ASE, and ensure your have Owner permissions on it, before using the script.
- Clone or download this repo to your laptop.
- Grant permission to run the script. Run PowerShell as an Administrator, navigate to where the script is present and unblock the script using:
Unblock-File PowerShellBasedConfiguration.psm1
- In case your laptop does not have permissions to execute powershell scripts, the Set-ExecutionPolicy cmdlet changes PowerShell execution policies for Windows computers. Run this inside your PowerShell terminal:
Set-ExecutionPolicy Unrestricted -Scope CurrentUser
- Complete all of the steps mentioned under Order and set up your Azure Stack Edge Pro device(s).
- Verify that your laptop has access to the ASE's IP address over the management/OAM port, for example, by pointing a web browser at the IP.
- Confirm that your ASE has Certificates generated, Activated and in the Kubernetes (Preview) section you have enabled the "an Azure Private MEC solution in your environment" option.
- IMPORTANT: After selecting "an Azure Private MEC solution in your environment", you might require to upgrade the ASE K8s firmware again before running the script if that box was unchecked.
- Check that on the Azure portal, under the ASE Resource, you do not have any unresolved prompts or warnings, such as recommendations to upgrade ASE software. If you do, please follow the steps to perform the necessary ASE firmware upgrades.
- Fill in all your parameters in the Excel file:
parameters_file_single_ASE_AP5GC
. - Save the file and close Excel.
- Open PowerShell as an Adminstrator, and navigate to the location of the script.
- In the same session, run:
az login
. Select the appropriate tenant ID in the browser pop up and sign in. - Execute the PowerShell script:
(A browser prompt may request that you log in to your tenant - this is for the Az cmdlet.)
.\one_script_single_ASE.ps1
Typically, all the ASE resources should be deployed within 35-45 minutes.