Difference between revisions of "DEPRECATED - REMOVE IT SmartGears gHN Installation"

From Gcube Wiki
Jump to: navigation, search
(Supporting resource encryption/decryption)
(Configuring the gHN)
Line 111: Line 111:
 
=== Configuring the gHN ===
 
=== Configuring the gHN ===
  
The configuration of the gHN that relates to its operation within the infrastructure and can be found in <code>$GLOBUS_LOCATION/config/GHNConfig.xml</code>. The file <code>$GLOBUS_LOCATION/config/GHNConfig.client.xml</code> ''can'' be used to dedicate a separate configuration to a gHN that operates in [[Contexts#The_gHN_Context|client mode]].
+
The configuration of the SmartGears gHN that relates to its operation within the infrastructure and can be found in <code>$GHN_HOME/container.xml</code>.  
  
The following gHN properties are available for configuration:
+
The following properties are available for configuration:
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
|-
 
| '''<code>securityenabled</code>'''
 
| <code>true</code> if the gHN can operate in a secure infrastructure, <code>false</code> otherwise.
 
 
|-
 
|-
 
| '''<code>mode</code>'''
 
| '''<code>mode</code>'''
| either '''<code>CONNECTED</code>''' or '''<code>STANDALONE</code>''' depending on whether the gHN does or does not publish information in the infrastructure.  
+
| either '''<code>offline</code>''' or '''<code>online</code>''' depending on whether the gHN does or does not publish information in the infrastructure.
 +
|-
 +
| '''<code>hostname</code>'''
 +
| the hostname of the container to be published on the infrastructure.
 +
|-
 +
| '''<code>port</code>'''
 +
| the port of the container to be published on the infrastructure.  
 
|-
 
|-
 
| '''<code>infrastructure</code>'''
 
| '''<code>infrastructure</code>'''
 
| the name of the infrastructure in which the gHN operates. (e.g. <code>gcube</code>, <code>d4science</code>,...).
 
| the name of the infrastructure in which the gHN operates. (e.g. <code>gcube</code>, <code>d4science</code>,...).
 
|-
 
|-
| '''<code>startScopes</code>'''
+
| '''<code>vo</code>'''
| a comma-separated list of VOs that the gHN joins.
+
| the VO[s] that the gHN joins.
 
|-
 
|-
| '''<code>allowedScopes</code>'''
+
| '''<code>persistence</code>'''
| a comma-separated list of VOs that the gHN will potentially join (upon VO Manager decision).
+
| an alternative folder where the gHN and apps state are maintained.
 
|-
 
|-
| '''<code>labels</code>'''
+
| '''<code>property</code>'''
| the name of the file that includes custom labels to characterize the gHN.  These are added to those automatically derived by gCore and published in the gHN profile. The file name must be relative to the <code>$GLOBUS_LOCATION/config</code> directory.
+
| an arbitrary property with name/value attributes
|-
+
| '''<code>GHNtype</code>'''
+
| either '''<code>DYNAMIC</code>''' or '''<code>STATIC</code>''' depending on whether the gHN can or cannot be used as a target for dynamic deployment operations.
+
|-
+
| '''<code>coordinates</code>'''
+
| a pair of comma-separated values for the latitude and longitude of the gHN. Coordinates for some popular locations are available [[gHN Coordinates|here]].
+
 
|-
 
|-
 
| '''<code>country</code>'''
 
| '''<code>country</code>'''
Line 147: Line 144:
 
| the name of the location.
 
| the name of the location.
 
|-
 
|-
| '''<code>publishedHost</code>'''
+
| '''<code>publication-frequency</code>'''
| the hostname to declare in the GHN and Running Instance profiles, if different from the actual one
+
| how often the gHN has to refresh its profile on the IS (in seconds).
|-
+
| '''<code>publishedPort</code>'''
+
| the port to declare in the GHN and Running Instance profiles, if different from the actual one
+
|-
+
| '''<code>updateInterval</code>'''
+
| how often the gHN must has to refresh its profile on the IS (in seconds).
+
|-
+
| '''<code>portRange</code>''' [optional]
+
| a dash-separated pair of numbers that identify a range of free ports, if any.
+
|-
+
| '''<code>testInterval</code>''' [optional]
+
|  how often the monitoring Probes have to perform local test on the gHN
+
 
|}
 
|}
 
<pre>
 
infrastructure = gcube
 
startScopes = devsec,testing
 
</pre>
 
 
For an in-depth coverage of scope and scope-related parameters (infrastructure and startScopes) see the [[Scope_Management|Developer Guide]].
 
  
 
=== Configuring Logging ===
 
=== Configuring Logging ===

Revision as of 16:09, 9 October 2013

Introduction

As very well described in the dedicated gCube developer guide section, SmartGears is a set of Java libraries that turn Servlet-based containers and applications into gCube resources in a transparent way.

