Date: Thu, 28 Mar 2024 07:29:54 -0600 (MDT) Message-ID: <36909858.2443.1711632594762@confluence-external-wiki> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_2442_861730000.1711632594762" ------=_Part_2442_861730000.1711632594762 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
This guide will allow users to automate Yellowfin deployment on = a Linux operating system using a bash script.
Following is an example of a headless bash script that can be used as is= , or modified to very quickly get Yellowfin and its dependencies installed = on any Linux operating system (such as Ubuntu).
This bash script will require the following:
The script will then perform these steps:
To use the script below, it=E2=80=99s important you have a thorough unde= rstanding of Linux.
#CODE H= ERE =20 #!/bin/bash date echo "Start script" =20 #Setting DB user var _dbuser=3D`echo $1 | base64 --decode` echo "db User is" echo $_dbuser =20 #Setting DB user var _dbpass=3D`echo $2 | base64 --decode` echo "db pass is" echo $_dbpass =20 =20 #Update installer package date echo "Update apt-get" sudo apt-get update =20 #Install JRE and Postgres date echo "Install Default-jre" sudo apt-get install --yes --force-yes default-jre date echo "Install Postgres" sudo apt-get install --yes --force-yes postgresql postgresql-contrib =20 #Create Postgres User for YF date echo "Create Postgres DB User" sudo -u postgres createuser $_dbuser --createdb --superuser date echo "Set Postgres DB User Pass" sudo -u postgres psql -c "ALTER USER $_dbuser WITH PASSWORD '$_dbpass'" =20 #OPTIONAL #Get Yellowfin Installer #Change the "WGET" to the location of your Yellowfin installer file #date #echo "Get Yellowfin Installer" #wget http://insterller-file-here/installer.jar -O /tmp/yellowfin.jar =20 #OPTIONAL #Get Yellowfin Licence #date #echo "Get Yellowfin Licence" #wget http://licence-location-here/licence.lic -O /tmp/yellowfin72.lic =20 =20 #Generate Silence Installer Properties date echo "Generate Silence Installer Properties" echo "InstallPath=3D/opt/yellowfin" >> /tmp/install.properties echo "InstallTutorialDatabase=3Dtrue" >> /tmp/install.properties echo "LicenceFilePath=3D/tmp/licence.lic" >> /tmp/install.properties echo "ServicePort=3D80" >> /tmp/install.properties echo "DatabaseType=3DPostgreSQL" >> /tmp/install.properties echo "CreateYellowfinDB=3Dtrue" >> /tmp/install.properties echo "CreateYellowfinDBUser=3Dfalse" >> /tmp/install.properties echo "DatabaseHostname=3Dlocalhost" >> /tmp/install.properties echo "DatabaseName=3Dyellowfindb" >> /tmp/install.properties echo "DatabaseDBAUser=3D$_dbuser" >> /tmp/install.properties echo "DatabaseDBAPassword=3D$_dbpass" >> /tmp/install.properties echo "DatabaseUser=3D$_dbuser" >> /tmp/install.properties echo "DatabasePassword=3D$_dbpass" >> /tmp/install.properties =20 #Install Yellowfin date echo "Install Yellowfin" sudo java -jar /tmp/yellowfin.jar -silent /tmp/install.properties =20 #Set Boot Params date echo "Set Boot Params" sudo sed -i '$ihostname Yellowfin72' /etc/rc.local sudo sed -i '$i/opt/yellowfin/appserver/bin/startup.sh > /tmp/yellowfins= tart.log 2>&1' /etc/rc.local =20 #Start Yellowfin date echo "Start Yellowfin" sudo nohup /opt/yellowfin/appserver/bin/startup.sh =20 #Clean Up date echo "Clean up" rm -rf /tmp/installer.jar rm -rf /tmp/licence.lic =20 date echo "END" exit 0
Upload the Yellowfin .jar installer to the machine and rename it. It=
should be located here: /tmp/yellowfin.jar. =
This can be done using SCP or any other method of transfer you lik=
e.
If uploading from a Windows machine, we recommend using an easy to use t= ool like WinSCP.
If the installer was downloaded from Yellowfin's website, you will need = to rename it to "yellowfin.jar"
Copy the provided script to your instance and save it as a .=
sh file, using your preferred text editor.
Make any modifications to the script that you like, for example make sur= e you point it towards your license file and the Yellowfin installer file, = if you have not placed them in the same location. You can also change where= Yellowfin will install to inside the =E2=80=9C#Generate Silent Installer= =E2=80=9D section of the script.
Note there are optional parts in the script, in which the script would g= o and wget a license and installer file from the location you choose. Uncom= ment this section if you wish to use it. IMPORTANT =E2=80=93 you will need = to direct the script to the correct location for these files by changing th= e value of the wget.
Execute the script. (./script.sh)
You may need to run the script as root, depending on your permission lev= el. If you install it at root, you will likely need to start Yellowfin as r= oot too.
By default, this script is configured to install Yellowfin to =E2=80= =9C/opt/yellowfin=E2=80=9D. To start Yellowfin, navigate to =E2=80=9C/opt/y= ellowfin/appserver/bin=E2=80=9D and run =E2=80=9C./startup.sh=E2=80=9D.
If you ran the installer script as root, you may need to run ./startup.s= h as root.
You should now have a working Yellowfin install available on port 80=
.
If you want Yellowfin to run on a different port, you can change this in= the =E2=80=9C#Generate Silent Installer=E2=80=9D section of the script.