* ARM templates - 7.7.3 support added. Pro and JCR

* ARM templates - Xray 3.8.2 support

* ARM templates - Nginx configuration changed for JCR

* ARM templates - Xray ARM extension script, yq added, Rabbitmq default password added

* ARM templates - Xray, Extension script changes

* ARM templates - RT readme updated, branch for extensions scripts switched back to master

* ARM templates - JCR, updated API, best practives

* ARM templates - Nginx configuration changed for JCR

* ARM templates - MP submissions, Xray installation script changes, master key minimun char number added in JCR

* ARM templates - Parameters draft
This commit is contained in:
Daniel Miakotkin
2020-09-08 13:35:04 -07:00
committed by GitHub
parent 31a0a8b830
commit d56935b274
25 changed files with 185 additions and 492 deletions

View File

@@ -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": {

View File

@@ -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."

View File

@@ -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 <<EOF >/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/