From 66c07c4d2a8dbda0228646e1fe46e2827460c0f0 Mon Sep 17 00:00:00 2001 From: danielmkn Date: Thu, 15 Oct 2020 17:32:30 -0700 Subject: [PATCH 1/4] ARM templates - add version parameter to the installation script --- .../Artifactory/vm_install/install_pro7_to_vm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AzureResourceManager/Artifactory/vm_install/install_pro7_to_vm.sh b/AzureResourceManager/Artifactory/vm_install/install_pro7_to_vm.sh index b08338b..b5ebd3c 100644 --- a/AzureResourceManager/Artifactory/vm_install/install_pro7_to_vm.sh +++ b/AzureResourceManager/Artifactory/vm_install/install_pro7_to_vm.sh @@ -1,7 +1,7 @@ #!/bin/bash # Upgrade version for every release -ARTIFACTORY_VERSION=7.7.3 +ARTIFACTORY_VERSION=$1 UBUNTU_CODENAME=$(cat /etc/lsb-release | grep "^DISTRIB_CODENAME=" | sed "s/DISTRIB_CODENAME=//") export DEBIAN_FRONTEND=noninteractive From 3b97737dfc30b88f6d5f54199708097929f2b356 Mon Sep 17 00:00:00 2001 From: danielmkn Date: Fri, 16 Oct 2020 15:13:19 -0700 Subject: [PATCH 2/4] ARM templates - parameterized versions in JCR and Xray - added callhome for VM and Template installations - added RT, JCR and Xray templates for VM image creation --- .../scripts/install_artifactory7.sh | 11 + .../Artifactory/vm_install/vm_deploy.json | 265 ++++++++++++++++++ .../Artifactory/vm_install/vm_parameters.json | 102 +++++++ .../scripts/install_artifactory7.sh | 11 + .../JCR/scripts/install_artifactory7.sh | 11 + .../JCR/vm_install/install_jcr7_to_vm.sh | 4 +- .../JCR/vm_install/vm_deploy.json | 262 +++++++++++++++++ .../JCR/vm_install/vm_parameters.json | 99 +++++++ .../MP_submission/scripts/install_xray.sh | 6 + .../Xray/scripts/install_xray.sh | 6 + .../Xray/vm_install/install_xray_to_vm.sh | 6 +- .../Xray/vm_install/vm_deploy.json | 262 +++++++++++++++++ .../Xray/vm_install/vm_parameters.json | 99 +++++++ 13 files changed, 1139 insertions(+), 5 deletions(-) create mode 100644 AzureResourceManager/Artifactory/vm_install/vm_deploy.json create mode 100644 AzureResourceManager/Artifactory/vm_install/vm_parameters.json create mode 100644 AzureResourceManager/JCR/vm_install/vm_deploy.json create mode 100644 AzureResourceManager/JCR/vm_install/vm_parameters.json create mode 100644 AzureResourceManager/Xray/vm_install/vm_deploy.json create mode 100644 AzureResourceManager/Xray/vm_install/vm_parameters.json diff --git a/AzureResourceManager/Artifactory/MP_submission/scripts/install_artifactory7.sh b/AzureResourceManager/Artifactory/MP_submission/scripts/install_artifactory7.sh index b292514..115fccf 100644 --- a/AzureResourceManager/Artifactory/MP_submission/scripts/install_artifactory7.sh +++ b/AzureResourceManager/Artifactory/MP_submission/scripts/install_artifactory7.sh @@ -256,6 +256,17 @@ cat /tmp/temp.key | sed 's/KEY----- /&\n/' | sed 's/ -----END/\n-----END/' | awk rm /tmp/temp.key fi +cat </var/opt/jfrog/artifactory/etc/info/installer-info.json +{ + "productId": "ARM_artifactory-pro-template/1.0.0", + "features": [ + { + "featureId": "Partner/ACC-007221" + } + ] +} +EOF + chown artifactory:artifactory -R /var/opt/jfrog/artifactory/* && chown artifactory:artifactory -R /var/opt/jfrog/artifactory/etc/security && chown artifactory:artifactory -R /var/opt/jfrog/artifactory/etc/* # start Artifactory diff --git a/AzureResourceManager/Artifactory/vm_install/vm_deploy.json b/AzureResourceManager/Artifactory/vm_install/vm_deploy.json new file mode 100644 index 0000000..f131e70 --- /dev/null +++ b/AzureResourceManager/Artifactory/vm_install/vm_deploy.json @@ -0,0 +1,265 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "String" + }, + "networkInterfaceName": { + "type": "String" + }, + "networkSecurityGroupName": { + "type": "String" + }, + "networkSecurityGroupRules": { + "type": "Array" + }, + "subnetName": { + "type": "String" + }, + "virtualNetworkName": { + "type": "String" + }, + "addressPrefixes": { + "type": "Array" + }, + "subnets": { + "type": "Array" + }, + "publicIpAddressName": { + "type": "String" + }, + "publicIpAddressType": { + "type": "String" + }, + "publicIpAddressSku": { + "type": "String" + }, + "virtualMachineName": { + "type": "String" + }, + "virtualMachineComputerName": { + "type": "String" + }, + "diskNameSalt": { + "type": "String" + }, + "storageAccountName": { + "type": "String" + }, + "virtualMachineSize": { + "type": "String" + }, + "adminUsername": { + "type": "String" + }, + "adminPassword": { + "type": "SecureString" + }, + "diagnosticsStorageAccountName": { + "type": "String" + }, + "diagnosticsStorageAccountId": { + "type": "String" + }, + "diagnosticsStorageAccountType": { + "type": "String" + }, + "diagnosticsStorageAccountKind": { + "type": "String" + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "The base URI where artifacts required by this template are located. When the template is deployed using the accompanying scripts, a private location in the subscription will be used and this value will be automatically generated." + }, + "defaultValue": "https://raw.githubusercontent.com/jfrog/JFrog-Cloud-Installers/vm-image-templates/AzureResourceManager/Artifactory/" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated." + }, + "defaultValue": "" + }, + "artifactoryVersion": { + "type": "String" + }, + "scriptName": { + "type": "String" + }, + "baseTime": { + "type": "string", + "defaultValue": "[utcNow()]" + } + }, + "variables": { + "nsgId": "[resourceId(resourceGroup().name, 'Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroupName'))]", + "vnetId": "[resourceId(resourceGroup().name,'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "subnetRef": "[concat(variables('vnetId'), '/subnets/', parameters('subnetName'))]", + "storageContainerUri": "[concat(concat('https://', parameters('storageAccountName'), '.blob.core.windows.net/'), 'vhds/')]", + "scriptName": "[parameters('scriptName')]", + "commandToExecute": "[concat('bash ', variables('scriptName'), ' ', parameters('artifactoryVersion'))]", + "fileLocation": "[uri(parameters('_artifactsLocation'), concat('vm_install/', variables('scriptName'), parameters('_artifactsLocationSasToken')))]", + "diskNameSalt": "[concat(parameters('artifactoryVersion'), '-', parameters('baseTime'))]" + + }, + "resources": [ + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2019-07-01", + "name": "[parameters('networkInterfaceName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Network/networkSecurityGroups/', parameters('networkSecurityGroupName'))]", + "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]", + "[concat('Microsoft.Network/publicIpAddresses/', parameters('publicIpAddressName'))]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "subnet": { + "id": "[variables('subnetRef')]" + }, + "privateIPAllocationMethod": "Dynamic", + "publicIpAddress": { + "id": "[resourceId(resourceGroup().name, 'Microsoft.Network/publicIpAddresses', parameters('publicIpAddressName'))]" + } + } + } + ], + "networkSecurityGroup": { + "id": "[variables('nsgId')]" + } + } + }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "apiVersion": "2019-02-01", + "name": "[parameters('networkSecurityGroupName')]", + "location": "[parameters('location')]", + "properties": { + "securityRules": "[parameters('networkSecurityGroupRules')]" + } + }, + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "2019-09-01", + "name": "[parameters('virtualNetworkName')]", + "location": "[parameters('location')]", + "properties": { + "addressSpace": { + "addressPrefixes": "[parameters('addressPrefixes')]" + }, + "subnets": "[parameters('subnets')]" + } + }, + { + "type": "Microsoft.Network/publicIpAddresses", + "apiVersion": "2019-02-01", + "name": "[parameters('publicIpAddressName')]", + "location": "[parameters('location')]", + "sku": { + "name": "[parameters('publicIpAddressSku')]" + }, + "properties": { + "publicIpAllocationMethod": "[parameters('publicIpAddressType')]" + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2019-07-01", + "name": "[parameters('virtualMachineName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Network/networkInterfaces/', parameters('networkInterfaceName'))]", + "[concat('Microsoft.Storage/storageAccounts/', parameters('diagnosticsStorageAccountName'))]" + ], + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('virtualMachineSize')]" + }, + "storageProfile": { + "osDisk": { + "createOption": "fromImage", + "vhd": { + "uri": "[concat(variables('storageContainerUri'), parameters('virtualMachineName'), variables('diskNameSalt'), '.vhd')]" + }, + "name": "[parameters('virtualMachineName')]" + }, + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaceName'))]" + } + ] + }, + "osProfile": { + "computerName": "[parameters('virtualMachineComputerName')]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "[concat('https://', parameters('diagnosticsStorageAccountName'), '.blob.core.windows.net/')]" + } + } + }, + "resources":[ + { + "name": "extension1", + "type": "extensions", + "apiVersion": "2015-05-01-preview", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('virtualMachineName'))]" + ], + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "[variables('fileLocation')]" + ], + "commandToExecute": "[variables('commandToExecute')]" + } + } + + } + ] + }, + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "2019-06-01", + "name": "[parameters('diagnosticsStorageAccountName')]", + "location": "[parameters('location')]", + "sku": { + "name": "[parameters('diagnosticsStorageAccountType')]" + }, + "kind": "[parameters('diagnosticsStorageAccountKind')]", + "properties": {} + } + ], + "outputs": { + "adminUsername": { + "type": "String", + "value": "[parameters('adminUsername')]" + }, + "commandTExecute": { + "type": "String", + "value": "[variables('commandToExecute')]" + } + } +} \ No newline at end of file diff --git a/AzureResourceManager/Artifactory/vm_install/vm_parameters.json b/AzureResourceManager/Artifactory/vm_install/vm_parameters.json new file mode 100644 index 0000000..9049765 --- /dev/null +++ b/AzureResourceManager/Artifactory/vm_install/vm_parameters.json @@ -0,0 +1,102 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "value": "westus2" + }, + "networkInterfaceName": { + "value": "rt-nic" + }, + "networkSecurityGroupName": { + "value": "rt-nsg" + }, + "networkSecurityGroupRules": { + "value": [ + { + "name": "SSH", + "properties": { + "priority": 300, + "protocol": "TCP", + "access": "Allow", + "direction": "Inbound", + "sourceAddressPrefix": "*", + "sourcePortRange": "*", + "destinationAddressPrefix": "*", + "destinationPortRange": "22" + } + } + ] + }, + "subnetName": { + "value": "default" + }, + "virtualNetworkName": { + "value": "artifactory-vm-test-vnet" + }, + "addressPrefixes": { + "value": [ + "10.0.0.0/24" + ] + }, + "subnets": { + "value": [ + { + "name": "default", + "properties": { + "addressPrefix": "10.0.0.0/24" + } + } + ] + }, + "publicIpAddressName": { + "value": "rt-public-ip" + }, + "publicIpAddressType": { + "value": "Dynamic" + }, + "publicIpAddressSku": { + "value": "Basic" + }, + "virtualMachineName": { + "value": "artifactory-vm" + }, + "virtualMachineComputerName": { + "value": "rtvm" + }, + "diskNameSalt": { + "value": "20200824153005" + }, + "storageAccountName": { + "value": "mpstoragevhd" + }, + "virtualMachineSize": { + "value": "Standard_B4ms" + }, + + "diagnosticsStorageAccountName": { + "value": "artifactoryvmtestdiag" + }, + "diagnosticsStorageAccountId": { + "value": "Microsoft.Storage/storageAccounts/artifactoryvmtestdiag" + }, + "diagnosticsStorageAccountType": { + "value": "Standard_LRS" + }, + "diagnosticsStorageAccountKind": { + "value": "Storage" + }, + "adminUsername": { + "value": "vmuser" + }, + "adminPassword": { + "value": "OWERWRITE_THE_PASSWORD" + }, + "artifactoryVersion": { + "value": "7.10.2" + }, + "scriptName": { + "value": "install_pro7_to_vm.sh" + } + } +} \ No newline at end of file diff --git a/AzureResourceManager/JCR/MP_submission_7/scripts/install_artifactory7.sh b/AzureResourceManager/JCR/MP_submission_7/scripts/install_artifactory7.sh index 9884bae..ba73852 100644 --- a/AzureResourceManager/JCR/MP_submission_7/scripts/install_artifactory7.sh +++ b/AzureResourceManager/JCR/MP_submission_7/scripts/install_artifactory7.sh @@ -160,6 +160,17 @@ cat </var/opt/jfrog/artifactory/etc/artifactory/binarystore.xml EOF +cat </var/opt/jfrog/artifactory/etc/info/installer-info.json +{ + "productId": "ARM_artifactory-jcr-template/1.0.0", + "features": [ + { + "featureId": "Partner/ACC-007221" + } + ] +} +EOF + cat /var/lib/cloud/instance/user-data.txt | grep "^CERTIFICATE=" | sed "s/CERTIFICATE=//" > /tmp/temp.pem cat /tmp/temp.pem | sed 's/CERTIFICATE----- /&\n/g' | sed 's/ -----END/\n-----END/g' | awk '{if($0 ~ /----/) {print;} else { gsub(/ /,"\n");print;}}' > /etc/pki/tls/certs/cert.pem rm /tmp/temp.pem diff --git a/AzureResourceManager/JCR/scripts/install_artifactory7.sh b/AzureResourceManager/JCR/scripts/install_artifactory7.sh index 9884bae..ba73852 100644 --- a/AzureResourceManager/JCR/scripts/install_artifactory7.sh +++ b/AzureResourceManager/JCR/scripts/install_artifactory7.sh @@ -160,6 +160,17 @@ cat </var/opt/jfrog/artifactory/etc/artifactory/binarystore.xml EOF +cat </var/opt/jfrog/artifactory/etc/info/installer-info.json +{ + "productId": "ARM_artifactory-jcr-template/1.0.0", + "features": [ + { + "featureId": "Partner/ACC-007221" + } + ] +} +EOF + cat /var/lib/cloud/instance/user-data.txt | grep "^CERTIFICATE=" | sed "s/CERTIFICATE=//" > /tmp/temp.pem cat /tmp/temp.pem | sed 's/CERTIFICATE----- /&\n/g' | sed 's/ -----END/\n-----END/g' | awk '{if($0 ~ /----/) {print;} else { gsub(/ /,"\n");print;}}' > /etc/pki/tls/certs/cert.pem rm /tmp/temp.pem diff --git a/AzureResourceManager/JCR/vm_install/install_jcr7_to_vm.sh b/AzureResourceManager/JCR/vm_install/install_jcr7_to_vm.sh index 00e3894..fcdc03a 100644 --- a/AzureResourceManager/JCR/vm_install/install_jcr7_to_vm.sh +++ b/AzureResourceManager/JCR/vm_install/install_jcr7_to_vm.sh @@ -1,7 +1,7 @@ #!/bin/bash # Upgrade version for every release -ARTIFACTORY_VERSION=7.7.3 +ARTIFACTORY_VERSION=$1 UBUNTU_CODENAME=$(cat /etc/lsb-release | grep "^DISTRIB_CODENAME=" | sed "s/DISTRIB_CODENAME=//") export DEBIAN_FRONTEND=noninteractive @@ -25,7 +25,7 @@ apt-get -y install jfrog-artifactory-jcr=${ARTIFACTORY_VERSION} >> /tmp/install- mkdir -p /var/opt/jfrog/artifactory/etc/info cat </var/opt/jfrog/artifactory/etc/info/installer-info.json { - "productId": "ARM_artifactory-jcr/1.0.0", + "productId": "ARM_artifactory-jcr-vm/1.0.0", "features": [ { "featureId": "Partner/ACC-007221" diff --git a/AzureResourceManager/JCR/vm_install/vm_deploy.json b/AzureResourceManager/JCR/vm_install/vm_deploy.json new file mode 100644 index 0000000..035a169 --- /dev/null +++ b/AzureResourceManager/JCR/vm_install/vm_deploy.json @@ -0,0 +1,262 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "String" + }, + "networkInterfaceName": { + "type": "String" + }, + "networkSecurityGroupName": { + "type": "String" + }, + "networkSecurityGroupRules": { + "type": "Array" + }, + "subnetName": { + "type": "String" + }, + "virtualNetworkName": { + "type": "String" + }, + "addressPrefixes": { + "type": "Array" + }, + "subnets": { + "type": "Array" + }, + "publicIpAddressName": { + "type": "String" + }, + "publicIpAddressType": { + "type": "String" + }, + "publicIpAddressSku": { + "type": "String" + }, + "virtualMachineName": { + "type": "String" + }, + "virtualMachineComputerName": { + "type": "String" + }, + "storageAccountName": { + "type": "String" + }, + "virtualMachineSize": { + "type": "String" + }, + "adminUsername": { + "type": "String" + }, + "adminPassword": { + "type": "SecureString" + }, + "diagnosticsStorageAccountName": { + "type": "String" + }, + "diagnosticsStorageAccountId": { + "type": "String" + }, + "diagnosticsStorageAccountType": { + "type": "String" + }, + "diagnosticsStorageAccountKind": { + "type": "String" + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "The base URI where artifacts required by this template are located. When the template is deployed using the accompanying scripts, a private location in the subscription will be used and this value will be automatically generated." + }, + "defaultValue": "https://raw.githubusercontent.com/jfrog/JFrog-Cloud-Installers/vm-image-templates/AzureResourceManager/JCR/" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated." + }, + "defaultValue": "" + }, + "artifactoryVersion": { + "type": "String" + }, + "scriptName": { + "type": "String" + }, + "baseTime": { + "type": "string", + "defaultValue": "[utcNow()]" + } + }, + "variables": { + "nsgId": "[resourceId(resourceGroup().name, 'Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroupName'))]", + "vnetId": "[resourceId(resourceGroup().name,'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "subnetRef": "[concat(variables('vnetId'), '/subnets/', parameters('subnetName'))]", + "storageContainerUri": "[concat(concat('https://', parameters('storageAccountName'), '.blob.core.windows.net/'), 'vhds/')]", + "scriptName": "[parameters('scriptName')]", + "commandToExecute": "[concat('bash ', variables('scriptName'), ' ', parameters('artifactoryVersion'))]", + "fileLocation": "[uri(parameters('_artifactsLocation'), concat('vm_install/', variables('scriptName'), parameters('_artifactsLocationSasToken')))]", + "diskNameSalt": "[concat(parameters('artifactoryVersion'), '-', parameters('baseTime'))]" + + }, + "resources": [ + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2019-07-01", + "name": "[parameters('networkInterfaceName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Network/networkSecurityGroups/', parameters('networkSecurityGroupName'))]", + "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]", + "[concat('Microsoft.Network/publicIpAddresses/', parameters('publicIpAddressName'))]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "subnet": { + "id": "[variables('subnetRef')]" + }, + "privateIPAllocationMethod": "Dynamic", + "publicIpAddress": { + "id": "[resourceId(resourceGroup().name, 'Microsoft.Network/publicIpAddresses', parameters('publicIpAddressName'))]" + } + } + } + ], + "networkSecurityGroup": { + "id": "[variables('nsgId')]" + } + } + }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "apiVersion": "2019-02-01", + "name": "[parameters('networkSecurityGroupName')]", + "location": "[parameters('location')]", + "properties": { + "securityRules": "[parameters('networkSecurityGroupRules')]" + } + }, + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "2019-09-01", + "name": "[parameters('virtualNetworkName')]", + "location": "[parameters('location')]", + "properties": { + "addressSpace": { + "addressPrefixes": "[parameters('addressPrefixes')]" + }, + "subnets": "[parameters('subnets')]" + } + }, + { + "type": "Microsoft.Network/publicIpAddresses", + "apiVersion": "2019-02-01", + "name": "[parameters('publicIpAddressName')]", + "location": "[parameters('location')]", + "sku": { + "name": "[parameters('publicIpAddressSku')]" + }, + "properties": { + "publicIpAllocationMethod": "[parameters('publicIpAddressType')]" + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2019-07-01", + "name": "[parameters('virtualMachineName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Network/networkInterfaces/', parameters('networkInterfaceName'))]", + "[concat('Microsoft.Storage/storageAccounts/', parameters('diagnosticsStorageAccountName'))]" + ], + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('virtualMachineSize')]" + }, + "storageProfile": { + "osDisk": { + "createOption": "fromImage", + "vhd": { + "uri": "[concat(variables('storageContainerUri'), parameters('virtualMachineName'), variables('diskNameSalt'), '.vhd')]" + }, + "name": "[parameters('virtualMachineName')]" + }, + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaceName'))]" + } + ] + }, + "osProfile": { + "computerName": "[parameters('virtualMachineComputerName')]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "[concat('https://', parameters('diagnosticsStorageAccountName'), '.blob.core.windows.net/')]" + } + } + }, + "resources":[ + { + "name": "extension1", + "type": "extensions", + "apiVersion": "2015-05-01-preview", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('virtualMachineName'))]" + ], + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "[variables('fileLocation')]" + ], + "commandToExecute": "[variables('commandToExecute')]" + } + } + + } + ] + }, + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "2019-06-01", + "name": "[parameters('diagnosticsStorageAccountName')]", + "location": "[parameters('location')]", + "sku": { + "name": "[parameters('diagnosticsStorageAccountType')]" + }, + "kind": "[parameters('diagnosticsStorageAccountKind')]", + "properties": {} + } + ], + "outputs": { + "adminUsername": { + "type": "String", + "value": "[parameters('adminUsername')]" + }, + "commandTExecute": { + "type": "String", + "value": "[variables('commandToExecute')]" + } + } +} \ No newline at end of file diff --git a/AzureResourceManager/JCR/vm_install/vm_parameters.json b/AzureResourceManager/JCR/vm_install/vm_parameters.json new file mode 100644 index 0000000..41388d6 --- /dev/null +++ b/AzureResourceManager/JCR/vm_install/vm_parameters.json @@ -0,0 +1,99 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "value": "westus2" + }, + "networkInterfaceName": { + "value": "jcr-nic" + }, + "networkSecurityGroupName": { + "value": "jcr-nsg" + }, + "networkSecurityGroupRules": { + "value": [ + { + "name": "SSH", + "properties": { + "priority": 300, + "protocol": "TCP", + "access": "Allow", + "direction": "Inbound", + "sourceAddressPrefix": "*", + "sourcePortRange": "*", + "destinationAddressPrefix": "*", + "destinationPortRange": "22" + } + } + ] + }, + "subnetName": { + "value": "default" + }, + "virtualNetworkName": { + "value": "jcr-vm-test-vnet" + }, + "addressPrefixes": { + "value": [ + "10.0.0.0/24" + ] + }, + "subnets": { + "value": [ + { + "name": "default", + "properties": { + "addressPrefix": "10.0.0.0/24" + } + } + ] + }, + "publicIpAddressName": { + "value": "jcr-public-ip" + }, + "publicIpAddressType": { + "value": "Dynamic" + }, + "publicIpAddressSku": { + "value": "Basic" + }, + "virtualMachineName": { + "value": "jcr-vm" + }, + "virtualMachineComputerName": { + "value": "jcrvm" + }, + "storageAccountName": { + "value": "mpstoragevhd" + }, + "virtualMachineSize": { + "value": "Standard_B4ms" + }, + + "diagnosticsStorageAccountName": { + "value": "jcrvmtestdiag" + }, + "diagnosticsStorageAccountId": { + "value": "Microsoft.Storage/storageAccounts/jcrvmtestdiag" + }, + "diagnosticsStorageAccountType": { + "value": "Standard_LRS" + }, + "diagnosticsStorageAccountKind": { + "value": "Storage" + }, + "adminUsername": { + "value": "vmuser" + }, + "adminPassword": { + "value": "OWERWRITE_THE_PASSWORD" + }, + "artifactoryVersion": { + "value": "7.10.2" + }, + "scriptName": { + "value": "install_jcr7_to_vm.sh" + } + } +} \ No newline at end of file diff --git a/AzureResourceManager/Xray/MP_submission/scripts/install_xray.sh b/AzureResourceManager/Xray/MP_submission/scripts/install_xray.sh index f2195cf..2a4988f 100644 --- a/AzureResourceManager/Xray/MP_submission/scripts/install_xray.sh +++ b/AzureResourceManager/Xray/MP_submission/scripts/install_xray.sh @@ -21,6 +21,12 @@ cat </opt/jfrog/xray/var/etc/security/master.key ${MASTER_KEY} EOF +# Add Template Callhome to the Xray instance +cat <>/opt/jfrog/xray/app/bin/xray.default +export PARTNER_ID=Partner/ACC-007221 +export INTEGRATION_NAME=ARM_xray-template/1.0.0 +EOF + # Xray should have the same join key as the Artifactory instance # Both application should be deployed in the same Virtual Networks HOSTNAME=$(hostname -i) diff --git a/AzureResourceManager/Xray/scripts/install_xray.sh b/AzureResourceManager/Xray/scripts/install_xray.sh index f2195cf..2a4988f 100644 --- a/AzureResourceManager/Xray/scripts/install_xray.sh +++ b/AzureResourceManager/Xray/scripts/install_xray.sh @@ -21,6 +21,12 @@ cat </opt/jfrog/xray/var/etc/security/master.key ${MASTER_KEY} EOF +# Add Template Callhome to the Xray instance +cat <>/opt/jfrog/xray/app/bin/xray.default +export PARTNER_ID=Partner/ACC-007221 +export INTEGRATION_NAME=ARM_xray-template/1.0.0 +EOF + # Xray should have the same join key as the Artifactory instance # Both application should be deployed in the same Virtual Networks HOSTNAME=$(hostname -i) diff --git a/AzureResourceManager/Xray/vm_install/install_xray_to_vm.sh b/AzureResourceManager/Xray/vm_install/install_xray_to_vm.sh index 191d4ab..e3fc408 100644 --- a/AzureResourceManager/Xray/vm_install/install_xray_to_vm.sh +++ b/AzureResourceManager/Xray/vm_install/install_xray_to_vm.sh @@ -1,7 +1,7 @@ #!/bin/bash # Upgrade version for every release -XRAY_VERSION=3.8.5 +XRAY_VERSION=$1 export DEBIAN_FRONTEND=noninteractive @@ -33,10 +33,10 @@ EOF # Run interactive installation script with default parameters cat "/opt/jfrog-xray-${XRAY_VERSION}-deb/input.txt" | ./install.sh >> /var/log/install-xray.log 2>&1 -# Add Callhome to the Xray instance +# Add VM image Callhome to the Xray instance cat <>/opt/jfrog/xray/app/bin/xray.default export PARTNER_ID=Partner/ACC-007221 -export INTEGRATION_NAME=ARM_xray/1.0.0 +export INTEGRATION_NAME=ARM_xray-vm/1.0.0 EOF # Remove Xray service from boot up run diff --git a/AzureResourceManager/Xray/vm_install/vm_deploy.json b/AzureResourceManager/Xray/vm_install/vm_deploy.json new file mode 100644 index 0000000..ed1ef10 --- /dev/null +++ b/AzureResourceManager/Xray/vm_install/vm_deploy.json @@ -0,0 +1,262 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "type": "String" + }, + "networkInterfaceName": { + "type": "String" + }, + "networkSecurityGroupName": { + "type": "String" + }, + "networkSecurityGroupRules": { + "type": "Array" + }, + "subnetName": { + "type": "String" + }, + "virtualNetworkName": { + "type": "String" + }, + "addressPrefixes": { + "type": "Array" + }, + "subnets": { + "type": "Array" + }, + "publicIpAddressName": { + "type": "String" + }, + "publicIpAddressType": { + "type": "String" + }, + "publicIpAddressSku": { + "type": "String" + }, + "virtualMachineName": { + "type": "String" + }, + "virtualMachineComputerName": { + "type": "String" + }, + "storageAccountName": { + "type": "String" + }, + "virtualMachineSize": { + "type": "String" + }, + "adminUsername": { + "type": "String" + }, + "adminPassword": { + "type": "SecureString" + }, + "diagnosticsStorageAccountName": { + "type": "String" + }, + "diagnosticsStorageAccountId": { + "type": "String" + }, + "diagnosticsStorageAccountType": { + "type": "String" + }, + "diagnosticsStorageAccountKind": { + "type": "String" + }, + "_artifactsLocation": { + "type": "string", + "metadata": { + "description": "The base URI where artifacts required by this template are located. When the template is deployed using the accompanying scripts, a private location in the subscription will be used and this value will be automatically generated." + }, + "defaultValue": "https://raw.githubusercontent.com/jfrog/JFrog-Cloud-Installers/vm-image-templates/AzureResourceManager/Xray/" + }, + "_artifactsLocationSasToken": { + "type": "securestring", + "metadata": { + "description": "The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated." + }, + "defaultValue": "" + }, + "artifactoryVersion": { + "type": "String" + }, + "scriptName": { + "type": "String" + }, + "baseTime": { + "type": "string", + "defaultValue": "[utcNow()]" + } + }, + "variables": { + "nsgId": "[resourceId(resourceGroup().name, 'Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroupName'))]", + "vnetId": "[resourceId(resourceGroup().name,'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "subnetRef": "[concat(variables('vnetId'), '/subnets/', parameters('subnetName'))]", + "storageContainerUri": "[concat(concat('https://', parameters('storageAccountName'), '.blob.core.windows.net/'), 'vhds/')]", + "scriptName": "[parameters('scriptName')]", + "commandToExecute": "[concat('bash ', variables('scriptName'), ' ', parameters('artifactoryVersion'))]", + "fileLocation": "[uri(parameters('_artifactsLocation'), concat('vm_install/', variables('scriptName'), parameters('_artifactsLocationSasToken')))]", + "diskNameSalt": "[concat(parameters('artifactoryVersion'), '-', parameters('baseTime'))]" + + }, + "resources": [ + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2019-07-01", + "name": "[parameters('networkInterfaceName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Network/networkSecurityGroups/', parameters('networkSecurityGroupName'))]", + "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]", + "[concat('Microsoft.Network/publicIpAddresses/', parameters('publicIpAddressName'))]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "subnet": { + "id": "[variables('subnetRef')]" + }, + "privateIPAllocationMethod": "Dynamic", + "publicIpAddress": { + "id": "[resourceId(resourceGroup().name, 'Microsoft.Network/publicIpAddresses', parameters('publicIpAddressName'))]" + } + } + } + ], + "networkSecurityGroup": { + "id": "[variables('nsgId')]" + } + } + }, + { + "type": "Microsoft.Network/networkSecurityGroups", + "apiVersion": "2019-02-01", + "name": "[parameters('networkSecurityGroupName')]", + "location": "[parameters('location')]", + "properties": { + "securityRules": "[parameters('networkSecurityGroupRules')]" + } + }, + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "2019-09-01", + "name": "[parameters('virtualNetworkName')]", + "location": "[parameters('location')]", + "properties": { + "addressSpace": { + "addressPrefixes": "[parameters('addressPrefixes')]" + }, + "subnets": "[parameters('subnets')]" + } + }, + { + "type": "Microsoft.Network/publicIpAddresses", + "apiVersion": "2019-02-01", + "name": "[parameters('publicIpAddressName')]", + "location": "[parameters('location')]", + "sku": { + "name": "[parameters('publicIpAddressSku')]" + }, + "properties": { + "publicIpAllocationMethod": "[parameters('publicIpAddressType')]" + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2019-07-01", + "name": "[parameters('virtualMachineName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Network/networkInterfaces/', parameters('networkInterfaceName'))]", + "[concat('Microsoft.Storage/storageAccounts/', parameters('diagnosticsStorageAccountName'))]" + ], + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('virtualMachineSize')]" + }, + "storageProfile": { + "osDisk": { + "createOption": "fromImage", + "vhd": { + "uri": "[concat(variables('storageContainerUri'), parameters('virtualMachineName'), variables('diskNameSalt'), '.vhd')]" + }, + "name": "[parameters('virtualMachineName')]" + }, + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaceName'))]" + } + ] + }, + "osProfile": { + "computerName": "[parameters('virtualMachineComputerName')]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "[concat('https://', parameters('diagnosticsStorageAccountName'), '.blob.core.windows.net/')]" + } + } + }, + "resources":[ + { + "name": "extension1", + "type": "extensions", + "apiVersion": "2015-05-01-preview", + "location": "[parameters('location')]", + "dependsOn": [ + "[concat('Microsoft.Compute/virtualMachines/', parameters('virtualMachineName'))]" + ], + "properties": { + "publisher": "Microsoft.Azure.Extensions", + "type": "CustomScript", + "typeHandlerVersion": "2.0", + "autoUpgradeMinorVersion": true, + "settings": { + "fileUris": [ + "[variables('fileLocation')]" + ], + "commandToExecute": "[variables('commandToExecute')]" + } + } + + } + ] + }, + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "2019-06-01", + "name": "[parameters('diagnosticsStorageAccountName')]", + "location": "[parameters('location')]", + "sku": { + "name": "[parameters('diagnosticsStorageAccountType')]" + }, + "kind": "[parameters('diagnosticsStorageAccountKind')]", + "properties": {} + } + ], + "outputs": { + "adminUsername": { + "type": "String", + "value": "[parameters('adminUsername')]" + }, + "commandTExecute": { + "type": "String", + "value": "[variables('commandToExecute')]" + } + } +} \ No newline at end of file diff --git a/AzureResourceManager/Xray/vm_install/vm_parameters.json b/AzureResourceManager/Xray/vm_install/vm_parameters.json new file mode 100644 index 0000000..2d58ea8 --- /dev/null +++ b/AzureResourceManager/Xray/vm_install/vm_parameters.json @@ -0,0 +1,99 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "location": { + "value": "westus2" + }, + "networkInterfaceName": { + "value": "xray-nic" + }, + "networkSecurityGroupName": { + "value": "xray-nsg" + }, + "networkSecurityGroupRules": { + "value": [ + { + "name": "SSH", + "properties": { + "priority": 300, + "protocol": "TCP", + "access": "Allow", + "direction": "Inbound", + "sourceAddressPrefix": "*", + "sourcePortRange": "*", + "destinationAddressPrefix": "*", + "destinationPortRange": "22" + } + } + ] + }, + "subnetName": { + "value": "default" + }, + "virtualNetworkName": { + "value": "xray-vm-test-vnet" + }, + "addressPrefixes": { + "value": [ + "10.0.0.0/24" + ] + }, + "subnets": { + "value": [ + { + "name": "default", + "properties": { + "addressPrefix": "10.0.0.0/24" + } + } + ] + }, + "publicIpAddressName": { + "value": "xray-public-ip" + }, + "publicIpAddressType": { + "value": "Dynamic" + }, + "publicIpAddressSku": { + "value": "Basic" + }, + "virtualMachineName": { + "value": "xray-vm" + }, + "virtualMachineComputerName": { + "value": "xrayvm" + }, + "storageAccountName": { + "value": "mpstoragevhd" + }, + "virtualMachineSize": { + "value": "Standard_B4ms" + }, + + "diagnosticsStorageAccountName": { + "value": "xrayvmvmtestdiag" + }, + "diagnosticsStorageAccountId": { + "value": "Microsoft.Storage/storageAccounts/xrayvmvmtestdiag" + }, + "diagnosticsStorageAccountType": { + "value": "Standard_LRS" + }, + "diagnosticsStorageAccountKind": { + "value": "Storage" + }, + "adminUsername": { + "value": "vmuser" + }, + "adminPassword": { + "value": "OWERWRITE_THE_PASSWORD" + }, + "artifactoryVersion": { + "value": "3.8.5" + }, + "scriptName": { + "value": "install_xray_to_vm.sh" + } + } +} \ No newline at end of file From 282d251e5df2ef2b815973af2176032cb5135b05 Mon Sep 17 00:00:00 2001 From: danielmkn Date: Mon, 19 Oct 2020 14:12:07 -0700 Subject: [PATCH 3/4] ARM templates - RT 7.10.2, JCR 7.10.2, Xray 3.9.1 - minor changes in VM image templates --- .../MP_submission/createUiDefinition.json | 6 ++- .../MP_submission/mainTemplate.json | 5 ++- .../Artifactory/azuredeploy_ms_ps.json | 11 ++--- .../Artifactory/vm_install/vm_deploy.json | 3 -- .../Artifactory/vm_install/vm_parameters.json | 3 -- .../MP_submission_7/createUiDefinition.json | 6 ++- .../JCR/MP_submission_7/mainTemplate.json | 5 ++- AzureResourceManager/JCR/azuredeploy.json | 5 ++- .../JCR/vm_install/vm_deploy.json | 41 ++++++++----------- .../JCR/vm_install/vm_parameters.json | 13 +----- .../MP_submission/createUiDefinition.json | 6 ++- .../Xray/MP_submission/mainTemplate.json | 5 ++- .../Xray/azuredeploy_xray.parameters.json | 2 +- .../Xray/azuredeploy_xray_vmss.json | 5 ++- .../Xray/vm_install/vm_parameters.json | 2 +- 15 files changed, 55 insertions(+), 63 deletions(-) diff --git a/AzureResourceManager/Artifactory/MP_submission/createUiDefinition.json b/AzureResourceManager/Artifactory/MP_submission/createUiDefinition.json index e91512a..76ebfdd 100644 --- a/AzureResourceManager/Artifactory/MP_submission/createUiDefinition.json +++ b/AzureResourceManager/Artifactory/MP_submission/createUiDefinition.json @@ -132,7 +132,7 @@ "name": "artifactoryVersion", "type": "Microsoft.Common.DropDown", "label": "Artifactory-vm image version to deploy.", - "defaultValue": "7.7.3", + "defaultValue": "7.10.2", "toolTip": "Version of Artifactory to deploy", "constraints": { "allowedValues": [ @@ -167,6 +167,10 @@ { "label": "7.7.3", "value": "0.0.2" + }, + { + "label": "7.10.2", + "value": "0.0.3" } ], "required": true diff --git a/AzureResourceManager/Artifactory/MP_submission/mainTemplate.json b/AzureResourceManager/Artifactory/MP_submission/mainTemplate.json index 76b323c..cb86554 100644 --- a/AzureResourceManager/Artifactory/MP_submission/mainTemplate.json +++ b/AzureResourceManager/Artifactory/MP_submission/mainTemplate.json @@ -79,7 +79,7 @@ }, "artifactoryVersion": { "type": "string", - "defaultValue": "0.0.2", + "defaultValue": "0.0.3", "allowedValues": [ "6.6.0", "6.6.1", @@ -95,7 +95,8 @@ "7.4.3", "7.4.30", "0.0.1", - "0.0.2" + "0.0.2", + "0.0.3" ], "metadata": { "description": "Artifactory-vm image version to deploy." diff --git a/AzureResourceManager/Artifactory/azuredeploy_ms_ps.json b/AzureResourceManager/Artifactory/azuredeploy_ms_ps.json index 7ae66b3..9b2399a 100644 --- a/AzureResourceManager/Artifactory/azuredeploy_ms_ps.json +++ b/AzureResourceManager/Artifactory/azuredeploy_ms_ps.json @@ -79,26 +79,21 @@ }, "artifactoryVersion": { "type": "string", - "defaultValue": "0.0.2", + "defaultValue": "0.0.3", "allowedValues": [ - "6.6.0", - "6.6.1", - "6.7.0", - "6.8.0", "6.11.3", "6.15.0", "0.16.0", "0.17.0", "6.18.0", - "7.0.0717", - "7.0.4001", "7.2.1", "7.4.3", "7.4.30", "7.4.31", "7.5.7", "0.0.1", - "0.0.2" + "0.0.2", + "0.0.3" ], "metadata": { "description": "Artifactory-vm image version to deploy." diff --git a/AzureResourceManager/Artifactory/vm_install/vm_deploy.json b/AzureResourceManager/Artifactory/vm_install/vm_deploy.json index f131e70..2d8053b 100644 --- a/AzureResourceManager/Artifactory/vm_install/vm_deploy.json +++ b/AzureResourceManager/Artifactory/vm_install/vm_deploy.json @@ -41,9 +41,6 @@ "virtualMachineComputerName": { "type": "String" }, - "diskNameSalt": { - "type": "String" - }, "storageAccountName": { "type": "String" }, diff --git a/AzureResourceManager/Artifactory/vm_install/vm_parameters.json b/AzureResourceManager/Artifactory/vm_install/vm_parameters.json index 9049765..8241d9c 100644 --- a/AzureResourceManager/Artifactory/vm_install/vm_parameters.json +++ b/AzureResourceManager/Artifactory/vm_install/vm_parameters.json @@ -64,9 +64,6 @@ "virtualMachineComputerName": { "value": "rtvm" }, - "diskNameSalt": { - "value": "20200824153005" - }, "storageAccountName": { "value": "mpstoragevhd" }, diff --git a/AzureResourceManager/JCR/MP_submission_7/createUiDefinition.json b/AzureResourceManager/JCR/MP_submission_7/createUiDefinition.json index 990c3ba..0918f67 100644 --- a/AzureResourceManager/JCR/MP_submission_7/createUiDefinition.json +++ b/AzureResourceManager/JCR/MP_submission_7/createUiDefinition.json @@ -101,7 +101,7 @@ "name": "artifactoryVersion", "type": "Microsoft.Common.DropDown", "label": "JFrog Container Registry-vm image version to deploy.", - "defaultValue": "7.7.3", + "defaultValue": "7.10.2", "toolTip": "Version of JFrog Container Registry to deploy", "constraints": { "allowedValues": [ @@ -120,6 +120,10 @@ { "label": "7.7.3", "value": "0.0.2" + }, + { + "label": "7.10.2", + "value": "0.0.3" } ], "required": true diff --git a/AzureResourceManager/JCR/MP_submission_7/mainTemplate.json b/AzureResourceManager/JCR/MP_submission_7/mainTemplate.json index 8456a9e..6277267 100644 --- a/AzureResourceManager/JCR/MP_submission_7/mainTemplate.json +++ b/AzureResourceManager/JCR/MP_submission_7/mainTemplate.json @@ -25,12 +25,13 @@ }, "artifactoryVersion": { "type": "string", - "defaultValue": "0.0.2", + "defaultValue": "0.0.3", "allowedValues": [ "7.2.1", "7.3.2", "7.4.3", - "0.0.2" + "0.0.2", + "0.0.3" ], "metadata": { "description": "JFrog Container Registry-vm image version to deploy." diff --git a/AzureResourceManager/JCR/azuredeploy.json b/AzureResourceManager/JCR/azuredeploy.json index a2cc4f9..b1ec59b 100644 --- a/AzureResourceManager/JCR/azuredeploy.json +++ b/AzureResourceManager/JCR/azuredeploy.json @@ -25,12 +25,13 @@ }, "artifactoryVersion": { "type": "string", - "defaultValue": "0.0.2", + "defaultValue": "0.0.3", "allowedValues": [ "7.2.1", "7.3.2", "7.4.3", - "0.0.2" + "0.0.2", + "0.0.3" ], "metadata": { "description": "JFrog Container Registry-vm image version to deploy." diff --git a/AzureResourceManager/JCR/vm_install/vm_deploy.json b/AzureResourceManager/JCR/vm_install/vm_deploy.json index 035a169..b6e6977 100644 --- a/AzureResourceManager/JCR/vm_install/vm_deploy.json +++ b/AzureResourceManager/JCR/vm_install/vm_deploy.json @@ -5,11 +5,8 @@ "location": { "type": "String" }, - "networkInterfaceName": { - "type": "String" - }, - "networkSecurityGroupName": { - "type": "String" + "namingInfix": { + "type": "string" }, "networkSecurityGroupRules": { "type": "Array" @@ -17,18 +14,12 @@ "subnetName": { "type": "String" }, - "virtualNetworkName": { - "type": "String" - }, "addressPrefixes": { "type": "Array" }, "subnets": { "type": "Array" }, - "publicIpAddressName": { - "type": "String" - }, "publicIpAddressType": { "type": "String" }, @@ -91,8 +82,12 @@ } }, "variables": { - "nsgId": "[resourceId(resourceGroup().name, 'Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroupName'))]", - "vnetId": "[resourceId(resourceGroup().name,'Microsoft.Network/virtualNetworks', parameters('virtualNetworkName'))]", + "networkInterfaceName": "[concat(parameters('namingInfix'), '-nic')]", + "networkSecurityGroupName": "[concat(parameters('namingInfix'), '-nsg')]", + "virtualNetworkName": "[concat(parameters('namingInfix'), '-vnet')]", + "publicIpAddressName": "[concat(parameters('namingInfix'), '-public-ip')]", + "nsgId": "[resourceId(resourceGroup().name, 'Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]", + "vnetId": "[resourceId(resourceGroup().name,'Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]", "subnetRef": "[concat(variables('vnetId'), '/subnets/', parameters('subnetName'))]", "storageContainerUri": "[concat(concat('https://', parameters('storageAccountName'), '.blob.core.windows.net/'), 'vhds/')]", "scriptName": "[parameters('scriptName')]", @@ -105,12 +100,12 @@ { "type": "Microsoft.Network/networkInterfaces", "apiVersion": "2019-07-01", - "name": "[parameters('networkInterfaceName')]", + "name": "[variables('networkInterfaceName')]", "location": "[parameters('location')]", "dependsOn": [ - "[concat('Microsoft.Network/networkSecurityGroups/', parameters('networkSecurityGroupName'))]", - "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]", - "[concat('Microsoft.Network/publicIpAddresses/', parameters('publicIpAddressName'))]" + "[concat('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]", + "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", + "[concat('Microsoft.Network/publicIpAddresses/', variables('publicIpAddressName'))]" ], "properties": { "ipConfigurations": [ @@ -122,7 +117,7 @@ }, "privateIPAllocationMethod": "Dynamic", "publicIpAddress": { - "id": "[resourceId(resourceGroup().name, 'Microsoft.Network/publicIpAddresses', parameters('publicIpAddressName'))]" + "id": "[resourceId(resourceGroup().name, 'Microsoft.Network/publicIpAddresses', variables('publicIpAddressName'))]" } } } @@ -135,7 +130,7 @@ { "type": "Microsoft.Network/networkSecurityGroups", "apiVersion": "2019-02-01", - "name": "[parameters('networkSecurityGroupName')]", + "name": "[variables('networkSecurityGroupName')]", "location": "[parameters('location')]", "properties": { "securityRules": "[parameters('networkSecurityGroupRules')]" @@ -144,7 +139,7 @@ { "type": "Microsoft.Network/virtualNetworks", "apiVersion": "2019-09-01", - "name": "[parameters('virtualNetworkName')]", + "name": "[variables('virtualNetworkName')]", "location": "[parameters('location')]", "properties": { "addressSpace": { @@ -156,7 +151,7 @@ { "type": "Microsoft.Network/publicIpAddresses", "apiVersion": "2019-02-01", - "name": "[parameters('publicIpAddressName')]", + "name": "[variables('publicIpAddressName')]", "location": "[parameters('location')]", "sku": { "name": "[parameters('publicIpAddressSku')]" @@ -171,7 +166,7 @@ "name": "[parameters('virtualMachineName')]", "location": "[parameters('location')]", "dependsOn": [ - "[concat('Microsoft.Network/networkInterfaces/', parameters('networkInterfaceName'))]", + "[concat('Microsoft.Network/networkInterfaces/', variables('networkInterfaceName'))]", "[concat('Microsoft.Storage/storageAccounts/', parameters('diagnosticsStorageAccountName'))]" ], "properties": { @@ -196,7 +191,7 @@ "networkProfile": { "networkInterfaces": [ { - "id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaceName'))]" + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('networkInterfaceName'))]" } ] }, diff --git a/AzureResourceManager/JCR/vm_install/vm_parameters.json b/AzureResourceManager/JCR/vm_install/vm_parameters.json index 41388d6..58c512d 100644 --- a/AzureResourceManager/JCR/vm_install/vm_parameters.json +++ b/AzureResourceManager/JCR/vm_install/vm_parameters.json @@ -5,11 +5,8 @@ "location": { "value": "westus2" }, - "networkInterfaceName": { - "value": "jcr-nic" - }, - "networkSecurityGroupName": { - "value": "jcr-nsg" + "namingInfix": { + "value": "jcr" }, "networkSecurityGroupRules": { "value": [ @@ -31,9 +28,6 @@ "subnetName": { "value": "default" }, - "virtualNetworkName": { - "value": "jcr-vm-test-vnet" - }, "addressPrefixes": { "value": [ "10.0.0.0/24" @@ -49,9 +43,6 @@ } ] }, - "publicIpAddressName": { - "value": "jcr-public-ip" - }, "publicIpAddressType": { "value": "Dynamic" }, diff --git a/AzureResourceManager/Xray/MP_submission/createUiDefinition.json b/AzureResourceManager/Xray/MP_submission/createUiDefinition.json index d4ca300..88e3488 100644 --- a/AzureResourceManager/Xray/MP_submission/createUiDefinition.json +++ b/AzureResourceManager/Xray/MP_submission/createUiDefinition.json @@ -123,7 +123,7 @@ "name": "xrayVersion", "type": "Microsoft.Common.DropDown", "label": "Xray-vm image version to deploy.", - "defaultValue": "3.8.5", + "defaultValue": "3.9.1", "toolTip": "Version of Xray to deploy", "constraints": { "allowedValues": [ @@ -138,6 +138,10 @@ { "label": "3.8.5", "value": "0.0.5" + }, + { + "label": "3.9.1", + "value": "0.0.6" } ], "required": true diff --git a/AzureResourceManager/Xray/MP_submission/mainTemplate.json b/AzureResourceManager/Xray/MP_submission/mainTemplate.json index 4d0b228..15bf701 100644 --- a/AzureResourceManager/Xray/MP_submission/mainTemplate.json +++ b/AzureResourceManager/Xray/MP_submission/mainTemplate.json @@ -19,11 +19,12 @@ }, "xrayVersion": { "type": "string", - "defaultValue": "0.0.5", + "defaultValue": "0.0.6", "allowedValues": [ "0.0.3", "0.0.4", - "0.0.5" + "0.0.5", + "0.0.6" ], "metadata": { "description": "Xray-vm image version to deploy." diff --git a/AzureResourceManager/Xray/azuredeploy_xray.parameters.json b/AzureResourceManager/Xray/azuredeploy_xray.parameters.json index 7979be9..2f18bb9 100644 --- a/AzureResourceManager/Xray/azuredeploy_xray.parameters.json +++ b/AzureResourceManager/Xray/azuredeploy_xray.parameters.json @@ -33,7 +33,7 @@ "value": "10.0.1.0/24" }, "xrayVersion": { - "value": "0.0.4" + "value": "0.0.6" }, "artifactoryURL": { "value": "http://artifactory-url.cloudapp.azure.com" diff --git a/AzureResourceManager/Xray/azuredeploy_xray_vmss.json b/AzureResourceManager/Xray/azuredeploy_xray_vmss.json index e8c4339..a16eb18 100644 --- a/AzureResourceManager/Xray/azuredeploy_xray_vmss.json +++ b/AzureResourceManager/Xray/azuredeploy_xray_vmss.json @@ -19,11 +19,12 @@ }, "xrayVersion": { "type": "string", - "defaultValue": "0.0.5", + "defaultValue": "0.0.6", "allowedValues": [ "0.0.3", "0.0.4", - "0.0.5" + "0.0.5", + "0.0.6" ], "metadata": { "description": "Xray-vm image version to deploy." diff --git a/AzureResourceManager/Xray/vm_install/vm_parameters.json b/AzureResourceManager/Xray/vm_install/vm_parameters.json index 2d58ea8..77992f8 100644 --- a/AzureResourceManager/Xray/vm_install/vm_parameters.json +++ b/AzureResourceManager/Xray/vm_install/vm_parameters.json @@ -90,7 +90,7 @@ "value": "OWERWRITE_THE_PASSWORD" }, "artifactoryVersion": { - "value": "3.8.5" + "value": "3.9.1" }, "scriptName": { "value": "install_xray_to_vm.sh" From 579c7deca71f9e1f075f5d2de9c3fd1b09fc109a Mon Sep 17 00:00:00 2001 From: danielmkn Date: Mon, 19 Oct 2020 15:11:07 -0700 Subject: [PATCH 4/4] ARM templates - version parameter renamed for xray --- AzureResourceManager/Xray/vm_install/vm_deploy.json | 6 +++--- AzureResourceManager/Xray/vm_install/vm_parameters.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/AzureResourceManager/Xray/vm_install/vm_deploy.json b/AzureResourceManager/Xray/vm_install/vm_deploy.json index ed1ef10..47e23a7 100644 --- a/AzureResourceManager/Xray/vm_install/vm_deploy.json +++ b/AzureResourceManager/Xray/vm_install/vm_deploy.json @@ -79,7 +79,7 @@ }, "defaultValue": "" }, - "artifactoryVersion": { + "xrayVersion": { "type": "String" }, "scriptName": { @@ -96,9 +96,9 @@ "subnetRef": "[concat(variables('vnetId'), '/subnets/', parameters('subnetName'))]", "storageContainerUri": "[concat(concat('https://', parameters('storageAccountName'), '.blob.core.windows.net/'), 'vhds/')]", "scriptName": "[parameters('scriptName')]", - "commandToExecute": "[concat('bash ', variables('scriptName'), ' ', parameters('artifactoryVersion'))]", + "commandToExecute": "[concat('bash ', variables('scriptName'), ' ', parameters('xrayVersion'))]", "fileLocation": "[uri(parameters('_artifactsLocation'), concat('vm_install/', variables('scriptName'), parameters('_artifactsLocationSasToken')))]", - "diskNameSalt": "[concat(parameters('artifactoryVersion'), '-', parameters('baseTime'))]" + "diskNameSalt": "[concat(parameters('xrayVersion'), '-', parameters('baseTime'))]" }, "resources": [ diff --git a/AzureResourceManager/Xray/vm_install/vm_parameters.json b/AzureResourceManager/Xray/vm_install/vm_parameters.json index 77992f8..6296ec4 100644 --- a/AzureResourceManager/Xray/vm_install/vm_parameters.json +++ b/AzureResourceManager/Xray/vm_install/vm_parameters.json @@ -89,7 +89,7 @@ "adminPassword": { "value": "OWERWRITE_THE_PASSWORD" }, - "artifactoryVersion": { + "xrayVersion": { "value": "3.9.1" }, "scriptName": {