mirror of https://github.com/OpenVidu/openvidu.git
openvidu-deployment: azure - CUID for elastic and ha deployments and adjustments to those .bicep to support the new CUID
parent
0b017b2abb
commit
915a4598b1
|
@ -39,7 +39,7 @@
|
|||
},
|
||||
{
|
||||
"name": "parameters SSL",
|
||||
"label": "Parameters for Domain and SSL certificate configuration",
|
||||
"label": "Domain and SSL certificate configuration",
|
||||
"elements": [
|
||||
{
|
||||
"name": "certificateType",
|
||||
|
@ -176,7 +176,7 @@
|
|||
},
|
||||
{
|
||||
"name": "parameters INSTANCE",
|
||||
"label": "Parameters for OpenVidu instance configuration",
|
||||
"label": "OpenVidu instance configuration",
|
||||
"elements": [
|
||||
{
|
||||
"name": "instanceType",
|
||||
|
@ -249,7 +249,7 @@
|
|||
},
|
||||
{
|
||||
"name": "parameters STORAGE",
|
||||
"label": "Parameters for Storage Account configuration",
|
||||
"label": "Storage Account configuration",
|
||||
"elements": [
|
||||
{
|
||||
"name": "storageAccountName",
|
||||
|
@ -287,7 +287,7 @@
|
|||
},
|
||||
{
|
||||
"name": "parameters TURN",
|
||||
"label": "(Optional) Parameters for TURN server configuration with TLS",
|
||||
"label": "(Optional) TURN server configuration with TLS",
|
||||
"elements": [
|
||||
{
|
||||
"name": "turnDomainName",
|
||||
|
|
|
@ -16,10 +16,7 @@ and an Elastic IP, you can use this option to generate a Let's Encrypt certifica
|
|||
param certificateType string = 'selfsigned'
|
||||
|
||||
@description('Previously created Public IP address for the OpenVidu Deployment. Blank will generate a public IP')
|
||||
param publicIpAddress string = ''
|
||||
|
||||
@description('Name of the PublicIPAddress resource in your azure if you have a resource of publicIPAddress')
|
||||
param publicIpAddressResourceName string = ''
|
||||
param publicIpAddressObject object
|
||||
|
||||
@description('Domain name for the OpenVidu Deployment. Blank will generate default domain')
|
||||
param domainName string = ''
|
||||
|
@ -282,7 +279,7 @@ param adminUsername string
|
|||
|
||||
@description('SSH Key or password for the Virtual Machine')
|
||||
@secure()
|
||||
param adminSshKey string
|
||||
param adminSshKey object
|
||||
|
||||
@description('Number of initial media nodes to deploy')
|
||||
param initialNumberOfMediaNodes int = 1
|
||||
|
@ -298,29 +295,12 @@ param scaleTargetCPU int = 50
|
|||
|
||||
/*------------------------------------------- VARIABLES AND VALIDATIONS -------------------------------------------*/
|
||||
|
||||
var isEmptyIp = publicIpAddress == ''
|
||||
var ipSegments = split(publicIpAddress, '.')
|
||||
var isFourSegments = length(ipSegments) == 4
|
||||
var seg1valid = isEmptyIp ? true : int(ipSegments[0]) >= 0 && int(ipSegments[0]) <= 255
|
||||
var seg2valid = isEmptyIp ? true : int(ipSegments[1]) >= 0 && int(ipSegments[1]) <= 255
|
||||
var seg3valid = isEmptyIp ? true : int(ipSegments[2]) >= 0 && int(ipSegments[2]) <= 255
|
||||
var seg4valid = isEmptyIp ? true : int(ipSegments[3]) >= 0 && int(ipSegments[3]) <= 255
|
||||
var isValidIP = !isEmptyIp && isFourSegments && seg1valid && seg2valid && seg3valid && seg4valid
|
||||
var isEmptyIp = publicIpAddressObject.newOrExistingOrNone == 'none'
|
||||
|
||||
var isEmptyDomain = domainName == ''
|
||||
var domainParts = split(domainName, '.')
|
||||
var validNumberParts = length(domainParts) >= 2
|
||||
var allPartsValid = [
|
||||
for part in domainParts: length(part) >= 1 && length(part) <= 63 && !empty(part) && part == toLower(part) && !contains(
|
||||
part,
|
||||
'--'
|
||||
) && empty(replace(part, '[a-z0-9-]', ''))
|
||||
]
|
||||
|
||||
var isDomainValid = !isEmptyDomain && validNumberParts && !contains(allPartsValid, false)
|
||||
|
||||
var masterNodeVMSettings = {
|
||||
vmName: '${stackName}-VN-MasterNode'
|
||||
vmName: '${stackName}-VM-MasterNode'
|
||||
osDiskType: 'StandardSSD_LRS'
|
||||
ubuntuOSVersion: {
|
||||
publisher: 'Canonical'
|
||||
|
@ -334,7 +314,7 @@ var masterNodeVMSettings = {
|
|||
publicKeys: [
|
||||
{
|
||||
path: '/home/${adminUsername}/.ssh/authorized_keys'
|
||||
keyData: adminSshKey
|
||||
keyData: adminSshKey.sshPublicKey
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -356,7 +336,7 @@ var mediaNodeVMSettings = {
|
|||
publicKeys: [
|
||||
{
|
||||
path: '/home/${adminUsername}/.ssh/authorized_keys'
|
||||
keyData: adminSshKey
|
||||
keyData: adminSshKey.sshPublicKey
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1079,7 +1059,6 @@ resource openviduMasterNode 'Microsoft.Compute/virtualMachines@2023-09-01' = {
|
|||
osProfile: {
|
||||
computerName: masterNodeVMSettings.vmName
|
||||
adminUsername: adminUsername
|
||||
adminPassword: adminSshKey
|
||||
linuxConfiguration: masterNodeVMSettings.linuxConfiguration
|
||||
}
|
||||
userData: base64(userDataMasterNode)
|
||||
|
@ -1315,7 +1294,6 @@ resource openviduScaleSetMediaNode 'Microsoft.Compute/virtualMachineScaleSets@20
|
|||
osProfile: {
|
||||
computerNamePrefix: mediaNodeVMSettings.vmName
|
||||
adminUsername: adminUsername
|
||||
adminPassword: adminSshKey
|
||||
linuxConfiguration: mediaNodeVMSettings.linuxConfiguration
|
||||
}
|
||||
networkProfile: {
|
||||
|
@ -1541,8 +1519,16 @@ resource publicIP_OV 'Microsoft.Network/publicIPAddresses@2023-11-01' = if (isEm
|
|||
}
|
||||
}
|
||||
|
||||
resource publicIP_OV_ifNotEmpty 'Microsoft.Network/publicIPAddresses@2023-11-01' existing = if (!isEmptyIp == true) {
|
||||
name: publicIpAddressResourceName
|
||||
var ipExists = publicIpAddressObject.newOrExistingOrNone == 'existing'
|
||||
|
||||
resource publicIP_OV_ifExisting 'Microsoft.Network/publicIPAddresses@2023-11-01' existing = if (ipExists == true) {
|
||||
name: publicIpAddressObject.name
|
||||
}
|
||||
|
||||
var ipNew = publicIpAddressObject.newOrExistingOrNone == 'new'
|
||||
|
||||
resource publicIP_OV_ifNew 'Microsoft.Network/publicIPAddresses@2023-11-01' existing = if (ipNew == true) {
|
||||
name: publicIpAddressObject.name
|
||||
}
|
||||
|
||||
resource vnet_OV 'Microsoft.Network/virtualNetworks@2023-11-01' = {
|
||||
|
@ -1598,7 +1584,7 @@ resource netInterfaceMasterNode 'Microsoft.Network/networkInterfaces@2023-11-01'
|
|||
}
|
||||
]
|
||||
publicIPAddress: {
|
||||
id: isEmptyIp ? publicIP_OV.id : publicIP_OV_ifNotEmpty.id
|
||||
id: isEmptyIp ? publicIP_OV.id : ipNew ? publicIP_OV_ifNew.id : publicIP_OV_ifExisting.id
|
||||
properties: {
|
||||
deleteOption: 'Delete'
|
||||
}
|
||||
|
@ -2070,16 +2056,3 @@ resource blobContainer 'Microsoft.Storage/storageAccounts/blobServices/container
|
|||
publicAccess: 'None'
|
||||
}
|
||||
}
|
||||
|
||||
/*------------------------------------------- OUTPUTS -------------------------------------------*/
|
||||
|
||||
output ipValidationStatus string = isValidIP ? 'IP address is valid' : 'IP address not valid'
|
||||
|
||||
output domainValidationStatus string = isDomainValid ? 'Domain is valid' : 'Domain is not valid'
|
||||
|
||||
output ownCertValidationStatus string = (certificateType == 'owncert' && ownPrivateCertificate != '' && ownPublicCertificate != '')
|
||||
? 'owncert selected and valid'
|
||||
: 'You need to fill \'Own Public Certificate\' and \'Own Private Certificate\''
|
||||
output letsEncryptValidationStatus string = (certificateType == 'letsencrypt' && letsEncryptEmail != '')
|
||||
? 'letsEncrypt selected and valid'
|
||||
: 'You need to fill \'Lets Encrypt Email\''
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -28,7 +28,7 @@ param ownPrivateCertificate string = ''
|
|||
param letsEncryptEmail string = ''
|
||||
|
||||
@description('Name of the PublicIPAddress resource in Azure when using certificateType \'owncert\' or \'letsencrypt\'')
|
||||
param publicIpAddressResourceName string = ''
|
||||
param publicIpAddressObject object
|
||||
|
||||
@description('(Optional) Domain name for the TURN server with TLS. Only needed if your users are behind restrictive firewalls')
|
||||
param turnDomainName string = ''
|
||||
|
@ -40,7 +40,10 @@ param turnOwnPublicCertificate string = ''
|
|||
param turnOwnPrivateCertificate string = ''
|
||||
|
||||
@description('Name of the PublicIPAddress resource in Azure when using TURN server with TLS')
|
||||
param turnPublicIpAddressResourceName string = ''
|
||||
param turnPublicIpAddressObject object = {
|
||||
name: ''
|
||||
id: ''
|
||||
}
|
||||
|
||||
@description('Visit https://openvidu.io/account')
|
||||
@secure()
|
||||
|
@ -285,7 +288,7 @@ param adminUsername string
|
|||
|
||||
@description('SSH Key for the Virtual Machine.')
|
||||
@secure()
|
||||
param adminSshKey string
|
||||
param adminSshKey object
|
||||
|
||||
@description('Number of initial media nodes to deploy')
|
||||
param initialNumberOfMediaNodes int = 1
|
||||
|
@ -316,7 +319,7 @@ var masterNodeVMSettings = {
|
|||
publicKeys: [
|
||||
{
|
||||
path: '/home/${adminUsername}/.ssh/authorized_keys'
|
||||
keyData: adminSshKey
|
||||
keyData: adminSshKey.sshPublicKey
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -338,7 +341,7 @@ var mediaNodeVMSettings = {
|
|||
publicKeys: [
|
||||
{
|
||||
path: '/home/${adminUsername}/.ssh/authorized_keys'
|
||||
keyData: adminSshKey
|
||||
keyData: adminSshKey.sshPublicKey
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1264,7 +1267,6 @@ resource openviduMasterNode1 'Microsoft.Compute/virtualMachines@2023-09-01' = {
|
|||
osProfile: {
|
||||
computerName: '${stackName}-VM-MasterNode1'
|
||||
adminUsername: adminUsername
|
||||
adminPassword: adminSshKey
|
||||
linuxConfiguration: masterNodeVMSettings.linuxConfiguration
|
||||
}
|
||||
userData: base64(userDataMasterNode1)
|
||||
|
@ -1299,7 +1301,6 @@ resource openviduMasterNode2 'Microsoft.Compute/virtualMachines@2023-09-01' = {
|
|||
osProfile: {
|
||||
computerName: '${stackName}-VM-MasterNode2'
|
||||
adminUsername: adminUsername
|
||||
adminPassword: adminSshKey
|
||||
linuxConfiguration: masterNodeVMSettings.linuxConfiguration
|
||||
}
|
||||
userData: base64(userDataMasterNode2)
|
||||
|
@ -1335,7 +1336,6 @@ resource openviduMasterNode3 'Microsoft.Compute/virtualMachines@2023-09-01' = {
|
|||
osProfile: {
|
||||
computerName: '${stackName}-VM-MasterNode3'
|
||||
adminUsername: adminUsername
|
||||
adminPassword: adminSshKey
|
||||
linuxConfiguration: masterNodeVMSettings.linuxConfiguration
|
||||
}
|
||||
userData: base64(userDataMasterNode3)
|
||||
|
@ -1371,7 +1371,6 @@ resource openviduMasterNode4 'Microsoft.Compute/virtualMachines@2023-09-01' = {
|
|||
osProfile: {
|
||||
computerName: '${stackName}-VM-MasterNode4'
|
||||
adminUsername: adminUsername
|
||||
adminPassword: adminSshKey
|
||||
linuxConfiguration: masterNodeVMSettings.linuxConfiguration
|
||||
}
|
||||
userData: base64(userDataMasterNode4)
|
||||
|
@ -1613,7 +1612,6 @@ resource openviduScaleSetMediaNode 'Microsoft.Compute/virtualMachineScaleSets@20
|
|||
osProfile: {
|
||||
computerNamePrefix: mediaNodeVMSettings.vmName
|
||||
adminUsername: adminUsername
|
||||
adminPassword: adminSshKey
|
||||
linuxConfiguration: mediaNodeVMSettings.linuxConfiguration
|
||||
}
|
||||
networkProfile: {
|
||||
|
@ -1822,8 +1820,8 @@ resource scaleInActivityLogRule 'Microsoft.Insights/activityLogAlerts@2020-10-01
|
|||
|
||||
/*------------------------------------------- NETWORK -------------------------------------------*/
|
||||
|
||||
var isEmptyIp = publicIpAddressResourceName == ''
|
||||
var turnIsEmptyIp = turnPublicIpAddressResourceName == ''
|
||||
var isEmptyIp = publicIpAddressObject.newOrExistingOrNone == ''
|
||||
var turnIsEmptyIp = turnPublicIpAddressObject.newOrExistingOrNone == ''
|
||||
var lbName = '${stackName}-loadBalancer'
|
||||
var lbFrontEndName = 'LoadBalancerFrontEnd'
|
||||
var lbBackendPoolNameMasterNode = 'LoadBalancerBackEndMasterNode'
|
||||
|
@ -1840,8 +1838,16 @@ resource publicIPAddressLoadBalancer 'Microsoft.Network/publicIPAddresses@2024-0
|
|||
}
|
||||
}
|
||||
|
||||
resource publicIP_LoadBalancer_ifNotEmpty 'Microsoft.Network/publicIPAddresses@2023-11-01' existing = if (!isEmptyIp == true) {
|
||||
name: publicIpAddressResourceName
|
||||
var ipExists = publicIpAddressObject.newOrExistingOrNone == 'existing'
|
||||
|
||||
resource publicIP_LoadBalancer_ifExisting 'Microsoft.Network/publicIPAddresses@2023-11-01' existing = if (ipExists == true) {
|
||||
name: publicIpAddressObject.name
|
||||
}
|
||||
|
||||
var ipNew = publicIpAddressObject.newOrExistingOrNone == 'new'
|
||||
|
||||
resource publicIP_LoadBalancer_ifNew 'Microsoft.Network/publicIPAddresses@2023-11-01' existing = if (ipNew == true) {
|
||||
name: publicIpAddressObject.name
|
||||
}
|
||||
|
||||
resource publicIPAddressTurnTLSLoadBalancer 'Microsoft.Network/publicIPAddresses@2024-05-01' = if (turnTLSIsEnabled == true) {
|
||||
|
@ -1856,8 +1862,16 @@ resource publicIPAddressTurnTLSLoadBalancer 'Microsoft.Network/publicIPAddresses
|
|||
}
|
||||
}
|
||||
|
||||
resource publicIP_TurnTLSLoadBalancer_ifNotEmpty 'Microsoft.Network/publicIPAddresses@2023-11-01' existing = if (!turnIsEmptyIp && turnTLSIsEnabled == true) {
|
||||
name: publicIpAddressResourceName
|
||||
var ipTURNExists = publicIpAddressObject.newOrExistingOrNone == 'existing'
|
||||
|
||||
resource publicIP_TurnTLSLoadBalancer_ifExisting 'Microsoft.Network/publicIPAddresses@2023-11-01' existing = if (ipTURNExists && turnTLSIsEnabled == true) {
|
||||
name: publicIpAddressObject.name
|
||||
}
|
||||
|
||||
var ipTURNNew = publicIpAddressObject.newOrExistingOrNone == 'new'
|
||||
|
||||
resource publicIP_TurnTLSLoadBalancer_ifNew 'Microsoft.Network/publicIPAddresses@2023-11-01' existing = if (ipTURNNew && turnTLSIsEnabled == true) {
|
||||
name: publicIpAddressObject.name
|
||||
}
|
||||
|
||||
resource LoadBalancer 'Microsoft.Network/loadBalancers@2024-05-01' = {
|
||||
|
@ -1872,7 +1886,9 @@ resource LoadBalancer 'Microsoft.Network/loadBalancers@2024-05-01' = {
|
|||
name: lbFrontEndName
|
||||
properties: {
|
||||
publicIPAddress: {
|
||||
id: isEmptyIp ? publicIPAddressLoadBalancer.id : publicIP_LoadBalancer_ifNotEmpty.id
|
||||
id: isEmptyIp
|
||||
? publicIPAddressLoadBalancer.id
|
||||
: ipNew ? publicIP_LoadBalancer_ifNew.id : publicIP_LoadBalancer_ifExisting.id
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1990,7 +2006,9 @@ resource TurnTLSLoadbalancer 'Microsoft.Network/loadBalancers@2024-05-01' = if (
|
|||
privateIPAllocationMethod: 'Dynamic'
|
||||
privateIPAddressVersion: 'IPv4'
|
||||
publicIPAddress: {
|
||||
id: turnIsEmptyIp ? publicIPAddressLoadBalancer.id : publicIP_TurnTLSLoadBalancer_ifNotEmpty.id
|
||||
id: turnIsEmptyIp
|
||||
? publicIPAddressTurnTLSLoadBalancer.id
|
||||
: ipTURNNew ? publicIP_TurnTLSLoadBalancer_ifNew.id : publicIP_TurnTLSLoadBalancer_ifExisting.id
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,595 @@
|
|||
{
|
||||
"$schema": "https://schema.management.azure.com/schemas/2021-09-09/uiFormDefinition.schema.json",
|
||||
"view": {
|
||||
"kind": "Form",
|
||||
"properties": {
|
||||
"title": "OpenVidu High Availability deployment",
|
||||
"steps": [
|
||||
{
|
||||
"name": "basics",
|
||||
"label": "Provide a Resource Group and a Stack Name",
|
||||
"elements": [
|
||||
{
|
||||
"name": "resourceScope",
|
||||
"type": "Microsoft.Common.ResourceScope",
|
||||
"location": {
|
||||
"resourceTypes": [
|
||||
"microsoft.insights/autoscalesettings",
|
||||
"microsoft.storage/storageaccounts",
|
||||
"microsoft.resources/resourcegroups"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "stackName",
|
||||
"type": "Microsoft.Common.TextBox",
|
||||
"label": "Stack Name",
|
||||
"subLabel": "",
|
||||
"defaultValue": "",
|
||||
"toolTip": "Stack name",
|
||||
"constraints": {
|
||||
"required": true,
|
||||
"regex": "",
|
||||
"validationMessage": "",
|
||||
"validations": []
|
||||
},
|
||||
"infoMessages": [],
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "parameters SSL",
|
||||
"label": "Domain and SSL certificate configuration",
|
||||
"elements": [
|
||||
{
|
||||
"name": "certificateType",
|
||||
"type": "Microsoft.Common.DropDown",
|
||||
"label": "Certificate Type",
|
||||
"subLabel": "",
|
||||
"defaultValue": "selfsigned",
|
||||
"toolTip": "[[selfsigned] Not recommended for production use. If you don't have a FQDN, (DomainName parameter) you can use this option to generate a self-signed certificate.\n[owncert] Valid for productions environments. If you have a FQDN, (DomainName parameter)\nand an Elastic IP, you can use this option to use your own certificate.\n[letsencrypt] Valid for production environments. If you have a FQDN, (DomainName parameter)\nand an Elastic IP, you can use this option to generate a Let's Encrypt certificate.\n",
|
||||
"constraints": {
|
||||
"required": false,
|
||||
"allowedValues": [
|
||||
{
|
||||
"label": "selfsigned",
|
||||
"value": "selfsigned"
|
||||
},
|
||||
{
|
||||
"label": "owncert",
|
||||
"value": "owncert"
|
||||
},
|
||||
{
|
||||
"label": "letsencrypt",
|
||||
"value": "letsencrypt"
|
||||
}
|
||||
],
|
||||
"validations": []
|
||||
},
|
||||
"infoMessages": [],
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"name": "publicIpAddressObject",
|
||||
"type": "Microsoft.Network.PublicIpAddressCombo",
|
||||
"label": {
|
||||
"publicIpAddress": "Public IP address"
|
||||
},
|
||||
"toolTip": {
|
||||
"publicIpAddress": "Name of the PublicIPAddress resource in Azure when using certificateType 'owncert' or 'letsencrypt'"
|
||||
},
|
||||
"defaultValue": {
|
||||
"publicIpAddressName": ""
|
||||
},
|
||||
"options": {
|
||||
"hideNone": false,
|
||||
"hideDomainNameLabel": true,
|
||||
"hideExisting": false
|
||||
},
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"name": "domainName",
|
||||
"type": "Microsoft.Common.TextBox",
|
||||
"label": "Domain Name",
|
||||
"subLabel": "Domain name for the OpenVidu Deployment.",
|
||||
"defaultValue": "",
|
||||
"toolTip": "",
|
||||
"constraints": {
|
||||
"required": true,
|
||||
"regex": "^$|^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$",
|
||||
"validationMessage": "",
|
||||
"validations": [
|
||||
{
|
||||
"isValid": "[if(or(equals(steps('parameters SSL').certificateType, 'letsencrypt'), equals(steps('parameters SSL').certificateType, 'owncert')), not(empty(steps('parameters SSL').domainName)), true)]",
|
||||
"message": "You need to fill this parameter because you've selected another certificate type that is not selfsigned."
|
||||
}
|
||||
]
|
||||
},
|
||||
"infoMessages": [],
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"name": "ownPublicCertificate",
|
||||
"type": "Microsoft.Common.TextBox",
|
||||
"label": "Own Public Certificate",
|
||||
"subLabel": "If certificate type is 'owncert', this parameter will be used to specify the public certificate",
|
||||
"defaultValue": "",
|
||||
"toolTip": "",
|
||||
"constraints": {
|
||||
"required": false,
|
||||
"regex": "",
|
||||
"validationMessage": "",
|
||||
"validations": [
|
||||
{
|
||||
"isValid": "[if(equals(steps('parameters SSL').certificateType, 'owncert'), not(empty(steps('parameters SSL').ownPublicCertificate)), true)]",
|
||||
"message": "You need to fill this parameter because you've selected owncert certificate type."
|
||||
}
|
||||
]
|
||||
},
|
||||
"infoMessages": [],
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"name": "ownPrivateCertificate",
|
||||
"type": "Microsoft.Common.TextBox",
|
||||
"label": "Own Private Certificate",
|
||||
"subLabel": "If certificate type is 'owncert', this parameter will be used to specify the private certificate",
|
||||
"defaultValue": "",
|
||||
"toolTip": "",
|
||||
"constraints": {
|
||||
"required": false,
|
||||
"regex": "",
|
||||
"validationMessage": "",
|
||||
"validations": [
|
||||
{
|
||||
"isValid": "[if(equals(steps('parameters SSL').certificateType, 'owncert'), not(empty(steps('parameters SSL').ownPrivateCertificate)), true)]",
|
||||
"message": "You need to fill this parameter because you've selected owncert certificate type."
|
||||
}
|
||||
]
|
||||
},
|
||||
"infoMessages": [],
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"name": "letsEncryptEmail",
|
||||
"type": "Microsoft.Common.TextBox",
|
||||
"label": "Lets Encrypt Email",
|
||||
"subLabel": "If certificate type is 'letsencrypt', this email will be used for Let's Encrypt notifications",
|
||||
"defaultValue": "",
|
||||
"toolTip": "",
|
||||
"constraints": {
|
||||
"required": false,
|
||||
"regex": "",
|
||||
"validationMessage": "",
|
||||
"validations": [
|
||||
{
|
||||
"isValid": "[if(equals(steps('parameters SSL').certificateType, 'letsencrypt'), not(empty(steps('parameters SSL').letsEncryptEmail)), true)]",
|
||||
"message": "You need to fill this parameter because you've selected letsencrypt certificate type."
|
||||
}
|
||||
]
|
||||
},
|
||||
"infoMessages": [],
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "parameters OPENVIDU",
|
||||
"label": "OpenVidu High Availability configuration",
|
||||
"elements": [
|
||||
{
|
||||
"name": "openviduLicense",
|
||||
"type": "Microsoft.Common.PasswordBox",
|
||||
"label": {
|
||||
"password": "Openvidu License",
|
||||
"confirmPassword": "Confirm password"
|
||||
},
|
||||
"defaultValue": "",
|
||||
"toolTip": "Visit https://openvidu.io/account",
|
||||
"constraints": {
|
||||
"required": true,
|
||||
"regex": "",
|
||||
"validationMessage": "",
|
||||
"validations": []
|
||||
},
|
||||
"options": {
|
||||
"hideConfirmation": true
|
||||
},
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"name": "rtcEngine",
|
||||
"type": "Microsoft.Common.DropDown",
|
||||
"label": "Rtc Engine",
|
||||
"subLabel": "RTCEngine media engine to use",
|
||||
"defaultValue": "pion",
|
||||
"toolTip": "",
|
||||
"constraints": {
|
||||
"required": false,
|
||||
"allowedValues": [
|
||||
{
|
||||
"label": "pion",
|
||||
"value": "pion"
|
||||
},
|
||||
{
|
||||
"label": "mediasoup",
|
||||
"value": "mediasoup"
|
||||
}
|
||||
],
|
||||
"validations": []
|
||||
},
|
||||
"infoMessages": [],
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "parameters INSTANCE",
|
||||
"label": "Master and Media node configuration",
|
||||
"elements": [
|
||||
{
|
||||
"name": "masterNodeInstanceType",
|
||||
"type": "Microsoft.Compute.SizeSelector",
|
||||
"label": "Master Node Instance Type",
|
||||
"toolTip": "Specifies the Azure instance type for your OpenVidu Master Node",
|
||||
"recommendedSizes": [
|
||||
"Standard_B2s"
|
||||
],
|
||||
"constraints": {
|
||||
"allowedSizes": [],
|
||||
"excludedSizes": [],
|
||||
"numAvailabilityZonesRequired": 3,
|
||||
"zone": "3"
|
||||
},
|
||||
"options": {
|
||||
"hideDiskTypeFilter": false
|
||||
},
|
||||
"osPlatform": "Linux",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"name": "masterNodesDiskSize",
|
||||
"type": "Microsoft.Common.Slider",
|
||||
"min": 70,
|
||||
"max": 200,
|
||||
"label": "Master Nodes Disk Size",
|
||||
"subLabel": "GB",
|
||||
"defaultValue": 100,
|
||||
"showStepMarkers": false,
|
||||
"toolTip": "Size of the disk in GB",
|
||||
"constraints": {
|
||||
"required": false
|
||||
},
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"name": "mediaNodeInstanceType",
|
||||
"type": "Microsoft.Compute.SizeSelector",
|
||||
"label": "Media Node Instance Type",
|
||||
"toolTip": "Specifies the Azure instance type for your OpenVidu Media Nodes",
|
||||
"recommendedSizes": [
|
||||
"Standard_B2s",
|
||||
"Standard_B4ms"
|
||||
],
|
||||
"constraints": {
|
||||
"allowedSizes": [],
|
||||
"excludedSizes": [],
|
||||
"numAvailabilityZonesRequired": 3,
|
||||
"zone": "3"
|
||||
},
|
||||
"options": {
|
||||
"hideDiskTypeFilter": false
|
||||
},
|
||||
"osPlatform": "Linux",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"name": "adminUsername",
|
||||
"type": "Microsoft.Common.TextBox",
|
||||
"label": "Admin Username",
|
||||
"subLabel": "Username for the Virtual Machine.",
|
||||
"defaultValue": "",
|
||||
"toolTip": "",
|
||||
"constraints": {
|
||||
"required": true,
|
||||
"regex": "",
|
||||
"validationMessage": "",
|
||||
"validations": [
|
||||
{
|
||||
"isValid": "[or(or(empty(steps('parameters INSTANCE').adminUsername),and(not(startsWith(steps('parameters INSTANCE').adminUsername,'[[')),startsWith(steps('parameters INSTANCE').adminUsername,'['),endsWith(steps('parameters INSTANCE').adminUsername,']'),greater(indexOf(steps('parameters INSTANCE').adminUsername,'('),-1),greater(indexOf(steps('parameters INSTANCE').adminUsername,')'),-1))),and(not(regex(steps('parameters INSTANCE').adminUsername,'/[\\\\/\\\"\\\"\\[\\]:|<>+=;,$ ?*@]+/')),not(endsWith(steps('parameters INSTANCE').adminUsername,'.'))),regex(steps('parameters INSTANCE').adminUsername,'^[a-zA-Z0-9-]+$'))]",
|
||||
"message": "User name cannot contain special characters \\/\\\"[]:|<>+=;,?*@ or end with '.', and must be between 1 and 15 characters."
|
||||
},
|
||||
{
|
||||
"isValid": "[or(or(empty(steps('parameters INSTANCE').adminUsername),and(not(startsWith(steps('parameters INSTANCE').adminUsername,'[[')),startsWith(steps('parameters INSTANCE').adminUsername,'['),endsWith(steps('parameters INSTANCE').adminUsername,']'),greater(indexOf(steps('parameters INSTANCE').adminUsername,'('),-1),greater(indexOf(steps('parameters INSTANCE').adminUsername,')'),-1))),equals(length(filter(parse('[\"administrator\", \"admin\", \"user\", \"user1\", \"test\", \"user2\", \"test1\", \"user3\", \"admin1\", \"1\", \"123\", \"a\", \"actuser\", \"adm\", \"admin2\", \"aspnet\", \"backup\", \"console\", \"david\", \"guest\", \"john\", \"owner\", \"root\", \"server\", \"sql\", \"support\", \"support_388945a0\", \"sys\", \"test2\", \"test3\", \"user4\", \"user5\"]'),(item) => equals(toLower(item),toLower(steps('parameters INSTANCE').adminUsername)))),0))]",
|
||||
"message": "The specified username is not allowed. Please choose a different value."
|
||||
}
|
||||
]
|
||||
},
|
||||
"infoMessages": [],
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"name": "adminSshKey",
|
||||
"type": "Microsoft.Compute.CredentialsCombo",
|
||||
"label": {
|
||||
"authenticationType": "Authentication type",
|
||||
"sshPublicKey": "SSH public key"
|
||||
},
|
||||
"toolTip": {
|
||||
"authenticationType": "",
|
||||
"sshPublicKey": "SSH Key for the Instances of Media and Master nodes."
|
||||
},
|
||||
"constraints": {
|
||||
"required": true
|
||||
},
|
||||
"options": {
|
||||
"hideConfirmation": true,
|
||||
"hidePassword": true
|
||||
},
|
||||
"osPlatform": "Linux",
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "parameters SCALING",
|
||||
"label": "Media Nodes Sacle Set configuration",
|
||||
"elements": [
|
||||
{
|
||||
"name": "initialNumberOfMediaNodes",
|
||||
"type": "Microsoft.Common.TextBox",
|
||||
"label": "Initial Number Of Media Nodes",
|
||||
"subLabel": "Number of initial media nodes to deploy",
|
||||
"defaultValue": "1",
|
||||
"toolTip": "",
|
||||
"constraints": {
|
||||
"required": false,
|
||||
"regex": "",
|
||||
"validationMessage": "",
|
||||
"validations": []
|
||||
},
|
||||
"infoMessages": [],
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"name": "minNumberOfMediaNodes",
|
||||
"type": "Microsoft.Common.TextBox",
|
||||
"label": "Min Number Of Media Nodes",
|
||||
"subLabel": "Minimum number of media nodes to deploy",
|
||||
"defaultValue": "1",
|
||||
"toolTip": "",
|
||||
"constraints": {
|
||||
"required": false,
|
||||
"regex": "",
|
||||
"validationMessage": "",
|
||||
"validations": []
|
||||
},
|
||||
"infoMessages": [],
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"name": "maxNumberOfMediaNodes",
|
||||
"type": "Microsoft.Common.TextBox",
|
||||
"label": "Max Number Of Media Nodes",
|
||||
"subLabel": "Maximum number of media nodes to deploy",
|
||||
"defaultValue": "5",
|
||||
"toolTip": "",
|
||||
"constraints": {
|
||||
"required": false,
|
||||
"regex": "",
|
||||
"validationMessage": "",
|
||||
"validations": []
|
||||
},
|
||||
"infoMessages": [],
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"name": "scaleTargetCPU",
|
||||
"type": "Microsoft.Common.TextBox",
|
||||
"label": "Scale Target CPU",
|
||||
"subLabel": "Target CPU percentage to scale up or down",
|
||||
"defaultValue": "50",
|
||||
"toolTip": "",
|
||||
"constraints": {
|
||||
"required": false,
|
||||
"regex": "",
|
||||
"validationMessage": "",
|
||||
"validations": []
|
||||
},
|
||||
"infoMessages": [],
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"name": "datetime",
|
||||
"type": "Microsoft.Common.TextBox",
|
||||
"label": "Datetime",
|
||||
"subLabel": "",
|
||||
"defaultValue": "[[utcNow('u')]",
|
||||
"toolTip": "",
|
||||
"constraints": {
|
||||
"required": false,
|
||||
"regex": "",
|
||||
"validationMessage": "",
|
||||
"validations": []
|
||||
},
|
||||
"infoMessages": [],
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"name": "automationAccountName",
|
||||
"type": "Microsoft.Common.TextBox",
|
||||
"label": "Automation Account Name",
|
||||
"subLabel": "Automation Account Name to create a runbook inside it for scale in",
|
||||
"defaultValue": "",
|
||||
"toolTip": "",
|
||||
"constraints": {
|
||||
"required": true,
|
||||
"regex": "",
|
||||
"validationMessage": "",
|
||||
"validations": []
|
||||
},
|
||||
"infoMessages": [],
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "parameters STORAGE",
|
||||
"label": "Storage Account configuration",
|
||||
"elements": [
|
||||
{
|
||||
"name": "storageAccountName",
|
||||
"type": "Microsoft.Common.TextBox",
|
||||
"label": "Storage Account Name",
|
||||
"subLabel": "Name of an existing storage account. It is essential that this parameter is filled just when you want to save recordings and still using the same container after an update. If not specified, a new storage account will be generated.",
|
||||
"defaultValue": "",
|
||||
"toolTip": "",
|
||||
"constraints": {
|
||||
"required": false,
|
||||
"regex": "",
|
||||
"validationMessage": "",
|
||||
"validations": []
|
||||
},
|
||||
"infoMessages": [],
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"name": "containerName",
|
||||
"type": "Microsoft.Common.TextBox",
|
||||
"label": "Container Name",
|
||||
"subLabel": "Name of the bucket where OpenVidu will store the recordings, if an Storage Account Name is specified this parameter will act as the container name for the recordings that exists in the Storage Account. If not specified, a default bucket will be created.",
|
||||
"defaultValue": "",
|
||||
"toolTip": "",
|
||||
"constraints": {
|
||||
"required": false,
|
||||
"regex": "",
|
||||
"validationMessage": "",
|
||||
"validations": []
|
||||
},
|
||||
"infoMessages": [],
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "parameters TURN",
|
||||
"label": "(Optional) TURN server configuration with TLS",
|
||||
"elements": [
|
||||
{
|
||||
"name": "turnDomainName",
|
||||
"type": "Microsoft.Common.TextBox",
|
||||
"label": "Turn Domain Name",
|
||||
"subLabel": "(Optional) Domain name for the TURN server with TLS. Only needed if your users are behind restrictive firewalls",
|
||||
"defaultValue": "",
|
||||
"toolTip": "",
|
||||
"constraints": {
|
||||
"required": false,
|
||||
"regex": "",
|
||||
"validationMessage": "",
|
||||
"validations": []
|
||||
},
|
||||
"infoMessages": [],
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"name": "turnOwnPublicCertificate",
|
||||
"type": "Microsoft.Common.TextBox",
|
||||
"label": "Turn Own Public Certificate",
|
||||
"subLabel": "(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified.",
|
||||
"defaultValue": "",
|
||||
"toolTip": "",
|
||||
"constraints": {
|
||||
"required": false,
|
||||
"regex": "",
|
||||
"validationMessage": "",
|
||||
"validations": [
|
||||
{
|
||||
"isValid": "[if(and(equals(steps('parameters SSL').certificateType, 'owncert'), not(empty(steps('parameters TURN').turnDomainName))), not(empty(steps('parameters TURN').turnOwnPublicCertificate)), true)]",
|
||||
"message": "You need to fill this parameter because you've selected owncert certificate type and you've filled Turn Domain Name."
|
||||
}
|
||||
]
|
||||
},
|
||||
"infoMessages": [],
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"name": "turnOwnPrivateCertificate",
|
||||
"type": "Microsoft.Common.TextBox",
|
||||
"label": "Turn Own Private Certificate",
|
||||
"subLabel": "(Optional) This setting is applicable if the certificate type is set to 'owncert' and the TurnDomainName is specified.",
|
||||
"defaultValue": "",
|
||||
"toolTip": "",
|
||||
"constraints": {
|
||||
"required": false,
|
||||
"regex": "",
|
||||
"validationMessage": "",
|
||||
"validations": [
|
||||
{
|
||||
"isValid": "[if(and(equals(steps('parameters SSL').certificateType, 'owncert'), not(empty(steps('parameters TURN').turnDomainName))), not(empty(steps('parameters TURN').turnOwnPrivateCertificate)), true)]",
|
||||
"message": "You need to fill this parameter because you've selected owncert certificate type and you've filled Turn Domain Name."
|
||||
}
|
||||
]
|
||||
},
|
||||
"infoMessages": [],
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"name": "turnPublicIpAddressObject",
|
||||
"type": "Microsoft.Network.PublicIpAddressCombo",
|
||||
"label": {
|
||||
"publicIpAddress": "Turn Public Ip Address"
|
||||
},
|
||||
"toolTip": {
|
||||
"publicIpAddress": "Name of the PublicIPAddress resource in Azure when using TURN server with TLS"
|
||||
},
|
||||
"defaultValue": {
|
||||
"publicIpAddressName": ""
|
||||
},
|
||||
"options": {
|
||||
"hideNone": false,
|
||||
"hideDomainNameLabel": true,
|
||||
"hideExisting": false
|
||||
},
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"outputs": {
|
||||
"kind": "ResourceGroup",
|
||||
"location": "[steps('basics').resourceScope.location.name]",
|
||||
"resourceGroupId": "[steps('basics').resourceScope.resourceGroup.id]",
|
||||
"parameters": {
|
||||
"stackName": "[steps('basics').stackName]",
|
||||
"certificateType": "[steps('parameters SSL').certificateType]",
|
||||
"domainName": "[steps('parameters SSL').domainName]",
|
||||
"ownPublicCertificate": "[steps('parameters SSL').ownPublicCertificate]",
|
||||
"ownPrivateCertificate": "[steps('parameters SSL').ownPrivateCertificate]",
|
||||
"letsEncryptEmail": "[steps('parameters SSL').letsEncryptEmail]",
|
||||
"publicIpAddressObject": "[steps('parameters SSL').publicIpAddressObject]",
|
||||
"turnDomainName": "[steps('parameters TURN').turnDomainName]",
|
||||
"turnOwnPublicCertificate": "[steps('parameters TURN').turnOwnPublicCertificate]",
|
||||
"turnOwnPrivateCertificate": "[steps('parameters TURN').turnOwnPrivateCertificate]",
|
||||
"turnPublicIpAddressObject": "[steps('parameters TURN').turnPublicIpAddressObject]",
|
||||
"openviduLicense": "[steps('parameters OPENVIDU').openviduLicense]",
|
||||
"rtcEngine": "[steps('parameters OPENVIDU').rtcEngine]",
|
||||
"masterNodeInstanceType": "[steps('parameters INSTANCE').masterNodeInstanceType]",
|
||||
"masterNodesDiskSize": "[steps('parameters INSTANCE').masterNodesDiskSize]",
|
||||
"mediaNodeInstanceType": "[steps('parameters INSTANCE').mediaNodeInstanceType]",
|
||||
"adminUsername": "[steps('parameters INSTANCE').adminUsername]",
|
||||
"adminSshKey": "[steps('parameters INSTANCE').adminSshKey]",
|
||||
"initialNumberOfMediaNodes": "[steps('parameters SCALING').initialNumberOfMediaNodes]",
|
||||
"minNumberOfMediaNodes": "[steps('parameters SCALING').minNumberOfMediaNodes]",
|
||||
"maxNumberOfMediaNodes": "[steps('parameters SCALING').maxNumberOfMediaNodes]",
|
||||
"scaleTargetCPU": "[steps('parameters SCALING').scaleTargetCPU]",
|
||||
"datetime": "[steps('parameters SCALING').datetime]",
|
||||
"automationAccountName": "[steps('parameters SCALING').automationAccountName]",
|
||||
"storageAccountName": "[steps('parameters STORAGE').storageAccountName]",
|
||||
"containerName": "[steps('parameters STORAGE').containerName]"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue