mirror of
https://github.com/ZwareBear/JFrog-Cloud-Installers.git
synced 2026-01-21 01:06:55 -06:00
Azure xray 3.8.5 (#42)
* ARM templates - Xray config script, added value to support Azure Postgres service * ARM templates - Xray 3.8.5 * ARM templates - Xray, fixed bug in MP submission, removed Postgres workaround from README.md
This commit is contained in:
@@ -123,7 +123,7 @@
|
||||
"name": "xrayVersion",
|
||||
"type": "Microsoft.Common.DropDown",
|
||||
"label": "Xray-vm image version to deploy.",
|
||||
"defaultValue": "3.8.2",
|
||||
"defaultValue": "3.8.5",
|
||||
"toolTip": "Version of Xray to deploy",
|
||||
"constraints": {
|
||||
"allowedValues": [
|
||||
@@ -134,6 +134,10 @@
|
||||
{
|
||||
"label": "3.8.2",
|
||||
"value": "0.0.4"
|
||||
},
|
||||
{
|
||||
"label": "3.8.5",
|
||||
"value": "0.0.5"
|
||||
}
|
||||
],
|
||||
"required": true
|
||||
|
||||
@@ -19,10 +19,11 @@
|
||||
},
|
||||
"xrayVersion": {
|
||||
"type": "string",
|
||||
"defaultValue": "0.0.4",
|
||||
"defaultValue": "0.0.5",
|
||||
"allowedValues": [
|
||||
"0.0.3",
|
||||
"0.0.4"
|
||||
"0.0.4",
|
||||
"0.0.5"
|
||||
],
|
||||
"metadata": {
|
||||
"description": "Xray-vm image version to deploy."
|
||||
@@ -182,6 +183,7 @@
|
||||
"publicIPAddressType": "Dynamic",
|
||||
"db_server": "[parameters('db_server')]",
|
||||
"db_user": "[concat(parameters('db_user'), '@', parameters('db_server'))]",
|
||||
"actual_db_user": "[parameters('db_user')]",
|
||||
"db_password": "[parameters('db_password')]",
|
||||
"db_location": "[parameters('location')]",
|
||||
"db_name": "[parameters('databases').properties[0].name]",
|
||||
@@ -351,7 +353,7 @@
|
||||
"computerNamePrefix": "[variables('namingInfix')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]",
|
||||
"customData": "[base64(concat('#INSTALL SCRIPT INPUTS\nXRAY_VERSION=', parameters('xrayVersion'),'\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'))]"
|
||||
"customData": "[base64(concat('#INSTALL SCRIPT INPUTS\nXRAY_VERSION=', parameters('xrayVersion'),'\nARTIFACTORY_URL=',variables('artifactoryURL'),'\nDB_SERVER=',variables('db_server'),'\nDB_NAME=',variables('db_name'),'\nDB_ADMIN_USER=',variables('db_user'),'\nACTUAL_DB_ADMIN_USER=',variables('actual_db_user'),'\nDB_ADMIN_PASSWD=',variables('db_password'),'\nMASTER_KEY=',variables('masterKey'),'\nJOIN_KEY=',variables('joinKey'),'\n'))]"
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaceConfigurations": [
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
DB_NAME=$(cat /var/lib/cloud/instance/user-data.txt | grep "^DB_NAME=" | sed "s/DB_NAME=//")
|
||||
DB_USER=$(cat /var/lib/cloud/instance/user-data.txt | grep "^DB_ADMIN_USER=" | sed "s/DB_ADMIN_USER=//")
|
||||
ACTUAL_DB_USER=$(cat /var/lib/cloud/instance/user-data.txt | grep "^ACTUAL_DB_ADMIN_USER=" | sed "s/ACTUAL_DB_ADMIN_USER=//")
|
||||
DB_PASSWORD=$(cat /var/lib/cloud/instance/user-data.txt | grep "^DB_ADMIN_PASSWD=" | sed "s/DB_ADMIN_PASSWD=//")
|
||||
DB_SERVER=$(cat /var/lib/cloud/instance/user-data.txt | grep "^DB_SERVER=" | sed "s/DB_SERVER=//")
|
||||
MASTER_KEY=$(cat /var/lib/cloud/instance/user-data.txt | grep "^MASTER_KEY=" | sed "s/MASTER_KEY=//")
|
||||
@@ -25,6 +26,7 @@ EOF
|
||||
HOSTNAME=$(hostname -i)
|
||||
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.actualUsername ${ACTUAL_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}
|
||||
|
||||
@@ -14,7 +14,7 @@ This template can help you setup [JFrog Xray](https://jfrog.com/xray/) on Azure
|
||||
2. Deployed Postgresql instance (if "existing DB" is selected as a parameter).
|
||||
|
||||
## Postgresql deployment
|
||||
Xray could fail to connect to "out of the box" Azure Postgresql. You can deploy a compatible Postgresql instance using this link:
|
||||
You can deploy a compatible Postgresql instance using this link:
|
||||
|
||||
<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fjfrog%2FJFrog-Cloud-Installers%2Farm-xray%2FAzureResourceManager%2FPostgresql%2FazurePostgresDBDeploy.json" target="_blank">
|
||||
<img src="https://aka.ms/deploytoazurebutton"/>
|
||||
@@ -33,16 +33,6 @@ In the Databases field, use the object:
|
||||
]
|
||||
}
|
||||
```
|
||||
Before deploying Xray, please do following steps:
|
||||
1. Use the admin role given by Azure that you initially connected with to PSDB (for example xray) - Remember the password of this role to connect when setting up with Xray.
|
||||
|
||||
2. Create a new role named xray@{hostname}, where {hostname} is a DB server name.
|
||||
|
||||
3. Add xray@{hostname} membership to the base Azure user. In the client tab (PgAdmin for example) right click on properties of role "azure_pg_admin" and under Membership tab, add the relevant "xray@{hostname}", click on the checkbox on the tag, save.
|
||||
|
||||
4. Change ownership of Xray database. Right click On the name of the database and change owner to "xray@{hostname}"
|
||||
|
||||
After these steps are done, run Xray deployment.
|
||||
|
||||
## Installation
|
||||
1. Click "Deploy to Azure" button. If you don't have an Azure subscription, it will guide you on how to signup for a free trial.
|
||||
|
||||
@@ -19,10 +19,11 @@
|
||||
},
|
||||
"xrayVersion": {
|
||||
"type": "string",
|
||||
"defaultValue": "0.0.4",
|
||||
"defaultValue": "0.0.5",
|
||||
"allowedValues": [
|
||||
"0.0.3",
|
||||
"0.0.4"
|
||||
"0.0.4",
|
||||
"0.0.5"
|
||||
],
|
||||
"metadata": {
|
||||
"description": "Xray-vm image version to deploy."
|
||||
@@ -182,6 +183,7 @@
|
||||
"publicIPAddressType": "Dynamic",
|
||||
"db_server": "[parameters('db_server')]",
|
||||
"db_user": "[concat(parameters('db_user'), '@', parameters('db_server'))]",
|
||||
"actual_db_user": "[parameters('db_user')]",
|
||||
"db_password": "[parameters('db_password')]",
|
||||
"db_location": "[parameters('location')]",
|
||||
"db_name": "[parameters('databases').properties[0].name]",
|
||||
@@ -189,7 +191,7 @@
|
||||
"joinKey": "[parameters('joinKey')]",
|
||||
"osType": {
|
||||
"publisher": "jfrog",
|
||||
"offer": "x-ray-vm-preview",
|
||||
"offer": "x-ray-vm",
|
||||
"sku": "x-ray-vm",
|
||||
"version": "[parameters('xrayVersion')]"
|
||||
},
|
||||
@@ -325,7 +327,7 @@
|
||||
"plan": {
|
||||
"name": "x-ray-vm",
|
||||
"publisher": "jfrog",
|
||||
"product": "x-ray-vm-preview"
|
||||
"product": "x-ray-vm"
|
||||
},
|
||||
"sku": {
|
||||
"name": "[parameters('virtualMachineSize')]",
|
||||
@@ -351,7 +353,7 @@
|
||||
"computerNamePrefix": "[variables('namingInfix')]",
|
||||
"adminUsername": "[parameters('adminUsername')]",
|
||||
"adminPassword": "[parameters('adminPassword')]",
|
||||
"customData": "[base64(concat('#INSTALL SCRIPT INPUTS\nXRAY_VERSION=', parameters('xrayVersion'),'\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'))]"
|
||||
"customData": "[base64(concat('#INSTALL SCRIPT INPUTS\nXRAY_VERSION=', parameters('xrayVersion'),'\nARTIFACTORY_URL=',variables('artifactoryURL'),'\nDB_SERVER=',variables('db_server'),'\nDB_NAME=',variables('db_name'),'\nDB_ADMIN_USER=',variables('db_user'),'\nACTUAL_DB_ADMIN_USER=',variables('actual_db_user'),'\nDB_ADMIN_PASSWD=',variables('db_password'),'\nMASTER_KEY=',variables('masterKey'),'\nJOIN_KEY=',variables('joinKey'),'\n'))]"
|
||||
},
|
||||
"networkProfile": {
|
||||
"networkInterfaceConfigurations": [
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
DB_NAME=$(cat /var/lib/cloud/instance/user-data.txt | grep "^DB_NAME=" | sed "s/DB_NAME=//")
|
||||
DB_USER=$(cat /var/lib/cloud/instance/user-data.txt | grep "^DB_ADMIN_USER=" | sed "s/DB_ADMIN_USER=//")
|
||||
ACTUAL_DB_USER=$(cat /var/lib/cloud/instance/user-data.txt | grep "^ACTUAL_DB_ADMIN_USER=" | sed "s/ACTUAL_DB_ADMIN_USER=//")
|
||||
DB_PASSWORD=$(cat /var/lib/cloud/instance/user-data.txt | grep "^DB_ADMIN_PASSWD=" | sed "s/DB_ADMIN_PASSWD=//")
|
||||
DB_SERVER=$(cat /var/lib/cloud/instance/user-data.txt | grep "^DB_SERVER=" | sed "s/DB_SERVER=//")
|
||||
MASTER_KEY=$(cat /var/lib/cloud/instance/user-data.txt | grep "^MASTER_KEY=" | sed "s/MASTER_KEY=//")
|
||||
@@ -25,6 +26,7 @@ EOF
|
||||
HOSTNAME=$(hostname -i)
|
||||
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.actualUsername ${ACTUAL_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}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Upgrade version for every release
|
||||
XRAY_VERSION=3.8.2
|
||||
XRAY_VERSION=3.8.5
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
|
||||
Reference in New Issue
Block a user