Files
JFrog-Cloud-Installers/AzureResourceManager/Artifactory/vm_install/install_pro7_to_vm.sh
Anup Singh ccfb8c0383 Arm 7.11.2 (#68)
* ARM templates - Postgresql JDBC driver is updated (for 7.10.2 compatibility)

* ARM templates - RT and JCR 7.10.2, Xray 3.9.1

* VM image publish template - RT 7.10.5

* ARM template for 7.10.5

* ARM template for Xray 3.10.3

* Updated artifactoryVersion and location

* Updated 7.10.5 version for JCR Azure application

* updated version on azuredeploy_ms_ps.json

* updated azuredeploy_ms_ps.json

* updated azuredeploy_ms_ps.json

* updated 7.10.6 verion in azuredeploy_ms_ps.json, MP_submission/createUiDefinition.json, MP_submission/mainTemplate.json

* Updated the Version for JCR

* updated new xray version 3.11.2 in template files

* updated new x-ray version in createUiDefinition.json mainTemplate.json

* updated createUiDefinition.json mainTemplate.json

* updated 7.11.2 changes for xray, rt and jcr

* ARM template, fixing formatting

Co-authored-by: danielmkn <danielmi@jfrog.com>
Co-authored-by: Aayush-sood94 <aayush.sood1@igtsolutions.com>
2020-12-02 09:58:06 -08:00

51 lines
2.5 KiB
Bash

#!/bin/bash
# Upgrade version for every release
ARTIFACTORY_VERSION=$1
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 PRO and Nginx
echo "deb https://jfrog.bintray.com/artifactory-pro-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-pro=${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 <<EOF >/var/opt/jfrog/artifactory/etc/info/installer-info.json
{
"productId": "ARM_artifactory-pro-vm/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-42.2.18.jar https://jdbc.postgresql.org/download/postgresql-42.2.18.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