In order to achieve the goal of Software-as-resource and Container-as-resource infrastructure administrators and site-managers have been equipped with a bundle for the installation and management of the software needed to :

  • enable any servlet-based container as a resource on the infrastructure
  • enable any application running on the container as a resource on the infrastructure.

Prerequisites

The following are prerequisite for the installation of a SmartGears gHN:

  • J2SE 1.6 update 4 SDK or greater. Sun's reference implementation is recommended, but versions from IBM, HP, or BEA should work equally well.
  • GNU tar to install gCore from archived distributions.

The following are pre-requisites for the operation of gHN in any infrastructure:

  • A static IP address and preferably a DNS name.

Installation

The SmartGears gHN is available as archived distribution from the gCube Nexus Maven repository. ( link). Once downloaded the distribution can be expanded in any location of the filesystem. The distribution contains all the relevant files and in particular the install script, which performs the real installation of SmartGears within the servlet container.

In order to install the distribution a new folder should be created to store the gHN state. This folder should be also configured on the environment as GHN_HOME.

usage:  install [-d <distro directory>] -s tomcat|<lib directory> -a [app directory] [-g gHN directory] [-x|-h] 

  <distro directory> = the directory with the distribution of SmartGears XXX.
                       By default, this is the parent directory of this script.
  <lib directory>    = the directory with libraries shared by all applications in the target container.
  <app directory>    = the directory with all the applications in the target container.
  <gHN directory>    = the directory with logs and files related to the gCube Hosting Node.
                       By default, this is value of the GHN_HOME env var.
  tomcat             = Sets <lib directory> and <app directory> for a target Tomcat container.
  x                  = dry run.
  h                  = shows this help.

The following parameters have to be provided to the script for each servlet container except for Tomcat:

  • -a <app directory> : is the folder where applications are stored in the container
  • -s <lib directory> : is the folder where the shared libraries of the container are stored.

in the case of Tomcat container the option -s tomcat will automatically do the installation ( env var CATALINA_HOME should be correctly set)

The other optional parameters are meant to :

  • -s <distro directory>: specifies the folder where the Smargears distribution has been downloaded.
  • -g <gHN directory> : specify the gHN folder if not provided trough GHN_HOME var
  • -x : perform a dry run

Upgrade

In order to upgrade an existing SmartGears gHN installation the download script has been provided to contact the gCube Nexus Repository. The script is available from $GHN_HOME/scipts/download and it has this options:

usage:  download [-v <version>] [-o <folder>] [-s|-h] 

  <version>          = the version to download.
                     = By default, this is the latest known version.
  s                  = download a snapshot version.
  <folder>           = download to specific folder.
  h                  = shows this help.

Clean

The SmartGears gHN serialises locally on the disk the information published on the gCube Information system ( gHN and RunningInstance profiles), in particular:

  • gHN profile is serialised in the file $GHN_HOME/state'/ghn.xml
  • Apps profiles are serialised in the file $GHN_HOME/state/<app-name>/endpoint.xml

scripts are available in order to clean the state of the gHN ( both gHN and single app) and it quite useful in the case of reinstallation or development.

Clean gHN state

The script $GHN_HOME/scripts/clean-container-state can be used in order to clean the whole gHN state:

usage:  clean-container-state  [-g <ghn_home>] [-h] 

  <ghn_home>   = the gHN directory.
  h             = shows this help.

Clean App state

The script $GHN_HOME/scripts/clean-app-state can be executed in order to clean the state of a single app:

usage:  clean-app-state -a <app_name> [-g <ghn_home>] [-h] 

  <app-name>    = the application name whose state has to be cleaned
  <ghn_home>    = the gHN directory.
  h             = shows this help.

Configuration

Configuring the Environment

Configuring the gHN

The configuration of the SmartGears gHN that relates to its operation within the infrastructure and can be found in $GHN_HOME/container.xml.

The following properties are available for configuration:

mode either offline or online depending on whether the gHN does or does not publish information in the infrastructure.
hostname the hostname of the container to be published on the infrastructure.
port the port of the container to be published on the infrastructure.
infrastructure the name of the infrastructure in which the gHN operates. (e.g. gcube, d4science,...).
vo the VO[s] that the gHN joins.
persistence an alternative folder where the gHN and apps state are maintained.
property an arbitrary property with name/value attributes
country the two-character ISO code of the Country where the gHN is located.
location the name of the location.
publication-frequency how often the gHN has to refresh its profile on the IS (in seconds).

Configuring Logging

Please refer to the SmartGears development guide section on logging [1]

Supporting resource encryption/decryption

If the gHN is foreseen to manage gCube encrypted resources, the AES symmetric key has to be downloaded and stored in the $GHN_HOME/ folder.