Script Console

Installation procedure (Windows)

Script Console can be configured to run in different modes. Common scenarios are:

  1. standalone interactive console, connected to OTCS: mainly used for batch processing and administration tasks
  2. standalone script interpreter, connected to OTCS: mainly used for scheduling administration tasks
  3. standalone lightweight webserver (based on embedded application server), connected or not connected to OTCS
  4. web application deployed on external application server, connected or not connected to OTCS

This guide covers the standard installation procedure of the Content Script Console (standalone based on embedded application server) which allows for modes 1, 2 and 3 of the above list.

For alternative deployment scenarios, including deployment on an external application server, please make reference to AnswerModules Support Team and guides available through Support Portal.

  • Run the Script Console Installer and install the Script Console in your favourite location (this step should be executed by an user having local administrative privileges)

Environment variables

The Script Console installer will create for your convenience a couple of environment variables:

  • AMSC_CONFIG: the Script Console's configuration root folder
  • AMCS_RUNTIME: the Script Console's runtime root folder

Step-by-step procedure

The following screens will guide you through the Content Script Module Master Installer steps.

Action to take Installer's screen
Select “Next” when ready to start the installation.

this is the initial step if using the Module installer directly

Welcome
Acceptance of the end-user license agreement is mandatory.
Upon installation, a copy of the agreement will be available in: /license
license/EULA

Accepting the End User Agreement is mandatory to proceed with the installation. Select “Next” when ready.
EULA License Agreement
Licensing information for third-party software included in the release. Upon installation, a copy of the notice will be available in: /license
license/THIRD-PARTY

Accepting the End User Agreement is mandatory to proceed with the installation. Select “Next” when ready.
Third Party Licenses
Licensing information for extra third-party software included in the release. Upon installation, a copy of the notice will be available in: /license
license/THIRD-PARTY-EXTRA

Accepting the End User Agreement is mandatory to proceed with the installation. Select “Next” when ready.
Additional Third Party Licenses
Choose the location where the Script Console components will be installed.
Runtime includes all binary and libraries.
Example:
C:\AnswerModules\ContentScriptConsole_1.7.0\
Select “Next” when ready to proceed.
Install location
Pick the extension packages that will be included in your installation.
There are two different types of extensions that can be installed:
  • Content Script Extensions are extensions for the embedded Content Script Engine.
  • Script Console Extensions are components specifically targeted to Script Console
Extension packages selection
Follow the installation steps for each component to be installed. Installing
The unpacking of the module is complete.
Select “Finish” and return to the installation checklist to finalize the module setup.
Complete

  • Copy Content Server's libraries to the Script Console runtime

Some Content Script extension packages require two Java libraries that are specific to the target Content Server environment, and are not distributed with the module. The required library files are:

  • csapi.jar
  • service-api-10.X.XX.jar

and can be found in the web app located in:

  • %OTCS_HOME%\webservices\java\webapps\cws.war (on CS 16.X)
  • %OTCS_HOME%\webservices\java\webapps\cws.war (on CS 10.5.X)
  • %OTCS_HOME%\webservices\java\webapps\les-services.war (on CS 10.0)

To retrieve the files:

  • copy the file named XXX.war to a temporary folder
  • rename the file XXX.war in XXX.
  • extract the zip archive contents locate the files in the WEB-INF/lib folder

Once the files have been located, copy them to the folder: %AMSC_RUNTIME%\amlib

  • Perform basic configuration of the Script Console. The main configuration file is located in: %AMSC_CONFIG%/config/cs-console-systemConfiguration.xml
    Default configuration will be similar to the following:
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    <?xml version="1.0" encoding="UTF-8" ?>
      <config>
          <systems>
              <system id="TEST">
                  <name>Content Server TEST Environment</name>
                  <serverHost>localhost</serverHost>
                  <serverPort>2099</serverPort>
                  <local-repository-home>TEST</local-repository-home>
                  <local-repository-encoding>UTF-8</local-repository-encoding>
                  <otcs-repository-encoding>UTF-8</otcs-repository-encoding>         
                  <systemVars>
                      <systemVar name="img">/</systemVar>
                      <systemVar name="url"></systemVar
                      <systemVar name="csModulePath">
                  </systemVars>
                  <serviceVars>
                      <serviceVar service="core" name="amcs.core.httpProxyHostname" ></serviceVar>
                      <serviceVar service="core" name="amcs.core.httpProxyPort">80</serviceVar>
                      <serviceVar service="core" name="amcs.core.httpProxyUsername"></serviceVar>
                      <serviceVar service="core" name="amcs.core.httpProxyPassword"></serviceVar>
                      <serviceVar service="core" name="amcs.core.httpMaxConnPerRoute">20</serviceVar>
                      <serviceVar service="core" name="amcs.core.httpMaxConnTotal">50</serviceVar>
                      <serviceVar service="core" name="amcs.core.httpOTCSSchema">http</serviceVar>
                      <serviceVar service="core" name="amcs.core.tempFilePath">/tmp/</serviceVar>
                  </serviceVars>
                  <users></users>
              </system>
          </systems>
      </config>
    
    The base configuration allows to specify one or more “system” objects which represent OTCS instances to which the console will be able to connect.

How to setup your base configuration

The base configuration can be edited manually, or, alternatively, configuration parameters can be downloaded from a target Content Server instance. This feature comes particularly handy for installations that include multiple Content Script Extension Packages, each with its own configuration settings.

Configure Script Console

To perform configuration against an OTCS instance, run the Script Console in shell mode. To do so, open a Windows Commands Processor and move to the folder: %AMSC_RUNTIME%/bin which includes the Script Console's executables

  • Run the app-windows executable:

Run the app-windows executable

  • The following prompt should appear:

  • The default TEST system is selected. To list all available systems, use the system command with the list flag (-l, --list). E.g. system -l:

  • To create a new system (for example, LOCAL) use the system command with the add flag (-a, --add) followed by the ID of the new system. E.g. system -a LOCAL

    The shell will prompt for the required base values, such as hostname and port number.

Upon creating a new system, the Script Console will require a restart and will automatically shutdown.

  • Switch the active system to LOCAL using the system command with the system flag (-s) followed by the ID of the target system. E.g. system -s LOCAL

The active system indicator in the command prompt should now indicate LOCAL.

  • Login to the LOCAL system using the login command

The active system indicator in the command prompt should now turn green to indicate that the system is ONLINE

  • Synchronize ModuleSuite configuration parameters from the LOCAL system using the loadConfig command with the mode flag (-m, --mode) followed by the ALL value, and the verbose flag (-v, --verbose). E.g. loadConfig -m ALL -v The LOCAL system base configuration will be transfered and stored in the Script Console configuration file

  • The configuration is complete. Try a simple ls command to test the connection