diff --git a/AzureResourceManager/Artifactory/MP_submission/artifactory-pro-7-7-3-0.zip b/AzureResourceManager/Artifactory/MP_submission/artifactory-pro-7-7-3-0.zip new file mode 100644 index 0000000..dd67abd Binary files /dev/null and b/AzureResourceManager/Artifactory/MP_submission/artifactory-pro-7-7-3-0.zip differ diff --git a/AzureResourceManager/Artifactory/MP_submission/createUiDefinition.json b/AzureResourceManager/Artifactory/MP_submission/createUiDefinition.json index acfeb1a..e91512a 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.6.2", + "defaultValue": "7.7.3", "toolTip": "Version of Artifactory to deploy", "constraints": { "allowedValues": [ @@ -163,6 +163,10 @@ { "label": "7.6.2", "value": "0.0.1" + }, + { + "label": "7.7.3", + "value": "0.0.2" } ], "required": true diff --git a/AzureResourceManager/Artifactory/MP_submission/mainTemplate.json b/AzureResourceManager/Artifactory/MP_submission/mainTemplate.json index 1c04533..76b323c 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.1", + "defaultValue": "0.0.2", "allowedValues": [ "6.6.0", "6.6.1", @@ -94,7 +94,8 @@ "0.3.2", "7.4.3", "7.4.30", - "0.0.1" + "0.0.1", + "0.0.2" ], "metadata": { "description": "Artifactory-vm image version to deploy." diff --git a/AzureResourceManager/Artifactory/README.md b/AzureResourceManager/Artifactory/README.md index 66d7be3..48053c8 100644 --- a/AzureResourceManager/Artifactory/README.md +++ b/AzureResourceManager/Artifactory/README.md @@ -50,12 +50,11 @@ considering you have SSL certificate for `*.jfrog.team` ### Steps to upgrade Artifactory Version -1. Login into Primary VM instance and sudo as root. Use the admin credentials provided in the install setup. +1. Login into first member VM instance and sudo as root. Use the admin credentials provided in the install setup. Note: Use load balancer's NAT entries under Azure resources, to get the allocated NAT port for accessing the VM instance. 2. Stop nginx and artifactory services. ``` - service nginx stop service artifactory stop ``` @@ -67,9 +66,9 @@ Note: Use load balancer's NAT entries under Azure resources, to get the allocate 4. Start artifactory and nginx services. ``` service artifactory start - service nginx start ``` -5. Repeat above steps for all member nodes. +5. Repeat above steps for all member nodes then for primary node. +6. To check the version of each node, open Administration -> Monitoring -> Service status ------ #### Note: diff --git a/AzureResourceManager/Artifactory/azuredeploy_ms_ps.json b/AzureResourceManager/Artifactory/azuredeploy_ms_ps.json index daf1497..7ae66b3 100644 --- a/AzureResourceManager/Artifactory/azuredeploy_ms_ps.json +++ b/AzureResourceManager/Artifactory/azuredeploy_ms_ps.json @@ -79,7 +79,7 @@ }, "artifactoryVersion": { "type": "string", - "defaultValue": "0.0.1", + "defaultValue": "0.0.2", "allowedValues": [ "6.6.0", "6.6.1", @@ -97,7 +97,8 @@ "7.4.30", "7.4.31", "7.5.7", - "0.0.1" + "0.0.1", + "0.0.2" ], "metadata": { "description": "Artifactory-vm image version to deploy." @@ -242,7 +243,7 @@ "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/arm-xray/AzureResourceManager/Artifactory/" + "defaultValue": "https://raw.githubusercontent.com/jfrog/JFrog-Cloud-Installers/master/AzureResourceManager/Artifactory/" }, "_artifactsLocationSasToken": { "type": "securestring", diff --git a/AzureResourceManager/Artifactory/azuredeploy_ms_ps.parameters.json b/AzureResourceManager/Artifactory/azuredeploy_ms_ps.parameters.json index 182f9f0..8e4317e 100644 --- a/AzureResourceManager/Artifactory/azuredeploy_ms_ps.parameters.json +++ b/AzureResourceManager/Artifactory/azuredeploy_ms_ps.parameters.json @@ -44,10 +44,10 @@ "value": "postgressrvr" }, "masterKey": { - "value": "GEN-UNIQUE" + "value": "GENERATE_MASTER_KEY" }, "joinKey": { - "value": "GEN-UNIQUE" + "value": "GENERATE_JOIN_KEY" }, "certificate": { "value": "-----BEGIN CERTIFICATE----- -----END CERTIFICATE-----" diff --git a/AzureResourceManager/Artifactory/vm_install/install_pro7_to_vm.sh b/AzureResourceManager/Artifactory/vm_install/install_pro7_to_vm.sh index 41d33cc..7900216 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.6.2 +ARTIFACTORY_VERSION=7.7.3 UBUNTU_CODENAME=$(cat /etc/lsb-release | grep "^DISTRIB_CODENAME=" | sed "s/DISTRIB_CODENAME=//") export DEBIAN_FRONTEND=noninteractive diff --git a/AzureResourceManager/JCR/MP_submission_7/createUiDefinition.json b/AzureResourceManager/JCR/MP_submission_7/createUiDefinition.json index e61080f..990c3ba 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.4.3", + "defaultValue": "7.7.3", "toolTip": "Version of JFrog Container Registry to deploy", "constraints": { "allowedValues": [ @@ -116,6 +116,10 @@ { "label": "7.4.3", "value": "7.4.3" + }, + { + "label": "7.7.3", + "value": "0.0.2" } ], "required": true @@ -132,7 +136,7 @@ "toolTip": "Master key for JFrog Container Registry cluster. Generate master.key using command '$openssl rand -hex 16'", "constraints": { "required": true, - "regex": "^[a-z0-9A-Z]{1,32}$", + "regex": "^[a-z0-9A-Z]{12,32}$", "validationMessage": "Only alphanumeric characters are allowed, and the value must be 1-32 characters long." }, "options": { diff --git a/AzureResourceManager/JCR/MP_submission_7/jfrog-container-registry-artifactory-7-7-3-0.zip b/AzureResourceManager/JCR/MP_submission_7/jfrog-container-registry-artifactory-7-7-3-0.zip new file mode 100644 index 0000000..b218f46 Binary files /dev/null and b/AzureResourceManager/JCR/MP_submission_7/jfrog-container-registry-artifactory-7-7-3-0.zip differ diff --git a/AzureResourceManager/JCR/MP_submission_7/mainTemplate.json b/AzureResourceManager/JCR/MP_submission_7/mainTemplate.json index bd39da3..8456a9e 100644 --- a/AzureResourceManager/JCR/MP_submission_7/mainTemplate.json +++ b/AzureResourceManager/JCR/MP_submission_7/mainTemplate.json @@ -25,11 +25,12 @@ }, "artifactoryVersion": { "type": "string", - "defaultValue": "7.4.3", + "defaultValue": "0.0.2", "allowedValues": [ "7.2.1", "7.3.2", - "7.4.3" + "7.4.3", + "0.0.2" ], "metadata": { "description": "JFrog Container Registry-vm image version to deploy." @@ -213,7 +214,7 @@ "type": "Microsoft.Network/networkSecurityGroups", "location": "[parameters('location')]", "name": "[variables('nsgName')]", - "apiVersion": "2018-07-01", + "apiVersion": "2020-03-01", "properties": { "securityRules": [ { @@ -293,9 +294,9 @@ "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", "location": "[parameters('location')]", - "apiVersion": "2018-07-01", + "apiVersion": "2020-03-01", "dependsOn": [ - "[concat('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]" + "[resourceId('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]" ], "properties": { "addressSpace": { @@ -317,14 +318,14 @@ } }, { - "apiVersion": "2018-07-01", + "apiVersion": "2020-03-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicPrimaryName')]", "location": "[parameters('location')]", "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', variables('pipPrimaryName'))]", - "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", - "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" + "[resourceId('Microsoft.Network/publicIPAddresses/', variables('pipPrimaryName'))]", + "[resourceId('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", + "[resourceId('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]" ], "properties": { "ipConfigurations": [ @@ -350,7 +351,7 @@ "sku": { "name": "Standard" }, - "apiVersion": "2018-07-01", + "apiVersion": "2020-03-01", "properties": { "publicIPAllocationMethod": "Static", "dnsSettings": { @@ -362,12 +363,12 @@ "type": "Microsoft.Network/loadBalancers", "name": "[variables('lbName')]", "location": "[parameters('location')]", - "apiVersion": "2018-07-01", + "apiVersion": "2020-03-01", "sku": { "name": "Standard" }, "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', variables('pipPrimaryName'))]" + "[resourceId('Microsoft.Network/publicIPAddresses/', variables('pipPrimaryName'))]" ], "tags":{ "displayName": "Load Balancer" @@ -468,7 +469,7 @@ } }, { - "apiVersion": "2018-07-01", + "apiVersion": "2019-06-01", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "location": "[parameters('location')]", @@ -484,7 +485,7 @@ { "type": "Microsoft.Resources/deployments", "name": "deploySQLDB", - "apiVersion": "2018-07-01", + "apiVersion": "2019-09-01", "properties": { "mode": "Incremental", "templateLink": { @@ -519,10 +520,10 @@ "location": "[parameters('location')]", "apiVersion": "2018-10-01", "dependsOn": [ - "[concat('Microsoft.Network/loadBalancers/', variables('lbName'))]", - "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", - "[concat('Microsoft.Resources/deployments/', 'deploySQLDB')]", - "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]" + "[resourceId('Microsoft.Network/loadBalancers/', variables('lbName'))]", + "[resourceId('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", + "[resourceId('Microsoft.Resources/deployments/', 'deploySQLDB')]", + "[resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]" ], "plan": { "name": "artifactory-jcr", diff --git a/AzureResourceManager/JCR/MP_submission_7/nested/azureDBDeploy.json b/AzureResourceManager/JCR/MP_submission_7/nested/azureDBDeploy.json index 70c31a5..44b6f3d 100644 --- a/AzureResourceManager/JCR/MP_submission_7/nested/azureDBDeploy.json +++ b/AzureResourceManager/JCR/MP_submission_7/nested/azureDBDeploy.json @@ -43,7 +43,7 @@ "type": "Microsoft.Sql/servers", "kind": "v12.0", "location": "[variables('db_location')]", - "apiVersion": "2019-06-01-preview", + "apiVersion": "2020-02-02-preview", "tags": { "displayName": "artifactoryDB" }, @@ -57,9 +57,9 @@ "name": "[uniqueString(parameters('db_server'), 'AllowAllWindowsAzureIps' )]", "type": "firewallrules", "location": "[variables('db_location')]", - "apiVersion": "2019-06-01-preview", + "apiVersion": "2020-02-02-preview", "dependsOn": [ - "[concat('Microsoft.Sql/servers/', parameters('db_server'))]" + "[resourceId('Microsoft.Sql/servers/', parameters('db_server'))]" ], "properties": { "startIpAddress": "0.0.0.0", @@ -71,7 +71,7 @@ "type": "databases", "kind": "v12.0,user", "location": "[variables('db_location')]", - "apiVersion": "2019-06-01-preview", + "apiVersion": "2020-02-02-preview", "dependsOn": [ "[parameters('db_server')]" ], @@ -90,7 +90,7 @@ "outputs": { "jdbcConnString": { "type": "string", - "value": "[concat('jdbc:sqlserver://', reference(concat('Microsoft.Sql/servers/', parameters('db_server'))).fullyQualifiedDomainName, ':1433')]" + "value": "[concat('jdbc:sqlserver://', reference(resourceId('Microsoft.Sql/servers/', parameters('db_server'))).fullyQualifiedDomainName, ':1433')]" } } } diff --git a/AzureResourceManager/JCR/azuredeploy.json b/AzureResourceManager/JCR/azuredeploy.json index 1a5878c..a2cc4f9 100644 --- a/AzureResourceManager/JCR/azuredeploy.json +++ b/AzureResourceManager/JCR/azuredeploy.json @@ -25,19 +25,19 @@ }, "artifactoryVersion": { "type": "string", - "defaultValue": "7.4.3", + "defaultValue": "0.0.2", "allowedValues": [ "7.2.1", "7.3.2", - "7.4.3" + "7.4.3", + "0.0.2" ], "metadata": { "description": "JFrog Container Registry-vm image version to deploy." } }, "masterKey": { - "type": "string", - "defaultValue": "1ce2be4490ca2c662cb79636cf9b7b8e", + "type": "securestring", "maxLength": 64, "metadata": { "description": "Master key for JFrog Container Registry cluster. Generate master.key using command '$openssl rand -hex 16'" @@ -56,15 +56,13 @@ } }, "certificate": { - "type": "string", - "defaultValue": "-----BEGIN CERTIFICATE----- MIIFhzCCA2+gAwIBAgIJALC4r5BQWZE4MA0GCSqGSIb3DQEBCwUAMFoxCzAJBgNV BAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRMwEQYDVQQHDApTYW50YUNsYXJh MQswCQYDVQQKDAJJVDEUMBIGA1UEAwwLKi5sb2NhbGhvc3QwHhcNMTgwMTE3MTk0 NjI4WhcNMTkwMTA4MTk0NjI4WjBaMQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2Fs aWZvcm5pYTETMBEGA1UEBwwKU2FudGFDbGFyYTELMAkGA1UECgwCSVQxFDASBgNV BAMMCyoubG9jYWxob3N0MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA 7KfOWDQlov8cMa8r/lcJqiWZaH9myQC74Vbe0HXsntQbcvljkjG2P7ebm5dd9Bzc sauNOJpbKf5AhFK1iwJUAkciGc1LR4k8wfWmQM3NPS8hrqrtH20zqNpdFRpNYjja JofwccPNm030GhhZkZ95TpruvmswMDwspl3jfqdcc/eiQsHcKyGnV2a+UAeoqe7J mHhmhRy1MLqAjF5U1GrUYUONA+22iRDJb4c9B91QoWvsnXpdA9NKV/mmA3/rIdx6 Ld2IPRdrIw2K5sAnXsh3bx2oCSvSfussf0x+4XDrnsaHVfjwvfNL8ECOuac2Oi/E WOp9528gOohpFAuwEt63Vl5p8/CC9m0HJDTZBKm2l5eD1kdPIj4PvP9Sn9CxGXKQ E1bxWoFxGX8EyRW0b0NK31N7b8JPZ1SoFNiB5amOMNLvR26a7cQrKumTuJeYK9Ja JaxhMXM7R0DA0Ev8ZG2xmyCygox+1KPSmJOIEpT70BFbj3rKLNqP22ET+zvPuh+2 DdgyrpHFeYkGWjMbWPjK7wJsD2zM8ccoJQfepPz8I4rT0JfrKAQgCGuGOggneaNJ KTVGNOFbj5AXdZ/Q+GvNommyRdq4J7EnqY6L+P25fo5qZ6UZ/iS0tPcvxgn0Fdhs pUPbQyQIDZyxZd3Q1lUIE38ol8P66mS2zbzf8EeOCoUCAwEAAaNQME4wHQYDVR0O BBYEFETAQM/5P7XJ8kevHFj6BPndQOFaMB8GA1UdIwQYMBaAFETAQM/5P7XJ8kev HFj6BPndQOFaMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggIBAJ1TepKv LWYhFmVQcgZwZf/qt1a1cohzJSm6da9RCnnAWC7WC/U117bgSomtrH1v0OysHFhB zBBUeBqI7+OmzAX8dhj+roKkcnFUM/IwlK1eueIIA//CWvEf/o0XExilVS2yCc9d PTpOQBXwk9QinxK36kHdBiGxa7dW0JPnOEEmuMgGORKeLy4J6Ik8iSeFY1SZVcOI +6WWvoKciPlmIeccC+6YVmkeBwhP2o5r5w/UAaO2hSnGvmm4UIj/VJv4VQu7xTUp cIfFz5NtIr80DbqcyPiEMS2ETJ4L/kO4MS5FfeEXyQuXCzmiIDVY6tE3C7+kZmK4 JzPLuWm9ndQoyQySOGfQqvlUR1+YxUdvmu3LrOS5dOA354Q36wHa4wEGUoHU/7GV fYQmmmDSDaNSpXW5PFey6scFyDBS/yYJ0H9EjYb/11HeWYj8Yv5xTWj8nhzJONC8 D6Y5ydlU4PifM2pOf88pTYpmogNwLJWXbql5I9cvMa8APo4yLVqcISU5ynsvFke+ Non+T0mHpJai/hrA9NK+s6EGC1dAX58jy61h6FhOPI1d4s/mov/KMa2t3SfZp5SF 81aR6dHvO56teiK5M1xMkrqG75zh3TMFJJLRFe9XxeB4JeN76URB3mgADOUqkBxd ibSgVqfKwOw4IujEcqMUc5mqSnbLY1Dv+oby -----END CERTIFICATE-----", + "type": "securestring", "metadata": { "description": "To use Artifactory as docker registry you need to provide wild card valid Certificate. Provide your SSL Certificate." } }, "certificateKey": { - "type": "string", - "defaultValue": "-----BEGIN PRIVATE KEY----- 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 S+j1+iUKGGhwVmhqh75q5do3+VF3XlAh -----END PRIVATE KEY-----", + "type": "securestring", "metadata": { "description": "Provide your SSL Certificate key" } @@ -144,7 +142,7 @@ "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/JFrogDev/JFrog-Cloud-Installers/master/AzureResourceManager/JCR/" + "defaultValue": "https://raw.githubusercontent.com/jfrog/JFrog-Cloud-Installers/master/AzureResourceManager/JCR/" }, "_artifactsLocationSasToken": { "type": "securestring", @@ -190,7 +188,7 @@ "osType": { "publisher": "jfrog", "offer": "jfrogcontainerregistry-vm", - "sku": "artifactory-jcr-private", + "sku": "artifactory-jcr", "version": "[parameters('artifactoryVersion')]" }, "imageReference": "[variables('osType')]", @@ -216,7 +214,7 @@ "type": "Microsoft.Network/networkSecurityGroups", "location": "[parameters('location')]", "name": "[variables('nsgName')]", - "apiVersion": "2018-07-01", + "apiVersion": "2020-03-01", "properties": { "securityRules": [ { @@ -296,9 +294,9 @@ "type": "Microsoft.Network/virtualNetworks", "name": "[variables('virtualNetworkName')]", "location": "[parameters('location')]", - "apiVersion": "2018-07-01", + "apiVersion": "2020-03-01", "dependsOn": [ - "[concat('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]" + "[resourceId('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]" ], "properties": { "addressSpace": { @@ -320,14 +318,14 @@ } }, { - "apiVersion": "2018-07-01", + "apiVersion": "2020-03-01", "type": "Microsoft.Network/networkInterfaces", "name": "[variables('nicPrimaryName')]", "location": "[parameters('location')]", "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', variables('pipPrimaryName'))]", - "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", - "[resourceId('Microsoft.Network/networkSecurityGroups', variables('nsgName'))]" + "[resourceId('Microsoft.Network/publicIPAddresses/', variables('pipPrimaryName'))]", + "[resourceId('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", + "[resourceId('Microsoft.Network/networkSecurityGroups/', variables('nsgName'))]" ], "properties": { "ipConfigurations": [ @@ -353,7 +351,7 @@ "sku": { "name": "Standard" }, - "apiVersion": "2018-07-01", + "apiVersion": "2020-03-01", "properties": { "publicIPAllocationMethod": "Static", "dnsSettings": { @@ -365,12 +363,12 @@ "type": "Microsoft.Network/loadBalancers", "name": "[variables('lbName')]", "location": "[parameters('location')]", - "apiVersion": "2018-07-01", + "apiVersion": "2020-03-01", "sku": { "name": "Standard" }, "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', variables('pipPrimaryName'))]" + "[resourceId('Microsoft.Network/publicIPAddresses/', variables('pipPrimaryName'))]" ], "tags":{ "displayName": "Load Balancer" @@ -471,7 +469,7 @@ } }, { - "apiVersion": "2018-07-01", + "apiVersion": "2019-06-01", "type": "Microsoft.Storage/storageAccounts", "name": "[variables('storageAccountName')]", "location": "[parameters('location')]", @@ -487,7 +485,7 @@ { "type": "Microsoft.Resources/deployments", "name": "deploySQLDB", - "apiVersion": "2018-07-01", + "apiVersion": "2019-09-01", "properties": { "mode": "Incremental", "templateLink": { @@ -522,13 +520,13 @@ "location": "[parameters('location')]", "apiVersion": "2018-10-01", "dependsOn": [ - "[concat('Microsoft.Network/loadBalancers/', variables('lbName'))]", - "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", - "[concat('Microsoft.Resources/deployments/', 'deploySQLDB')]", - "[concat('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]" + "[resourceId('Microsoft.Network/loadBalancers/', variables('lbName'))]", + "[resourceId('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]", + "[resourceId('Microsoft.Resources/deployments/', 'deploySQLDB')]", + "[resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]" ], "plan": { - "name": "artifactory-jcr-private", + "name": "artifactory-jcr", "publisher": "jfrog", "product": "jfrogcontainerregistry-vm" }, diff --git a/AzureResourceManager/JCR/azuredeploy.parameters.json b/AzureResourceManager/JCR/azuredeploy.parameters.json index c73c281..513b9d9 100644 --- a/AzureResourceManager/JCR/azuredeploy.parameters.json +++ b/AzureResourceManager/JCR/azuredeploy.parameters.json @@ -21,7 +21,13 @@ "value": "GEN-UNIQUE" }, "masterKey": { - "value": "GEN-UNIQUE" + "value": "GENERATE_MASTER_KEY" + }, + "certificate": { + "value": "-----BEGIN CERTIFICATE----- -----END CERTIFICATE-----" + }, + "certificateKey": { + "value": "-----BEGIN PRIVATE KEY----- -----END PRIVATE KEY-----" } } } \ No newline at end of file diff --git a/AzureResourceManager/JCR/nested/azureDBDeploy.json b/AzureResourceManager/JCR/nested/azureDBDeploy.json index 8c608f5..44b6f3d 100644 --- a/AzureResourceManager/JCR/nested/azureDBDeploy.json +++ b/AzureResourceManager/JCR/nested/azureDBDeploy.json @@ -1,9 +1,10 @@ { - "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "db_user": { "type": "string", + "defaultValue": "artifactory", "minLength": 1 }, "db_password": { @@ -11,10 +12,12 @@ }, "db_server": { "type": "string", + "defaultValue": "artmssqlsrv", "minLength": 1 }, "db_name": { "type": "string", + "defaultValue": "artdb", "minLength": 1 }, "db_location": { @@ -40,10 +43,7 @@ "type": "Microsoft.Sql/servers", "kind": "v12.0", "location": "[variables('db_location')]", - "apiVersion": "2015-05-01-preview", - "dependsOn": [ - - ], + "apiVersion": "2020-02-02-preview", "tags": { "displayName": "artifactoryDB" }, @@ -57,9 +57,9 @@ "name": "[uniqueString(parameters('db_server'), 'AllowAllWindowsAzureIps' )]", "type": "firewallrules", "location": "[variables('db_location')]", - "apiVersion": "2015-05-01-preview", + "apiVersion": "2020-02-02-preview", "dependsOn": [ - "[concat('Microsoft.Sql/servers/', parameters('db_server'))]" + "[resourceId('Microsoft.Sql/servers/', parameters('db_server'))]" ], "properties": { "startIpAddress": "0.0.0.0", @@ -71,7 +71,7 @@ "type": "databases", "kind": "v12.0,user", "location": "[variables('db_location')]", - "apiVersion": "2015-05-01-preview", + "apiVersion": "2020-02-02-preview", "dependsOn": [ "[parameters('db_server')]" ], @@ -90,7 +90,7 @@ "outputs": { "jdbcConnString": { "type": "string", - "value": "[concat('jdbc:sqlserver://', reference(concat('Microsoft.Sql/servers/', parameters('db_server'))).fullyQualifiedDomainName, ':1433')]" + "value": "[concat('jdbc:sqlserver://', reference(resourceId('Microsoft.Sql/servers/', parameters('db_server'))).fullyQualifiedDomainName, ':1433')]" } } } diff --git a/AzureResourceManager/JCR/vm_install/install_jcr7_to_vm.sh b/AzureResourceManager/JCR/vm_install/install_jcr7_to_vm.sh new file mode 100644 index 0000000..00e3894 --- /dev/null +++ b/AzureResourceManager/JCR/vm_install/install_jcr7_to_vm.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +# Upgrade version for every release +ARTIFACTORY_VERSION=7.7.3 +UBUNTU_CODENAME=$(cat /etc/lsb-release | grep "^DISTRIB_CODENAME=" | sed "s/DISTRIB_CODENAME=//") + +export DEBIAN_FRONTEND=noninteractive + +# install the wget and curl +apt-get update +apt-get -y install wget curl>> /tmp/install-curl.log 2>&1 + +#Generate Self-Signed Cert +mkdir -p /etc/pki/tls/private/ /etc/pki/tls/certs/ +openssl req -nodes -x509 -newkey rsa:4096 -keyout /etc/pki/tls/private/example.key -out /etc/pki/tls/certs/example.pem -days 356 -subj "/C=US/ST=California/L=SantaClara/O=IT/CN=*.localhost" + +# install the Artifactory JCR and Nginx +echo "deb https://jfrog.bintray.com/artifactory-debs ${UBUNTU_CODENAME} main" | tee -a /etc/apt/sources.list +curl --retry 5 https://bintray.com/user/downloadSubjectPublicKey?username=jfrog | apt-key add - +apt-get update +apt-get -y install nginx>> /tmp/install-nginx.log 2>&1 +apt-get -y install jfrog-artifactory-jcr=${ARTIFACTORY_VERSION} >> /tmp/install-artifactory.log 2>&1 + +# Add callhome metadata (allow us to collect information) +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", + "features": [ + { + "featureId": "Partner/ACC-007221" + } + ] +} +EOF + +#Install database drivers (for Java 11, path is different for RT6 and RT7) +curl --retry 5 -L -o /opt/jfrog/artifactory/app/artifactory/tomcat/lib/mysql-connector-java-5.1.38.jar https://bintray.com/artifact/download/bintray/jcenter/mysql/mysql-connector-java/5.1.38/mysql-connector-java-5.1.38.jar >> /tmp/install-databse-driver.log 2>&1 +curl --retry 5 -L -o /opt/jfrog/artifactory/app/artifactory/tomcat/lib/mssql-jdbc-7.4.1.jre11.jar https://bintray.com/artifact/download/bintray/jcenter/com/microsoft/sqlserver/mssql-jdbc/7.4.1.jre11/mssql-jdbc-7.4.1.jre11.jar >> /tmp/install-databse-driver.log 2>&1 +curl --retry 5 -L -o /opt/jfrog/artifactory/app/artifactory/tomcat/lib/postgresql-9.4.1212.jar https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar >> /tmp/install-databse-driver.log 2>&1 + +#Configuring nginx +rm /etc/nginx/sites-enabled/default + +printf "\nartifactory.ping.allowUnauthenticated=true" >> /var/opt/jfrog/artifactory/etc/artifactory/artifactory.system.properties + +chown artifactory:artifactory -R /var/opt/jfrog/artifactory/* && chown artifactory:artifactory -R /var/opt/jfrog/artifactory/etc/* + +# Remove Artifactory service from boot up run +systemctl disable artifactory +systemctl disable nginx \ No newline at end of file diff --git a/AzureResourceManager/Postgresql/postgres.parameters.json b/AzureResourceManager/Postgresql/postgres.parameters.json index 5aad362..892a315 100644 --- a/AzureResourceManager/Postgresql/postgres.parameters.json +++ b/AzureResourceManager/Postgresql/postgres.parameters.json @@ -3,10 +3,10 @@ "contentVersion": "1.0.0.0", "parameters": { "db_user": { - "value": "GEN-UNIQUE" + "value": "xray" }, "db_password": { - "value": "GEN-UNIQUE" + "value": "Password123!" }, "db_server": { "value": "postgressrvr" diff --git a/AzureResourceManager/Xray/MP_submission/createUiDefinition.json b/AzureResourceManager/Xray/MP_submission/createUiDefinition.json index e27c5ed..80c03e4 100644 --- a/AzureResourceManager/Xray/MP_submission/createUiDefinition.json +++ b/AzureResourceManager/Xray/MP_submission/createUiDefinition.json @@ -123,13 +123,17 @@ "name": "xrayVersion", "type": "Microsoft.Common.DropDown", "label": "Xray-vm image version to deploy.", - "defaultValue": "3.6.2", + "defaultValue": "3.8.2", "toolTip": "Version of Xray to deploy", "constraints": { "allowedValues": [ { "label": "3.6.2", "value": "0.0.3" + }, + { + "label": "3.8.2", + "value": "0.0.4" } ], "required": true @@ -158,7 +162,7 @@ "toolTip": "Master key for Xray instance. Generate master.key using command '$openssl rand -hex 16'", "constraints": { "required": true, - "regex": "^[a-z0-9A-Z]{1,32}$", + "regex": "^[a-z0-9A-Z]{12,32}$", "validationMessage": "Only alphanumeric characters are allowed, and the value must be 1-32 characters long." }, "options": { @@ -175,7 +179,7 @@ "toolTip": "Join key from Artifactory cluster. You can copy Join key from the Artifactory UI, Security -> Settings -> Connection details", "constraints": { "required": true, - "regex": "^[a-z0-9A-Z]{1,32}$", + "regex": "^[a-z0-9A-Z]{12,32}$", "validationMessage": "Only alphanumeric characters are allowed, and the value must be 1-32 characters long." }, "options": { diff --git a/AzureResourceManager/Xray/MP_submission/jfrog-xray-3-8-2-0.zip b/AzureResourceManager/Xray/MP_submission/jfrog-xray-3-8-2-0.zip new file mode 100644 index 0000000..6c0a6b0 Binary files /dev/null and b/AzureResourceManager/Xray/MP_submission/jfrog-xray-3-8-2-0.zip differ diff --git a/AzureResourceManager/Xray/MP_submission/mainTemplate.json b/AzureResourceManager/Xray/MP_submission/mainTemplate.json index 9232cc5..391dcd4 100644 --- a/AzureResourceManager/Xray/MP_submission/mainTemplate.json +++ b/AzureResourceManager/Xray/MP_submission/mainTemplate.json @@ -19,9 +19,10 @@ }, "xrayVersion": { "type": "string", - "defaultValue": "0.0.3", + "defaultValue": "0.0.4", "allowedValues": [ - "0.0.3" + "0.0.3", + "0.0.4" ], "metadata": { "description": "Xray-vm image version to deploy." diff --git a/AzureResourceManager/Xray/MP_submission/scripts/install_xray.sh b/AzureResourceManager/Xray/MP_submission/scripts/install_xray.sh index 5828c61..95db4a2 100644 --- a/AzureResourceManager/Xray/MP_submission/scripts/install_xray.sh +++ b/AzureResourceManager/Xray/MP_submission/scripts/install_xray.sh @@ -9,6 +9,11 @@ ARTIFACTORY_URL=$(cat /var/lib/cloud/instance/user-data.txt | grep "^ARTIFACTORY export DEBIAN_FRONTEND=noninteractive +sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CC86BB64 +sudo add-apt-repository ppa:rmescandon/yq -y +sudo apt update -y +sudo apt install yq -y + # Create master.key on each node sudo mkdir -p /opt/jfrog/xray/var/etc/security/ cat </opt/jfrog/xray/var/etc/security/master.key @@ -18,13 +23,13 @@ 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) -sed -i -e "s/ip:..*/ip: ${HOSTNAME}/" /var/opt/jfrog/xray/etc/system.yaml -sed -i -e "s#jfrogUrl:..*#jfrogUrl: \"${ARTIFACTORY_URL}\"#" /var/opt/jfrog/xray/etc/system.yaml -sed -i -e "s/joinKey:..*/joinKey: ${JOIN_KEY}/" /var/opt/jfrog/xray/etc/system.yaml -# DB configuration -sed -i -e "s/url: postgres:..*/url: \"postgres:\/\/${DB_SERVER}.postgres.database.azure.com:5432\/${DB_NAME}?sslmode=disable\"/" /var/opt/jfrog/xray/etc/system.yaml -sed -i -e "s/username:..*/username: \"${DB_USER}\"/" /var/opt/jfrog/xray/etc/system.yaml -sed -i -e "s/password:..*/password: \"${DB_PASSWORD}\"/" /var/opt/jfrog/xray/etc/system.yaml +yq w -i /var/opt/jfrog/xray/etc/system.yaml shared.database.url postgres://${DB_SERVER}.postgres.database.azure.com:5432/${DB_NAME}?sslmode=disable +yq w -i /var/opt/jfrog/xray/etc/system.yaml shared.database.username ${DB_USER} +yq w -i /var/opt/jfrog/xray/etc/system.yaml shared.database.password ${DB_PASSWORD} +yq w -i /var/opt/jfrog/xray/etc/system.yaml shared.rabbitMq.password JFXR_RABBITMQ_COOKIE +yq w -i /var/opt/jfrog/xray/etc/system.yaml shared.jfrogUrl ${ARTIFACTORY_URL} +yq w -i /var/opt/jfrog/xray/etc/system.yaml shared.security.joinKey ${JOIN_KEY} +yq w -i /var/opt/jfrog/xray/etc/system.yaml shared.node.ip ${HOSTNAME} chown xray:xray -R /opt/jfrog/xray/var/etc/security/* && chown xray:xray -R /opt/jfrog/xray/var/etc/security/ diff --git a/AzureResourceManager/Xray/azuredeploy_xray.json b/AzureResourceManager/Xray/azuredeploy_xray.json deleted file mode 100644 index fa5829a..0000000 --- a/AzureResourceManager/Xray/azuredeploy_xray.json +++ /dev/null @@ -1,389 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "location": { - "type": "string", - "defaultValue": "[resourceGroup().location]", - "metadata": { - "description": "Location for the resources." - } - }, - "vmName": { - "type": "string", - "metadata": { - "title": "VM Name", - "description": "This is the name of the your VM" - } - }, - "xrayVersion": { - "type": "string", - "defaultValue": "3.5.2", - "allowedValues": [ - "3.5.2" - ], - "metadata": { - "description": "Xray-vm image version to deploy." - } - }, - "artifactoryURL": { - "type": "string", - "metadata": { - "description": "Artifactory URL" - } - }, - "masterKey": { - "type": "securestring", - "maxLength": 64, - "metadata": { - "description": "Master key for Artifactory cluster. Generate master.key using command '$openssl rand -hex 16'" - } - }, - "joinKey": { - "type": "securestring", - "maxLength": 64, - "metadata": { - "description": "Join key for Artifactory cluster. Generate join.key using command '$openssl rand -hex 16'" - } - }, - "adminUsername": { - "type": "string", - "defaultValue": "testadmin", - "metadata": { - "description": "Username for the Virtual Machine." - } - }, - "adminPassword": { - "type": "securestring", - "metadata": { - "description": "Password for the Virtual Machine." - } - }, - "virtualNetworkName": { - "type": "string", - "metadata": { - "description": "New or Existing VNet Name" - } - }, - "virtualNetworkNewOrExisting": { - "type": "string", - "metadata": { - "description": "Boolean indicating whether the VNet is new or existing" - } - }, - "virtualNetworkAddressPrefix": { - "type": "string", - "metadata": { - "description": "VNet address prefix" - } - }, - "virtualNetworkResourceGroup": { - "type": "string", - "metadata": { - "description": "Resource group of the VNet" - } - }, - "virtualMachineSize": { - "type": "string", - "metadata": { - "description": "The size of the VM" - } - }, - "subnetName": { - "type": "string", - "metadata": { - "description": "New or Existing subnet Name" - } - }, - "subnetAddressPrefix": { - "type": "string", - "metadata": { - "description": "Subnet address prefix" - } - }, - "db_type": { - "type": "string", - "defaultValue": "Postgresql_deploy.json", - "allowedValues": [ - "Postgresql_deploy.json", - "Postgresql_existing.json" - ], - "metadata": { - "description": "Deploy new Postgresql, MSSQL or use existing DB" - } - }, - "manual_db_url": { - "type": "string", - "metadata": { - "description": "DB server URL, if existing DB server is used instead of a new deployment (jdbc:sqlserver://.. or jdbc:postgresql://..)" - } - }, - "db_server": { - "type": "string", - "metadata": { - "description": "DB server name, if pre-existing DB is used" - } - }, - "db_user": { - "type": "string", - "minLength": 1, - "metadata": { - "description": "Database Admin user name" - } - }, - "db_password": { - "type": "securestring", - "minLength": 1, - "metadata": { - "description": "Database Admin password" - } - }, - "databases": { - "type": "object", - "defaultValue": { - "properties": [ - { - "name": "xray", - "charset": "UTF8", - "collation": "English_United States.1252" - } - ] - } - }, - "_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/arm-xray/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": "" - } - }, - "variables": { - "storageAccountName": "[concat(uniquestring(resourceGroup().id), 'sawinvm')]", - "publicIPAddressName": "[concat(uniqueString(resourceGroup().id),'IP')]", - "vmName": "[parameters('vmName')]", - "nicName": "[concat(parameters('vmName'),'Nic')]", - "vnetId": { - "new": "[resourceId('Microsoft.Network/virtualNetworks',parameters('virtualNetworkName'))]", - "existing": "[resourceId(parameters('virtualNetworkResourceGroup'),'Microsoft.Network/virtualNetworks',parameters('virtualNetworkName'))]" - }, - "subnetId": "[concat(variables('vnetId')[parameters('virtualNetworkNewOrExisting')],'/subnets/',parameters('subnetName'))]", - "publicIPAddressType": "Dynamic", - "db_server": "[parameters('db_server')]", - "db_user": "[concat(parameters('db_user'), '@', parameters('db_server'))]", - "db_password": "[parameters('db_password')]", - "db_location": "[parameters('location')]", - "db_name": "[parameters('databases').properties[0].name]", - "masterKey": "[parameters('masterKey')]", - "joinKey": "[parameters('joinKey')]", - "osType": { - "publisher": "Canonical", - "offer": "UbuntuServer", - "sku": "18.04-LTS", - "version": "latest" - }, - "imageReference": "[variables('osType')]", - "dbTemplate": "[parameters('db_type')]", - "dbTemplateLocation": "[uri(parameters('_artifactsLocation'), concat('nested/', variables('dbTemplate'), parameters('_artifactsLocationSasToken')))]", - "artifactoryURL": "[parameters('artifactoryURL')]" - }, - "resources": [ - { - "apiVersion": "2019-05-01", - "name": "pid-04c1c376-5d4b-4771-9a7f-054f5910dcef", - "type": "Microsoft.Resources/deployments", - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "resources": [] - } - } - }, - { - "condition": "[equals(parameters('virtualNetworkNewOrExisting'),'new')]", - "type": "Microsoft.Network/virtualNetworks", - "apiVersion": "2017-09-01", - "name": "[parameters('virtualNetworkName')]", - "location": "[parameters('location')]", - "properties": { - "addressSpace": { - "addressPrefixes": [ - "[parameters('virtualNetworkAddressPrefix')]" - ] - }, - "subnets": [ - { - "name": "[parameters('subnetName')]", - "properties": { - "addressPrefix": "[parameters('subnetAddressPrefix')]" - } - } - ] - } - }, - { - "type": "Microsoft.Network/publicIPAddresses", - "name": "[variables('publicIPAddressName')]", - "apiVersion": "2015-06-15", - "location": "[parameters('location')]", - "properties": { - "publicIPAllocationMethod": "[variables('publicIPAddressType')]" - } - }, - { - "type": "Microsoft.Network/networkInterfaces", - "name": "[variables('nicName')]", - "apiVersion": "2016-03-30", - "location": "[parameters('location')]", - "properties": { - "ipConfigurations": [ - { - "name": "ipconfig1", - "properties": { - "privateIPAllocationMethod": "Dynamic", - "publicIPAddress": { - "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]" - }, - "subnet": { - "id": "[variables('subnetId')]" - } - } - } - ], - "enableIPForwarding": true - }, - "dependsOn": [ - "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]", - "[resourceId('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]" - ] - }, - { - "type": "Microsoft.Storage/storageAccounts", - "apiVersion": "2018-11-01", - "name": "[variables('storageAccountName')]", - "location": "[parameters('location')]", - "sku": { - "name": "Standard_LRS" - }, - "kind": "Storage", - "properties": {} - }, - { - "type": "Microsoft.Resources/deployments", - "name": "deploySQLDB", - "apiVersion": "2018-07-01", - "properties": { - "mode": "Incremental", - "templateLink": { - "uri": "[variables('dbTemplateLocation')]", - "contentVersion": "1.0.0.0" - }, - "parameters": { - "db_user": { - "value": "[parameters('db_user')]" - }, - "db_password": { - "value": "[variables('db_password')]" - }, - "db_server": { - "value": "[variables('db_server')]" - }, - "db_location": { - "value": "[variables('db_location')]" - }, - "databases": { - "value": "[parameters('databases')]" - }, - "manual_db_url": { - "value": "[parameters('manual_db_url')]" - } - } - } - }, - { - "type": "Microsoft.Compute/virtualMachines", - "apiVersion": "2018-10-01", - "name": "[variables('vmName')]", - "location": "[parameters('location')]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))]", - "[resourceId('Microsoft.Network/networkInterfaces/', variables('nicName'))]" - ], - "properties": { - "hardwareProfile": { - "vmSize": "[parameters('virtualMachineSize')]" - }, - "osProfile": { - "computerName": "[variables('vmName')]", - "adminUsername": "[parameters('adminUsername')]", - "adminPassword": "[parameters('adminPassword')]", - "customData": "[base64(concat('#INSTALL SCRIPT INPUTS\nXRAY_VERSION=', parameters('xrayVersion'),'\nJDBC_STR=',reference('Microsoft.Resources/deployments/deploySQLDB').outputs.jdbcConnString.value,'\nARTIFACTORY_URL=',variables('artifactoryURL'),'\nDB_SERVER=',variables('db_server'),'\nDB_NAME=',variables('db_name'),'\nDB_ADMIN_USER=',variables('db_user'),'\nDB_ADMIN_PASSWD=',variables('db_password'),'\nMASTER_KEY=',variables('masterKey'),'\nJOIN_KEY=',variables('joinKey'),'\n'))]" - }, - "storageProfile": { - "imageReference": "[variables('imageReference')]", - "osDisk": { - "createOption": "FromImage" - }, - "dataDisks": [ - { - "diskSizeGB": 1023, - "lun": 0, - "createOption": "Empty" - } - ] - }, - "networkProfile": { - "networkInterfaces": [ - { - "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]" - } - ] - }, - "diagnosticsProfile": { - "bootDiagnostics": { - "enabled": true, - "storageUri": "[reference(resourceId('Microsoft.Storage/storageAccounts/', variables('storageAccountName'))).primaryEndpoints.blob]" - } - } - }, - "resources": [ - { - "apiVersion": "2019-03-01", - "type": "extensions", - "name": "config-app", - "location": "[resourceGroup().location]", - "dependsOn": [ - "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]" - ], - "tags": { - "displayName": "config-app" - }, - "properties": { - "publisher": "Microsoft.Azure.Extensions", - "type": "CustomScript", - "typeHandlerVersion": "2.1", - "autoUpgradeMinorVersion": true, - "settings": { - }, - "protectedSettings": { - "commandToExecute": "echo 'hello!' >> /opt/installation_log.txt", - "fileUris": [ - "[uri(parameters('_artifactsLocation'), concat('vm_install/install_xray_to_vm.sh', parameters('_artifactsLocationSasToken')))]", - "[uri(parameters('_artifactsLocation'), concat('scripts/install_xray.sh', parameters('_artifactsLocationSasToken')))]" - ] - } - } - } - ] - } - ] -} \ No newline at end of file diff --git a/AzureResourceManager/Xray/azuredeploy_xray.parameters.json b/AzureResourceManager/Xray/azuredeploy_xray.parameters.json index 2af13e3..7979be9 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.3" + "value": "0.0.4" }, "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 711d6bb..a495022 100644 --- a/AzureResourceManager/Xray/azuredeploy_xray_vmss.json +++ b/AzureResourceManager/Xray/azuredeploy_xray_vmss.json @@ -19,9 +19,10 @@ }, "xrayVersion": { "type": "string", - "defaultValue": "0.0.3", + "defaultValue": "0.0.4", "allowedValues": [ - "0.0.3" + "0.0.3", + "0.0.4" ], "metadata": { "description": "Xray-vm image version to deploy." @@ -156,7 +157,7 @@ "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/arm-xray/AzureResourceManager/Xray/" + "defaultValue": "https://raw.githubusercontent.com/jfrog/JFrog-Cloud-Installers/master/AzureResourceManager/Xray/" }, "_artifactsLocationSasToken": { "type": "securestring", @@ -188,7 +189,7 @@ "joinKey": "[parameters('joinKey')]", "osType": { "publisher": "jfrog", - "offer": "x-ray-vm", + "offer": "x-ray-vm-preview", "sku": "x-ray-vm", "version": "[parameters('xrayVersion')]" }, @@ -324,7 +325,7 @@ "plan": { "name": "x-ray-vm", "publisher": "jfrog", - "product": "x-ray-vm" + "product": "x-ray-vm-preview" }, "sku": { "name": "[parameters('virtualMachineSize')]", diff --git a/AzureResourceManager/Xray/scripts/install_xray.sh b/AzureResourceManager/Xray/scripts/install_xray.sh index 5828c61..95db4a2 100644 --- a/AzureResourceManager/Xray/scripts/install_xray.sh +++ b/AzureResourceManager/Xray/scripts/install_xray.sh @@ -9,6 +9,11 @@ ARTIFACTORY_URL=$(cat /var/lib/cloud/instance/user-data.txt | grep "^ARTIFACTORY export DEBIAN_FRONTEND=noninteractive +sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CC86BB64 +sudo add-apt-repository ppa:rmescandon/yq -y +sudo apt update -y +sudo apt install yq -y + # Create master.key on each node sudo mkdir -p /opt/jfrog/xray/var/etc/security/ cat </opt/jfrog/xray/var/etc/security/master.key @@ -18,13 +23,13 @@ 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) -sed -i -e "s/ip:..*/ip: ${HOSTNAME}/" /var/opt/jfrog/xray/etc/system.yaml -sed -i -e "s#jfrogUrl:..*#jfrogUrl: \"${ARTIFACTORY_URL}\"#" /var/opt/jfrog/xray/etc/system.yaml -sed -i -e "s/joinKey:..*/joinKey: ${JOIN_KEY}/" /var/opt/jfrog/xray/etc/system.yaml -# DB configuration -sed -i -e "s/url: postgres:..*/url: \"postgres:\/\/${DB_SERVER}.postgres.database.azure.com:5432\/${DB_NAME}?sslmode=disable\"/" /var/opt/jfrog/xray/etc/system.yaml -sed -i -e "s/username:..*/username: \"${DB_USER}\"/" /var/opt/jfrog/xray/etc/system.yaml -sed -i -e "s/password:..*/password: \"${DB_PASSWORD}\"/" /var/opt/jfrog/xray/etc/system.yaml +yq w -i /var/opt/jfrog/xray/etc/system.yaml shared.database.url postgres://${DB_SERVER}.postgres.database.azure.com:5432/${DB_NAME}?sslmode=disable +yq w -i /var/opt/jfrog/xray/etc/system.yaml shared.database.username ${DB_USER} +yq w -i /var/opt/jfrog/xray/etc/system.yaml shared.database.password ${DB_PASSWORD} +yq w -i /var/opt/jfrog/xray/etc/system.yaml shared.rabbitMq.password JFXR_RABBITMQ_COOKIE +yq w -i /var/opt/jfrog/xray/etc/system.yaml shared.jfrogUrl ${ARTIFACTORY_URL} +yq w -i /var/opt/jfrog/xray/etc/system.yaml shared.security.joinKey ${JOIN_KEY} +yq w -i /var/opt/jfrog/xray/etc/system.yaml shared.node.ip ${HOSTNAME} chown xray:xray -R /opt/jfrog/xray/var/etc/security/* && chown xray:xray -R /opt/jfrog/xray/var/etc/security/ diff --git a/AzureResourceManager/Xray/vm_install/install_xray_to_vm.sh b/AzureResourceManager/Xray/vm_install/install_xray_to_vm.sh index 79a0d15..6827c90 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.6.2 +XRAY_VERSION=3.8.2 export DEBIAN_FRONTEND=noninteractive @@ -20,6 +20,7 @@ cd jfrog-xray-${XRAY_VERSION}-deb cat </opt/jfrog-xray-${XRAY_VERSION}-deb/input.txt /var/opt/jfrog/xray http:// +Y EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE replace_with_host_ip N