FSLogix has over the last couple of years become a rather hot topic as is automation. Now while automating the install of the FSLogix agent is straight forward the reporting server takes a little more effort due to its requirement of Java, TomCat and MongoDB.
Installing TomCat isn’t to bad however the MongoDB does require some configuration files to be created copied and new services created. The FSLogix documentation states that it the report server is not reliant on any particular version of TomCat or MongoDB or Java so grab whichever is the latest binaries for those and amend the version numbers in the scripts.
To automate the installation go through the below steps. The script has been broken down into sections to make life a little easier.
Create a folder to house all the binaries and configuration files then create a MONGOD.cfg file (using notepad) and paste the following into it.
Goto your FSlogix Agent download and copy the apps-reporting.war file into the new directory. Once complete your directory should have the following file list.
Apache-tomcat binary (available HERE)
Install script.bat (from this post)
Java Binary (available HERE)
Mongodb.msi (available HERE)
The first part of the script installs the Tomcat binaries, there are no specific configurations required for tomcat so just installing it silently will be quite sufficient. Similarly, MongoDB can be installed with the default options at this stage.
ECHO —-INSTALLING APACHE AND MONGODB—-
MSIEXEC /I MONGODB.MSI /QN /NORESTART
Now we will need to create some folders for MongoDB and also copy the Mongo configuration files into the correct location.
ECHO —-CREATING FOLDERS AND COPYING CONTENT—-
COPY MONGOD.CFG “C:\PROGRAM FILES\MONGODB\MONGOD.CFG”
Once the folders and configuration files have been copied into the server we will need to create a service, start the services and copy across the apache web package (war file) that exists within the FSLogix Report Server directory into the apache directory.
When you run the SC Create MongoDB line make sure you check and update the server\3.4\ path to ensure it matches with your installed version of the database and also you will need to ensure the tomcat version is also correct when copying over the War file.
ECHO —-CREATING AND STARTING SERVICES—-
SC CREATE MONGODB BINPATH= “\”C:\PROGRAM FILES\MONGODB\SERVER\3.4\BIN\MONGOD.EXE\” –SERVICE –CONFIG=\”C:\PROGRAM FILES\MONGODB\MONGOD.CFG\”” DISPLAYNAME= “MONGODB” START= “AUTO”
SC START MONGODB
SC QUERY MONGODB
COPY APPS-REPORTING.WAR “C:\PROGRAM FILES\APACHE SOFTWARE FOUNDATION\TOMCAT 9.0\WEBAPPS\”
SC START TOMCAT9
Now use a browser to navigate to http://%FSlogixreportingserver%:8080/apps-reporting and ensure that the reporting displays as expected.
The full script is as below:
Echo —-Installing Apache, Java and MogoDB—-
msiexec /i mongodb.msi /qn /norestart
Echo —-Creating Folders and copying content—-
Copy mongod.cfg “C:\Program Files\MongoDB\mongod.cfg”
Echo —-Creating and starting services—-
sc create MongoDB binPath= “\”C:\Program Files\MongoDB\Server\3.4\bin\mongod.exe\” –service –config=\”C:\Program Files\MongoDB\mongod.cfg\”” DisplayName= “MongoDB” start= “auto”
sc start mongodb
sc query mongodb
Copy Apps-reporting.war “c:\program files\Apache Software Foundation\Tomcat 9.0\webapps\”
sc start tomcat9
Author: Dale Scriven