Reference : SIM_SQuORE Version : 2011-C
This edition of the Installation and Administration Guide applies to SQuORE 2011-C and to all subsequent releases and modifications until otherwise indicated in new editions.
Licence
No part of this publication may be reproduced, transmitted, stored in a retrieval system, nor translated into any human or computer language, in any form or by any means, electronic, mechanical, magnetic, optical, chemical, manual or otherwise, without the prior written permission of the copyright owner, SQuORING Technologies.
SQuORING Technologies reserves the right to revise this publication and to make changes from time to time without obligation to notify authorized users of such changes. Consult SQuORING Technologies to determine whether any such changes have been made.
The terms and conditions governing the licensing of SQuORING Technologies software consist solely of those set forth in the written contracts between SQuORING Technologies and its customers.
All third-party products are trademarks or registered trademarks of their respective companies.
Warranty
SQuORING Technologies makes no warranty of any kind with regard to this material, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. SQuORING Technologies shall not be liable for errors contained herein nor for incidental or consequential damages in connection with the furnishing, performance or use of this material.
Table of Contents
Typographical Conventions ... iv
Acronyms and Abbreviations ... v
1. Introduction ... 1
1.1. Foreword ... 1
1.2. Overview ... 1
1.3. Contacting SQuORING Technologies Product Support ... 1
1.4. Responsibilities ... 2
2. The SQuORE Architecture ... 3
2.1. The SQuORE Ecosystem ... 3
2.2. The SQuORE Database ... 3
2.3. The SQuORE Application Server ... 3
2.4. The SQuORE Client ... 4
2.5. The SQuORE Command Line Interface ... 4
2.6. The SQuORE Continuous Integration Plug-Ins ... 4
2.7. The SQuORE Licence Server ... 5
3. Installing SQuORE ... 6
3.1. Installation Prerequisites ... 6
3.2. Installing SQuORE on Windows ... 6
3.3. Installing SQuORE on Linux ... 14
4. Starting SQuORE ... 15
4.1. Starting SQuORE on Windows ... 15
4.2. Starting SQuORE on Linux ... 15
5. SQuORE Administration ... 16
5.1. Looking at the SQuORE Configuration ... 16
5.2. Adjusting the SQuORE Configuration ... 17
5.3. Using the SQuORE Database Administration Scripts ... 18
5.4. Backing-Up the SQuORE Database ... 19
5.4.1. On Windows ... 19
5.4.2. On Linux ... 19
5.5. Restoring a SQuORE Database ... 19
5.5.1. On Windows ... 19
5.5.2. On Linux ... 20
5.6. Resetting the SQuORE Database ... 20
5.6.1. On Windows ... 20
5.6.2. On Linux ... 20
5.7. Updating the SQuORE Licence File ... 20
5.8. Connecting to a Remote Licence Server ... 21
5.9. Running SQuORE as a Service ... 21
6. Sizing the SQuORE Server and Database ... 23
6.1. Disk Usage ... 23
6.1.1. Project Size and Growth ... 23
6.2. Performance Implications ... 24
6.2.1. Available RAM ... 24
6.2.2. Project Volume ... 25
Typographical Conventions
The following conventions are used in this manual.
Typeface or Symbol Meaning
Bold Book titles, important items, or items that can be selected including buttons and menu choices. For example: Click
Next > to continue
Italic A name of a user defined textual element. For example: Username: admin
Courier New Files and directories; file extensions, computer output. For
example: Edit the config.xml file
Courier Bold Commands, screen messages requiring user action. For example: Username : admin
> Menu choices. For example: Select File > Open . This means select the File menu, then select the Open command from it.
<...> Generic terms. For example: <InstallationDir> refers as
the SQuORE installation directory.
Notes :
Screenshots displayed in this manual may differ slightly from the ones in the actual product.
Acronyms and Abbreviations
The following acronyms and abbreviations are used in this manual.
CI Continuous Integration
CLI Command Line Interface
COTS Commercial Off-The-Shelf
IDE Integrated Development Environment
IE Internet Explorer
GB Gigabyte
JDK Java Development Kit
JEE Java Enterprise Edition
KPI Key Performance Indicator
MB Megabyte
1. Introduction
1.1. Foreword
This document (reference: SIM_SQuORE) has been released by SQuORING Technologies.
It is part of the user documentation of the SQuORE software product edited and distributed by SQuORING Technologies.
1.2. Overview
This document is the Installation Guide for the SQuORE software product.
While we recommend that you read it in its entirety, we divided it up into chapters for an easier introduction to SQuORE:
– Jump to Chapter 2, The SQuORE Architecture to learn about the available SQuORE
components.
– Jump to Chapter 3, Installing SQuORE to learn how to deploy SQuORE in your
environment.
– Jump to Chapter 4, Starting SQuORE to learn how to to launch the SQuORE server. – Jump to Chapter 5, SQuORE Administration to discover how to maintain a SQuORE
installation.
– Jump to Chapter 6, Sizing the SQuORE Server and Database to evaluate the resources
that SQuORE will require in your environment.
If you want to install SQuORE Command Line Interface, refer to the online SQuORE open wiki: http://openwiki.squoring.com.
For information on how to use and configure SQuORE, the following manuals are also available:
– SQuORE Getting Started Guide, – SQuORE Configuration Guide, – SQuORE Reference Manual.
1.3. Contacting SQuORING Technologies Product Support
If the information provided in this manual is erroneous or inaccurate, or if you encounter problems during your installation, contact SQuORING Technologies Product Support: http://support.squoring.com
You will need a valid SQuORE customer account to submit a support request. You can create an account on the support website if you do not have one already.
For any communication:
SQuORING Technologies Product Support
1.4. Responsibilities
Approval of this version of the document and any further updates are the responsibility of SQuORING Technologies.
2. The SQuORE Architecture
2.1. The SQuORE Ecosystem
SQuORE is based on a traditional 3-tier architecture consisting of:
– a database
– an application server
– a client front-end accessible through a Web Browser
The SQuORE Architecture
2.2. The SQuORE Database
The SQuORE database is a PostgreSQL database used for storing:
– a hierarchy of artefacts defined in a software projects (e.g. files, classes, functions) – incremental sets of base measures (e.g. complexity measures provided by the SQuORE
data providers)
– incremental sets of derived measures (i.e. all measures computed by the specified
SQuORE analysis model)
2.3. The SQuORE Application Server
The SQuORE application server is based on the JBoss/JEE framework. Its main functionalities are:
– Aggregating data coming from the various SQuORE data providers
– Applying an analysis model, producing high-level key performance indicators
– Exploring and analysing the results using efficient graphical representations and
2.4. The SQuORE Client
SQuORE end-users access the server services through a Web interface that enables them to:
– create projects including all data collected on the software artefacts,
– explore the results i.e. the artefact levels of performance, using a user-specific,
dynamic dashboard making use of filtering and sorting features,
– export information for reporting purposes.
SQuORE is compatible with many browsers. The following is the list of officially supported browsers. The higher up the list a browser appears, the more compatible it is with SQuORE:
– Google Chrome version 5 or higher – Mozilla Firefox, version 3.5 or higher – Apple Safari
– Microsoft Internet Explorer 8 – Microsoft Internet Explorer 7 – Microsoft Internet Explorer 6
For more details on performance-related requirements when using SQuORE, please refer to Chapter 6, Sizing the SQuORE Server and Database.
2.5. The SQuORE Command Line Interface
In order to provide compatibility with Continuous Integration systems (see Section 2.6, “The SQuORE Continuous Integration Plug-Ins”), SQuORING Technologies also delivers the SQuORE Command Line Interface (CLI): a set of APIs used to remotely create and manage software projects.
SQuORE CLI is a SQuORE add-in that allows a SQuORE client to locally analyse project source code files visible to the client machine and send the results to a remote SQuORE server.
SQuORE CLI comes as a simple archive file that can be downloaded from SQuORING Technologies's support site: http://support.squoring.com/download.
For more information about installing SQuORE CLI, refer to the online SQuORING Technologies open wiki: http://openwiki.squoring.com.
2.6. The SQuORE Continuous Integration Plug-Ins
SQuORING Technologies also provides plug-ins for integrating SQuORE with Continuous Integration systems.
Two SQuORE CI plug-ins are available: one for CruiseControl and one for Jenkins. Each plug-in is made of two “builders” and one “publisher”:
– The first builder activates SQuORE to collect base measures on the source code
– The second builder runs after all other code analysis tools and sends data to the
SQuORE server.
– The publisher is used to show the SQuORE rating for the current project, for deeper
result analysis, the user is redirected to the SQuORE server. The SQuORE CI plug-ins use the SQuORE Command Line Interface.
Contact SQuORING Technologies product support to get the SQuORE CI plug-ins or enquire about the installation procedure.
2.7. The SQuORE Licence Server
The SQuORE Server requires a valid licence in order to start and run. The licence information is served by the SQuORE Licence Server, which reads the licence file squore-server.p7s located in <INSTALLATIONDIR>/Server/server/default/conf/licenses.
The licence file is delivered by SQuORING Technologies and can be copied on the licence server at installation time or post-installation. In all cases, the SQuORE Licence Server must be restarted to read the new licence information.
If you run multiple SQuORE Servers, you can choose to connect each one to its own licence server, or you can connect them all to the same SQuORE Licence Server, in which case they will share the available resources.
SQuORE licences restrict SQuORE usage according to the following parameters:
– A licence has a start date, meaning that it becomes active at a date decided by
SQuORING Technologies when the licence is issued.
– A licence has an end date, meaning that it becomes invalid at a date decided by
SQuORING Technologies when the licence is issued.
– A licence is tied to a particular server host-id, a fingerprint of some of the hardware
components of a server, making it impossible to share a licence between servers.
– A licence defines a number of users per installation. This number is the maximum
amount of accounts that can be created in the SQuORE database.
– A licence imposes that each SQuORE user should log into SQuORE using their own
3. Installing SQuORE
3.1. Installation Prerequisites
For a successful installation of SQuORE, you will need:
– the latest version of the SQuORE installer, which can be download from the SQuORING
Technologies support website (see Section 1.3, “Contacting SQuORING Technologies Product Support”)
– a user account with system administrator privileges – the SUN Java Development Kit version 1.6 or higher
– at least 550 MB of space available on the disk for a full installation – at least 2 GB of RAM on the server (4 GB recommended)
– optionally, a valid license file.
Note: Depending on the type of licence agreement, the licence information may have been delivered by email.
The licence file can be added after installation with no need to re-install the product (see Section 5.7, “Updating the SQuORE Licence File”).
Note that on Windows platforms, some third-party libraries require the presence of Visual C++ Libraries runtime components. If they are not installed on your server, you can download them from the Microsoft website: http://www.microsoft.com/download/en/ details.aspx?displaylang=en&id=5638
On Linux platforms:
– Perl version 5.10 or greater; – Tcl version 8.3 or greater,
– PostgreSQL version 8.4 or greater. For more details about required packages, see
Section 3.3, “Installing SQuORE on Linux”
3.2. Installing SQuORE on Windows
1.Log on with an account that has administrator privileges. 2.Launch the SQuORE installer. A Welcome screen appears.
The SQuORE installer Welcome screen
3.Click on the Next button to start the installation:
The SQuORE Licence Agreement screen
4.Click I Agree to accept the terms of the agreement and continue with the installation. 5.The next screen allows you to choose which components of SQuORE will be installed.
The SQuORE Choose Components screen
Three types of installations are available:
– Full: all components will be installed
– Minimal: only the SQuORE Server will be installed. Use this mode if a PostgreSQL
server and a distribution of the Perl scripting environment are already available on the server
– Custom: only the selected components will be installed
The optional components to be installed can also be selected by checking the corresponding boxes.
If you are unsure which option is the best for you, you can safely use the Full installation, so that all SQuORE components are installed locally.
Select the appropriate installation profile. Then, click on the Next button.
6.The next screen allows selecting the SQuORE installation folder, where the application server will be installed.
The SQuORE Server installation folder screen
Check that the location suggested by the SQuORE installer is appropriate. If not, use the Browse... button to select another location.
<InstallationDir> will now refer to the SQuORE installation directory specified in
the Destination Folder text box.
After specifying the Destination Folder, click on the Next button. 7.The next screen offers more installation parameters:
The SQuORE installation parameters screen
– JDK 1.6 directory: the directory where the SUN JDK 1.6 is installed. Remember
that SUN JDK version 6 or higher is requested (see Section 3.1, “Installation Prerequisites”).
8.Check if the default location suggested by the SQuORE Installation Wizard is appropriate. If not, use the button ... to select a new one.
– Advanced PostgreSQL configuration: checking this box allow you to change the
default configuration of PostgreSQL database server (see hereafter).
– Advanced JBoss AS configuration: checking this box allows you to change the
default configuration of the SQuORE JBoss application server. For security reasons, the default JBoss AS is only bound to localhost. If you are planning to access the server from other computers on your network, please use the Advanced JBoss AS configuration.
– Licensing key: the location of the SQuORE licence file you wish to use for your
installation. Note that you can leave this field empty at this time and provide the licence information only after the installation procedure has finished. This is explained in further details in Section 5.7, “Updating the SQuORE Licence File”). 9.Use the ... button to select the licence file. The file (named SQuORE-server.p7s)
should have been previously provided by SQuORING Technologies according to the applicable SQuORE licencing agreement.
After validating the file location, click on the Next button.
10.In you selected the Advanced PostgreSQL configuration, the following three screens will be displayed, allowing changing all or part of the default configuration of the SQuORE PostgreSQL database server.
The PostgreSQL cluster configuration screen
It is strongly recommended to use the different physical disk for the cluster and the backup directories.
The PostgreSQL server configuration screen
The SQuORE database configuration screen
After adjusting the settings in the screens above, click on the Next button.
11.If you selected the Advanced JBoss AS configuration, the following screen will be displayed, allowing you to change all or part of the default configuration of the SQuORE JBoss application server.
If you want your SQuORE server to be accessible from anywhere on your network, please use “0.0.0.0” for the bind address. Otherwise you will only be able to access
SQuORE from the SQuORE server itself. Available service binding set are ports-default, ports-01, ports-02 and ports-03.
The JBoss AS networking configuration screen
After adjusting the settings, click on the Next button.
12.The following screen is a summary of the parameters you specified for the installation and allows you to confirm that they correspond to your expectations before launching the installation:
The SQuORE configuration summary screen
Check the installation parameters are appropriate and click on the Install button to start installing SQuORE.
Note: The installation may take a few minutes
when the installation process completes, the following screen is displayed.
14.Click the Finish button to clsoe the SQuORE Installation Wizard.
SQuORE is now ready for use. Refer to the next section to learn how to launch SQuORE and, if applicable, change the default configuration.
3.3. Installing SQuORE on Linux
Before installing SQuORE on a Linux platform, verify that the following items are already installed:
– the SUN JDK version 6 or greater
– Perl version 5.10 or greater including the libraries Algorithm::Diff and DBD::Pg – Tcl version 8.3 or greater
– PostgreSQL version 8.4 including at least the postgresql-server and pgadmin3
packages (they can be installed using the package-manager delivered with your Linux distribution)
1.Unzip the SQuORE_Linux_2011-C.<buildNumber>.tar.bz2 archive file and then extract
the content of the tar file in <InstallationDir>: i.e. the selected SQuORE installation directory.
tar -xf SQuORE_Linux_2011-C.<buildNumber>.tar.bz2
<InstallationDir> now contains a new folder called SQuORE. As an example: / home/user/SQuORING/SQuORE/.
2.Run the SQuORE installation script in a command shell:
<InstallationDir>/SQuORE/Bin/install.sh –b 0.0.0.0 –D <SQuOREDBRepository> where <SQuOREDBRepository> is the path of the new directory where the SQuORE database will be stored.
3.Set up the SQuORE licensing key by copying the file named SQuORE-server.p7s in
the following folder: <InstallationDir>/Server/server/default/conf/licenses The file SQuORE-server.p7s should have been previously provided by SQuORING
Technologies according to the applicable SQuORE licensing agreement.
SQuORE is now ready for use. Refer to the next section to see how to launch SQuORE and, if applicable, change the default configuration.
4. Starting SQuORE
4.1. Starting SQuORE on Windows
The SQuORING program group created during the installation process contains all commands to start SQuORE on Windows.
1.Launch the SQuORE Database Server: Start > SQuORING > SQuORE > Launch > StartDatabase
2.Launch the SQuORE Application Server: Start > SQuORING > SQuORE > Launch > StartServer
3.Launch the SQuORE Client: Start > SQuORING > SQuORE > Launch > StartClient Alternatively, you can type the following address in a web browser: http:// localhost:8180/SQuORE_Server/
4.Log into SQuORE using the default user account:
– Username: admin – Password: admin
SQuORE is now started. Please refer to the SQuORE Getting Started Guide for more details on how to use SQuORE for assessing software products and processes.
4.2. Starting SQuORE on Linux
1.Move into the SQuORE bin directory cd <InstallationDir>/SQuORE/Server/bin/ 2.Launch the SQuORE database (if not yet started): ./StartDatabase.sh
3.Launch the SQuORE Application Server: ./StartServer.sh
4.Launch the SQuORE Client by typing the following address in a Web browser: http:// localhost:8180/SQuORE_Server/
5.Log into SQuORE using the default user account:
– Username: admin – Password: admin
SQuORE is now started. Please refer to the SQuORE Getting Started Guide for more details on how to use SQuORE for assessing software products and processes.
5. SQuORE Administration
5.1. Looking at the SQuORE Configuration
During the installation process, the SQuORE Installation Wizard creates several folders and files in the SQuORE installation directory <InstallationDir>:
The Bin folder contains the main commands available to administer SQuORE. Most
of these commands are also available from the Start menu in the SQuORING/SQuORE
program group. For more details, please refer to the SQuORE Getting Started Guide. The Configuration folder contains folders and files that end users may modify to
configure and customise SQuORE:
– The analysis and decisions models used for assessing the software products and
processes
– The dashboards and reports provided to the users
– The “data providers”: i.e. the scripts allowing to import base measurement data from
COTS tools to SQuORE
– The project creation wizards
For more details on how to use these configuration files, refer to the SQuORE Configuration Guide.
The Database folder contains PostgreSQL tools to administer the database.
The Samples folder contains some sample source code in various programming
languages that can be used as examples when getting to know SQuORE.
The Server folder contains the SQuORE application server. See Section 2.3, “The
SQuORE Application Server”
The Share folder contains the SQuORE user documentation and some third-party
libraries (e.g. Perl).
The file config.xml is used to specify the location of some configuration folders. See
Section 5.2, “Adjusting the SQuORE Configuration” for more information.
SQuORE_Uninst is a utility that launches the uninstallation of SQuORE.
WebClient is a shortcut to directly access the homepage of the SQuORE client.
Support is a shortcut to the SQuORING Technologies product support website: http://
www.support.squoring.com.
5.2. Adjusting the SQuORE Configuration
The default configuration of SQuORE may be modified by specifying:
– the SQuORE temporary folder: i.e. the directory containing internal temporary
SQuORE user data;
By default, the SQuORE temporary folder is <InstallationDir>/SQuORE/Tmp.
– the SQuORE configuration folder: i.e. the directory containing folders and files
accessible to the end users for configuring SQuORE, consisting of:
— models: the analysis and decision models used for assessing the software products
and processes; default example models are available
— tools: the default configurations allowing to import data from data providers
— wizards: the default configuration associated to the project creation wizards
For more information on how to use these configuration files, refer to the SQuORE Configuration Guide.
By default, the SQuORE configuration is located under <InstallationDir>/SQuORE/
Configuration.
There are two ways you can modify the default locations of the SQuORE temporary and configuration folders:
• By setting up the two environment variables SQuORE_TMP and SQuORE_CONF, to define
the paths used for the SQuORE Temporary and Configuration folders respectively. • Alternativaly, by updating the config.xml file located in the SQuORE installation
directory so that the variables cfg and tmp point to the desired location of the SQuORE
temporary and configuration folders.
On Windows, the initial contents of config.xml are as follows: <?xml version="1.0" encoding="utf-8" standalone="yes"?> <SQuORE>
<cfg directory="C:\Program Files\SQuORING\SQuORE\Configuration" /> <tmp directory="C:\Program Files\SQuORING\SQuORE\Tmp" />
<src directory="C:\Program Files\SQuORING\SQuORE\Sources" /> </SQuORE>
On Linux, the initial contents of config.xmlare as follows:
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <SQuORE>
<cfg directory=“/SQuORING/SQuORE/Configuration" /> <tmp directory="/SQuORING/SQuORE/Tmp" />
<src directory="/SQuORING/SQuORE/Sources" /> </SQuORE>
The following is an example of what config.xml may look like after your modifications: <?xml version="1.0" encoding="utf-8" standalone="yes"?>
<SQuORE>
<cfg directory= “/home/user/SQuORING/SQuORE/Configuration"/> <tmp directory= "/home/user/SQuORING/SQuORE/Tmp"/>
<src directory= "/home/user/SQuORING/SQuORE/Sources" /> </SQuORE>
Note that the SQuORE Sources folder is not yet in use in this version of the SQuORE product.
5.3. Using the SQuORE Database Administration Scripts
Your installation of SQuORE includes some scripts designed to help administering the SQuORE PostgreSQL database. These scripts will let you to:
– save the current SQuORE Database (See Section 5.4, “Backing-Up the SQuORE
Database”);
– restore a previously saved SQuORE Database (See Section 5.5, “Restoring a SQuORE
Database”);
– reset the SQuORE Database to its initial state (See Section 5.6, “Resetting the SQuORE
Database”);
The scripts are located in the Bin folder of the SQuORE installation directory:
– BackupDatabase.sh
– RestoreDatabase_EMPTY.sh
– RestoreDatabase_SAVED.sh
Note: On Linux, depending on the configuration of your PostgreSQL Database installation directory, these scripts may need to be modified to operate properly.
For instance, the initial content of the script RestoreDatabase_SAVED.sh is as follow:
#!/bin/bash PORT=4561 HOST=127.0.0.1 USER=SQuOREAdmin DATABASE=SQuOREDB SQuOREDIR=${0%/*} FILE=$SQuOREDIR/../Database/archive/SQuOREDB_SAVED.backup
echo "*** Delete database $DATABASE ***" dropdb -h $HOST -p $PORT -U $USER $DATABASE echo "*** Create database $DATABASE ***"
createdb -h $HOST -p $PORT -U $USER $DATABASE echo "*** Initialize database $DATABASE ***"
psql -h $HOST -p $PORT -U $USER -f "$FILE" $DATABASE
The value of the following variables can be modified to match the actual installation specified in Section 3.3, “Installing SQuORE on Linux”:
– PORT: database server port
– HOST: database server host-id
– USER: database server administration user
– DATABASE: database name
– FILE: pathname of the file to be created / used when running the scripts.
5.4. Backing-Up the SQuORE Database
The contents of the SQuORE Database can be saved using the BackupDatabase script
located in the Bin folder of the SQuORE installation directory.
Executing this script creates a SQuOREDB_SAVED.backup file in the archive folder in the
SQuORE Database installation directory. This backup file can later be used by a script that restores database snapshots, which we will cover in the next section.
5.4.1. On Windows
1.Launch Start > SQuORING > SQuORE > Admin > BackUp current DB
5.4.2. On Linux
Prior to running the script, check that it has been set up correctly as specified in Section 5.3, “Using the SQuORE Database Administration Scripts”
1.Run the SQuORE Database backup script in a command shell: <InstallationDir>/ SQuORE/Bin/BackupDatabase.sh
5.5. Restoring a SQuORE Database
A previously backed-up SQuORE Database can be restored using the
RestoreDatabase_SAVED script located in the Bin of the SQuORE installation directory.
The script uses the backup file SQuOREDB_SAVED.backup in the archive folder in the
SQuORE Database installation directory.
5.5.1. On Windows
1.Shutdown the SQuORE server: Start > SQuORING > SQuORE > Launch > ShutdownServer
2.Launch Start > SQuORING > SQuORE > Admin > Restore saved DB
3.Start the SQuORE Application server again after the script finishes via Start > SQuORING > SQuORE > Launch > StartServer
5.5.2. On Linux
Prior to running the script, check that it has been set up correctly as specified in Section 5.3, “Using the SQuORE Database Administration Scripts”.
1.Shutdown the SQuORE server: <InstallationDir>/SQuORE/Server/bin/ shutdown.sh --shutdown
2.Run the SQuORE Database restore script in a command shell: <InstallationDir>/ SQuORE/Bin/RestoreDatabase_SAVED.sh
3.Start the SQuORE server again after the script finishes via <InstallationDir>/ SQuORE/Server/bin/startserver.sh
5.6. Resetting the SQuORE Database
You can reset the SQuORE Database to its initial state, and therefore delete all your projects using the RestoreDatabase_EMPTY script located in the Bin folder of the
SQuORE installation directory.
The script uses the file SQuOREDB_EMPTY.sql in the archive folder in the SQuORE
Database installation directory to import a clean database.
5.6.1. On Windows
1.Shutdown the SQuORE server: Start > SQuORING > SQuORE > Launch > ShutdownServer
2.Launch Start > SQuORING > SQuORE > Admin > Clear DB
3.Start the SQuORE server after the script finishes, via Start > SQuORING > SQuORE > Launch > StartServer
5.6.2. On Linux
Prior to running the script, check that it has been set up correctly as specified in Section 5.3, “Using the SQuORE Database Administration Scripts”.
1.Shutdown the SQuORE server: <InstallationDir>/SQuORE/Server/bin/ shutdown.sh --shutdown
2.Run the SQuORE Database reset script in a command shell: <InstallationDir>/ SQuORE/Bin/RestoreDatabase_EMPTY.sh
3.Start the SQuORE server after the script completes via <InstallationDir>/SQuORE/ Server/bin/startserver.sh
5.7. Updating the SQuORE Licence File
A SQuORE licence key file named SQuORE-server.p7s should have been provided to you
by SQuORING Technologies under the applicable SQuORE licencing agreement. Follow these steps to deploy the SQuORE licence file:
1.Shutdown the SQuORE server
2.Copy the file SQuORE-server.p7s in the following folder: <InstallationDir>/ Server/server/default/conf/licenses
3.Start the SQuORE Application server to apply the changes.
5.8. Connecting to a Remote Licence Server
In this section, you will learn to configure SQuORE to rely on a remote licence server instead of using the default server embedded into each installation. This is useful when you run a production server and a development server, and you want the licence to be shared between both installations.
Note: Before you follow these steps, ensure that the two SQuORE servers are installed and start up correcly as described in Chapter 3, Installing SQuORE and Chapter 4,
Starting SQuORE.
In order to point a local SQuORE server to a licence served by a remote SQuORE installation, carry out the following steps:
1.Shut down the local SQuORE server
2.Browse to <INSTALL_DIR>/server/default/conf/props and open squore-server.properties in a text editor.
3.Uncomment the line #license.jnp = jnp://host:port/
4.Replace host with the IP or name of the remote SQuORE server
5.Replace port with the JNP port of the remote JBOSS server (default: 1199)
6.Restart the local SQuORE server to apply the new licence configuration. The local SQuORE server is now using a remote licence server.
5.9. Running SQuORE as a Service
It is possible to configure SQuORE to run as a service on Windows, using a tool that generates separate services for JBOSS and postgreSQL to start automatically.
Note: Before converting your installation, make sure that the SQuORE server starts up properly by following the steps described in Section 4.1, “Starting SQuORE on Windows”. Follow the steps below to convert your SQuORE installation so it runs as a service: 1.Shutdown the SQuORE server
2.Execute the script <InstallationDir>/Bin/InstallService.bat as administrator.
The following image is the output of the console after the services were successfully installed:
You can manage and configure the nwo new services (SQuOREDB and SQuORESERVER) in the Windows Services console.
6. Sizing the SQuORE Server and Database
This chapter provides information about the resource utilisation and impact of running a SQuORE server over time.
6.1. Disk Usage
6.1.1. Project Size and Growth
The following graph shows that the SQuORE database growth is linear with regard to the project volume, measured in terms of the number of artefacts (i.e. the sum of the number of files, classes, functions defined in the project).
The graph is an analysis of the evolution of the database size for a sample project consisting of:
– 250 files – 2200 functions – 40000 lines of code
The following graph shows a project’s evolution during three versions.
For the purpose of this benchmark, a fixed number of files were modified in the project, and the database size evolution was measured after the new version was created. This benchmark shows that the database size evolution is consistent with the project’s evolution through time: each time a certain amount of project artefacts are modified, an equivalent amount of new database entries are needed.
For a medium-sized project (10 000 artefacts): • 500 files
• 20 artefacts per files (class and functions) • 50 base measures per artefacts
The database space required for the first project analysis is about 60 MB. After 50 versions the required space is evaluated to 1.1 GB.
6.2. Performance Implications
6.2.1. Available RAM
The amount of memory allocated to the SQuORE server has an impact on the overall performance of SQuORE. The following graph shows the influence of available RAM on the time needed to import a large-size project into the SQuORE database. This type of processing is normally the most time consuming in a typical SQuORE usage.
The test was performed with a project containing:
– 1,400,000 lines of code, – 2,500 source code files, – 21,000 functions,
– 1,100,000 base measures.
Running on a Windows Server 2003 64 bits machine, SQuORE is able to handle the project with 2GB of RAM. It could also manage this project with less memory, but at the expense of performance. It is however recommended to allow at least 4 GB of RAM to the SQuORE server. 8 GB may be required for large projects.
6.2.2. Project Volume
Using projects of increasing size, the following graph shows how all stages of the SQuORE project creation evolve linearly. These stages are respectively:
– Pre-processing: creating and managing the project data. – Computation: running the analysis model on the project data.
– DB update: importing the artefacts, the base and derived measures values into the
SQuORE database.
These measurements are associated to a new project, which means that all objects are inserted into the database. In the case of a project being updated (i.e. a new version fo an existing project), only the new data is inserted into the database, resulting in a much reduced the DB update time.
Index
S
Server, 4