mirror of
https://github.com/ZwareBear/JFrog-Cloud-Installers.git
synced 2026-01-21 06:06:56 -06:00
ARM templates. Removed support of older VM images to be compatible with GovCloud.
Only 7.12.5 and 7.12.6 versions are supported now. Removed version selector script and installation script for Artifactory 6.x Added new screenshots to the README.md, minor fixes.
This commit is contained in:
@@ -132,53 +132,17 @@
|
|||||||
"name": "artifactoryVersion",
|
"name": "artifactoryVersion",
|
||||||
"type": "Microsoft.Common.DropDown",
|
"type": "Microsoft.Common.DropDown",
|
||||||
"label": "Artifactory-vm image version to deploy.",
|
"label": "Artifactory-vm image version to deploy.",
|
||||||
"defaultValue": "7.11.2",
|
"defaultValue": "7.12.5",
|
||||||
"toolTip": "Version of Artifactory to deploy",
|
"toolTip": "Version of Artifactory to deploy",
|
||||||
"constraints": {
|
"constraints": {
|
||||||
"allowedValues": [
|
"allowedValues": [
|
||||||
{
|
{
|
||||||
"label": "6.16.0",
|
"label": "7.12.5",
|
||||||
"value": "0.16.0"
|
"value": "0.0.8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "6.17.0",
|
"label": "7.12.6",
|
||||||
"value": "0.17.0"
|
"value": "0.0.9"
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "6.18.0",
|
|
||||||
"value": "6.18.0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "7.2.1",
|
|
||||||
"value": "7.2.1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "7.3.2",
|
|
||||||
"value": "0.3.2"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "7.4.3",
|
|
||||||
"value": "7.4.30"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "7.6.2",
|
|
||||||
"value": "0.0.1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "7.7.3",
|
|
||||||
"value": "0.0.2"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "7.10.2",
|
|
||||||
"value": "0.0.31"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "7.10.5",
|
|
||||||
"value": "0.0.4"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "7.10.6",
|
|
||||||
"value": "0.0.52"
|
|
||||||
},
|
},
|
||||||
{ "label": "7.11.2", "value": "0.0.6" }
|
{ "label": "7.11.2", "value": "0.0.6" }
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -79,27 +79,10 @@
|
|||||||
},
|
},
|
||||||
"artifactoryVersion": {
|
"artifactoryVersion": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"defaultValue": "0.0.6",
|
"defaultValue": "0.0.8",
|
||||||
"allowedValues": [
|
"allowedValues": [
|
||||||
"6.6.0",
|
"0.0.8",
|
||||||
"6.6.1",
|
"0.0.9"
|
||||||
"6.7.0",
|
|
||||||
"6.8.0",
|
|
||||||
"6.11.3",
|
|
||||||
"6.15.0",
|
|
||||||
"0.16.0",
|
|
||||||
"0.17.0",
|
|
||||||
"6.18.0",
|
|
||||||
"7.2.1",
|
|
||||||
"0.3.2",
|
|
||||||
"7.4.3",
|
|
||||||
"7.4.30",
|
|
||||||
"0.0.1",
|
|
||||||
"0.0.2",
|
|
||||||
"0.0.31",
|
|
||||||
"0.0.4",
|
|
||||||
"0.0.52",
|
|
||||||
"0.0.6"
|
|
||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"description": "Artifactory-vm image version to deploy."
|
"description": "Artifactory-vm image version to deploy."
|
||||||
@@ -860,9 +843,7 @@
|
|||||||
"autoUpgradeMinorVersion": false,
|
"autoUpgradeMinorVersion": false,
|
||||||
"settings": {
|
"settings": {
|
||||||
"fileUris": [
|
"fileUris": [
|
||||||
"[uri(parameters('_artifactsLocation'), concat('scripts/install_artifactory.sh', parameters('_artifactsLocationSasToken')))]",
|
"[uri(parameters('_artifactsLocation'), concat('scripts/install_artifactory7.sh', parameters('_artifactsLocationSasToken')))]"
|
||||||
"[uri(parameters('_artifactsLocation'), concat('scripts/install_artifactory7.sh', parameters('_artifactsLocationSasToken')))]",
|
|
||||||
"[uri(parameters('_artifactsLocation'), concat('scripts/version_selector.sh', parameters('_artifactsLocationSasToken')))]"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"protectedSettings": {
|
"protectedSettings": {
|
||||||
@@ -959,9 +940,7 @@
|
|||||||
"autoUpgradeMinorVersion": false,
|
"autoUpgradeMinorVersion": false,
|
||||||
"settings": {
|
"settings": {
|
||||||
"fileUris": [
|
"fileUris": [
|
||||||
"[uri(parameters('_artifactsLocation'), concat('scripts/install_artifactory.sh', parameters('_artifactsLocationSasToken')))]",
|
"[uri(parameters('_artifactsLocation'), concat('scripts/install_artifactory7.sh', parameters('_artifactsLocationSasToken')))]"
|
||||||
"[uri(parameters('_artifactsLocation'), concat('scripts/install_artifactory7.sh', parameters('_artifactsLocationSasToken')))]",
|
|
||||||
"[uri(parameters('_artifactsLocation'), concat('scripts/version_selector.sh', parameters('_artifactsLocationSasToken')))]"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"protectedSettings": {
|
"protectedSettings": {
|
||||||
|
|||||||
@@ -1,214 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
DB_URL=$(cat /var/lib/cloud/instance/user-data.txt | grep "^JDBC_STR" | sed "s/JDBC_STR=//")
|
|
||||||
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=//")
|
|
||||||
DB_PASSWORD=$(cat /var/lib/cloud/instance/user-data.txt | grep "^DB_ADMIN_PASSWD=" | sed "s/DB_ADMIN_PASSWD=//")
|
|
||||||
STORAGE_ACCT=$(cat /var/lib/cloud/instance/user-data.txt | grep "^STO_ACT_NAME=" | sed "s/STO_ACT_NAME=//")
|
|
||||||
STORAGE_CONTAINER=$(cat /var/lib/cloud/instance/user-data.txt | grep "^STO_CTR_NAME=" | sed "s/STO_CTR_NAME=//")
|
|
||||||
STORAGE_ACCT_KEY=$(cat /var/lib/cloud/instance/user-data.txt | grep "^STO_ACT_KEY=" | sed "s/STO_ACT_KEY=//")
|
|
||||||
ARTIFACTORY_VERSION=$(cat /var/lib/cloud/instance/user-data.txt | grep "^ARTIFACTORY_VERSION=" | sed "s/ARTIFACTORY_VERSION=//")
|
|
||||||
MASTER_KEY=$(cat /var/lib/cloud/instance/user-data.txt | grep "^MASTER_KEY=" | sed "s/MASTER_KEY=//")
|
|
||||||
IS_PRIMARY=$(cat /var/lib/cloud/instance/user-data.txt | grep "^IS_PRIMARY=" | sed "s/IS_PRIMARY=//")
|
|
||||||
ARTIFACTORY_LICENSE_1=$(cat /var/lib/cloud/instance/user-data.txt | grep "^LICENSE1=" | sed "s/LICENSE1=//")
|
|
||||||
ARTIFACTORY_LICENSE_2=$(cat /var/lib/cloud/instance/user-data.txt | grep "^LICENSE2=" | sed "s/LICENSE2=//")
|
|
||||||
ARTIFACTORY_LICENSE_3=$(cat /var/lib/cloud/instance/user-data.txt | grep "^LICENSE3=" | sed "s/LICENSE3=//")
|
|
||||||
ARTIFACTORY_LICENSE_4=$(cat /var/lib/cloud/instance/user-data.txt | grep "^LICENSE4=" | sed "s/LICENSE4=//")
|
|
||||||
ARTIFACTORY_LICENSE_5=$(cat /var/lib/cloud/instance/user-data.txt | grep "^LICENSE5=" | sed "s/LICENSE5=//")
|
|
||||||
|
|
||||||
UBUNTU_CODENAME=$(cat /etc/lsb-release | grep "^DISTRIB_CODENAME=" | sed "s/DISTRIB_CODENAME=//")
|
|
||||||
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
|
||||||
|
|
||||||
#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"
|
|
||||||
|
|
||||||
CERTIFICATE_DOMAIN=$(cat /var/lib/cloud/instance/user-data.txt | grep "^CERTIFICATE_DOMAIN=" | sed "s/CERTIFICATE_DOMAIN=//")
|
|
||||||
[ -z "$CERTIFICATE_DOMAIN" ] && CERTIFICATE_DOMAIN=artifactory
|
|
||||||
|
|
||||||
ARTIFACTORY_SERVER_NAME=$(cat /var/lib/cloud/instance/user-data.txt | grep "^ARTIFACTORY_SERVER_NAME=" | sed "s/ARTIFACTORY_SERVER_NAME=//")
|
|
||||||
[ -z "$ARTIFACTORY_SERVER_NAME" ] && ARTIFACTORY_SERVER_NAME=artifactory
|
|
||||||
|
|
||||||
#Configuring nginx
|
|
||||||
rm /etc/nginx/sites-enabled/default
|
|
||||||
|
|
||||||
cat <<EOF >/etc/nginx/nginx.conf
|
|
||||||
#user nobody;
|
|
||||||
worker_processes 1;
|
|
||||||
error_log /var/log/nginx/error.log info;
|
|
||||||
#pid logs/nginx.pid;
|
|
||||||
events {
|
|
||||||
worker_connections 1024;
|
|
||||||
}
|
|
||||||
|
|
||||||
http {
|
|
||||||
include mime.types;
|
|
||||||
variables_hash_max_size 1024;
|
|
||||||
variables_hash_bucket_size 64;
|
|
||||||
server_names_hash_max_size 4096;
|
|
||||||
server_names_hash_bucket_size 128;
|
|
||||||
types_hash_max_size 2048;
|
|
||||||
types_hash_bucket_size 64;
|
|
||||||
proxy_read_timeout 2400s;
|
|
||||||
client_header_timeout 2400s;
|
|
||||||
client_body_timeout 2400s;
|
|
||||||
proxy_connect_timeout 75s;
|
|
||||||
proxy_send_timeout 2400s;
|
|
||||||
proxy_buffer_size 32k;
|
|
||||||
proxy_buffers 40 32k;
|
|
||||||
proxy_busy_buffers_size 64k;
|
|
||||||
proxy_temp_file_write_size 250m;
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
client_body_buffer_size 128k;
|
|
||||||
|
|
||||||
include /etc/nginx/conf.d/*.conf;
|
|
||||||
default_type application/octet-stream;
|
|
||||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
|
||||||
'$status $body_bytes_sent "$http_referer" '
|
|
||||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
|
||||||
access_log /var/log/nginx/access.log main;
|
|
||||||
sendfile on;
|
|
||||||
#tcp_nopush on;
|
|
||||||
#keepalive_timeout 0;
|
|
||||||
keepalive_timeout 65;
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat <<EOF >/etc/nginx/conf.d/artifactory.conf
|
|
||||||
ssl_certificate /etc/pki/tls/certs/cert.pem;
|
|
||||||
ssl_certificate_key /etc/pki/tls/private/cert.key;
|
|
||||||
ssl_session_cache shared:SSL:1m;
|
|
||||||
ssl_prefer_server_ciphers on;
|
|
||||||
## server configuration
|
|
||||||
server {
|
|
||||||
listen 443 ssl;
|
|
||||||
listen 80 ;
|
|
||||||
server_name ~(?<repo>.+)\\.${CERTIFICATE_DOMAIN} artifactory ${ARTIFACTORY_SERVER_NAME}.${CERTIFICATE_DOMAIN};
|
|
||||||
if (\$http_x_forwarded_proto = '') {
|
|
||||||
set \$http_x_forwarded_proto \$scheme;
|
|
||||||
}
|
|
||||||
## Application specific logs
|
|
||||||
## access_log /var/log/nginx/artifactory-access.log timing;
|
|
||||||
## error_log /var/log/nginx/artifactory-error.log;
|
|
||||||
rewrite ^/$ /artifactory/webapp/ redirect;
|
|
||||||
rewrite ^/artifactory/?(/webapp)?$ /artifactory/webapp/ redirect;
|
|
||||||
rewrite ^/(v1|v2)/(.*) /artifactory/api/docker/\$repo/\$1/\$2;
|
|
||||||
chunked_transfer_encoding on;
|
|
||||||
client_max_body_size 0;
|
|
||||||
location /artifactory/ {
|
|
||||||
proxy_read_timeout 2400;
|
|
||||||
proxy_pass_header Server;
|
|
||||||
proxy_cookie_path ~*^/.* /;
|
|
||||||
proxy_pass http://127.0.0.1:8081/artifactory/;
|
|
||||||
proxy_set_header X-Artifactory-Override-Base-Url
|
|
||||||
\$http_x_forwarded_proto://\$host:\$server_port/artifactory;
|
|
||||||
proxy_set_header X-Forwarded-Port \$server_port;
|
|
||||||
proxy_set_header X-Forwarded-Proto \$http_x_forwarded_proto;
|
|
||||||
proxy_set_header Host \$http_host;
|
|
||||||
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat <<EOF >/var/opt/jfrog/artifactory/etc/artifactory.cluster.license
|
|
||||||
${ARTIFACTORY_LICENSE_1}
|
|
||||||
|
|
||||||
${ARTIFACTORY_LICENSE_2}
|
|
||||||
|
|
||||||
${ARTIFACTORY_LICENSE_3}
|
|
||||||
|
|
||||||
${ARTIFACTORY_LICENSE_4}
|
|
||||||
|
|
||||||
${ARTIFACTORY_LICENSE_5}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat <<EOF >/var/opt/jfrog/artifactory/etc/ha-node.properties
|
|
||||||
node.id=art1
|
|
||||||
artifactory.ha.data.dir=/var/opt/jfrog/artifactory/data
|
|
||||||
context.url=http://127.0.0.1:8081/artifactory
|
|
||||||
membership.port=10001
|
|
||||||
hazelcast.interface=172.25.0.3
|
|
||||||
primary=${IS_PRIMARY}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat <<EOF >/var/opt/jfrog/artifactory/etc/db.properties
|
|
||||||
type=mssql
|
|
||||||
driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
|
|
||||||
url=${DB_URL};databaseName=${DB_NAME};sendStringParametersAsUnicode=false;applicationName=Artifactory Binary Repository
|
|
||||||
username=${DB_USER}
|
|
||||||
password=${DB_PASSWORD}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
mkdir -p /var/opt/jfrog/artifactory/etc/security
|
|
||||||
|
|
||||||
cat <<EOF >/var/opt/jfrog/artifactory/etc/security/master.key
|
|
||||||
${MASTER_KEY}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat <<EOF >/var/opt/jfrog/artifactory/etc/binarystore.xml
|
|
||||||
<config version="2">
|
|
||||||
<chain>
|
|
||||||
<provider id="cache-fs-eventual-azure-blob-storage" type="cache-fs">
|
|
||||||
<provider id="sharding-cluster-eventual-azure-blob-storage" type="sharding-cluster">
|
|
||||||
<sub-provider id="eventual-cluster-azure-blob-storage" type="eventual-cluster">
|
|
||||||
<provider id="retry-azure-blob-storage" type="retry">
|
|
||||||
<provider id="azure-blob-storage" type="azure-blob-storage"/>
|
|
||||||
</provider>
|
|
||||||
</sub-provider>
|
|
||||||
<dynamic-provider id="remote-azure-blob-storage" type="remote"/>
|
|
||||||
</provider>
|
|
||||||
</provider>
|
|
||||||
</chain>
|
|
||||||
|
|
||||||
<!-- cluster eventual Azure Blob Storage Service default chain -->
|
|
||||||
<provider id="sharding-cluster-eventual-azure-blob-storage" type="sharding-cluster">
|
|
||||||
<readBehavior>crossNetworkStrategy</readBehavior>
|
|
||||||
<writeBehavior>crossNetworkStrategy</writeBehavior>
|
|
||||||
<redundancy>2</redundancy>
|
|
||||||
<lenientLimit>1</lenientLimit>
|
|
||||||
<property name="zones" value="local,remote"/>
|
|
||||||
</provider>
|
|
||||||
|
|
||||||
<provider id="remote-azure-blob-storage" type="remote">
|
|
||||||
<zone>remote</zone>
|
|
||||||
</provider>
|
|
||||||
|
|
||||||
<provider id="eventual-cluster-azure-blob-storage" type="eventual-cluster">
|
|
||||||
<zone>local</zone>
|
|
||||||
</provider>
|
|
||||||
|
|
||||||
<!--cluster eventual template-->
|
|
||||||
<provider id="azure-blob-storage" type="azure-blob-storage">
|
|
||||||
<accountName>${STORAGE_ACCT}</accountName>
|
|
||||||
<accountKey>${STORAGE_ACCT_KEY}</accountKey>
|
|
||||||
<endpoint>https://${STORAGE_ACCT}.blob.core.windows.net/</endpoint>
|
|
||||||
<containerName>${STORAGE_CONTAINER}</containerName>
|
|
||||||
</provider>
|
|
||||||
</config>
|
|
||||||
EOF
|
|
||||||
|
|
||||||
|
|
||||||
HOSTNAME=$(hostname -i)
|
|
||||||
sed -i -e "s/art1/art-$(date +%s$RANDOM)/" /var/opt/jfrog/artifactory/etc/ha-node.properties
|
|
||||||
sed -i -e "s/127.0.0.1/$HOSTNAME/" /var/opt/jfrog/artifactory/etc/ha-node.properties
|
|
||||||
sed -i -e "s/172.25.0.3/$HOSTNAME/" /var/opt/jfrog/artifactory/etc/ha-node.properties
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
cat /var/lib/cloud/instance/user-data.txt | grep "^CERTIFICATE_KEY=" | sed "s/CERTIFICATE_KEY=//" > /tmp/temp.key
|
|
||||||
cat /tmp/temp.key | sed 's/KEY----- /&\n/' | sed 's/ -----END/\n-----END/' | awk '{if($0 ~ /----/) {print;} else { gsub(/ /,"\n");print;}}' > /etc/pki/tls/private/cert.key
|
|
||||||
rm /tmp/temp.key
|
|
||||||
|
|
||||||
EXTRA_JAVA_OPTS=$(cat /var/lib/cloud/instance/user-data.txt | grep "^EXTRA_JAVA_OPTS=" | sed "s/EXTRA_JAVA_OPTS=//")
|
|
||||||
[ -z "$EXTRA_JAVA_OPTS" ] && EXTRA_JAVA_OPTS='-server -Xms2g -Xmx6g -Xss256k -XX:+UseG1GC -XX:OnOutOfMemoryError="kill -9 %p"'
|
|
||||||
echo "export JAVA_OPTIONS=\"${EXTRA_JAVA_OPTS}\"" >> /var/opt/jfrog/artifactory/etc/default
|
|
||||||
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
|
|
||||||
sleep $((RANDOM % 120))
|
|
||||||
service artifactory start
|
|
||||||
service nginx start
|
|
||||||
nginx -s reload
|
|
||||||
echo "INFO: Artifactory installation completed."
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
ARTIFACTORY_VERSION=$(cat /var/lib/cloud/instance/user-data.txt | grep "^ARTIFACTORY_VERSION=" | sed "s/ARTIFACTORY_VERSION=//")
|
|
||||||
IFS=$'\t'
|
|
||||||
SUPPORTED_VERSIONS=("6.8.0\t6.11.3\t6.15.0\t0.16.0\t0.17.0\t6.18.0")
|
|
||||||
unset IFS
|
|
||||||
|
|
||||||
if [[ "\t${SUPPORTED_VERSIONS[@]}\t" =~ "\t${ARTIFACTORY_VERSION}\t" ]]; then
|
|
||||||
./install_artifactory.sh
|
|
||||||
echo "\ninstall_artifactory.sh was selected" >> user-data.txt
|
|
||||||
else
|
|
||||||
./install_artifactory7.sh
|
|
||||||
echo "\ninstall_artifactory7.sh was selected" >> user-data.txt
|
|
||||||
fi
|
|
||||||
@@ -18,7 +18,10 @@ This template can help you setup the [Artifactory Enterprise](https://jfrog.com/
|
|||||||
2. Enter a valid values to parameters. At least 1 license has to be provided.
|
2. Enter a valid values to parameters. At least 1 license has to be provided.
|
||||||
|
|
||||||
|
|
||||||

|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
3. Click on Review + Create, then on Create to start deploying resources. It will deploy MsSQL or Postgresql database (or it can use existing), Azure Blob storage container, VM installing Nginx and Artifactory and Load balancer.
|
3. Click on Review + Create, then on Create to start deploying resources. It will deploy MsSQL or Postgresql database (or it can use existing), Azure Blob storage container, VM installing Nginx and Artifactory and Load balancer.
|
||||||
|
|
||||||
@@ -33,7 +36,7 @@ This template can help you setup the [Artifactory Enterprise](https://jfrog.com/
|
|||||||
2. Turn off daily backups. Read Documentation provided [here](https://www.jfrog.com/confluence/display/RTF/Managing+Backups)
|
2. Turn off daily backups. Read Documentation provided [here](https://www.jfrog.com/confluence/display/RTF/Managing+Backups)
|
||||||
3. Use SSL Certificate with valid wild card to you artifactory as docker registry with subdomain method.
|
3. Use SSL Certificate with valid wild card to you artifactory as docker registry with subdomain method.
|
||||||
4. Input values for 'adminUsername' and 'adminPassword' parameters needs to follow azure VM access rules.
|
4. Input values for 'adminUsername' and 'adminPassword' parameters needs to follow azure VM access rules.
|
||||||
5. One primary node is configured automatically. And, Minimum 1 member node is expected for the Artifactory HA installation.
|
5. One primary node is configured automatically. And, minimum 1 member node is expected for the Artifactory HA installation.
|
||||||
6. This template provides support for max 5 licenses. To add more licenses, Edit the template (input fields, CustomScript sections) and install_artifactory.sh script.
|
6. This template provides support for max 5 licenses. To add more licenses, Edit the template (input fields, CustomScript sections) and install_artifactory.sh script.
|
||||||
7. Refer to [System Requirements](https://www.jfrog.com/confluence/display/RTF/System+Requirements) for changing 'extraJavaOptions' input parameter value.
|
7. Refer to [System Requirements](https://www.jfrog.com/confluence/display/RTF/System+Requirements) for changing 'extraJavaOptions' input parameter value.
|
||||||
|
|
||||||
@@ -72,7 +75,7 @@ Note: Use load balancer's NAT entries under Azure resources, to get the allocate
|
|||||||
|
|
||||||
------
|
------
|
||||||
#### Note:
|
#### Note:
|
||||||
Supported locations: `East US 2`, `Central US`, `West Central US` and `West Europe`.
|
Supported locations: `East US 2`, `Central US`, `West Central US`, `West US`, `West US 2` and `West Europe`.
|
||||||
Please check the Azure region support for `Standard Sku` property in load balancer for this template to work properly.
|
Please check the Azure region support for `Standard Sku` property in load balancer for this template to work properly.
|
||||||
Check for SQL server support on specified location. If SQL server is not available in the location, Use 'DB_Location' to specify the location with SQL server support.
|
Check for SQL server support on specified location. If SQL server is not available in the location, Use 'DB_Location' to specify the location with SQL server support.
|
||||||
|
|
||||||
|
|||||||
@@ -79,25 +79,10 @@
|
|||||||
},
|
},
|
||||||
"artifactoryVersion": {
|
"artifactoryVersion": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"defaultValue": "0.0.7",
|
"defaultValue": "0.0.9",
|
||||||
"allowedValues": [
|
"allowedValues": [
|
||||||
"6.11.3",
|
"0.0.8",
|
||||||
"6.15.0",
|
"0.0.9"
|
||||||
"0.16.0",
|
|
||||||
"0.17.0",
|
|
||||||
"6.18.0",
|
|
||||||
"7.2.1",
|
|
||||||
"7.4.3",
|
|
||||||
"7.4.30",
|
|
||||||
"7.4.31",
|
|
||||||
"7.5.7",
|
|
||||||
"0.0.1",
|
|
||||||
"0.0.2",
|
|
||||||
"0.0.31",
|
|
||||||
"0.0.4",
|
|
||||||
"0.0.52",
|
|
||||||
"0.0.6",
|
|
||||||
"0.0.7"
|
|
||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"description": "Artifactory-vm image version to deploy."
|
"description": "Artifactory-vm image version to deploy."
|
||||||
@@ -858,9 +843,7 @@
|
|||||||
"autoUpgradeMinorVersion": false,
|
"autoUpgradeMinorVersion": false,
|
||||||
"settings": {
|
"settings": {
|
||||||
"fileUris": [
|
"fileUris": [
|
||||||
"[uri(parameters('_artifactsLocation'), concat('scripts/install_artifactory.sh', parameters('_artifactsLocationSasToken')))]",
|
"[uri(parameters('_artifactsLocation'), concat('scripts/install_artifactory7.sh', parameters('_artifactsLocationSasToken')))]"
|
||||||
"[uri(parameters('_artifactsLocation'), concat('scripts/install_artifactory7.sh', parameters('_artifactsLocationSasToken')))]",
|
|
||||||
"[uri(parameters('_artifactsLocation'), concat('scripts/version_selector.sh', parameters('_artifactsLocationSasToken')))]"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"protectedSettings": {
|
"protectedSettings": {
|
||||||
@@ -957,9 +940,7 @@
|
|||||||
"autoUpgradeMinorVersion": false,
|
"autoUpgradeMinorVersion": false,
|
||||||
"settings": {
|
"settings": {
|
||||||
"fileUris": [
|
"fileUris": [
|
||||||
"[uri(parameters('_artifactsLocation'), concat('scripts/install_artifactory.sh', parameters('_artifactsLocationSasToken')))]",
|
"[uri(parameters('_artifactsLocation'), concat('scripts/install_artifactory7.sh', parameters('_artifactsLocationSasToken')))]"
|
||||||
"[uri(parameters('_artifactsLocation'), concat('scripts/install_artifactory7.sh', parameters('_artifactsLocationSasToken')))]",
|
|
||||||
"[uri(parameters('_artifactsLocation'), concat('scripts/version_selector.sh', parameters('_artifactsLocationSasToken')))]"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"protectedSettings": {
|
"protectedSettings": {
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 101 KiB |
BIN
AzureResourceManager/Artifactory/images/Parameters0.png
Normal file
BIN
AzureResourceManager/Artifactory/images/Parameters0.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 163 KiB |
BIN
AzureResourceManager/Artifactory/images/Parameters1.png
Normal file
BIN
AzureResourceManager/Artifactory/images/Parameters1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 119 KiB |
BIN
AzureResourceManager/Artifactory/images/Parameters2.png
Normal file
BIN
AzureResourceManager/Artifactory/images/Parameters2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 174 KiB |
BIN
AzureResourceManager/Artifactory/images/Parameters3.png
Normal file
BIN
AzureResourceManager/Artifactory/images/Parameters3.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 108 KiB |
@@ -1,214 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
DB_URL=$(cat /var/lib/cloud/instance/user-data.txt | grep "^JDBC_STR" | sed "s/JDBC_STR=//")
|
|
||||||
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=//")
|
|
||||||
DB_PASSWORD=$(cat /var/lib/cloud/instance/user-data.txt | grep "^DB_ADMIN_PASSWD=" | sed "s/DB_ADMIN_PASSWD=//")
|
|
||||||
STORAGE_ACCT=$(cat /var/lib/cloud/instance/user-data.txt | grep "^STO_ACT_NAME=" | sed "s/STO_ACT_NAME=//")
|
|
||||||
STORAGE_CONTAINER=$(cat /var/lib/cloud/instance/user-data.txt | grep "^STO_CTR_NAME=" | sed "s/STO_CTR_NAME=//")
|
|
||||||
STORAGE_ACCT_KEY=$(cat /var/lib/cloud/instance/user-data.txt | grep "^STO_ACT_KEY=" | sed "s/STO_ACT_KEY=//")
|
|
||||||
ARTIFACTORY_VERSION=$(cat /var/lib/cloud/instance/user-data.txt | grep "^ARTIFACTORY_VERSION=" | sed "s/ARTIFACTORY_VERSION=//")
|
|
||||||
MASTER_KEY=$(cat /var/lib/cloud/instance/user-data.txt | grep "^MASTER_KEY=" | sed "s/MASTER_KEY=//")
|
|
||||||
IS_PRIMARY=$(cat /var/lib/cloud/instance/user-data.txt | grep "^IS_PRIMARY=" | sed "s/IS_PRIMARY=//")
|
|
||||||
ARTIFACTORY_LICENSE_1=$(cat /var/lib/cloud/instance/user-data.txt | grep "^LICENSE1=" | sed "s/LICENSE1=//")
|
|
||||||
ARTIFACTORY_LICENSE_2=$(cat /var/lib/cloud/instance/user-data.txt | grep "^LICENSE2=" | sed "s/LICENSE2=//")
|
|
||||||
ARTIFACTORY_LICENSE_3=$(cat /var/lib/cloud/instance/user-data.txt | grep "^LICENSE3=" | sed "s/LICENSE3=//")
|
|
||||||
ARTIFACTORY_LICENSE_4=$(cat /var/lib/cloud/instance/user-data.txt | grep "^LICENSE4=" | sed "s/LICENSE4=//")
|
|
||||||
ARTIFACTORY_LICENSE_5=$(cat /var/lib/cloud/instance/user-data.txt | grep "^LICENSE5=" | sed "s/LICENSE5=//")
|
|
||||||
|
|
||||||
UBUNTU_CODENAME=$(cat /etc/lsb-release | grep "^DISTRIB_CODENAME=" | sed "s/DISTRIB_CODENAME=//")
|
|
||||||
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
|
||||||
|
|
||||||
#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"
|
|
||||||
|
|
||||||
CERTIFICATE_DOMAIN=$(cat /var/lib/cloud/instance/user-data.txt | grep "^CERTIFICATE_DOMAIN=" | sed "s/CERTIFICATE_DOMAIN=//")
|
|
||||||
[ -z "$CERTIFICATE_DOMAIN" ] && CERTIFICATE_DOMAIN=artifactory
|
|
||||||
|
|
||||||
ARTIFACTORY_SERVER_NAME=$(cat /var/lib/cloud/instance/user-data.txt | grep "^ARTIFACTORY_SERVER_NAME=" | sed "s/ARTIFACTORY_SERVER_NAME=//")
|
|
||||||
[ -z "$ARTIFACTORY_SERVER_NAME" ] && ARTIFACTORY_SERVER_NAME=artifactory
|
|
||||||
|
|
||||||
#Configuring nginx
|
|
||||||
rm /etc/nginx/sites-enabled/default
|
|
||||||
|
|
||||||
cat <<EOF >/etc/nginx/nginx.conf
|
|
||||||
#user nobody;
|
|
||||||
worker_processes 1;
|
|
||||||
error_log /var/log/nginx/error.log info;
|
|
||||||
#pid logs/nginx.pid;
|
|
||||||
events {
|
|
||||||
worker_connections 1024;
|
|
||||||
}
|
|
||||||
|
|
||||||
http {
|
|
||||||
include mime.types;
|
|
||||||
variables_hash_max_size 1024;
|
|
||||||
variables_hash_bucket_size 64;
|
|
||||||
server_names_hash_max_size 4096;
|
|
||||||
server_names_hash_bucket_size 128;
|
|
||||||
types_hash_max_size 2048;
|
|
||||||
types_hash_bucket_size 64;
|
|
||||||
proxy_read_timeout 2400s;
|
|
||||||
client_header_timeout 2400s;
|
|
||||||
client_body_timeout 2400s;
|
|
||||||
proxy_connect_timeout 75s;
|
|
||||||
proxy_send_timeout 2400s;
|
|
||||||
proxy_buffer_size 32k;
|
|
||||||
proxy_buffers 40 32k;
|
|
||||||
proxy_busy_buffers_size 64k;
|
|
||||||
proxy_temp_file_write_size 250m;
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
client_body_buffer_size 128k;
|
|
||||||
|
|
||||||
include /etc/nginx/conf.d/*.conf;
|
|
||||||
default_type application/octet-stream;
|
|
||||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
|
||||||
'$status $body_bytes_sent "$http_referer" '
|
|
||||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
|
||||||
access_log /var/log/nginx/access.log main;
|
|
||||||
sendfile on;
|
|
||||||
#tcp_nopush on;
|
|
||||||
#keepalive_timeout 0;
|
|
||||||
keepalive_timeout 65;
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat <<EOF >/etc/nginx/conf.d/artifactory.conf
|
|
||||||
ssl_certificate /etc/pki/tls/certs/cert.pem;
|
|
||||||
ssl_certificate_key /etc/pki/tls/private/cert.key;
|
|
||||||
ssl_session_cache shared:SSL:1m;
|
|
||||||
ssl_prefer_server_ciphers on;
|
|
||||||
## server configuration
|
|
||||||
server {
|
|
||||||
listen 443 ssl;
|
|
||||||
listen 80 ;
|
|
||||||
server_name ~(?<repo>.+)\\.${CERTIFICATE_DOMAIN} artifactory ${ARTIFACTORY_SERVER_NAME}.${CERTIFICATE_DOMAIN};
|
|
||||||
if (\$http_x_forwarded_proto = '') {
|
|
||||||
set \$http_x_forwarded_proto \$scheme;
|
|
||||||
}
|
|
||||||
## Application specific logs
|
|
||||||
## access_log /var/log/nginx/artifactory-access.log timing;
|
|
||||||
## error_log /var/log/nginx/artifactory-error.log;
|
|
||||||
rewrite ^/$ /artifactory/webapp/ redirect;
|
|
||||||
rewrite ^/artifactory/?(/webapp)?$ /artifactory/webapp/ redirect;
|
|
||||||
rewrite ^/(v1|v2)/(.*) /artifactory/api/docker/\$repo/\$1/\$2;
|
|
||||||
chunked_transfer_encoding on;
|
|
||||||
client_max_body_size 0;
|
|
||||||
location /artifactory/ {
|
|
||||||
proxy_read_timeout 2400;
|
|
||||||
proxy_pass_header Server;
|
|
||||||
proxy_cookie_path ~*^/.* /;
|
|
||||||
proxy_pass http://127.0.0.1:8081/artifactory/;
|
|
||||||
proxy_set_header X-Artifactory-Override-Base-Url
|
|
||||||
\$http_x_forwarded_proto://\$host:\$server_port/artifactory;
|
|
||||||
proxy_set_header X-Forwarded-Port \$server_port;
|
|
||||||
proxy_set_header X-Forwarded-Proto \$http_x_forwarded_proto;
|
|
||||||
proxy_set_header Host \$http_host;
|
|
||||||
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat <<EOF >/var/opt/jfrog/artifactory/etc/artifactory.cluster.license
|
|
||||||
${ARTIFACTORY_LICENSE_1}
|
|
||||||
|
|
||||||
${ARTIFACTORY_LICENSE_2}
|
|
||||||
|
|
||||||
${ARTIFACTORY_LICENSE_3}
|
|
||||||
|
|
||||||
${ARTIFACTORY_LICENSE_4}
|
|
||||||
|
|
||||||
${ARTIFACTORY_LICENSE_5}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat <<EOF >/var/opt/jfrog/artifactory/etc/ha-node.properties
|
|
||||||
node.id=art1
|
|
||||||
artifactory.ha.data.dir=/var/opt/jfrog/artifactory/data
|
|
||||||
context.url=http://127.0.0.1:8081/artifactory
|
|
||||||
membership.port=10001
|
|
||||||
hazelcast.interface=172.25.0.3
|
|
||||||
primary=${IS_PRIMARY}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat <<EOF >/var/opt/jfrog/artifactory/etc/db.properties
|
|
||||||
type=mssql
|
|
||||||
driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
|
|
||||||
url=${DB_URL};databaseName=${DB_NAME};sendStringParametersAsUnicode=false;applicationName=Artifactory Binary Repository
|
|
||||||
username=${DB_USER}
|
|
||||||
password=${DB_PASSWORD}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
mkdir -p /var/opt/jfrog/artifactory/etc/security
|
|
||||||
|
|
||||||
cat <<EOF >/var/opt/jfrog/artifactory/etc/security/master.key
|
|
||||||
${MASTER_KEY}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat <<EOF >/var/opt/jfrog/artifactory/etc/binarystore.xml
|
|
||||||
<config version="2">
|
|
||||||
<chain>
|
|
||||||
<provider id="cache-fs-eventual-azure-blob-storage" type="cache-fs">
|
|
||||||
<provider id="sharding-cluster-eventual-azure-blob-storage" type="sharding-cluster">
|
|
||||||
<sub-provider id="eventual-cluster-azure-blob-storage" type="eventual-cluster">
|
|
||||||
<provider id="retry-azure-blob-storage" type="retry">
|
|
||||||
<provider id="azure-blob-storage" type="azure-blob-storage"/>
|
|
||||||
</provider>
|
|
||||||
</sub-provider>
|
|
||||||
<dynamic-provider id="remote-azure-blob-storage" type="remote"/>
|
|
||||||
</provider>
|
|
||||||
</provider>
|
|
||||||
</chain>
|
|
||||||
|
|
||||||
<!-- cluster eventual Azure Blob Storage Service default chain -->
|
|
||||||
<provider id="sharding-cluster-eventual-azure-blob-storage" type="sharding-cluster">
|
|
||||||
<readBehavior>crossNetworkStrategy</readBehavior>
|
|
||||||
<writeBehavior>crossNetworkStrategy</writeBehavior>
|
|
||||||
<redundancy>2</redundancy>
|
|
||||||
<lenientLimit>1</lenientLimit>
|
|
||||||
<property name="zones" value="local,remote"/>
|
|
||||||
</provider>
|
|
||||||
|
|
||||||
<provider id="remote-azure-blob-storage" type="remote">
|
|
||||||
<zone>remote</zone>
|
|
||||||
</provider>
|
|
||||||
|
|
||||||
<provider id="eventual-cluster-azure-blob-storage" type="eventual-cluster">
|
|
||||||
<zone>local</zone>
|
|
||||||
</provider>
|
|
||||||
|
|
||||||
<!--cluster eventual template-->
|
|
||||||
<provider id="azure-blob-storage" type="azure-blob-storage">
|
|
||||||
<accountName>${STORAGE_ACCT}</accountName>
|
|
||||||
<accountKey>${STORAGE_ACCT_KEY}</accountKey>
|
|
||||||
<endpoint>https://${STORAGE_ACCT}.blob.core.windows.net/</endpoint>
|
|
||||||
<containerName>${STORAGE_CONTAINER}</containerName>
|
|
||||||
</provider>
|
|
||||||
</config>
|
|
||||||
EOF
|
|
||||||
|
|
||||||
|
|
||||||
HOSTNAME=$(hostname -i)
|
|
||||||
sed -i -e "s/art1/art-$(date +%s$RANDOM)/" /var/opt/jfrog/artifactory/etc/ha-node.properties
|
|
||||||
sed -i -e "s/127.0.0.1/$HOSTNAME/" /var/opt/jfrog/artifactory/etc/ha-node.properties
|
|
||||||
sed -i -e "s/172.25.0.3/$HOSTNAME/" /var/opt/jfrog/artifactory/etc/ha-node.properties
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
cat /var/lib/cloud/instance/user-data.txt | grep "^CERTIFICATE_KEY=" | sed "s/CERTIFICATE_KEY=//" > /tmp/temp.key
|
|
||||||
cat /tmp/temp.key | sed 's/KEY----- /&\n/' | sed 's/ -----END/\n-----END/' | awk '{if($0 ~ /----/) {print;} else { gsub(/ /,"\n");print;}}' > /etc/pki/tls/private/cert.key
|
|
||||||
rm /tmp/temp.key
|
|
||||||
|
|
||||||
EXTRA_JAVA_OPTS=$(cat /var/lib/cloud/instance/user-data.txt | grep "^EXTRA_JAVA_OPTS=" | sed "s/EXTRA_JAVA_OPTS=//")
|
|
||||||
[ -z "$EXTRA_JAVA_OPTS" ] && EXTRA_JAVA_OPTS='-server -Xms2g -Xmx6g -Xss256k -XX:+UseG1GC -XX:OnOutOfMemoryError="kill -9 %p"'
|
|
||||||
echo "export JAVA_OPTIONS=\"${EXTRA_JAVA_OPTS}\"" >> /var/opt/jfrog/artifactory/etc/default
|
|
||||||
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
|
|
||||||
sleep $((RANDOM % 120))
|
|
||||||
service artifactory start
|
|
||||||
service nginx start
|
|
||||||
nginx -s reload
|
|
||||||
echo "INFO: Artifactory installation completed."
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
ARTIFACTORY_VERSION=$(cat /var/lib/cloud/instance/user-data.txt | grep "^ARTIFACTORY_VERSION=" | sed "s/ARTIFACTORY_VERSION=//")
|
|
||||||
IFS=$'\t'
|
|
||||||
SUPPORTED_VERSIONS=("6.8.0\t6.11.3\t6.15.0\t0.16.0\t0.17.0\t6.18.0")
|
|
||||||
unset IFS
|
|
||||||
|
|
||||||
if [[ "\t${SUPPORTED_VERSIONS[@]}\t" =~ "\t${ARTIFACTORY_VERSION}\t" ]]; then
|
|
||||||
./install_artifactory.sh
|
|
||||||
echo "\ninstall_artifactory.sh was selected" >> user-data.txt
|
|
||||||
else
|
|
||||||
./install_artifactory7.sh
|
|
||||||
echo "\ninstall_artifactory7.sh was selected" >> user-data.txt
|
|
||||||
fi
|
|
||||||
Reference in New Issue
Block a user