diff --git a/README.md b/README.md index 9bc2c00..a3264f8 100644 --- a/README.md +++ b/README.md @@ -23,15 +23,15 @@ Deploying MATLAB Web App Server on Azure automatically deploys a network license To deploy the reference architecture, select your MATLAB Web App Server release from the table and follow the instructions to deploy the server using the provided template. | Release | Supported MATLAB Runtime Versions | | ------- | --------------------------------- | +| [R2025a](releases/R2025a/README.md) | R2025a, R2024b, R2024a, R2023b, R2023a*, R2022b* | | [R2024b](releases/R2024b/README.md) | R2024b, R2024a, R2023b, R2023a*, R2022b*, R2022a* | | [R2024a](releases/R2024a/README.md) | R2024a, R2023b, R2023a, R2022b, R2022a, R2021b | | [R2023b](releases/R2023b/README.md) | R2023b, R2023a, R2022b, R2022a, R2021b | | [R2023a](releases/R2023a/README.md) | R2023a, R2022b, R2022a, R2021b, R2021a, R2020b | | [R2022b](releases/R2022b/README.md) | R2022b, R2022a, R2021b, R2021a, R2020b, R2020a | -| [R2022a](releases/R2022a/README.md) | R2022a, R2021b, R2021a, R2020b, R2020a, R2019b | > [!WARNING] -> \*When the server is configured to use MATLAB Runtime versions prior to R2023b, the `unsafe-inline` attribute is set in the `script-src` directive of the server's Content Security Policy on the server and cannot be removed. The attribute allows inline JavaScript execution and event handlers contained within a web app to execute on the server. These runtimes are disabled by default in R2024b. You can enable them using the [webapps-runtime](https://www.mathworks.com/help/webappserver/ref/webappsruntime.html) command. +> \*When the server is configured to use MATLAB Runtime versions prior to R2023b, the `unsafe-inline` attribute is set in the `script-src` directive of the server's Content Security Policy on the server and cannot be removed. The attribute allows inline JavaScript execution and event handlers contained within a web app to execute on the server. These runtimes are disabled by default starting in R2024b. You can enable them using the [webapps-runtime](https://www.mathworks.com/help/webappserver/ref/webappsruntime.html) command. MathWorks provides templates for only the six most recent releases of MATLAB Web App Server. Earlier templates are removed and are no longer supported. @@ -68,20 +68,9 @@ If you are deploying a new network license manager, the following resources will # FAQ ## How do I deploy to an existing virtual network? >**Note:** Your existing virtual network must have at least two available subnets for deployment. -1. To deploy MATLAB Web App Server to an existing virtual network, set the **Deploy to New or Existing Virtual Network** paratmeter to `existing`. -1. Set the following parameter values in the template based on your existing virtual network and open the ports listed below. - -| Parameter Name | Value | -|-------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **Resource Group Name of Virtual Network** | Specify the name of the Azure resource group that has your existing virtual network. | -| **Name of Virtual Network Where MATLAB Web App Server Will Be Deployed** | Specify the name of the existing virtual network where the server will be deployed. | -| **Virtual Network CIDR Range** | Specify existing virtual network CIDR range. | -| **Name of Subnet for MATLAB Web App Server** | Specify the name of a subnet within the existing virtual network that the server can use. | -| **Server Subnet CIDR Range** | Specify existing virtual network subnet CIDR range. | -| **Specify Private IP Address to VM Hosting MATLAB Web App Server** | Specify a private IP address to the VM hosting the server. For example: 10.0.0.4 . | - -### **Ports to Open in Existing Virtual Network** +### Ports to Open in Existing Virtual Network +If you are deploying MATLAB Web App Server to an existing virtual network, you must open the following ports in your virtual network: | Port | Description | |------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `443` | HTTPS - the port Web App Server will service if SSL is enabled | @@ -89,14 +78,41 @@ If you are deploying a new network license manager, the following resources will | `3389` | RDP - used for remoting into Windows machines | | `27000` | Required for communication between network license manager and Web App Server | +### Create Service Endpoint in Virtual Network (Since R2025a) +Starting in R2025a, if you are using an existing virtual network and assign a public IP address to the VM hosting MATLAB Web App Server, then you must manually add a service endpoint to the virtual network *before* deploying MATLAB Web App Server in order to create and access the storage account. For more details, see [Grant access from a virtual network](https://learn.microsoft.com/en-us/azure/storage/common/storage-network-security?tabs=azure-portal#grant-access-from-a-virtual-network) in the Microsoft Azure documentation. + +You can check if such an endpoint already exists by navigating to the Azure Portal, selecting your virtual network, and clicking **Service endpoints**. If no such endpoint is present, follow these steps: +1. In the Azure Portal, click **Resource groups** and select the virtual network for this deployment. +1. In the left navigation menu, expand the **Settings** category and click **Service endpoints**. +1. Click **Add** to add the new endpoint. It must have the following parameters: + + + + +
ServiceMicrosoft.Storage
SubnetName of subnet in which the storage account will be deployed
+For more information on creating endpoints, see [Create and associate service endpoint policies](https://learn.microsoft.com/en-us/azure/virtual-network/virtual-network-service-endpoint-policies). + +### Deploy to Existing Virtual Network +To deploy MATLAB Web App Server to an existing virtual network, in the deployment template, set the **Deploy to New or Existing Virtual Network** parameter to `existing`. + +Set the following parameter values in the template based on your existing virtual network. + +| Parameter Name | Value | +|-------------------|-----------| +| **Resource Group Name of Virtual Network** | Specify the name of the Azure resource group that has your existing virtual network. | +| **Name of Virtual Network Where MATLAB Web App Server Will Be Deployed** | Specify the name of the existing virtual network where the server will be deployed. | +| **Virtual Network CIDR Range** | Specify existing virtual network CIDR range. | +| **Name of Subnet for MATLAB Web App Server** | Specify the name of a subnet within the existing virtual network that the server can use. | +| **Server Subnet CIDR Range** | Specify existing virtual network subnet CIDR range. | +| **Specify Private IP Address to VM Hosting MATLAB Web App Server** | Specify a private IP address to the VM hosting the server. For example: 10.0.0.4 . | ## How do I configure OIDC authentication? 1. To use OIDC authentication on the server, you need to register with an IdP such as Microsoft® Azure® AD, or Google® Identity Platform. MATLAB Web App Server must be registered as an application with the IdP. 1. During the registration process, you need a redirect URL for MATLAB Web App Server. The format of the URL is: `https://:/webapps/extauth/callback`. For example: `https://example.com:9988/webapps/extauth/callback`. 1. Create a file named `webapps_authn.json` using the JSON schema specified [here](https://www.mathworks.com/help/webappserver/ug/authentication.html#mw_908077ba-725e-4cc9-a906-a1bf29fceaf8) and place it in the `webapps_private` folder of the server. For folder location, see the [doc](https://www.mathworks.com/help/webappserver/ug/authentication.html#mw_146e67b0-5dff-4310-8d5d-544250e931a9). 1. To place the `webapps_authn.json` file in the `webapps_private` folder of the server, you need to remotely connect to the server using RDP on Windows or SCP on Linux. Once connected, you can drag-and-drop the `webapps_authn.json` file you created into the `webapps_private` folder of the server. Alternatively, you can drop the file into the file share first, before moving it to the `webapps_private` folder. -1. Restart the server by executing `webapps-restart` from a terminal on the the server machine. The `webapps-restart` command is located in the `script` folder within the default installation location. For default location, see the [doc](https://www.mathworks.com/help/webappserver/ug/set-up-matlab-web-app-server.html#responsive_offcanvas). +1. Restart the server by executing `webapps-restart` from a terminal on the server machine. The `webapps-restart` command is located in the `script` folder within the default installation location. For default location, see the [doc](https://www.mathworks.com/help/webappserver/ug/set-up-matlab-web-app-server.html#responsive_offcanvas). ## How do I remotely connect to the server virtual machine? ### Windows Virtual Machine diff --git a/releases/R2022a/templates/azuredeploy-existing-vnet-R2022a.json b/releases/R2022a/templates/azuredeploy-existing-vnet-R2022a.json deleted file mode 100644 index 40233d5..0000000 --- a/releases/R2022a/templates/azuredeploy-existing-vnet-R2022a.json +++ /dev/null @@ -1,330 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "instanceType": { - "type": "string", - "defaultValue": "Standard_B1ms", - "minLength": 1, - "metadata": { - "description": "Azure instance type, see https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes." - } - }, - "clientIPAddress": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "The IP address range that can be used access the license manager. This must be a valid IP CIDR range of the form x.x.x.x/x. Use the value <your_public_ip_address>/32 to restrict access to only your computer." - } - }, - "adminUsername": { - "defaultValue": "manager", - "minLength": 7, - "type": "String", - "metadata": { - "description": "Admin username, this is used to login to the Network License Manager for MATLAB dashboard." - } - }, - "adminPassword": { - "type": "securestring", - "metadata": { - "description": "Admin password for the chosen username. This is used to login to the Network License Manager for MATLAB dashboard." - } - }, - "virtualNetworkResourceID": { - "type": "string", - "metadata": { - "description": "The Resource ID of an existing virtual network to deploy your server into. Specify this parameter only when deploying with the Existing Virtual Network option." - } - }, - "subnetName": { - "type": "string", - "metadata": { - "description": "The name of an existing subnet within your virtual network to deploy your server into. Specify this parameter only when deploying with the Existing Virtual Network option." - } - } - }, - "variables": { - "clientIPAddress": "[split(parameters('clientIPAddress'), ',')]", - "namingPrefix": "netlm", - "artifactsBase": "C:/Windows/Temp/", - "addressPrefix": "10.0.0.0/16", - "subnetPrefix": "10.0.0.0/24", - "newOrExistingVirtualNetwork": "Existing", - "virtualNetworkCreateName": "[concat(variables('namingPrefix'), '-vnet')]", - "subnetCreateName": "[concat(variables('namingPrefix'), '-subnet')]", - "virtualNetworkName": "[if(equals(variables('newOrExistingVirtualNetwork'),'Existing'),last(split(parameters('virtualNetworkResourceID'),'/')),variables('virtualNetworkCreateName'))]", - "subnetName": "[if(equals(variables('newOrExistingVirtualNetwork'),'Existing'),parameters('subnetName'),variables('subnetCreateName'))]", - "subnetRef": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), variables('subnetName'))]", - "subnetId": "[if(equals(variables('newOrExistingVirtualNetwork'),'New'),variables('subnetRef'),concat(parameters('virtualNetworkResourceID'), '/subnets/', parameters('subnetName')))]", - "cuaTrackingNum": "pid-3519fce2-01d2-4019-90dc-b6566eacbe89-partnercenter", - "serverMachineName": "[concat(take(variables('namingPrefix'), 8), '-server')]", - "publisher": "mathworks-inc", - "offer": "license-manager-ref-arch-win", - "sku": "license-manager-ref-arch-win-sku-r2022a", - "version": "latest", - "imageReference": { - "publisher": "[variables('publisher')]", - "offer": "[variables('offer')]", - "sku": "[variables('sku')]", - "version": "[variables('version')]" - }, - "plan": { - "name": "[variables('sku')]", - "publisher": "[variables('publisher')]", - "product": "[variables('offer')]" - }, - "serverIPName": "[concat(variables('serverMachineName'), '-ip')]", - "dnsLabelPrefix": "[concat('azure-', uniqueString(resourceGroup().id))]", - "publicIpTimeout": "20", - "networkSecurityGroupName": "[concat(variables('namingPrefix'), '-nsg')]", - "serverNICName": "[concat(variables('serverMachineName'), '-nic')]", - "serverIPConfigName": "[concat(variables('serverMachineName'), '-ipconfig')]", - "scriptsUrl": "C:/Windows/Temp/", - "startScript": "startserver.ps1", - "fileUris": [ - "[concat(variables('scriptsUrl'), variables('startScript'))]" - ], - "scriptExe": "[concat(variables('artifactsBase'), variables('startScript'))]", - "installCommand": "[concat('powershell -ExecutionPolicy Unrestricted -File ', variables('scriptExe'))]", - "tagsForAll": { - "provider": "[variables('cuaTrackingNum')]" - } - }, - "resources": [ - { - "name": "[variables('virtualNetworkName')]", - "type": "Microsoft.Network/virtualNetworks", - "apiVersion": "2022-05-01", - "location": "[resourceGroup().location]", - "tags": "[variables('tagsForAll')]", - "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('addressPrefix')]" - ] - }, - "subnets": [ - { - "name": "[variables('subnetCreateName')]", - "properties": { - "addressPrefix": "[variables('subnetPrefix')]" - } - } - ] - }, - "condition": "[equals(variables('newOrExistingVirtualNetwork'),'New')]" - }, - { - "name": "[variables('serverIPName')]", - "type": "Microsoft.Network/publicIPAddresses", - "apiVersion": "2022-05-01", - "location": "[resourceGroup().location]", - "tags": "[variables('tagsForAll')]", - "properties": { - "publicIPAllocationMethod": "Static", - "dnsSettings": { - "domainNameLabel": "[concat(variables('serverMachineName'), variables('dnsLabelPrefix'))]" - }, - "idleTimeoutInMinutes": "[variables('publicIpTimeout')]" - } - }, - { - "name": "[variables('networkSecurityGroupName')]", - "type": "Microsoft.Network/networkSecurityGroups", - "apiVersion": "2022-05-01", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]" - ], - "tags": "[variables('tagsForAll')]", - "properties": { - "securityRules": [ - { - "name": "default-allow-rdp", - "properties": { - "priority": 1000, - "sourceAddressPrefixes": "[variables('clientIPAddress')]", - "protocol": "Tcp", - "destinationPortRange": "3389", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - }, - { - "name": "allow-https", - "properties": { - "priority": 1010, - "sourceAddressPrefixes": "[variables('clientIPAddress')]", - "protocol": "Tcp", - "destinationPortRange": "443", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - }, - { - "name": "allow-netlm", - "properties": { - "priority": 1020, - "sourceAddressPrefixes": "[variables('clientIPAddress')]", - "protocol": "Tcp", - "destinationPortRange": "27000-27010", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - }, - { - "name": "allow-internal-traffic", - "properties": { - "priority": 1030, - "sourceAddressPrefix": "VirtualNetwork", - "protocol": "Tcp", - "destinationPortRange": "*", - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "VirtualNetwork" - } - }, - { - "name": "allow-ssh", - "properties": { - "description": "allow-ssh", - "protocol": "TCP", - "sourcePortRange": "*", - "destinationPortRange": "22", - "sourceAddressPrefixes": "[variables('clientIPAddress')]", - "destinationAddressPrefix": "*", - "access": "Allow", - "priority": 1040, - "direction": "Inbound", - "sourcePortRanges": [], - "destinationPortRanges": [], - "destinationAddressPrefixes": [] - } - } - ] - } - }, - { - "name": "[variables('serverNICName')]", - "type": "Microsoft.Network/networkInterfaces", - "apiVersion": "2022-05-01", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.Network/publicIpAddresses', variables('serverIPName'))]", - "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]" - ], - "tags": "[variables('tagsForAll')]", - "properties": { - "ipConfigurations": [ - { - "name": "[variables('serverIPConfigName')]", - "properties": { - "subnet": { - "id": "[variables('subnetId')]" - }, - "privateIPAllocationMethod": "Dynamic", - "publicIpAddress": { - "id": "[resourceId('Microsoft.Network/publicIpAddresses', variables('serverIPName'))]" - } - } - } - ], - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]" - } - } - }, - { - "name": "[variables('serverMachineName')]", - "type": "Microsoft.Compute/virtualMachines", - "apiVersion": "2022-08-01", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.Network/networkInterfaces', variables('serverNICName'))]" - ], - "tags": "[variables('tagsForAll')]", - "plan": "[variables('plan')]", - "properties": { - "osProfile": { - "computerName": "[variables('serverMachineName')]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]", - "windowsConfiguration": { - "provisionVmAgent": "true" - } - }, - "hardwareProfile": { - "vmSize": "[parameters('instanceType')]" - }, - "storageProfile": { - "imageReference": "[variables('imageReference')]", - "osDisk": { - "createOption": "fromImage", - "managedDisk": { - "storageAccountType": "Premium_LRS" - } - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('serverNICName'))]" - } - ] - } - } - }, - { - "name": "[concat(variables('serverMachineName'), '/Installation')]", - "type": "Microsoft.Compute/virtualMachines/extensions", - "apiVersion": "2022-08-01", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[resourceId('Microsoft.Compute/virtualMachines', variables('serverMachineName'))]" - ], - "tags": "[variables('tagsForAll')]", - "properties": { - "publisher": "Microsoft.Compute", - "type": "CustomScriptExtension", - "typeHandlerVersion": "1.5", - "autoUpgradeMinorVersion": true, - "settings": { - "fileUris": "[variables('fileUris')]" - }, - "protectedSettings": { - "commandToExecute": "[concat(variables('installCommand'),' -DNS ', reference(variables('serverIPName')).dnsSettings.fqdn)]" - } - } - }, - { - "name": "pid-3519fce2-01d2-4019-90dc-b6566eacbe89-partnercenter", - "type": "Microsoft.Resources/deployments", - "apiVersion": "2020-10-01", - "dependsOn": [ - "[resourceId('Microsoft.Compute/virtualMachines', variables('serverMachineName'))]" - ], - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - } - ], - "outputs": { - "NetworkLicenseManagerAddress": { - "value": "[concat('https://', reference(variables('serverIPName')).dnsSettings.fqdn)]", - "type": "string" - } - } -} \ No newline at end of file diff --git a/releases/R2022a/templates/mainTemplate.json b/releases/R2022a/templates/mainTemplate.json deleted file mode 100644 index 0332cb8..0000000 --- a/releases/R2022a/templates/mainTemplate.json +++ /dev/null @@ -1,468 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "Server VM Instance Size": { - "defaultValue": "Standard_D4_v3", - "type": "string", - "metadata": { - "description": "Specify the size of the VM you want to use for deploying the server." - } - }, - "Operating System": { - "defaultValue": "Windows", - "allowedValues": [ - "Windows", - "Linux" - ], - "type": "string", - "metadata": { - "description": "Choose between Windows or Linux." - } - }, - "Deploy to New or Existing Virtual Network": { - "defaultValue": "new", - "allowedValues": [ - "new", - "existing" - ], - "type": "string", - "metadata": { - "description": "Select whether you want to deploy the server to a new virtual network or an existing one." - } - }, - "Name of Virtual Network Where MATLAB Web App Server Will Be Deployed": { - "defaultValue": "webapp-refarch-vnet", - "type": "string", - "metadata": { - "description": "Specify the name of the virtual network where the server will be deployed. If deploying to a new virtual network, a new virtual network will created with this name. If deploying to an existing virtual network, this name must match the name of an existing virtual network. For example: webappserver-vnet." - } - }, - "Resource Group Name Of Virtual Network": { - "defaultValue": "[resourceGroup().name]", - "type": "string", - "metadata": { - "description": "Specify the name of the Azure resource group if you are deploying to an existing virtual network. If deploying to a new virtual network, keep the value as default resourceGroup().name, which indicates the resource group of this deployment. If deploying to an existing virtual network, this must match the resource group of the existing virtual network specified. For example: webappserver_rsg." - } - }, - "Virtual Network CIDR Range": { - "defaultValue": "10.0.0.0/16", - "type": "string", - "metadata": { - "description": "Specify the virtual network CIDR range. For example: 10.0.0.0/16 . If deploying to a new virtual network, specify a suitable CIDR range to be used for the new virtual network. If deploying to an existing virtual network, this must match the CIDR range of the existing virtual network specified." - } - }, - "Name of Subnet for MATLAB Web App Server": { - "defaultValue": "default", - "type": "string", - "metadata": { - "description": "Specify the name of the subnet that the server can use. If deploying to a new virtual network, this specifies the name of the subnet to be created in the virtual network. If deploying to an existing virtual network, this must match the name of a subnet in the existing virtual network specified." - } - }, - "Server Subnet CIDR Range": { - "defaultValue": "10.0.0.0/24", - "type": "string", - "metadata": { - "description": "Specify subnet CIDR range. This is a CIDR range for the subnet specified above. For example: 10.0.0.0/24 . If deploying to a new virtual network, specify a suitable CIDR range to be used for the new subnet. If deploying to an existing virtual network, this must match the CIDR range of the existing subnet specified." - } - }, - "Specify Private IP Address to VM Hosting MATLAB Web App Server": { - "type": "string", - "defaultValue": "10.0.0.4", - "metadata": { - "description": "Specify an unused private IP address to be assigned to the VM hosting the server. For example: 10.0.0.4 ." - } - }, - "Assign Public IP Address to VM Hosting MATLAB Web App Server": { - "defaultValue": "Yes", - "allowedValues": [ - "Yes", - "No" - ], - "type": "string", - "metadata": { - "description": "Select whether you want to assign a public IP address to the VM hosting the server." - } - }, - "IP Addresses Permitted to Remote into Server VM in CIDR Notation": { - "type": "string", - "metadata": { - "description": "Specify the range of IP addresses in CIDR notation that can remote into the VM hosting MATLAB Web App Server and administer it. For example: 123.456.789.111/24 . This can be a comma separated list of CIDR ranges (no spaces), i.e. 123.456.789.111/24,123.456.789.111/24 ." - } - }, - "IP Addresses Allowed to Access MATLAB Web App Server Apps Home Page in CIDR Notation": { - "type": "string", - "metadata": { - "description": "Specify the range of IP addresses in CIDR notation that can access the MATLAB Web App Server apps home page. For example: 123.456.789.111/24 . This can be a comma separated list of CIDR ranges (no spaces), i.e. 123.456.789.111/24,123.456.789.111/24 ." - } - }, - "Base64 Encoded SSL Certificate": { - "type": "string", - "metadata": { - "description": "Enter a string that is a base64-encoded value of an SSL certificate in PEM format." - } - }, - "Base64 Encoded SSL Private Key": { - "type": "securestring", - "metadata": { - "description": "Enter a string that is a base64-encoded value of an SSL private key file in PEM format." - } - }, - "Username to Remote into Server VM and Network License Manager Web Interface": { - "type": "string", - "metadata": { - "description": "Specify a username to use when remoting into server VM hosting MATLAB Web App Server. This username is also used to login to the network license manager portal. For example: webappadmin. You cannot use \"admin\" as a username." - } - }, - "Password to Remote into Server VM and Network License Manager Web Interface": { - "type": "securestring", - "metadata": { - "description": "Specify a password to use when remoting into server VM hosting MATLAB Web App Server. This password is also used to login to the network license manager portal." - } - }, - "Deploy Network License Manager For MATLAB": { - "defaultValue": "Yes", - "allowedValues": [ - "Yes", - "No" - ], - "type": "string", - "metadata": { - "description": "Select whether you want to deploy a network license manager or not." - } - } - }, - "variables": { - "providerID": "D36A3EDC-0566-4EE4-86D3-64F20D2DDA06", - "location": "[resourceGroup().location]", - "vmName": "webapp-vm", - "usePublicIPAddresses": "[parameters('Assign Public IP Address to VM Hosting MATLAB Web App Server')]", - "addressPrefix": "[parameters('Virtual Network CIDR Range')]", - "serverPrivateIP": "[parameters('Specify Private IP Address to VM Hosting MATLAB Web App Server')]", - "serverPublicIP": "webapp-public-ip", - "publicIPprop1": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('serverPublicIP'))]" - }, - "webappDNSName": "[concat('webapp',uniqueString(resourceGroup().id))]", - "networkInterfaceName": "webapp-nic", - "virtualNetworkID": "[resourceId(variables('virtualNetworkResourceGroup'), 'Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", - "virtualNetworkResourceGroup": "[parameters('Resource Group Name Of Virtual Network')]", - "virtualNetworkName": "[parameters('Name of Virtual Network Where MATLAB Web App Server Will Be Deployed')]", - "subnetName": "[parameters('Name of Subnet for MATLAB Web App Server')]", - "subnetIP": "[parameters('Server Subnet CIDR Range')]", - "subnetRef": "[resourceId(variables('virtualNetworkResourceGroup'),'Microsoft.Network/virtualNetworks/subnets',variables('virtualNetworkName'),variables('subnetName'))]", - "networkSecurityGroupName": "webapp-nsg", - "adminIP": "[split(parameters('IP Addresses Permitted to Remote into Server VM in CIDR Notation'), ',')]", - "clientIP": "[split(parameters('IP Addresses Allowed to Access MATLAB Web App Server Apps Home Page in CIDR Notation'), ',')]", - "newOrExistingVirtualNetwork": "[parameters('Deploy to New or Existing Virtual Network')]", - "storageAccountName": "[concat('webapp',uniqueString(resourceGroup().id))]", - "storageAccountType": "Standard_LRS", - "platform": "[parameters('Operating System')]", - "WindowsOffer": "matlab-web-app-server-byol-windows", - "WindowsSKU": "matlab-web-app-server-byol-windows-22a", - "WindowsSKUVersion": "latest", - "LinuxOffer": "matlab-web-app-server-byol-linux", - "LinuxSKU": "matlab-web-app-server-byol-linux-22a", - "LinuxSKUVersion": "latest", - "enableSSL": "Yes", - "certFile": "[if(equals(variables('enableSSL'), 'Yes'), parameters('Base64 Encoded SSL Certificate'), 'NONE')]", - "privateKeyFile": "[if(equals(variables('enableSSL'), 'Yes'), parameters('Base64 Encoded SSL Private Key'), 'NONE')]", - "windowsCommand": "[concat('powershell -ExecutionPolicy Unrestricted -File initWindows.ps1 -storageAccountName ', variables('storageAccountName'), ' -resourceGroup ', resourceGroup().name, ' -subscriptionID ', subscription().subscriptionId, ' -enableSSL ', variables('enableSSL'), ' -certFile ', variables('certFile'), ' -privateKeyFile ', variables('privateKeyFile'))]", - "linuxCommand": "[concat('sudo bash ./initLinux.sh -n ', variables('storageAccountName'), ' -f ', resourceGroup().name, ' -k ', subscription().subscriptionId, ' -s ', variables('enableSSL'), ' -c ', variables('certFile'), ' -p ', variables('privateKeyFile'))]", - "windowsScriptURL": "https://raw.githubusercontent.com/mathworks-ref-arch/matlab-web-app-server-on-azure/main/releases/R2022a/scripts/initWindows.ps1", - "linuxScriptURL": "https://raw.githubusercontent.com/mathworks-ref-arch/matlab-web-app-server-on-azure/main/releases/R2022a/scripts/initLinux.sh", - "roleName": "[guid(resourceGroup().id, deployment().name)]", - "contributor": "[resourceId('Microsoft.Authorization/roleDefinitions/', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]", - "deployNetworkLicenseManager": "[parameters('Deploy Network License Manager For MATLAB')]", - "flex-arm-template-link": "https://raw.githubusercontent.com/mathworks-ref-arch/matlab-web-app-server-on-azure/main/releases/R2022a/templates/azuredeploy-existing-vnet-R2022a.json", - "flex-parameters": { - "instanceType": { - "value": "Standard_D2s_v3" - }, - "clientIPAddress": { - "value": "[parameters('IP Addresses Permitted to Remote into Server VM in CIDR Notation')]" - }, - "adminUsername": { - "value": "[parameters('Username to Remote into Server VM and Network License Manager Web Interface')]" - }, - "adminPassword": { - "value": "[parameters('Password to Remote into Server VM and Network License Manager Web Interface')]" - }, - "virtualNetworkResourceID": { - "value": "[variables('virtualNetworkID')]" - }, - "subnetName": { - "value": "[variables('subnetName')]" - } - } - }, - "resources": [ - { - "type": "Microsoft.Resources/deployments", - "apiVersion": "2021-04-01", - "name": "flex-lm-server", - "dependsOn": [ - "[resourceId('Microsoft.Network/networkInterfaces/',variables('networkInterfaceName'))]", - "[resourceId('Microsoft.Network/virtualNetworks/',variables('virtualNetworkName'))]" - ], - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[variables('flex-arm-template-link')]", - "contentVersion": "1.0.0.0" - }, - "parameters": "[variables('flex-parameters')]" - }, - "condition": "[equals(variables('deployNetworkLicenseManager'), 'Yes')]" - }, - { - "type": "Microsoft.Compute/virtualMachines", - "apiVersion": "2022-03-01", - "name": "[variables('vmName')]", - "location": "[variables('location')]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts/',variables('storageAccountName'))]", - "[resourceId('Microsoft.Network/networkInterfaces/',variables('networkInterfaceName'))]" - ], - "identity": { - "type": "SystemAssigned" - }, - "plan": { - "name": "[if(equals(variables('platform'), 'Windows'), variables('WindowsSKU'), variables('LinuxSKU'))]", - "publisher": "mathworks-inc", - "product": "[if(equals(variables('platform'), 'Windows'), variables('WindowsOffer'), variables('LinuxOffer'))]" - }, - "properties": { - "hardwareProfile": { - "vmSize": "[parameters('Server VM Instance Size')]" - }, - "osProfile": { - "computerName": "[variables('vmName')]", - "adminUsername": "[parameters('Username to Remote into Server VM and Network License Manager Web Interface')]", - "adminPassword": "[parameters('Password to Remote into Server VM and Network License Manager Web Interface')]" - }, - "storageProfile": { - "imageReference": { - "publisher": "mathworks-inc", - "offer": "[if(equals(variables('platform'), 'Windows'), variables('WindowsOffer'), variables('LinuxOffer'))]", - "sku": "[if(equals(variables('platform'), 'Windows'), variables('WindowsSKU'), variables('LinuxSKU'))]", - "version": "[if(equals(variables('platform'), 'Windows'), variables('WindowsSKUVersion'), variables('LinuxSKUVersion'))]" - }, - "osDisk": { - "createOption": "FromImage", - "managedDisk": { - "storageAccountType": "Standard_LRS" - } - } - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('networkInterfaceName'))]" - } - ] - } - }, - "resources": [ - { - "type": "extensions", - "apiVersion": "2022-03-01", - "name": "config-app", - "location": "[variables('location')]", - "dependsOn": [ - "[resourceId('Microsoft.Compute/virtualMachines/', variables('vmName'))]", - "[resourceId('Microsoft.Authorization/roleAssignments/', variables('roleName'))]" - ], - "tags": { - "displayName": "config-app", - "provider": "[variables('providerID')]" - }, - "properties": { - "publisher": "[if(equals(variables('platform'), 'Windows'), 'Microsoft.Compute', 'Microsoft.Azure.Extensions')]", - "type": "[if(equals(variables('platform'), 'Windows'), 'CustomScriptExtension', 'CustomScript')]", - "typeHandlerVersion": "[if(equals(variables('platform'), 'Windows'), '1.9', '2.0')]", - "autoUpgradeMinorVersion": true, - "settings": { - "skipDos2Unix": false, - "timestamp": 123456789 - }, - "protectedSettings": { - "commandToExecute": "[if(equals(variables('platform'), 'Windows'), variables('windowsCommand'), variables('linuxCommand') )]", - "fileUris": [ - "[if(equals(variables('platform'), 'Windows'), variables('windowsScriptURL'), variables('linuxScriptURL'))]" - ] - } - } - } - ] - }, - { - "type": "Microsoft.Authorization/roleAssignments", - "apiVersion": "2018-09-01-preview", - "name": "[variables('roleName')]", - "dependsOn": [ - "[resourceId('Microsoft.Compute/virtualMachines/', variables('vmName'))]" - ], - "properties": { - "roleDefinitionId": "[variables('contributor')]", - "principalId": "[reference(resourceId('Microsoft.Compute/virtualMachines', variables('vmName')),'2022-03-01', 'Full').identity.principalId]", - "scope": "[resourceGroup().id]", - "principalType": "ServicePrincipal" - } - }, - { - "type": "Microsoft.Storage/storageAccounts", - "apiVersion": "2021-09-01", - "name": "[variables('storageAccountName')]", - "location": "[variables('location')]", - "tags": { - "Description": "Storage account that stores application and config files", - "provider": "[variables('providerID')]" - }, - "sku": { - "name": "[variables('storageAccountType')]" - }, - "kind": "Storage", - "properties": {} - }, - { - "type": "Microsoft.Network/virtualNetworks", - "apiVersion": "2022-01-01", - "name": "[variables('virtualNetworkName')]", - "location": "[variables('location')]", - "dependsOn": [ - "[resourceId('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]" - ], - "tags": { - "Description": "Virtual network for the Web app Server deployment", - "provider": "[variables('providerID')]" - }, - "properties": { - "addressSpace": { - "addressPrefixes": [ - "[variables('addressPrefix')]" - ] - }, - "subnets": [ - { - "name": "[variables('subnetName')]", - "properties": { - "addressPrefix": "[variables('subnetIP')]", - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]" - } - } - } - ] - }, - "condition": "[equals(variables('newOrExistingVirtualNetwork'), 'new')]" - }, - { - "type": "Microsoft.Network/networkInterfaces", - "apiVersion": "2022-01-01", - "name": "[variables('networkInterfaceName')]", - "location": "[variables('location')]", - "dependsOn": [ - "[resourceId('Microsoft.Network/publicIPAddresses/', variables('serverPublicIP'))]", - "[resourceId('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]", - "[resourceId('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" - ], - "tags": { - "Description": "Network Interface Card (NIC) for the web app VM", - "provider": "[variables('providerID')]" - }, - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAddress": "[variables('serverPrivateIP')]", - "privateIPAllocationMethod": "Static", - "publicIPAddress": "[if(equals(variables('usePublicIPAddresses'), 'Yes'), variables('publicIPprop1'), json('null'))]", - "subnet": { - "id": "[variables('subnetRef')]" - } - } - } - ], - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]" - } - } - }, - { - "type": "Microsoft.Network/networkSecurityGroups", - "apiVersion": "2022-01-01", - "name": "[variables('networkSecurityGroupName')]", - "location": "[variables('location')]", - "tags": { - "Description": "Network Security Group to control access to VM", - "provider": "[variables('providerID')]" - }, - "properties": { - "securityRules": [ - { - "name": "allow-admin", - "properties": { - "priority": 1000, - "sourceAddressPrefixes": "[variables('adminIP')]", - "protocol": "Tcp", - "destinationPortRanges": [ "22", "3389", "443" ], - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - }, - { - "name": "allow-client", - "properties": { - "priority": 1001, - "sourceAddressPrefixes": "[variables('clientIP')]", - "protocol": "Tcp", - "destinationPortRanges": [ "443" ], - "access": "Allow", - "direction": "Inbound", - "sourcePortRange": "*", - "destinationAddressPrefix": "*" - } - } - ] - } - }, - { - "type": "Microsoft.Network/publicIPAddresses", - "apiVersion": "2022-01-01", - "name": "[variables('serverPublicIP')]", - "location": "[variables('location')]", - "tags": { - "Description": "Public IP Address of the MATLAB Production Server Dashboard", - "provider": "[variables('providerID')]" - }, - "sku": { - "name": "Standard" - }, - "properties": { - "publicIPAllocationMethod": "Static", - "dnsSettings": { - "domainNameLabel": "[variables('webappDNSName')]" - } - }, - "condition": "[equals(variables('usePublicIPAddresses'), 'Yes')]" - } - ], - "outputs": { - "webAppServerURL": { - "value": "[if(equals(variables('usePublicIPAddresses'), 'Yes'), concat(if(equals(variables('enableSSL'), 'Yes'), 'https://', 'http://'), reference(variables('serverPublicIP')).dnsSettings.fqdn), concat(if(equals(variables('enableSSL'), 'Yes'), 'https://', 'http://'), variables('serverPrivateIP')))]", - "type": "string" - }, - "networkLicenseManagerURL": { - "value": "[if(equals(variables('deployNetworkLicenseManager'), 'Yes'), reference('flex-lm-server').outputs.NetworkLicenseManagerAddress.value, 'none')]", - "type": "string" - }, - "webAppsOIDCRedirectURL": { - "value": "[if(equals(variables('enableSSL'), 'Yes'), if(equals(variables('usePublicIPAddresses'), 'Yes'), concat('https://', reference(variables('serverPublicIP')).dnsSettings.fqdn, ':443/webapps/extauth/callback'), concat('https://', variables('serverPrivateIP'), ':443/webapps/extauth/callback')), 'SSL is not enabled. SSL is required to configure OIDC.')]", - "type": "string" - } - } -} \ No newline at end of file diff --git a/releases/R2022b/README.md b/releases/R2022b/README.md index e9ca20d..2b71885 100644 --- a/releases/R2022b/README.md +++ b/releases/R2022b/README.md @@ -11,7 +11,7 @@ To deploy resources on Azure, click **Deploy to Azure**. The Azure Portal open i

Note: Creating resources on Azure can take up to 10 minutes.

## Step 2. Configure Cloud Resources -Provide values for parameters in the custom deployment template on the Azure Portal : +Provide values for parameters in the custom deployment template on the Azure Portal: | Parameter Name | Value | |-------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| @@ -30,10 +30,10 @@ Provide values for parameters in the custom deployment template on the Azure Por | **Assign Public IP Address to VM Hosting MATLAB Web App Server** | Select `Yes` if you want to assign a public IP address to the VM hosting the server. Otherwise, select `No`. If you select 'No', you must create a new virtual machine and add it to the same virtual network as the MATLAB Web App Server deployment. The ability to access the web apps home page or remotely connect to the server machine can be accomplished only through this virtual machine.| | **IP Addresses Permitted to Remote into Server VM in CIDR Notation** | Specify the range of IP addresses in CIDR notation that can remote into the VM hosting MATLAB Web App Server and administer it. The format for CIDR addresses is IP Address/Mask.

Example: `x.x.x.x/32`

You may also specify a comma separated list of CIDR addresses (no spaces).

*Example*: `x.x.x.x/32,x.x.x.x/32`

**NOTE:** Restricting access to the server using an IP address is not a form of authentication. MATLAB Web App Server supports authentication using OIDC. For details, see [Authentication](https://www.mathworks.com/help/webappserver/ug/authentication.html).| | **IP Addresses Allowed to Access MATLAB Web App Server Apps Home Page in CIDR Notation** | Specify the range of IP addresses that can access the MATLAB Web App Server apps home page in CIDR notation. The format for CIDR addresses is IP Address/Mask.

*Example*: `x.x.x.x/24`

You may also specify a comma separated list of CIDR addresses (no spaces).

*Example*: `x.x.x.x/24,z.z.z.z/24`

| -| **Base64 Encoded SSL Certificate** | Enter a string that is a base64-encoded value of an SSL certificate in PEM format. On Windows, you can Base64 encode a PEM file using a utility such as openssl. On Linux, you can Base64 encode a PEM file using the following command in the terminal:

```base64 -w 0 "cert.pem" > "cert.txt"```

You may need to change the filename arguments accordingly. The contents of the output file (here "cert.txt") should be used for this parameter.

NOTE:

| -| **Base64 Encoded SSL Private Key** | Enter a string that is a base64-encoded value of an SSL private key file in PEM format. On Windows, you can Base64 encode a PEM file using a utility such as openssl. On Linux, you can Base64 encode a PEM file using the following command in the terminal:

```base64 -w 0 "key.pem" > "key.txt"```

You may need to change the filename arguments accordingly. The contents of the output file (here "key.txt") should be used for this parameter. | -| **Username to Remote into Server VM** | Specify a username to use when remoting into server VM hosting MATLAB Web App Server. The username must be at least 7 characters long. This username is also used to login to the network license manager portal. For example: webappadmin. You cannot use "admin" as a username. | -| **Password to Remote into Server VM and Network License Manager Web Interface** | Specify a password to use when remoting into server VM hosting MATLAB Web App Server. This password is also used to login to the network license manager portal. | +| **Base64 Encoded SSL Certificate** | Enter a string that is a base64-encoded value of an SSL certificate in PEM format. On Linux, you can Base64 encode a PEM file using the following command in the terminal:

```base64 -w 0 "cert.pem" > "cert.txt"```

On Windows, you can Base64 encode a PEM file with a utility such as openssl or by using the following command in a PowerShell terminal:

```[Convert]::ToBase64String([System.IO.File]::ReadAllBytes("cert.pem")) \| Set-Content -NoNewline -Encoding Ascii "cert.txt"```

You may need to change the filename arguments accordingly. The contents of the output file (here "cert.txt") should be used for this parameter.

NOTE:

| +| **Base64 Encoded SSL Private Key** | Enter a string that is a base64-encoded value of an SSL private key file in PEM format. On Linux, you can Base64 encode a PEM file using the following command in the terminal:

```base64 -w 0 "key.pem" > "key.txt"```

On Windows, you can Base64 encode a PEM file with a utility such as openssl or by using the following command in a PowerShell terminal:

```[Convert]::ToBase64String([System.IO.File]::ReadAllBytes("key.pem")) \| Set-Content -NoNewline -Encoding Ascii "key.txt"```

You may need to change the filename arguments accordingly. The contents of the output file (here `"key.txt"`) should be used for this parameter. | +| **Username to Remote into Server VM** | Specify a username to use when remoting into server VM hosting MATLAB Web App Server. The username must be at least 7 characters long. This username is also used to login to the network license manager portal. For example: `webappadmin`. You cannot use `admin` as a username. | +| **Password to Remote into Server VM and Network License Manager Web Interface** | Specify a password to use when remoting into server VM hosting MATLAB Web App Server. This password is also used to login to the network license manager portal. Password requirements are:

| | **Deploy Network License Manager** | Select whether you want to deploy the Network License Manager for MATLAB to manage your license files. Selecting 'Yes' deploys the Network License Manager for MATLAB reference architecture. Select 'No' if you want to use an existing license manager. When using an existing license manager, the MATLAB Web App Server deployment and the license manager must be in the same virtual network.| Click **Create** to begin the deployment. This can take up to 10 minutes. @@ -61,7 +61,7 @@ To run applications on MATLAB Web App Server, you need to create applications us >**NOTE:**The network license manager MAC address is available only after the deployment to the cloud is complete. To get the MAC address of the network license manager: 1. Log in to the Network License Manager for MATLAB dashboard using the username and password you specified in the [Configure Cloud Resources](#step-2-configure-cloud-resources) step of the deployment process. -1. Click Administration > License. +1. Click **Administration** and then **License**. 1. Copy the license server MAC address displayed at the top. # Upload Apps diff --git a/releases/R2023a/README.md b/releases/R2023a/README.md index 7c3be30..b1910a0 100644 --- a/releases/R2023a/README.md +++ b/releases/R2023a/README.md @@ -11,7 +11,7 @@ To deploy resources on Azure, click **Deploy to Azure**. The Azure Portal open i

Note: Creating resources on Azure can take up to 10 minutes.

## Step 2. Configure Cloud Resources -Provide values for parameters in the custom deployment template on the Azure Portal : +Provide values for parameters in the custom deployment template on the Azure Portal: | Parameter Name | Value | |-------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| @@ -20,7 +20,7 @@ Provide values for parameters in the custom deployment template on the Azure Por | **Region** | Choose the region to start resources in. Ensure that you select a location which supports your requested instance types. To check which services are supported in each location, see [Azure Region Services]().

Example: `East US`

| | **Server VM Instance Size** | Specify the size of the VM you plan on using for deployment. Each MATLAB Web App Server instance runs on a VM and each instance will run multiple workers. We recommend you choose a VM size where the number of cores on your VM match the number of MATLAB workers per VM you plan on using. The template defaults to: `Standard_D4_v3`. This configuration has 4 vCPUs and 16 GiB of Memory. For more information, see Azure [documentation](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes-general).

Example: `Standard_D4_v3`

| | **Operating System**| Choose the operating system for the server. Your options are `Windows` or `Linux`. | -|**Deploy to New or Existing Virtual Network**| Specify whether you want to create a `new` virtual network for your deployment or use an `existing` one. When deploying to a new virtual network, by default, the ports listed in [below](#how-do-i-deploy-to-an-existing-virtual-network) are opened. Depending on your security requirements, you can choose to close ports 22 and 3389 after the deployment is complete. | +|**Deploy to New or Existing Virtual Network**| Specify whether you want to create a `new` virtual network for your deployment or use an `existing` one. When deploying to a new virtual network, by default, the ports listed [here](/README.md#ports-to-open-in-existing-virtual-network) are opened. Depending on your security requirements, you can choose to close ports 22 and 3389 after the deployment is complete. | | **Name of Virtual Network Where MATLAB Web App Server Will Be Deployed** | Specify the name of the virtual network where the server will be deployed.
  • If deploying to a new virtual network, you can use the default `webapp-refarch-vnet` name or specify a new name for the virtual network.
  • If deploying to an existing virtual network, the name you specify must match the name of an existing virtual network.
| | **Resource Group Name of Virtual Network** |
  • If deploying to a new virtual network, leave the default `resourceGroup().name` value unchanged.
  • If deploying to an existing virtual network, specify the name of the resource group containing the existing existing virtual network. For example: `webappserver_rsg`.
| | **Virtual Network CIDR Range** | Specify the virtual network CIDR range. For example: `10.0.0.0/16` .
  • If deploying to a new virtual network, specify a suitable CIDR range to be used for the new virtual network.
  • If deploying to an existing virtual network, this must match the CIDR range of the existing virtual network.
| @@ -28,11 +28,11 @@ Provide values for parameters in the custom deployment template on the Azure Por | **Server Subnet CIDR Range** | Specify subnet CIDR range. This is a CIDR range for the subnet specified above. For example: `10.0.0.0/24` .
  • If deploying to a new virtual network, specify a suitable CIDR range to be used for the new subnet.
  • If deploying to an existing virtual network, this must match the CIDR range of the existing subnet.
| | **Specify Private IP Address to VM Hosting MATLAB Web App Server** | Specify an unused private IP address to be assigned to the VM hosting the server. For example: `10.0.0.4` . | | **Assign Public IP Address to VM Hosting MATLAB Web App Server** | Select `Yes` if you want to assign a public IP address to the VM hosting the server. Otherwise, select `No`. If you select 'No', you must create a new virtual machine and add it to the same virtual network as the MATLAB Web App Server deployment. The ability to access the web apps home page or remotely connect to the server machine can be accomplished only through this virtual machine.| -| **IP Addresses Permitted to Remote into Server VM in CIDR Notation** | Specify the range of IP addresses in CIDR notation that can remote into the VM hosting MATLAB Web App Server and administer it. The format for CIDR addresses is IP Address/Mask.

Example: `x.x.x.x/32`

You may also specify a comma separated list of CIDR addresses (no spaces).

*Example*: `x.x.x.x/32,x.x.x.x/32`

  • To determine your IP address, you can search for **"what is my ip address"** on the web. The mask determines the number of IP addresses to include.
  • A mask of 32 is a single IP address.
  • Use a [CIDR calculator](https://www.ipaddressguide.com/cidr) if you need a range of more than one IP address.
  • You may need to contact your IT administrator to determine which address is appropriate.
**NOTE:** Restricting access to the server using an IP address is not a form of authentication. MATLAB Web App Server supports authentication using OIDC. For details, see [Authentication](https://www.mathworks.com/help/webappserver/ug/authentication.html).| +| **IP Addresses Permitted to Remote into Server VM in CIDR Notation** | Specify the range of IP addresses in CIDR notation that can remote into the VM hosting MATLAB Web App Server and administer it. The format for CIDR addresses is IP Address/Mask.

Example: `x.x.x.x/32`

  • To determine your IP address, you can search for **"what is my ip address"** on the web. The mask determines the number of IP addresses to include.
  • A mask of 32 is a single IP address.
  • Use a [CIDR calculator](https://www.ipaddressguide.com/cidr) if you need a range of more than one IP address.
  • You may need to contact your IT administrator to determine which address is appropriate.
**NOTE:** Restricting access to the server using an IP address is not a form of authentication. MATLAB Web App Server supports authentication using OIDC. For details, see [Authentication](https://www.mathworks.com/help/webappserver/ug/authentication.html).| | **IP Addresses Allowed to Access MATLAB Web App Server Apps Home Page in CIDR Notation** | Specify the range of IP addresses that can access the MATLAB Web App Server apps home page in CIDR notation. The format for CIDR addresses is IP Address/Mask.

*Example*: `x.x.x.x/24`

You may also specify a comma separated list of CIDR addresses (no spaces).

*Example*: `x.x.x.x/24,z.z.z.z/24`

| -| **Base64 Encoded SSL Certificate** | Enter a string that is a base64-encoded value of an SSL certificate in PEM format. On Windows, you can Base64 encode a PEM file using a utility such as openssl. On Linux, you can Base64 encode a PEM file using the following command in the terminal:

```base64 -w 0 "cert.pem" > "cert.txt"```

You may need to change the filename arguments accordingly. The contents of the output file (here "cert.txt") should be used for this parameter.

NOTE:

  • MATLAB Web App Server only supports the `.pem` SSL certificate format.
  • SSL keys must be 2048 bits in length and must be private.
  • Intermediate certificates are not supported by the server.
  • SSL certificate should not be password protected.
  • Private key should not be password protected.
| -| **Base64 Encoded SSL Private Key** | Enter a string that is a base64-encoded value of an SSL private key file in PEM format. On Windows, you can Base64 encode a PEM file using a utility such as openssl. On Linux, you can Base64 encode a PEM file using the following command in the terminal:

```base64 -w 0 "key.pem" > "key.txt"```

You may need to change the filename arguments accordingly. The contents of the output file (here "key.txt") should be used for this parameter. | -| **Username to Remote into Server VM** | Specify a username to use when remoting into server VM hosting MATLAB Web App Server. The username must be at least 7 characters long. This username is also used to login to the network license manager portal. For example: webappadmin. You cannot use "admin" as a username. | +| **Base64 Encoded SSL Certificate** | Enter a string that is a base64-encoded value of an SSL certificate in PEM format. On Linux, you can Base64 encode a PEM file using the following command in the terminal:

```base64 -w 0 "cert.pem" > "cert.txt"```

On Windows, you can Base64 encode a PEM file with a utility such as openssl or by using the following command in a PowerShell terminal:

```[Convert]::ToBase64String([System.IO.File]::ReadAllBytes("cert.pem")) \| Set-Content -NoNewline -Encoding Ascii "cert.txt"```

You may need to change the filename arguments accordingly. The contents of the output file (here "cert.txt") should be used for this parameter.

NOTE:

  • MATLAB Web App Server only supports the `.pem` SSL certificate format.
  • SSL keys must be 2048 bits in length and must be private.
  • Intermediate certificates are not supported by the server.
  • SSL certificate should not be password protected.
  • Private key should not be password protected.
| +| **Base64 Encoded SSL Private Key** | Enter a string that is a base64-encoded value of an SSL private key file in PEM format. On Linux, you can Base64 encode a PEM file using the following command in the terminal:

```base64 -w 0 "key.pem" > "key.txt"```

On Windows, you can Base64 encode a PEM file with a utility such as openssl or by using the following command in a PowerShell terminal:

```[Convert]::ToBase64String([System.IO.File]::ReadAllBytes("key.pem")) \| Set-Content -NoNewline -Encoding Ascii "key.txt"```

You may need to change the filename arguments accordingly. The contents of the output file (here `"key.txt"`) should be used for this parameter. | +| **Username to Remote into Server VM** | Specify a username to use when remoting into server VM hosting MATLAB Web App Server. The username must be at least 7 characters long. This username is also used to login to the network license manager portal. For example: `webappadmin`. You cannot use `admin` as a username. | | **Password to Remote into Server VM and Network License Manager Web Interface** | Specify a password to use when remoting into server VM hosting MATLAB Web App Server. This password is also used to login to the network license manager portal. Password requirements are:

  • Must be between 12-123 characters.
  • Have uppercase and lowercase characters.
  • Have a digit.
  • Have a special character.
| | **Deploy Network License Manager** | Select whether you want to deploy the Network License Manager for MATLAB to manage your license files. Selecting 'Yes' deploys the Network License Manager for MATLAB reference architecture. Select 'No' if you want to use an existing license manager. When using an existing license manager, the MATLAB Web App Server deployment and the license manager must be in the same virtual network.| @@ -61,7 +61,7 @@ To run applications on MATLAB Web App Server, you need to create applications us >**NOTE:**The network license manager MAC address is available only after the deployment to the cloud is complete. To get the MAC address of the network license manager: 1. Log in to the Network License Manager for MATLAB dashboard using the username and password you specified in the [Configure Cloud Resources](#step-2-configure-cloud-resources) step of the deployment process. -1. Click Administration > License. +1. Click **Administration** and then **License**. 1. Copy the license server MAC address displayed at the top. # Upload Apps diff --git a/releases/R2023b/README.md b/releases/R2023b/README.md index 9ddc4a5..2c4fe57 100644 --- a/releases/R2023b/README.md +++ b/releases/R2023b/README.md @@ -11,7 +11,7 @@ To deploy resources on Azure, click **Deploy to Azure**. The Azure Portal open i

Note: Creating resources on Azure can take up to 10 minutes.

## Step 2. Configure Cloud Resources -Provide values for parameters in the custom deployment template on the Azure Portal : +Provide values for parameters in the custom deployment template on the Azure Portal: | Parameter Name | Value | |-------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| @@ -30,9 +30,9 @@ Provide values for parameters in the custom deployment template on the Azure Por | **Assign Public IP Address to VM Hosting MATLAB Web App Server** | Select `Yes` if you want to assign a public IP address to the VM hosting the server. Otherwise, select `No`. If you select 'No', you must create a new virtual machine and add it to the same virtual network as the MATLAB Web App Server deployment. The ability to access the web apps home page or remotely connect to the server machine can be accomplished only through this virtual machine.| | **IP Addresses Permitted to Remote into Server VM in CIDR Notation** | Specify the range of IP addresses in CIDR notation that can remote into the VM hosting MATLAB Web App Server and administer it. The format for CIDR addresses is IP Address/Mask.

Example: `x.x.x.x/32`

  • To determine your IP address, you can search for **"what is my ip address"** on the web. The mask determines the number of IP addresses to include.
  • A mask of 32 is a single IP address.
  • Use a [CIDR calculator](https://www.ipaddressguide.com/cidr) if you need a range of more than one IP address.
  • You may need to contact your IT administrator to determine which address is appropriate.
**NOTE:** Restricting access to the server using an IP address is not a form of authentication. MATLAB Web App Server supports authentication using OIDC. For details, see [Authentication](https://www.mathworks.com/help/webappserver/ug/authentication.html).| | **IP Addresses Allowed to Access MATLAB Web App Server Apps Home Page in CIDR Notation** | Specify the range of IP addresses that can access the MATLAB Web App Server apps home page in CIDR notation. The format for CIDR addresses is IP Address/Mask.

*Example*: `x.x.x.x/24`

You may also specify a comma separated list of CIDR addresses (no spaces).

*Example*: `x.x.x.x/24,z.z.z.z/24`

| -| **Base64 Encoded SSL Certificate** | Enter a string that is a base64-encoded value of an SSL certificate in PEM format. On Windows, you can Base64 encode a PEM file using a utility such as openssl. On Linux, you can Base64 encode a PEM file using the following command in the terminal:

```base64 -w 0 "cert.pem" > "cert.txt"```

You may need to change the filename arguments accordingly. The contents of the output file (here "cert.txt") should be used for this parameter.

NOTE:

  • MATLAB Web App Server only supports the `.pem` SSL certificate format.
  • SSL keys must be 2048 bits in length and must be private.
  • Intermediate certificates are not supported by the server.
  • SSL certificate should not be password protected.
  • Private key should not be password protected.
| -| **Base64 Encoded SSL Private Key** | Enter a string that is a base64-encoded value of an SSL private key file in PEM format. On Windows, you can Base64 encode a PEM file using a utility such as openssl. On Linux, you can Base64 encode a PEM file using the following command in the terminal:

```base64 -w 0 "key.pem" > "key.txt"```

You may need to change the filename arguments accordingly. The contents of the output file (here "key.txt") should be used for this parameter. | -| **Username to Remote into Server VM** | Specify a username to use when remoting into server VM hosting MATLAB Web App Server. The username must be at least 7 characters long. This username is also used to login to the network license manager portal. For example: webappadmin. You cannot use "admin" as a username. | +| **Base64 Encoded SSL Certificate** | Enter a string that is a base64-encoded value of an SSL certificate in PEM format. On Linux, you can Base64 encode a PEM file using the following command in the terminal:

```base64 -w 0 "cert.pem" > "cert.txt"```

On Windows, you can Base64 encode a PEM file with a utility such as openssl or by using the following command in a PowerShell terminal:

```[Convert]::ToBase64String([System.IO.File]::ReadAllBytes("cert.pem")) \| Set-Content -NoNewline -Encoding Ascii "cert.txt"```

You may need to change the filename arguments accordingly. The contents of the output file (here "cert.txt") should be used for this parameter.

NOTE:

  • MATLAB Web App Server only supports the `.pem` SSL certificate format.
  • SSL keys must be 2048 bits in length and must be private.
  • Intermediate certificates are not supported by the server.
  • SSL certificate should not be password protected.
  • Private key should not be password protected.
| +| **Base64 Encoded SSL Private Key** | Enter a string that is a base64-encoded value of an SSL private key file in PEM format. On Linux, you can Base64 encode a PEM file using the following command in the terminal:

```base64 -w 0 "key.pem" > "key.txt"```

On Windows, you can Base64 encode a PEM file with a utility such as openssl or by using the following command in a PowerShell terminal:

```[Convert]::ToBase64String([System.IO.File]::ReadAllBytes("key.pem")) \| Set-Content -NoNewline -Encoding Ascii "key.txt"```

You may need to change the filename arguments accordingly. The contents of the output file (here `"key.txt"`) should be used for this parameter. | +| **Username to Remote into Server VM** | Specify a username to use when remoting into server VM hosting MATLAB Web App Server. The username must be at least 7 characters long. This username is also used to login to the network license manager portal. For example: `webappadmin`. You cannot use `admin` as a username. | | **Password to Remote into Server VM and Network License Manager Web Interface** | Specify a password to use when remoting into server VM hosting MATLAB Web App Server. This password is also used to login to the network license manager portal. Password requirements are:

  • Must be between 12-123 characters.
  • Have uppercase and lowercase characters.
  • Have a digit.
  • Have a special character.
| | **Deploy Network License Manager** | Select whether you want to deploy the Network License Manager for MATLAB to manage your license files. Selecting 'Yes' deploys the Network License Manager for MATLAB reference architecture. Select 'No' if you want to use an existing license manager. When using an existing license manager, the MATLAB Web App Server deployment and the license manager must be in the same virtual network.| @@ -61,7 +61,7 @@ To run applications on MATLAB Web App Server, you need to create applications us >**NOTE:**The network license manager MAC address is available only after the deployment to the cloud is complete. To get the MAC address of the network license manager: 1. Log in to the Network License Manager for MATLAB dashboard using the username and password you specified in the [Configure Cloud Resources](#step-2-configure-cloud-resources) step of the deployment process. -1. Click Administration > License. +1. Click **Administration** and then **License**. 1. Copy the license server MAC address displayed at the top. # Upload Apps diff --git a/releases/R2024a/README.md b/releases/R2024a/README.md index 11b5c7e..f7a049e 100644 --- a/releases/R2024a/README.md +++ b/releases/R2024a/README.md @@ -11,7 +11,7 @@ To deploy resources on Azure, click **Deploy to Azure**. The Azure Portal open i

Note: Creating resources on Azure can take up to 10 minutes.

## Step 2. Configure Cloud Resources -Provide values for parameters in the custom deployment template on the Azure Portal : +Provide values for parameters in the custom deployment template on the Azure Portal: | Parameter Name | Value | |-------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| @@ -30,9 +30,9 @@ Provide values for parameters in the custom deployment template on the Azure Por | **Assign Public IP Address to VM Hosting MATLAB Web App Server** | Select `Yes` if you want to assign a public IP address to the VM hosting the server. Otherwise, select `No`. If you select 'No', you must create a new virtual machine and add it to the same virtual network as the MATLAB Web App Server deployment. The ability to access the web apps home page or remotely connect to the server machine can be accomplished only through this virtual machine.| | **IP Addresses Permitted to Remote into Server VM in CIDR Notation** | Specify the range of IP addresses in CIDR notation that can remote into the VM hosting MATLAB Web App Server and administer it. The format for CIDR addresses is IP Address/Mask.

Example: `x.x.x.x/32`

  • To determine your IP address, you can search for **"what is my ip address"** on the web. The mask determines the number of IP addresses to include.
  • A mask of 32 is a single IP address.
  • Use a [CIDR calculator](https://www.ipaddressguide.com/cidr) if you need a range of more than one IP address.
  • You may need to contact your IT administrator to determine which address is appropriate.
**NOTE:** Restricting access to the server using an IP address is not a form of authentication. MATLAB Web App Server supports authentication using OIDC. For details, see [Authentication](https://www.mathworks.com/help/webappserver/ug/authentication.html).| | **IP Addresses Allowed to Access MATLAB Web App Server Apps Home Page in CIDR Notation** | Specify the range of IP addresses that can access the MATLAB Web App Server apps home page in CIDR notation. The format for CIDR addresses is IP Address/Mask.

*Example*: `x.x.x.x/24`

You may also specify a comma separated list of CIDR addresses (no spaces).

*Example*: `x.x.x.x/24,z.z.z.z/24`

| -| **Base64 Encoded SSL Certificate** | Enter a string that is a base64-encoded value of an SSL certificate in PEM format. On Windows, you can Base64 encode a PEM file using a utility such as openssl. On Linux, you can Base64 encode a PEM file using the following command in the terminal:

```base64 -w 0 "cert.pem" > "cert.txt"```

You may need to change the filename arguments accordingly. The contents of the output file (here "cert.txt") should be used for this parameter.

NOTE:

  • MATLAB Web App Server only supports the `.pem` SSL certificate format.
  • SSL keys must be 2048 bits in length and must be private.
  • Intermediate certificates are not supported by the server.
  • SSL certificate should not be password protected.
  • Private key should not be password protected.
| -| **Base64 Encoded SSL Private Key** | Enter a string that is a base64-encoded value of an SSL private key file in PEM format. On Windows, you can Base64 encode a PEM file using a utility such as openssl. On Linux, you can Base64 encode a PEM file using the following command in the terminal:

```base64 -w 0 "key.pem" > "key.txt"```

You may need to change the filename arguments accordingly. The contents of the output file (here "key.txt") should be used for this parameter. | -| **Username to Remote into Server VM** | Specify a username to use when remoting into server VM hosting MATLAB Web App Server. The username must be at least 7 characters long. This username is also used to login to the network license manager portal. For example: webappadmin. You cannot use "admin" as a username. | +| **Base64 Encoded SSL Certificate** | Enter a string that is a base64-encoded value of an SSL certificate in PEM format. On Linux, you can Base64 encode a PEM file using the following command in the terminal:

```base64 -w 0 "cert.pem" > "cert.txt"```

On Windows, you can Base64 encode a PEM file with a utility such as openssl or by using the following command in a PowerShell terminal:

```[Convert]::ToBase64String([System.IO.File]::ReadAllBytes("cert.pem")) \| Set-Content -NoNewline -Encoding Ascii "cert.txt"```

You may need to change the filename arguments accordingly. The contents of the output file (here "cert.txt") should be used for this parameter.

NOTE:

  • MATLAB Web App Server only supports the `.pem` SSL certificate format.
  • SSL keys must be 2048 bits in length and must be private.
  • Intermediate certificates are not supported by the server.
  • SSL certificate should not be password protected.
  • Private key should not be password protected.
| +| **Base64 Encoded SSL Private Key** | Enter a string that is a base64-encoded value of an SSL private key file in PEM format. On Linux, you can Base64 encode a PEM file using the following command in the terminal:

```base64 -w 0 "key.pem" > "key.txt"```

On Windows, you can Base64 encode a PEM file with a utility such as openssl or by using the following command in a PowerShell terminal:

```[Convert]::ToBase64String([System.IO.File]::ReadAllBytes("key.pem")) \| Set-Content -NoNewline -Encoding Ascii "key.txt"```

You may need to change the filename arguments accordingly. The contents of the output file (here `"key.txt"`) should be used for this parameter. | +| **Username to Remote into Server VM** | Specify a username to use when remoting into server VM hosting MATLAB Web App Server. The username must be at least 7 characters long. This username is also used to login to the network license manager portal. For example: `webappadmin`. You cannot use `admin` as a username. | | **Password to Remote into Server VM and Network License Manager Web Interface** | Specify a password to use when remoting into server VM hosting MATLAB Web App Server. This password is also used to login to the network license manager portal. Password requirements are:

  • Must be between 12-123 characters.
  • Have uppercase and lowercase characters.
  • Have a digit.
  • Have a special character.
| | **Deploy Network License Manager** | Select whether you want to deploy the Network License Manager for MATLAB to manage your license files. Selecting 'Yes' deploys the Network License Manager for MATLAB reference architecture. Select 'No' if you want to use an existing license manager. When using an existing license manager, the MATLAB Web App Server deployment and the license manager must be in the same virtual network.| @@ -61,7 +61,7 @@ To run applications on MATLAB Web App Server, you need to create applications us >**NOTE:**The network license manager MAC address is available only after the deployment to the cloud is complete. To get the MAC address of the network license manager: 1. Log in to the Network License Manager for MATLAB dashboard using the username and password you specified in the [Configure Cloud Resources](#step-2-configure-cloud-resources) step of the deployment process. -1. Click Administration > License. +1. Click **Administration** and then **License**. 1. Copy the license server MAC address displayed at the top. # Upload Apps diff --git a/releases/R2024b/README.md b/releases/R2024b/README.md index 8461d3d..3c09953 100644 --- a/releases/R2024b/README.md +++ b/releases/R2024b/README.md @@ -11,14 +11,14 @@ To deploy resources on Azure, click **Deploy to Azure**. The Azure Portal open i

Note: Creating resources on Azure can take up to 10 minutes.

## Step 2. Configure Cloud Resources -Provide values for parameters in the custom deployment template on the Azure Portal : +Provide values for parameters in the custom deployment template on the Azure Portal: | Parameter Name | Value | |-------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | **Subscription** | Choose an Azure subscription to use for purchasing resources.

Example: `VERTHAM Dev`

| | **Resource group** | Choose a name for the resource group that will hold the resources.

Example: `Saveros`

| | **Region** | Choose the region to start resources in. Ensure that you select a location which supports your requested instance types. To check which services are supported in each location, see [Azure Region Services]().

Example: `East US`

| -| **Server VM Instance Size** | Specify the size of the VM you plan on using for deployment. Each MATLAB Web App Server instance runs on a VM and each instance will run multiple workers. We recommend you choose a VM size where the number of cores on your VM match the number of MATLAB workers per VM you plan on using. The template defaults to: `Standard_D4_v3`. This configuration has 4 vCPUs and 16 GiB of Memory. For more information, see Azure [documentation](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes-general).

Example: `Standard_D4_v3`

| +| **Server VM Instance Size** | Specify the size of the VM you plan on using for deployment. Each MATLAB Web App Server instance runs on a VM and each instance will run multiple workers. We recommend you choose a VM size where the number of cores on your VM matches the number of MATLAB workers per VM you plan on using. The template defaults to: `Standard_D4_v3`. This configuration has 4 vCPUs and 16 GiB of Memory. For more information, see Azure [documentation](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes-general).

Example: `Standard_D4_v3`

| | **Operating System**| Choose the operating system for the server. Your options are `Windows` or `Linux`. | |**Deploy to New or Existing Virtual Network**| Specify whether you want to create a `new` virtual network for your deployment or use an `existing` one. When deploying to a new virtual network, by default, the ports listed [here](/README.md#ports-to-open-in-existing-virtual-network) are opened. Depending on your security requirements, you can choose to close ports 22 and 3389 after the deployment is complete. | | **Name of Virtual Network Where MATLAB Web App Server Will Be Deployed** | Specify the name of the virtual network where the server will be deployed.
  • If deploying to a new virtual network, you can use the default `webapp-refarch-vnet` name or specify a new name for the virtual network.
  • If deploying to an existing virtual network, the name you specify must match the name of an existing virtual network.
| @@ -30,9 +30,9 @@ Provide values for parameters in the custom deployment template on the Azure Por | **Assign Public IP Address to VM Hosting MATLAB Web App Server** | Select `Yes` if you want to assign a public IP address to the VM hosting the server. Otherwise, select `No`. If you select 'No', you must create a new virtual machine and add it to the same virtual network as the MATLAB Web App Server deployment. The ability to access the web apps home page or remotely connect to the server machine can be accomplished only through this virtual machine.| | **IP Addresses Permitted to Remote into Server VM in CIDR Notation** | Specify the range of IP addresses in CIDR notation that can remote into the VM hosting MATLAB Web App Server and administer it. The format for CIDR addresses is IP Address/Mask.

Example: `x.x.x.x/32`

You may also specify a comma separated list of CIDR addresses (no spaces).

*Example*: `x.x.x.x/32,z.z.z.z/32`

  • To determine your IP address, you can search for **"what is my ip address"** on the web. The mask determines the number of IP addresses to include.
  • A mask of 32 is a single IP address.
  • Use a [CIDR calculator](https://www.ipaddressguide.com/cidr) if you need a range of more than one IP address.
  • You may need to contact your IT administrator to determine which address is appropriate.
**NOTE:** Restricting access to the server using an IP address is not a form of authentication. MATLAB Web App Server supports authentication using OIDC. For details, see [Authentication](https://www.mathworks.com/help/webappserver/ug/authentication.html).| | **IP Addresses Allowed to Access MATLAB Web App Server Apps Home Page in CIDR Notation** | Specify the range of IP addresses that can access the MATLAB Web App Server apps home page in CIDR notation. The format for CIDR addresses is IP Address/Mask.

*Example*: `x.x.x.x/24`

You may also specify a comma separated list of CIDR addresses (no spaces).

*Example*: `x.x.x.x/24,z.z.z.z/24`

| -| **Base64 Encoded SSL Certificate** | Enter a string that is a base64-encoded value of an SSL certificate in PEM format. On Windows, you can Base64 encode a PEM file using a utility such as openssl. On Linux, you can Base64 encode a PEM file using the following command in the terminal:

```base64 -w 0 "cert.pem" > "cert.txt"```

You may need to change the filename arguments accordingly. The contents of the output file (here "cert.txt") should be used for this parameter.

NOTE:

  • MATLAB Web App Server only supports the `.pem` SSL certificate format.
  • SSL keys must be 2048 bits in length and must be private.
  • Intermediate certificates are not supported by the server.
  • SSL certificate should not be password protected.
  • Private key should not be password protected.
| -| **Base64 Encoded SSL Private Key** | Enter a string that is a base64-encoded value of an SSL private key file in PEM format. On Windows, you can Base64 encode a PEM file using a utility such as openssl. On Linux, you can Base64 encode a PEM file using the following command in the terminal:

```base64 -w 0 "key.pem" > "key.txt"```

You may need to change the filename arguments accordingly. The contents of the output file (here "key.txt") should be used for this parameter. | -| **Username to Remote into Server VM** | Specify a username to use when remoting into server VM hosting MATLAB Web App Server. The username must be at least 7 characters long. This username is also used to login to the network license manager portal. For example: `webappadmin`. You cannot use "admin" as a username. | +| **Base64 Encoded SSL Certificate** | Enter a string that is a base64-encoded value of an SSL certificate in PEM format. On Linux, you can Base64 encode a PEM file using the following command in the terminal:

```base64 -w 0 "cert.pem" > "cert.txt"```

On Windows, you can Base64 encode a PEM file with a utility such as openssl or by using the following command in a PowerShell terminal:

```[Convert]::ToBase64String([System.IO.File]::ReadAllBytes("cert.pem")) \| Set-Content -NoNewline -Encoding Ascii "cert.txt"```

You may need to change the filename arguments accordingly. The contents of the output file (here "cert.txt") should be used for this parameter.

NOTE:

  • MATLAB Web App Server only supports the `.pem` SSL certificate format.
  • SSL keys must be 2048 bits in length and must be private.
  • Intermediate certificates are not supported by the server.
  • SSL certificate should not be password protected.
  • Private key should not be password protected.
| +| **Base64 Encoded SSL Private Key** | Enter a string that is a base64-encoded value of an SSL private key file in PEM format. On Linux, you can Base64 encode a PEM file using the following command in the terminal:

```base64 -w 0 "key.pem" > "key.txt"```

On Windows, you can Base64 encode a PEM file with a utility such as openssl or by using the following command in a PowerShell terminal:

```[Convert]::ToBase64String([System.IO.File]::ReadAllBytes("key.pem")) \| Set-Content -NoNewline -Encoding Ascii "key.txt"```

You may need to change the filename arguments accordingly. The contents of the output file (here `"key.txt"`) should be used for this parameter. | +| **Username to Remote into Server VM** | Specify a username to use when remoting into server VM hosting MATLAB Web App Server. The username must be at least 7 characters long. This username is also used to login to the network license manager portal. For example: `webappadmin`. You cannot use `admin` as a username. | | **Password to Remote into Server VM and Network License Manager Web Interface** | Specify a password to use when remoting into server VM hosting MATLAB Web App Server. This password is also used to login to the network license manager portal. Password requirements are:

  • Must be between 12-123 characters.
  • Have uppercase and lowercase characters.
  • Have a digit.
  • Have a special character.
| | **Deploy Network License Manager** | Select whether you want to deploy the Network License Manager for MATLAB to manage your license files. Selecting 'Yes' deploys the Network License Manager for MATLAB reference architecture. Select 'No' if you want to use an existing license manager. When using an existing license manager, the MATLAB Web App Server deployment and the license manager must be in the same virtual network.| @@ -61,7 +61,7 @@ To run applications on MATLAB Web App Server, you need to create applications us >**NOTE:**The network license manager MAC address is available only after the deployment to the cloud is complete. To get the MAC address of the network license manager: 1. Log in to the Network License Manager for MATLAB dashboard using the username and password you specified in the [Configure Cloud Resources](#step-2-configure-cloud-resources) step of the deployment process. -1. Click Administration > License. +1. Click **Administration** and then **License**. 1. Copy the license server MAC address displayed at the top. # Upload Apps diff --git a/releases/R2022a/LICENSE.md b/releases/R2025a/LICENSE.md similarity index 98% rename from releases/R2022a/LICENSE.md rename to releases/R2025a/LICENSE.md index 53e4061..c9761ae 100644 --- a/releases/R2022a/LICENSE.md +++ b/releases/R2025a/LICENSE.md @@ -4,7 +4,7 @@ The files in this GitHub repository refer to commercial software products and se The following license terms apply only to the files in this GitHub repository, including files in this folder and its subfolders, and do not apply to MathWorks Programs. References to “software” and “code” in the following license terms refer to the files in this GitHub repository. -Copyright (c) 2022, The MathWorks, Inc. +Copyright (c) 2025, The MathWorks, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. diff --git a/releases/R2022a/README.md b/releases/R2025a/README.md similarity index 52% rename from releases/R2022a/README.md rename to releases/R2025a/README.md index c4d46aa..831d2ac 100644 --- a/releases/R2022a/README.md +++ b/releases/R2025a/README.md @@ -1,40 +1,44 @@ -# MATLAB Web App Server on Microsoft Azure - R2022a -Follow these steps to deploy the R2022a MATLAB Web App Server reference architecture on Microsoft Azure. To deploy reference architectures for other releases, see [Deploy Reference Architecture for Your Release](/README.md#deploy-reference-architecture-for-your-release). +# MATLAB Web App Server on Microsoft Azure - R2025a +Follow these steps to deploy the R2025a MATLAB Web App Server reference architecture on Microsoft Azure. To deploy reference architectures for other releases, see [Deploy Reference Architecture for Your Release](/README.md#deploy-reference-architecture-for-your-release). + +## Prerequisites +Before deploying MATLAB Web App Server within an existing virtual network, you must configure the virtual network to enable connectivity. For details, see [How do I deploy to an existing virtual network?](/README.md#how-do-i-deploy-to-an-existing-virtual-network). ## Step 1. Launch Template To deploy resources on Azure, click **Deploy to Azure**. The Azure Portal open in your web browser. - + -> MATLAB Release: R2022a +> MATLAB Release: R2025a

Note: Creating resources on Azure can take up to 10 minutes.

## Step 2. Configure Cloud Resources -Provide values for parameters in the custom deployment template on the Azure Portal : +Provide values for parameters in the custom deployment template on the Azure Portal: | Parameter Name | Value | |-------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | **Subscription** | Choose an Azure subscription to use for purchasing resources.

Example: `VERTHAM Dev`

| | **Resource group** | Choose a name for the resource group that will hold the resources.

Example: `Saveros`

| | **Region** | Choose the region to start resources in. Ensure that you select a location which supports your requested instance types. To check which services are supported in each location, see [Azure Region Services]().

Example: `East US`

| -| **Server VM Instance Size** | Specify the size of the VM you plan on using for deployment. Each MATLAB Web App Server instance runs on a VM and each instance will run multiple workers. We recommend you choose a VM size where the number of cores on your VM match the number of MATLAB workers per VM you plan on using. The template defaults to: `Standard_D4s_v3`. This configuration has 4 vCPUs and 16 GiB of Memory. For more information, see Azure [documentation](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes-general).

Example: `Standard_D4s_v3`

| +| **Server VM Instance Size** | Specify the size of the VM you plan on using for deployment. Each MATLAB Web App Server instance runs on a VM and each instance will run multiple workers. We recommend you choose a VM size where the number of cores on your VM matches the number of MATLAB workers per VM you plan on using. The template defaults to: `Standard_D4_v3`. This configuration has 4 vCPUs and 16 GiB of Memory. For more information, see Azure [documentation](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes-general).

Example: `Standard_D4_v3`

| | **Operating System**| Choose the operating system for the server. Your options are `Windows` or `Linux`. | -|**Deploy to New or Existing Virtual Network**| Specify whether you want to create a `new` virtual network for your deployment or use an `existing` one. When deploying to a new virtual network, by default, the ports listed [here](/README.md#ports-to-open-in-existing-virtual-network) are opened. Depending on your security requirements, you can choose to close ports 22 and 3389 after the deployment is complete. | +|**Deploy to New or Existing Virtual Network**| Specify whether you want to create a `new` virtual network for your deployment or use an `existing` one. When deploying to a new virtual network, by default, the ports listed [here](/README.md#ports-to-open-in-existing-virtual-network) are opened. Depending on your security requirements, you can choose to close ports 22 and 3389 after the deployment is complete.

If you are deploying to an existing virtual network, you may need to configure the network before deployment. For details, see [How do I deploy to an existing virtual network?](/README.md#how-do-i-deploy-to-an-existing-virtual-network).| | **Name of Virtual Network Where MATLAB Web App Server Will Be Deployed** | Specify the name of the virtual network where the server will be deployed.

  • If deploying to a new virtual network, you can use the default `webapp-refarch-vnet` name or specify a new name for the virtual network.
  • If deploying to an existing virtual network, the name you specify must match the name of an existing virtual network.
| | **Resource Group Name of Virtual Network** |
  • If deploying to a new virtual network, leave the default `resourceGroup().name` value unchanged.
  • If deploying to an existing virtual network, specify the name of the resource group containing the existing existing virtual network. For example: `webappserver_rsg`.
| | **Virtual Network CIDR Range** | Specify the virtual network CIDR range. For example: `10.0.0.0/16` .
  • If deploying to a new virtual network, specify a suitable CIDR range to be used for the new virtual network.
  • If deploying to an existing virtual network, this must match the CIDR range of the existing virtual network.
| | **Name of Subnet for MATLAB Web App Server** | Specify the name of the subnet that the server can use.
  • If deploying to a new virtual network, this specifies the name of the subnet to be created in the virtual network.
  • If deploying to an existing virtual network, this must match the name of a subnet in the existing virtual network.
| | **Server Subnet CIDR Range** | Specify subnet CIDR range. This is a CIDR range for the subnet specified above. For example: `10.0.0.0/24` .
  • If deploying to a new virtual network, specify a suitable CIDR range to be used for the new subnet.
  • If deploying to an existing virtual network, this must match the CIDR range of the existing subnet.
| | **Specify Private IP Address to VM Hosting MATLAB Web App Server** | Specify an unused private IP address to be assigned to the VM hosting the server. For example: `10.0.0.4` . | -| **Assign Public IP Address to VM Hosting MATLAB Web App Server** | Select `Yes` if you want to assign a public IP address to the VM hosting the server. Otherwise, select `No`. If you select 'No', you must create a new virtual machine and add it to the same virtual network as the MATLAB Web App Server deployment. The ability to access the web apps home page or remotely connect to the server machine can be accomplished only through this virtual machine.| -| **IP Addresses Permitted to Remote into Server VM in CIDR Notation** | Specify the range of IP addresses in CIDR notation that can remote into the VM hosting MATLAB Web App Server and administer it. The format for CIDR addresses is IP Address/Mask.

Example: `x.x.x.x/32`

You may also specify a comma separated list of CIDR addresses (no spaces).

*Example*: `x.x.x.x/32,x.x.x.x/32`

  • To determine your IP address, you can search for **"what is my ip address"** on the web. The mask determines the number of IP addresses to include.
  • A mask of 32 is a single IP address.
  • Use a [CIDR calculator](https://www.ipaddressguide.com/cidr) if you need a range of more than one IP address.
  • You may need to contact your IT administrator to determine which address is appropriate.
**NOTE:** Restricting access to the server using an IP address is not a form of authentication. MATLAB Web App Server supports authentication using OIDC. For details, see [Authentication](https://www.mathworks.com/help/webappserver/ug/authentication.html).| +| **Assign Public IP Address to VM Hosting MATLAB Web App Server** | Specify whether to assign a public IP address to the virtual machine hosting the server. This setting also controls which IP addresses are allowed to access the storage account.
  • If you select `Yes`, Azure assigns the MATLAB Web App Server VM a public IP address, and you can access the storage account using the MATLAB Web App Server VM. Additionally, the first parameter in each of the following template parameters is allowed to access the storage account:
    • **IP Addresses Permitted to Remote into Server VM in CIDR Notation**
    • **IP Addresses Allowed to Access MATLAB Web App Server Apps Home Page in CIDR Notation**
    You can use the Azure Portal to specify additional IP address ranges that can access the storage account. To do so, in your storage account settings under **Networking**, add IP address ranges using the IP Address/Mask format.

    **Note:** If you select `Yes` and are using an existing virtual network, then you must manually add a service endpoint to the virtual network *before* deploying MATLAB Web App Server in order to create and access the storage account. For details, see [How do I deploy to an existing virtual network?](/README.md#how-do-i-deploy-to-an-existing-virtual-network).

  • If you select `No`, the MATLAB Web App Server VM is assigned a private IP, and the storage account's public network access is disabled. You can access the storage account, the web apps home page, or remotely connect to the server machine from the from the MATLAB Web App Server VM or by creating a new virtual machine that is in the same virtual network as the MATLAB Web App Server deployment. This VM is called a Bastion host or jumpbox. For details, see [Overview of Azure Bastion host and jumpboxes](https://learn.microsoft.com/en-us/azure/cloud-adoption-framework/scenarios/cloud-scale-analytics/architectures/connect-to-environments-privately).

| +| **IP Addresses Permitted to Remote into Server VM in CIDR Notation** | Specify the range of IP addresses in CIDR notation that can remote into the VM hosting MATLAB Web App Server and administer it. The format for CIDR addresses is IP Address/Mask.

Example: `x.x.x.x/32`

  • To determine your IP address, you can search for **"what is my ip address"** on the web. The mask determines the number of IP addresses to include.
  • A mask of 32 is a single IP address.
  • Use a [CIDR calculator](https://www.ipaddressguide.com/cidr) if you need a range of more than one IP address.
  • You may need to contact your IT administrator to determine which address is appropriate.
**Note:** Restricting access to the server using an IP address is not a form of authentication. MATLAB Web App Server supports authentication using OIDC. For details, see [Authentication](https://www.mathworks.com/help/webappserver/ug/authentication.html).| | **IP Addresses Allowed to Access MATLAB Web App Server Apps Home Page in CIDR Notation** | Specify the range of IP addresses that can access the MATLAB Web App Server apps home page in CIDR notation. The format for CIDR addresses is IP Address/Mask.

*Example*: `x.x.x.x/24`

You may also specify a comma separated list of CIDR addresses (no spaces).

*Example*: `x.x.x.x/24,z.z.z.z/24`

| -| **Base64 Encoded SSL Certificate** | Enter a string that is a base64-encoded value of an SSL certificate in PEM format. On Windows, you can Base64 encode a PEM file using a utility such as openssl. On Linux, you can Base64 encode a PEM file using the following command in the terminal:

```base64 -w 0 "cert.pem" > "cert.txt"```

You may need to change the filename arguments accordingly. The contents of the output file (here "cert.txt") should be used for this parameter.

NOTE:

  • MATLAB Web App Server only supports the `.pem` SSL certificate format.
  • SSL keys must be 2048 bits in length and must be private.
  • Intermediate certificates are not supported by the server.
  • SSL certificate should not be password protected.
  • Private key should not be password protected.
| -| **Base64 Encoded SSL Private Key** | Enter a string that is a base64-encoded value of an SSL private key file in PEM format. On Windows, you can Base64 encode a PEM file using a utility such as openssl. On Linux, you can Base64 encode a PEM file using the following command in the terminal:

```base64 -w 0 "key.pem" > "key.txt"```

You may need to change the filename arguments accordingly. The contents of the output file (here "key.txt") should be used for this parameter. | -| **Username to Remote into Server VM** | Specify a username to use when remoting into server VM hosting MATLAB Web App Server. The username must be at least 7 characters long. This username is also used to login to the network license manager portal. For example: webappadmin. You cannot use "admin" as a username. | -| **Password to Remote into Server VM and Network License Manager Web Interface** | Specify a password to use when remoting into server VM hosting MATLAB Web App Server. This password is also used to login to the network license manager portal. | +| **Base64 Encoded SSL Certificate** | Enter a string that is a base64-encoded value of an SSL certificate in PEM format. On Linux, you can Base64 encode a PEM file using the following command in the terminal:

```base64 -w 0 "cert.pem" > "cert.txt"```

On Windows, you can Base64 encode a PEM file with a utility such as openssl or by using the following command in a PowerShell terminal:

```[Convert]::ToBase64String([System.IO.File]::ReadAllBytes("cert.pem")) \| Set-Content -NoNewline -Encoding Ascii "cert.txt"```

You may need to change the filename arguments accordingly. The contents of the output file (here `"cert.txt"`) should be used for this parameter.

Note:

  • MATLAB Web App Server only supports the `.pem` SSL certificate format.
  • SSL keys must be 2048 bits in length and must be private.
  • Intermediate certificates are not supported by the server.
  • SSL certificate should not be password protected.
  • Private key should not be password protected.
| +| **Base64 Encoded SSL Private Key** | Enter a string that is a base64-encoded value of an SSL private key file in PEM format. On Linux, you can Base64 encode a PEM file using the following command in the terminal:

```base64 -w 0 "key.pem" > "key.txt"```

On Windows, you can Base64 encode a PEM file with a utility such as openssl or by using the following command in a PowerShell terminal:

```[Convert]::ToBase64String([System.IO.File]::ReadAllBytes("key.pem")) \| Set-Content -NoNewline -Encoding Ascii "key.txt"```

You may need to change the filename arguments accordingly. The contents of the output file (here `"key.txt"`) should be used for this parameter. | +| **Username to Remote into Server VM** | Specify a username to use when remoting into server VM hosting MATLAB Web App Server. The username must be at least 7 characters long. This username is also used to login to the network license manager portal. For example: `webappadmin`. You cannot use `admin` as a username. | +| **Password to Remote into Server VM and Network License Manager Web Interface** | Specify a password to use when remoting into server VM hosting MATLAB Web App Server. This password is also used to login to the network license manager portal. Password requirements are:

  • Must be between 12-123 characters.
  • Have uppercase and lowercase characters.
  • Have a digit.
  • Have a special character.
| | **Deploy Network License Manager** | Select whether you want to deploy the Network License Manager for MATLAB to manage your license files. Selecting 'Yes' deploys the Network License Manager for MATLAB reference architecture. Select 'No' if you want to use an existing license manager. When using an existing license manager, the MATLAB Web App Server deployment and the license manager must be in the same virtual network.| +| **Location** | Region to store resources in. All resources are deployed in the same region as the resource group.

Examples: `eastus, westus, westus3`

| Click **Create** to begin the deployment. This can take up to 10 minutes. @@ -58,19 +62,42 @@ You are now ready to use MATLAB Web App Server on Azure. To run applications on MATLAB Web App Server, you need to create applications using MATLAB Compiler. For more information, see [Create Web App](https://www.mathworks.com/help/compiler/webapps/create-and-deploy-a-web-app.html) in the MATLAB Compiler documentation. # Get Network License Manager MAC Address ->**NOTE:**The network license manager MAC address is available only after the deployment to the cloud is complete. +>**Note:** The network license manager MAC address is available only after the deployment to the cloud is complete. + To get the MAC address of the network license manager: 1. Log in to the Network License Manager for MATLAB dashboard using the username and password you specified in the [Configure Cloud Resources](#step-2-configure-cloud-resources) step of the deployment process. -1. Click Administration > License. +1. Click **Administration** and then **License**. 1. Copy the license server MAC address displayed at the top. # Upload Apps -1. Select the `webapp` storage account resource from the resource group where MATLAB Web App Server was deployed. +## Upload from Azure Portal +>**Note:** If you set **Assign Public IP Address to VM Hosting MATLAB Web App Server** to `No` in the deployment template, then public network access is disabled for the storage account, and you must use a Bastion host or jumpbox VM to connect to the storage account. For details, see [Overview of Azure Bastion host and jumpboxes](https://learn.microsoft.com/en-us/azure/cloud-adoption-framework/scenarios/cloud-scale-analytics/architectures/connect-to-environments-privately). + +1. Select the `appstorage` storage account resource from the resource group where MATLAB Web App Server was deployed. 1. Select `File shares` from the left navigation pane under the `Data storage` category. -1. Select the `webapps` file share and click the `ctfs` folder. +1. Select the `webapps` file share. +1. Select `Browse` from the left navigation pane. You see two folders: `apps` and `logs`. +1. Click the `apps` folder. 1. Click `Upload` to browse and upload your app by following the prompts. +## Upload by Remoting into Server VM +### Windows Virtual Machine +1. Remotely connect to the server VM. For details, see [How do I remotely connect to the server virtual machine?](/README.md#how-do-i-remotely-connect-to-the-server-virtual-machine). +1. Open File Explorer and select `This PC`. +1. Double-click `Network Drive (W:)` to open it. +1. Double-click the `apps` folder. +1. Copy your app to this folder. + +**Note**: `Network Drive (W:)` is mapped to: `\\appstorage.file.core.windows.net\webapps`. + +### Linux Virtual Machine +1. Obtain the public IP address of the server VM. For details, see [How do I remotely connect to the server virtual machine?](/README.md#how-do-i-remotely-connect-to-the-server-virtual-machine). +1. From a local command shell, copy your app to the server VM in the folder `/mnt/webapps/apps` using SCP with the command format `scp @:/mnt/webapps/apps`. Authenticate using the username and password you specified in the [Configure Cloud Resources](#step-2-configure-cloud-resources) step of the deployment process. +For example: `scp ./mywebapp.ctf webappadmin@192.168.1.1:/mnt/webapps/apps`. + # View Log Files -1. Select the `webapp` storage account resource from the resource group where MATLAB Web App Server was deployed. +1. Select the `appstorage` storage account resource from the resource group where MATLAB Web App Server was deployed. 1. Select `File shares` from the left navigation pane under the `Data storage` category. -1. Select the `webapps` file share and click the `logs` folder to view the logs. +1. Select the `webapps` file share. +1. Select `Browse` from the left navigation pane. You see two folders: `apps` and `logs`. +1. Click the `logs` folder to view the logs. diff --git a/releases/R2022a/scripts/initLinux.sh b/releases/R2025a/scripts/initLinux.sh similarity index 86% rename from releases/R2022a/scripts/initLinux.sh rename to releases/R2025a/scripts/initLinux.sh index 4a46a22..19aeecc 100644 --- a/releases/R2022a/scripts/initLinux.sh +++ b/releases/R2025a/scripts/initLinux.sh @@ -3,7 +3,7 @@ # This script # 1. include storage account information to dynamicOption # 2. start controller -while getopts "n:f:k:s:c:p:" opt; do +while getopts "n:f:k:s:c:p:d:" opt; do case ${opt} in n) storageAccountName="$OPTARG";; f) resourceGroup="$OPTARG";; @@ -11,6 +11,7 @@ while getopts "n:f:k:s:c:p:" opt; do s) enableSSL="$OPTARG";; c) certFile="$OPTARG";; p) privateKeyFile="$OPTARG";; + d) fqdn="$OPTARG";; esac done @@ -21,7 +22,8 @@ JSONCMD=' "subscriptionID": "'"$subscriptionID"'", "enableSSL": "'"$enableSSL"'", "certFile": "'"$certFile"'", - "privateKeyFile": "'"$privateKeyFile"'" + "privateKeyFile": "'"$privateKeyFile"'", + "fqdn": "'"$fqdn"'" } ' @@ -31,6 +33,7 @@ rm $myPath #load json string into dynamic option file echo $JSONCMD >> $myPath + #to allow web app server to listen on port 443 sudo sysctl net.ipv4.ip_unprivileged_port_start=0 diff --git a/releases/R2022a/scripts/initWindows.ps1 b/releases/R2025a/scripts/initWindows.ps1 similarity index 80% rename from releases/R2022a/scripts/initWindows.ps1 rename to releases/R2025a/scripts/initWindows.ps1 index ff17fbc..eca0a44 100644 --- a/releases/R2022a/scripts/initWindows.ps1 +++ b/releases/R2025a/scripts/initWindows.ps1 @@ -1,7 +1,7 @@ <# .SYNOPSIS - This Script runs on master head node start, it is used in the ARM template to pass around the storage account name, key - as well as the mpsEndpoint. It saves the result to local disk and restarts the main nodeJS dashboard process running on the VM + This Script runs on master head node start, it is used in the ARM template to store the storage account name, key etc. + It saves the result to local disk and restarts the main nodeJS controller process running on the VM. #> Param ( @@ -16,7 +16,9 @@ Param ( [Parameter(Mandatory=$true)] [String]$certFile, [Parameter(Mandatory=$true)] - [String]$privateKeyFile + [String]$privateKeyFile, + [Parameter(Mandatory=$true)] + [String]$fqdn ) $myObj = New-Object System.Object @@ -27,6 +29,7 @@ $myObj | Add-Member -type NoteProperty -name subscriptionID -value $subscription $myObj | Add-Member -type NoteProperty -name enableSSL -value $enableSSL $myObj | Add-Member -type NoteProperty -name certFile -value $certFile $myObj | Add-Member -type NoteProperty -name privateKeyFile -value $privateKeyFile +$myObj | Add-Member -type NoteProperty -name fqdn -value $fqdn $Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False @@ -38,4 +41,4 @@ $myPath = "c:\\MathWorks\\controller\\config\\dynamicOptions.json" net stop http /y # Start the main service that performs bootstrapping and attaching the file share -Start-Process -FilePath "node" -ArgumentList("c:\\MathWorks\\controller\\index.js") +Start-Process -FilePath "node" -ArgumentList("c:\\MathWorks\\controller\\index.js") \ No newline at end of file diff --git a/releases/R2025a/templates/azuredeploy-existing-vnet-R2025a.json b/releases/R2025a/templates/azuredeploy-existing-vnet-R2025a.json new file mode 100644 index 0000000..009b79c --- /dev/null +++ b/releases/R2025a/templates/azuredeploy-existing-vnet-R2025a.json @@ -0,0 +1,594 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "Server VM Instance Size": { + "defaultValue": "Standard_D4_v3", + "type": "String", + "metadata": { + "description": "Specify the size of the VM you want to use for deploying the server." + } + }, + "Operating System": { + "defaultValue": "Windows", + "allowedValues": [ + "Windows", + "Linux" + ], + "type": "String", + "metadata": { + "description": "Choose between Windows or Linux." + } + }, + "Deploy to New or Existing Virtual Network": { + "defaultValue": "new", + "allowedValues": [ + "new", + "existing" + ], + "type": "String", + "metadata": { + "description": "Select whether you want to deploy the server to a new virtual network or an existing one." + } + }, + "Name of Virtual Network Where MATLAB Web App Server Will Be Deployed": { + "defaultValue": "webapp-refarch-vnet", + "type": "String", + "metadata": { + "description": "Specify the name of the virtual network where the server will be deployed. If deploying to a new virtual network, a new virtual network will created with this name. If deploying to an existing virtual network, this name must match the name of an existing virtual network. For example: webappserver-vnet." + } + }, + "Resource Group Name Of Virtual Network": { + "defaultValue": "[resourceGroup().name]", + "type": "String", + "metadata": { + "description": "Specify the name of the Azure resource group if you are deploying to an existing virtual network. If deploying to a new virtual network, keep the value as default resourceGroup().name, which indicates the resource group of this deployment. If deploying to an existing virtual network, this must match the resource group of the existing virtual network specified. For example: webappserver_rsg." + } + }, + "Virtual Network CIDR Range": { + "defaultValue": "10.0.0.0/16", + "type": "String", + "metadata": { + "description": "Specify the virtual network CIDR range. For example: 10.0.0.0/16 . If deploying to a new virtual network, specify a suitable CIDR range to be used for the new virtual network. If deploying to an existing virtual network, this must match the CIDR range of the existing virtual network specified." + } + }, + "Name of Subnet for MATLAB Web App Server": { + "defaultValue": "default", + "type": "String", + "metadata": { + "description": "Specify the name of the subnet that the server can use. If deploying to a new virtual network, this specifies the name of the subnet to be created in the virtual network. If deploying to an existing virtual network, this must match the name of a subnet in the existing virtual network specified." + } + }, + "Server Subnet CIDR Range": { + "defaultValue": "10.0.0.0/24", + "type": "String", + "metadata": { + "description": "Specify subnet CIDR range. This is a CIDR range for the subnet specified above. For example: 10.0.0.0/24 . If deploying to a new virtual network, specify a suitable CIDR range to be used for the new subnet. If deploying to an existing virtual network, this must match the CIDR range of the existing subnet specified." + } + }, + "Specify Private IP Address to VM Hosting MATLAB Web App Server": { + "defaultValue": "10.0.0.4", + "type": "String", + "metadata": { + "description": "Specify an unused private IP address to be assigned to the VM hosting the server. For example: 10.0.0.4 ." + } + }, + "Assign Public IP Address to VM Hosting MATLAB Web App Server": { + "defaultValue": "Yes", + "allowedValues": [ + "Yes", + "No" + ], + "type": "String", + "metadata": { + "description": "Select whether you want to assign a public IP address to the VM hosting the server." + } + }, + "IP Addresses Permitted to Remote into Server VM in CIDR Notation": { + "type": "String", + "metadata": { + "description": "Specify the range of IP addresses in CIDR notation that can remote into the VM hosting MATLAB Web App Server and administer it. For example: 192.168.1.0/24. This can be a comma-separated list of CIDR ranges (no spaces). For example: 192.168.1.0/24,10.0.0.0/8,172.16.0.0/16." + } + }, + "IP Addresses Allowed to Access MATLAB Web App Server Apps Home Page in CIDR Notation": { + "type": "String", + "metadata": { + "description": "Specify the range of IP addresses in CIDR notation that can access the MATLAB Web App Server apps home page. For example: 192.168.1.0/24. This can be a comma-separated list of CIDR ranges (no spaces). For example: 192.168.1.0/24,10.0.0.0/8,172.16.0.0/16." + } + }, + "Base64 Encoded SSL Certificate": { + "type": "String", + "metadata": { + "description": "Enter a string that is a base64-encoded value of an SSL certificate in PEM format." + } + }, + "Base64 Encoded SSL Private Key": { + "type": "SecureString", + "metadata": { + "description": "Enter a string that is a base64-encoded value of an SSL private key file in PEM format." + } + }, + "Username to Remote into Server VM and Network License Manager Web Interface": { + "type": "String", + "metadata": { + "description": "Specify a username to use when remoting into server VM hosting MATLAB Web App Server. This username is also used to login to the network license manager portal. For example: webappadmin. You cannot use \"admin\" as a username." + } + }, + "Password to Remote into Server VM and Network License Manager Web Interface": { + "type": "SecureString", + "metadata": { + "description": "Specify a password to use when remoting into server VM hosting MATLAB Web App Server. This password is also used to login to the network license manager portal." + } + }, + "Deploy Network License Manager For MATLAB": { + "defaultValue": "Yes", + "allowedValues": [ + "Yes", + "No" + ], + "type": "String", + "metadata": { + "description": "Select whether you want to deploy a network license manager or not." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources. This is automatically set to the resource group location. Do not change." + } + } + }, + "variables": { + "providerID": "D36A3EDC-0566-4EE4-86D3-64F20D2DDA06", + "vmName": "webapp-vm", + "usePublicIPAddresses": "[parameters('Assign Public IP Address to VM Hosting MATLAB Web App Server')]", + "addressPrefix": "[parameters('Virtual Network CIDR Range')]", + "serverPrivateIP": "[parameters('Specify Private IP Address to VM Hosting MATLAB Web App Server')]", + "serverPublicIP": "webapp-public-ip", + "publicIPprop1": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('serverPublicIP'))]" + }, + "webappDNSName": "[concat('webapp',uniqueString(resourceGroup().id))]", + "networkInterfaceName": "webapp-nic", + "virtualNetworkID": "[resourceId(variables('virtualNetworkResourceGroup'), 'Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]", + "virtualNetworkResourceGroup": "[parameters('Resource Group Name Of Virtual Network')]", + "virtualNetworkName": "[parameters('Name of Virtual Network Where MATLAB Web App Server Will Be Deployed')]", + "subnetName": "[parameters('Name of Subnet for MATLAB Web App Server')]", + "subnetIP": "[parameters('Server Subnet CIDR Range')]", + "subnetRef": "[resourceId(variables('virtualNetworkResourceGroup'),'Microsoft.Network/virtualNetworks/subnets',variables('virtualNetworkName'),variables('subnetName'))]", + "networkSecurityGroupName": "webapp-nsg", + "adminIP": "[split(parameters('IP Addresses Permitted to Remote into Server VM in CIDR Notation'), ',')]", + "adminSingleIP": "[if(endsWith(variables('adminIP')[0], '/32'), substring(variables('adminIP')[0], 0, sub(length(variables('adminIP')[0]), 3)), variables('adminIP')[0])]", + "clientIP": "[split(parameters('IP Addresses Allowed to Access MATLAB Web App Server Apps Home Page in CIDR Notation'), ',')]", + "clientSingleIP": "[if(endsWith(variables('clientIP')[0], '/32'), substring(variables('clientIP')[0], 0, sub(length(variables('clientIP')[0]), 3)), variables('clientIP')[0])]", + "newOrExistingVirtualNetwork": "[parameters('Deploy to New or Existing Virtual Network')]", + "storageAccountName": "[concat('appstorage',uniqueString(resourceGroup().id))]", + "storageAccountType": "Standard_LRS", + "privateEndpointName": "storagePrivateEndpoint", + "fileStorageDnsZone": "[concat('privatelink.file.', environment().suffixes.storage)]", + "privateEndpointDnsGroupName": "[format('{0}/mydnsgroupname', variables('privateEndpointName'))]", + "platform": "[parameters('Operating System')]", + "WindowsOffer": "matlab-web-app-server-byol-windows", + "WindowsSKU": "matlab-web-app-server-windows-25a", + "WindowsSKUVersion": "latest", + "LinuxOffer": "matlab-web-app-server-byol-linux", + "LinuxSKU": "matlab-web-app-server-linux-25a", + "LinuxSKUVersion": "latest", + "enableSSL": "Yes", + "certFile": "[if(equals(variables('enableSSL'), 'Yes'), parameters('Base64 Encoded SSL Certificate'), 'NONE')]", + "privateKeyFile": "[if(equals(variables('enableSSL'), 'Yes'), parameters('Base64 Encoded SSL Private Key'), 'NONE')]", + "windowsCommand": "[concat('powershell -ExecutionPolicy Unrestricted -File initWindows.ps1 -storageAccountName ', variables('storageAccountName'), ' -resourceGroup ', resourceGroup().name, ' -subscriptionID ', subscription().subscriptionId, ' -enableSSL ', variables('enableSSL'), ' -certFile ', variables('certFile'), ' -privateKeyFile ', variables('privateKeyFile'), ' -fqdn ', concat(variables('webappDNSName'),'.',parameters('location'),'.','cloudapp.azure.com'))]", + "linuxCommand": "[concat('sudo bash ./initLinux.sh -n ', variables('storageAccountName'), ' -f ', resourceGroup().name, ' -k ', subscription().subscriptionId, ' -s ', variables('enableSSL'), ' -c ', variables('certFile'), ' -p ', variables('privateKeyFile'), ' -d ', concat(variables('webappDNSName'),'.',parameters('location'),'.','cloudapp.azure.com'))]", + "storageEndpointSuffix": "[environment().suffixes.storage]", + "_artifactsLocation": "[concat('https://', 'mwappdeployment.blob.', variables('storageEndpointSuffix'), '/webappserver-artifacts-r2025a/')]", + "_artifactsLocationSasTokenWindows": "?sp=racwdt&st=2025-05-05T15:59:03Z&se=2028-05-05T23:59:03Z&spr=https&sv=2024-11-04&sr=b&sig=HQ2AzcxGnwVrHOjjeONcfrhIA%2FPVpKQmhDX5jNUqpVg%3D", + "_artifactsLocationSasTokenLinux": "?sp=racwdt&st=2025-05-05T16:00:47Z&se=2028-05-06T00:00:47Z&spr=https&sv=2024-11-04&sr=b&sig=OffP64sKc0FSj923ZyVUtv0lZuFV4%2Fxv1pBSS%2BNiGOE%3D", + "windowsScriptURL": "[uri(variables('_artifactsLocation'), concat('initWindows.ps1', variables('_artifactsLocationSasTokenWindows')))]", + "linuxScriptURL": "[uri(variables('_artifactsLocation'), concat('initLinux.sh', variables('_artifactsLocationSasTokenLinux')))]", + "roleName": "[guid(resourceGroup().id, deployment().name)]", + "contributor": "[resourceId('Microsoft.Authorization/roleDefinitions/', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]", + "deployNetworkLicenseManager": "[parameters('Deploy Network License Manager For MATLAB')]", + "flex-arm-template-link": "https://github.com/mathworks-ref-arch/license-manager-for-matlab-on-azure/blob/master/releases/v1/latest/azuredeploy.json", + "flex-parameters": { + "instanceType": { + "value": "Standard_D2s_v3" + }, + "clientIPAddressList": { + "value": "[parameters('IP Addresses Permitted to Remote into Server VM in CIDR Notation')]" + }, + "adminUsername": { + "value": "[parameters('Username to Remote into Server VM and Network License Manager Web Interface')]" + }, + "adminPassword": { + "value": "[parameters('Password to Remote into Server VM and Network License Manager Web Interface')]" + }, + "existingVnetResourceID": { + "value": "[variables('virtualNetworkID')]" + }, + "existingSubnetName": { + "value": "[variables('subnetName')]" + }, + "createPublicIPAddress": { + "value": "[parameters('Assign Public IP Address to VM Hosting MATLAB Web App Server')]" + } + }, + "publicDns": "[concat(variables('webappDNSName'), '.', parameters('location'), '.cloudapp.azure.com')]", + "publicIPWithSSL": "[concat('https://', variables('publicDns'))]", + "publicDnsWithoutSSL": "[concat('http://', variables('publicDns'))]", + "privateIPWithSSL": "[concat('https://', variables('serverPrivateIP'))]", + "privateIPWithoutSSL": "[concat('http://', variables('serverPrivateIP'))]", + "publicDnsWithSSLAndRedirect": "[concat(variables('publicIPWithSSL'), ':443/webapps/extauth/callback')]", + "privateIPWithSSLAndRedirect": "[concat(variables('privateIPWithSSL'), ':443/webapps/extauth/callback')]", + "webAppServerUrl": "[if(equals(variables('usePublicIPAddresses'), 'Yes'), if(equals(variables('enableSSL'), 'Yes'), variables('publicIPWithSSL'), variables('publicDnsWithoutSSL')), if(equals(variables('enableSSL'), 'Yes'), variables('privateIPWithSSL'), variables('privateIPWithoutSSL')))]", + "webAppServerOidcRedirectUrl": "[if(equals(variables('enableSSL'), 'Yes'), if(equals(variables('usePublicIPAddresses'), 'Yes'), variables('publicDnsWithSSLAndRedirect'), variables('privateIPWithSSLAndRedirect')), 'SSL is not enabled. SSL is required to configure OIDC.')]" + }, + "resources": [ + { + "type": "Microsoft.Resources/deployments", + "apiVersion": "2023-07-01", + "name": "flex-lm-server", + "dependsOn": [ + "[resourceId('Microsoft.Network/networkInterfaces/',variables('networkInterfaceName'))]", + "[resourceId('Microsoft.Network/virtualNetworks/',variables('virtualNetworkName'))]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[variables('flex-arm-template-link')]", + "contentVersion": "1.0.0.0" + }, + "parameters": "[variables('flex-parameters')]" + }, + "condition": "[equals(variables('deployNetworkLicenseManager'), 'Yes')]" + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2023-09-01", + "name": "[variables('vmName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts/',variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/networkInterfaces/',variables('networkInterfaceName'))]" + ], + "identity": { + "type": "SystemAssigned" + }, + "plan": { + "name": "[if(equals(variables('platform'), 'Windows'), variables('WindowsSKU'), variables('LinuxSKU'))]", + "publisher": "mathworks-inc", + "product": "[if(equals(variables('platform'), 'Windows'), variables('WindowsOffer'), variables('LinuxOffer'))]" + }, + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('Server VM Instance Size')]" + }, + "osProfile": { + "computerName": "[variables('vmName')]", + "adminUsername": "[parameters('Username to Remote into Server VM and Network License Manager Web Interface')]", + "adminPassword": "[parameters('Password to Remote into Server VM and Network License Manager Web Interface')]" + }, + "storageProfile": { + "imageReference": { + "publisher": "mathworks-inc", + "offer": "[if(equals(variables('platform'), 'Windows'), variables('WindowsOffer'), variables('LinuxOffer'))]", + "sku": "[if(equals(variables('platform'), 'Windows'), variables('WindowsSKU'), variables('LinuxSKU'))]", + "version": "[if(equals(variables('platform'), 'Windows'), variables('WindowsSKUVersion'), variables('LinuxSKUVersion'))]" + }, + "osDisk": { + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('networkInterfaceName'))]" + } + ] + } + }, + "resources": [ + { + "type": "extensions", + "apiVersion": "2023-09-01", + "name": "config-app", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Compute/virtualMachines/', variables('vmName'))]", + "[resourceId('Microsoft.Authorization/roleAssignments/', variables('roleName'))]" + ], + "tags": { + "displayName": "config-app", + "provider": "[variables('providerID')]" + }, + "properties": { + "publisher": "[if(equals(variables('platform'), 'Windows'), 'Microsoft.Compute', 'Microsoft.Azure.Extensions')]", + "type": "[if(equals(variables('platform'), 'Windows'), 'CustomScriptExtension', 'CustomScript')]", + "typeHandlerVersion": "[if(equals(variables('platform'), 'Windows'), '1.9', '2.0')]", + "autoUpgradeMinorVersion": true, + "settings": { + "skipDos2Unix": false, + "timestamp": 123456789 + }, + "protectedSettings": { + "commandToExecute": "[if(equals(variables('platform'), 'Windows'), variables('windowsCommand'), variables('linuxCommand') )]", + "fileUris": [ + "[if(equals(variables('platform'), 'Windows'), variables('windowsScriptURL'), variables('linuxScriptURL'))]" + ] + } + } + } + ] + }, + { + "type": "Microsoft.Authorization/roleAssignments", + "apiVersion": "2022-04-01", + "name": "[variables('roleName')]", + "dependsOn": [ + "[resourceId('Microsoft.Compute/virtualMachines/', variables('vmName'))]" + ], + "properties": { + "roleDefinitionId": "[variables('contributor')]", + "principalId": "[reference(resourceId('Microsoft.Compute/virtualMachines', variables('vmName')),'2023-09-01', 'Full').identity.principalId]", + "scope": "[resourceGroup().id]", + "principalType": "ServicePrincipal" + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "2023-04-01", + "name": "[variables('storageAccountName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]" + ], + "tags": { + "Description": "Storage account that stores application and config files", + "provider": "[variables('providerID')]" + }, + "sku": { + "name": "[variables('storageAccountType')]" + }, + "kind": "StorageV2", + "properties": { + "minimumTlsVersion": "TLS1_2", + "allowBlobPublicAccess": false, + "publicNetworkAccess": "[if(equals(variables('usePublicIPAddresses'), 'Yes'), 'Enabled', 'Disabled')]", + "networkAcls": { + "virtualNetworkRules": "[if(equals(variables('usePublicIPAddresses'), 'Yes'), createArray(createObject('id', variables('subnetRef'))), createArray())]", + "ipRules": "[if(equals(variables('usePublicIPAddresses'), 'Yes'), if(equals(variables('clientSingleIP'), variables('adminSingleIP')), createArray(createObject('action', 'Allow', 'value', variables('clientSingleIP'))), createArray(createObject('action', 'Allow', 'value', variables('clientSingleIP')), createObject('action', 'Allow', 'value', variables('adminSingleIP')))), createArray())]", + "defaultAction": "Deny" + } + } + }, + { + "type": "Microsoft.Network/privateEndpoints", + "apiVersion": "2023-06-01", + "name": "[variables('privateEndpointName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.Network/virtualNetworks', variables('VirtualNetworkName'))]" + ], + "properties": { + "subnet": { + "id": "[variables('subnetRef')]" + }, + "privateLinkServiceConnections": [ + { + "name": "[variables('privateEndpointName')]", + "properties": { + "privateLinkServiceId": "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "groupIds": [ + "file" + ] + } + } + ] + }, + "condition": "[equals(variables('usePublicIPAddresses'), 'No')]" + }, + { + "type": "Microsoft.Network/privateDnsZones", + "apiVersion": "2020-06-01", + "name": "[variables('fileStorageDnsZone')]", + "location": "global", + "dependsOn": [ + "[resourceId('Microsoft.Network/virtualNetworks', variables('VirtualNetworkName'))]" + ], + "properties": {}, + "condition": "[equals(variables('usePublicIPAddresses'), 'No')]" + }, + { + "type": "Microsoft.Network/privateDnsZones/virtualNetworkLinks", + "apiVersion": "2020-06-01", + "name": "[format('{0}/{1}', variables('fileStorageDnsZone'), format('{0}-link', variables('fileStorageDnsZone')))]", + "location": "global", + "dependsOn": [ + "[resourceId('Microsoft.Network/privateDnsZones', variables('fileStorageDnsZone'))]", + "[resourceId('Microsoft.Network/virtualNetworks', variables('VirtualNetworkName'))]" + ], + "properties": { + "registrationEnabled": false, + "virtualNetwork": { + "id": "[resourceId(variables('virtualNetworkResourceGroup'),'Microsoft.Network/virtualNetworks', variables('VirtualNetworkName'))]" + } + }, + "condition": "[equals(variables('usePublicIPAddresses'), 'No')]" + }, + { + "type": "Microsoft.Network/privateEndpoints/privateDnsZoneGroups", + "apiVersion": "2023-06-01", + "name": "[variables('privateEndpointDnsGroupName')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/privateDnsZones', variables('fileStorageDnsZone'))]", + "[resourceId('Microsoft.Network/privateEndpoints', variables('privateEndpointName'))]" + ], + "properties": { + "privateDnsZoneConfigs": [ + { + "name": "config1", + "properties": { + "privateDnsZoneId": "[resourceId('Microsoft.Network/privateDnsZones', variables('fileStorageDnsZone'))]" + } + } + ] + }, + "condition": "[equals(variables('usePublicIPAddresses'), 'No')]" + }, + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "2023-06-01", + "name": "[variables('virtualNetworkName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]" + ], + "tags": { + "Description": "Virtual network for the Web app Server deployment", + "provider": "[variables('providerID')]" + }, + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[variables('addressPrefix')]" + ] + }, + "subnets": [ + { + "name": "[variables('subnetName')]", + "properties": { + "addressPrefix": "[variables('subnetIP')]", + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]" + }, + "serviceEndpoints": [ + { + "service": "Microsoft.Storage", + "locations": "[parameters('location')]" + } + ] + } + } + ] + }, + "condition": "[equals(variables('newOrExistingVirtualNetwork'), 'new')]" + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2023-06-01", + "name": "[variables('networkInterfaceName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/publicIPAddresses/', variables('serverPublicIP'))]", + "[resourceId('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]", + "[resourceId('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]" + ], + "tags": { + "Description": "Network Interface Card (NIC) for the web app VM", + "provider": "[variables('providerID')]" + }, + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAddress": "[variables('serverPrivateIP')]", + "privateIPAllocationMethod": "Static", + "publicIPAddress": "[if(equals(variables('usePublicIPAddresses'), 'Yes'), variables('publicIPprop1'), json('null'))]", + "subnet": { + "id": "[variables('subnetRef')]" + } + } + } + ], + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]" + } + } + }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "apiVersion": "2023-06-01", + "name": "[variables('networkSecurityGroupName')]", + "location": "[parameters('location')]", + "tags": { + "Description": "Network Security Group to control access to VM", + "provider": "[variables('providerID')]" + }, + "properties": { + "securityRules": [ + { + "name": "allow-admin", + "properties": { + "priority": 1000, + "sourceAddressPrefixes": "[variables('adminIP')]", + "protocol": "Tcp", + "destinationPortRanges": [ + "22", + "3389", + "443" + ], + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" + } + }, + { + "name": "allow-client", + "properties": { + "priority": 1001, + "sourceAddressPrefixes": "[variables('clientIP')]", + "protocol": "Tcp", + "destinationPortRanges": [ + "443" + ], + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" + } + } + ] + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2023-06-01", + "name": "[variables('serverPublicIP')]", + "location": "[parameters('location')]", + "tags": { + "Description": "Public IP Address of the MATLAB Production Server Dashboard", + "provider": "[variables('providerID')]" + }, + "sku": { + "name": "Standard" + }, + "properties": { + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[variables('webappDNSName')]" + } + }, + "condition": "[equals(variables('usePublicIPAddresses'), 'Yes')]" + } + ], + "outputs": { + "webAppServerURL": { + "type": "String", + "value": "[variables('webAppServerUrl')]" + }, + "networkLicenseManagerURL": { + "type": "String", + "value": "[if(equals(variables('deployNetworkLicenseManager'), 'Yes'), reference('flex-lm-server').outputs.NetworkLicenseManagerAddress.value, 'none')]" + }, + "webAppsOIDCRedirectURL": { + "type": "String", + "value": "[variables('webAppServerOidcRedirectUrl')]" + } + } +} \ No newline at end of file diff --git a/releases/R2025a/templates/mainTemplate.json b/releases/R2025a/templates/mainTemplate.json new file mode 100644 index 0000000..792b9eb --- /dev/null +++ b/releases/R2025a/templates/mainTemplate.json @@ -0,0 +1,354 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "instanceType": { + "type": "string", + "defaultValue": "Standard_B1ms", + "minLength": 1, + "metadata": { + "description": "Azure instance type, see https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes." + } + }, + "clientIPAddressList": { + "type": "string", + "defaultValue": "", + "minLength": 7, + "metadata": { + "description": "A list of comma separated IP address ranges that can be used to access the license manager. These must be valid IP CIDR ranges of the form x.x.x.x/x. Use the value <your_client_ip_address>/32 to restrict access to only your computer." + } + }, + "adminUsername": { + "defaultValue": "manager", + "minLength": 7, + "type": "String", + "metadata": { + "description": "Admin username, this is used to login to the Network License Manager for MATLAB dashboard." + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Admin password for the chosen username. This is used to login to the Network License Manager for MATLAB dashboard." + } + }, + "existingVnetResourceID": { + "defaultValue": "", + "type": "string", + "metadata": { + "description": "Use this optional parameter to specify the Resource ID of an existing virtual network to deploy your server into. Specify this parameter only when you deploy using the Existing Virtual Network option." + } + }, + "existingSubnetName": { + "defaultValue": "", + "type": "string", + "metadata": { + "description": "Use this optional parameter to specify the name of an existing subnet within your virtual network to deploy your server into. Specify this parameter only when you deploy using the Existing Virtual Network option." + } + }, + "createPublicIPAddress": { + "type": "string", + "defaultValue": "Yes", + "allowedValues": [ + "Yes", + "No" + ], + "metadata": { + "description": "Choose whether to create a public IP address for the VM." + } + } + }, + "variables": { + "namingPrefix": "netlm", + "artifactsBase": "C:/Windows/Temp/", + "addressPrefix": "10.0.0.0/16", + "subnetPrefix": "10.0.0.0/24", + "newOrExistingVirtualNetwork": "[if(equals(parameters('existingVnetResourceID'), ''), 'new', 'existing')]", + "newVnetName": "[concat(variables('namingPrefix'), '-vnet')]", + "newSubnetName": "[concat(variables('namingPrefix'), '-subnet')]", + "virtualNetworkName": "[if(equals(variables('newOrExistingVirtualNetwork'),'existing'), last(split(parameters('existingVnetResourceID'),'/')), variables('newVnetName'))]", + "subnetName": "[if(equals(variables('newOrExistingVirtualNetwork'),'existing'), parameters('existingSubnetName'), variables('newSubnetName'))]", + "subnetRef": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), variables('subnetName'))]", + "subnetId": "[if(equals(variables('newOrExistingVirtualNetwork'),'new'), variables('subnetRef'), concat(parameters('existingVnetResourceID'), '/subnets/', parameters('existingSubnetName')))]", + "createPublicIPAddress": "[if(equals(parameters('createPublicIPAddress'), 'Yes'), bool('true'), bool('false'))]", + "cuaTrackingNum": "pid-3519fce2-01d2-4019-90dc-b6566eacbe89-partnercenter", + "serverMachineName": "[concat(take(variables('namingPrefix'), 8), '-server')]", + "publisher": "mathworks-inc", + "offer": "license-manager-ref-arch-win", + "sku": "license-manager-ref-arch-win-sku-r2025a-test", + "version": "latest", + "imageReference": { + "publisher": "[variables('publisher')]", + "offer": "[variables('offer')]", + "sku": "[variables('sku')]", + "version": "[variables('version')]" + }, + "plan": { + "name": "[variables('sku')]", + "publisher": "[variables('publisher')]", + "product": "[variables('offer')]" + }, + "publicIPName": "[concat(variables('serverMachineName'), '-ip')]", + "dnsLabelPrefix": "[concat('azure-', uniqueString(resourceGroup().id))]", + "publicIpTimeout": "20", + "networkSecurityGroupName": "[concat(variables('namingPrefix'), '-nsg')]", + "serverNICName": "[concat(variables('serverMachineName'), '-nic')]", + "serverIPConfigName": "[concat(variables('serverMachineName'), '-ipconfig')]", + "nicIpConfigurationWithPublicIP": [ + { + "name": "[variables('serverIPConfigName')]", + "properties": { + "subnet": { + "id": "[variables('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic", + "publicIpAddress": { + "id": "[resourceId('Microsoft.Network/publicIpAddresses', variables('publicIPName'))]" + } + } + } + ], + "nicIpConfigurationWithoutPublicIP": [ + { + "name": "[variables('serverIPConfigName')]", + "properties": { + "subnet": { + "id": "[variables('subnetId')]" + }, + "privateIPAllocationMethod": "Dynamic" + } + } + ], + "scriptsUrl": "C:/Windows/Temp/", + "startScript": "startserver.ps1", + "fileUris": [ + "[concat(variables('scriptsUrl'), variables('startScript'))]" + ], + "scriptExe": "[concat(variables('artifactsBase'), variables('startScript'))]", + "installCommand": "[concat('powershell -ExecutionPolicy Unrestricted -File ', variables('scriptExe'))]", + "tagsForAll": { + "provider": "[variables('cuaTrackingNum')]" + } + }, + "resources": [ + { + "condition": "[equals(variables('newOrExistingVirtualNetwork'),'new')]", + "name": "[variables('virtualNetworkName')]", + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "2023-11-01", + "location": "[resourceGroup().location]", + "tags": "[variables('tagsForAll')]", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[variables('addressPrefix')]" + ] + }, + "subnets": [ + { + "name": "[variables('subnetName')]", + "properties": { + "addressPrefix": "[variables('subnetPrefix')]" + } + } + ] + } + }, + { + "condition": "[variables('createPublicIPAddress')]", + "name": "[variables('publicIPName')]", + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2023-11-01", + "location": "[resourceGroup().location]", + "tags": "[variables('tagsForAll')]", + "properties": { + "publicIPAllocationMethod": "Static", + "dnsSettings": { + "domainNameLabel": "[concat(variables('serverMachineName'), variables('dnsLabelPrefix'))]" + }, + "idleTimeoutInMinutes": "[variables('publicIpTimeout')]" + } + }, + { + "name": "[variables('networkSecurityGroupName')]", + "type": "Microsoft.Network/networkSecurityGroups", + "apiVersion": "2023-11-01", + "location": "[resourceGroup().location]", + "dependsOn": [ + "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]" + ], + "tags": "[variables('tagsForAll')]", + "properties": { + "securityRules": [ + { + "name": "default-allow-rdp", + "properties": { + "priority": 1000, + "sourceAddressPrefixes": "[split(replace(parameters('clientIPAddressList'),' ', ''), ',')]", + "protocol": "TCP", + "destinationPortRange": "3389", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" + } + }, + { + "name": "allow-https", + "properties": { + "priority": 1010, + "sourceAddressPrefixes": "[split(replace(parameters('clientIPAddressList'),' ', ''), ',')]", + "protocol": "TCP", + "destinationPortRange": "443", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" + } + }, + { + "name": "allow-netlm", + "properties": { + "priority": 1020, + "sourceAddressPrefixes": "[split(replace(parameters('clientIPAddressList'),' ', ''), ',')]", + "protocol": "TCP", + "destinationPortRange": "27000-27010", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "*" + } + }, + { + "name": "allow-internal-traffic", + "properties": { + "priority": 1030, + "sourceAddressPrefix": "VirtualNetwork", + "protocol": "TCP", + "destinationPortRange": "*", + "access": "Allow", + "direction": "Inbound", + "sourcePortRange": "*", + "destinationAddressPrefix": "VirtualNetwork" + } + }, + { + "name": "allow-ssh", + "properties": { + "description": "allow-ssh", + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "22", + "sourceAddressPrefixes": "[split(replace(parameters('clientIPAddressList'),' ', ''), ',')]", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 1040, + "direction": "Inbound" + } + } + ] + } + }, + { + "name": "[variables('serverNICName')]", + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2023-11-01", + "location": "[resourceGroup().location]", + "dependsOn": [ + "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]", + "[resourceId('Microsoft.Network/publicIpAddresses', variables('publicIPName'))]" + ], + "tags": "[variables('tagsForAll')]", + "properties": { + "ipConfigurations": "[variables(if(variables('createPublicIPAddress'), 'nicIpConfigurationWithPublicIP', 'nicIpConfigurationWithoutPublicIP'))]", + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]" + } + } + }, + { + "name": "[variables('serverMachineName')]", + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2023-09-01", + "location": "[resourceGroup().location]", + "dependsOn": [ + "[resourceId('Microsoft.Network/networkInterfaces', variables('serverNICName'))]" + ], + "tags": "[variables('tagsForAll')]", + "plan": "[variables('plan')]", + "properties": { + "osProfile": { + "computerName": "[variables('serverMachineName')]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]", + "windowsConfiguration": { + "provisionVmAgent": "true" + } + }, + "hardwareProfile": { + "vmSize": "[parameters('instanceType')]" + }, + "storageProfile": { + "imageReference": "[variables('imageReference')]", + "osDisk": { + "createOption": "fromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('serverNICName'))]" + } + ] + } + } + }, + { + "name": "[concat(variables('serverMachineName'), '/Installation')]", + "type": "Microsoft.Compute/virtualMachines/extensions", + "apiVersion": "2023-09-01", + "location": "[resourceGroup().location]", + "dependsOn": [ + "[resourceId('Microsoft.Compute/virtualMachines', variables('serverMachineName'))]" + ], + "tags": "[variables('tagsForAll')]", + "properties": { + "publisher": "Microsoft.Compute", + "type": "CustomScriptExtension", + "typeHandlerVersion": "1.5", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": "[variables('fileUris')]" + }, + "protectedSettings": { + "commandToExecute": "[if(variables('createPublicIPAddress'), concat(variables('installCommand'),' -DNS ', reference(variables('publicIPName'), '2023-06-01').dnsSettings.fqdn), concat(variables('installCommand'),' -DNS ', reference(variables('serverNICName'), '2023-06-01').ipConfigurations[0].properties.privateIPAddress))]" + } + } + }, + { + "name": "pid-3519fce2-01d2-4019-90dc-b6566eacbe89-partnercenter", + "type": "Microsoft.Resources/deployments", + "apiVersion": "2023-07-01", + "dependsOn": [ + "[resourceId('Microsoft.Compute/virtualMachines', variables('serverMachineName'))]" + ], + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "resources": [] + } + } + } + ], + "outputs": { + "NetworkLicenseManagerAddress": { + "value": "[if(variables('createPublicIPAddress'), concat('https://', reference(variables('publicIPName')).dnsSettings.fqdn), concat('https://', reference(variables('serverNICName'), '2023-06-01').ipConfigurations[0].properties.privateIPAddress))]", + "type": "string" + } + } + } \ No newline at end of file diff --git a/releases/release-notes.md b/releases/release-notes.md new file mode 100644 index 0000000..6c4bcc6 --- /dev/null +++ b/releases/release-notes.md @@ -0,0 +1,13 @@ +## Release Notes for MATLAB Web App Server on Microsoft Azure + +### R2025a +- You can now deploy MATLAB Web App Server R2025a using the Microsoft Azure reference architecture. +- The **Assign Public IP Address to VM Hosting MATLAB Web App Server** entry of the deployment template controls access to the storage account. For details, see the **Assign Public IP Address to VM Hosting MATLAB Web App Server** entry in the [Configure Cloud Resources](/releases/R2025a/README.md#step-2-configure-cloud-resources) step of the deployment process. + - If you assign a public IP address to the VM hosting MATLAB Web App Server, then public network access to the storage account is enabled only from selected virtual networks and IP addresses. Previously, public network access was enabled from all networks. + - If you assign a private IP address to the VM hosting MATLAB Web App Server, then public network access to the storage account is disabled. You must use the MATLAB Web App Server VM or a bastion host to connect to the storage account. Previously, public network access was enabled from all networks. +- If you deploy using an existing virtual network and assign a public IP address to the VM hosting MATLAB Web App Server, you must manually add a service endpoint to the virtual network before deploying MATLAB Web App Server in order to create and access the storage account. For details, see [How do I deploy to an existing virtual network?](/README.md#how-do-i-deploy-to-an-existing-virtual-network). + +### R2024b +- You can now deploy MATLAB Web App Server R2024b using the Microsoft Azure reference architecture. +- You can assign a private IP address for the Network License Manager VM. Previously, you could only assign the Network License Manager VM a public IP address. +- You can allow a range of IP addresses to access the Network License Manager dashboard. \ No newline at end of file