Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added additional information on the windows machine setup

...

  • Network connection to a running instance of ActiveMQ broker
  • directory with write access for the log files
  • Proper config files

For a quick setup guide, please refer to the #Setup section below.

ActiveMQ Broker

The production instance of the ActiveMQ broker for DCT runs on joe.lowell.edu. It should only be connected to while trying to operate a real system instrument at DCTHJ. For testing one should try to connect to sabzi jumar.lowell.edu.

The connection URL for the ActiveMQ Broker is specified in jndi.properties file for the appropriate product. Please refer to the section below for more details.Below is the production version of the file for LMI:

Code Block
pl
pl
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
 
# use the following property to configure the default connector
java.naming.provider.url=failover://(tcp://joe.lowell.edu:61616)?startupMaxReconnectAttempts=1&initialReconnectDelay=1

# use the following property to embed a broker inside this JVM
useEmbeddedBroker=true

# use the following property to specify the JNDI name the connection factory
# should appear as.
connectionFactoryNames=connectionFactory, queueConnectionFactory, topicConnectionFactry

#my property to disable persistence
disablePersistence=true

# machine name where lois is running.
loisMachineName=lemi

Log Files

A LOUI product will write to one or more log files during the operation. The location and level of logging is specified in log4j.properties file for the appropriate product. The log files are rotated automatically daily and properly labeled. The timestamp for the log statements is in UT but the log rotation happens based on local time at midnight.

Config Files

Setup

Application

Configuration Path

Required Files

Log File Path

ActiveMQ TCS

/opt/LOUI/activemqTCS/

instrumentConfiguration.xml
jndi.properties

?

joe

/opt/LOUI/joe/

instrumentConfiguration.xml
jndi.properties
log4j.properties

/var/log/LOUI/joe/

joeClient

/opt/LOUI/joe/

instrumentConfiguration.xml
jndi.properties
log4j.properties

/var/log/LOUI/joe/

guider (gcs)

/opt/LOUI/gwaves/

instrumentConfiguration.xml
jndi.properties
CameraConfiguration.xml

?

wavefront sensor (wfs)

/opt/LOUI/gwaves/

instrumentConfiguration.xml
jndi.properties
CameraConfiguration.xml

?

hipoBlue

/opt/LOUI/hipo/

instrumentConfiguration.xml
jndi.properties
CameraConfiguration.xml

?

hipoRed

/opt/LOUI/hipo/

instrumentConfiguration.xml
jndi.properties
CameraConfiguration.xml

?

nasa42

/opt/LOUI/nasa42/

instrumentConfiguration.xml
jndi.properties
CameraConfiguration.xml

?

By default, the main log file for each application is app.log and they are located under /var/log/LOUI/ directory:

Code Block
/var/log/LOUI/
├── cat
├── gwaves
├── joe
├── joeClient
├── lmi
└── observerTargetlist

6 directories

Unless there is a very good reason, log4j.properties should not be modified and default values should be used.

Config Files

All the config files for the LOUI applications should be in the proper directory under /opt/LOUI/ directory. This path is built into the applications and has to exist on the installation computer:

Code Block
/opt/LOUI/
├── MasterInstrumentConfiguration.xml
├── activemqTCS
│   ├── instrumentConfiguration.xml
│   └── jndi.properties
├── cat
│   ├── CubeGeometry.xml
│   ├── jndi.properties
│   └── log4j.properties
├── gwaves
│   ├── CameraConfiguration_GDR.xml
│   ├── CameraConfiguration_WFS.xml
│   ├── DefaultUserButtonScripts_GDR.tcl
│   ├── DefaultUserButtonScripts_WFS.tcl
│   ├── Jndi_GDR.properties
│   ├── Jndi_WFS.properties
│   ├── log4j_GDR.properties
│   └── log4j_WFS.properties
├── hipo
│   ├── CameraConfigurationBlue.xml
│   ├── CameraConfigurationRed.xml
│   ├── instrumentConfigurationBlue.xml
│   ├── instrumentConfigurationRed.xml
│   ├── jndiBlue.properties
│   ├── jndiMCCS.properties
│   └── jndiRed.properties
├── joe
│   ├── jndi.properties
│   └── log4j.properties
├── joeClient
│   ├── jndi.properties
│   └── log4j.properties
├── lmi
│   ├── CameraConfiguration.xml
│   ├── DefaultUserButtonScripts.tcl
│   ├── MasterFilterListConfiguration.xml
│   ├── jndi.properties
│   └── log4j.properties
├── nasa42
│   ├── instrumentConfiguration.xml
│   └── jndi.properties
├── nihts
│   ├── CameraConfiguration.xml
│   ├── jndi.properties
│   └── log4j.properties
└── observerTargetlist
    ├── jndi.properties
    └── log4j.properties
10 directories, 37 files

The config files are either xml or java property files. There is main config file that is used by most applications /opt/LOUI/MasterInstrumentConfiguration.xml. Each application's specific configuration is under a separate subdirectory and the names of these subdirectories cannot be changed. Depending on the application, there are 2 or 3 config files:

  • CameraConfiguration.xml
    Contains the default values for different modes of operation of a CCD camera
  • jndi.properties
    contains parameters used for connecting to the ActiveMQ broker and/or database
  • log4j.properties
    contains the parameters for log4j framework such as log file location, logging levels, and rotation schedule

Setup
Anchor
Setup
Setup

Here are the steps for the first time installation of a LOUI application:

  1. Create the log file directory
  2. Copy the appropriate config files into the proper location
  3. Copy the application (executable code) into the relevant location for your OS (e.g. /Applications folder for Mac OS X)

Log File Directory

The easiest thing is to create the /var/log/LOUI directory and make it world writable. This way the application can be executed from multiple user accounts on the same machine.

The safer but more difficult way is to set up an Access Control List for the /var/log/LOUI directory.

The logging frame work will rotate the files indefinitely so it is up to the user to delete or archive the old log files.

Note

It is possible to change the names and location of the log files for the applications by editing the log4j.properties file. It is recommended not to change these values unless there is a very good reason.

Configuration Files

As explained earlier and shown above, the location and names of configuration files are not subject to change. The easiest Easiest way to set up the configuration environment is to checkout the whole tree structure .

...

(dev & prod) from the source code repository into a user selected location and use a symbolic link from /opt/LOUI to either dev or prod versions depending on usage.

Info

We use subversion for source control at Lowell. Most operating systems have built in command line client for subversion as part of their development environment. There are also good subversion open source or commercial GUI clients for all major operating systems.

The following can be used as an example:

Code Block
bash
bash
$ mkdir ~/LOUI_Configuration
$ cd 

...

~/LOUI_Configuration
$ svn checkout svn://jumar.lowell.edu/LOUI_Configuration/trunk

...

 .
$ sudo mkdir /opt
$ sudo ln -s ~/LOUI_Configuration/dev LOUI

If the app is not pointing to the right broker, edit

...

the jndi.properties file for the appropriate applications and correct the connection URI to point to the proper broker.

Note

Using subversion is the ideal way to get the configuration files as these files change regularly both in content and format. In case a subversion client is not available, a copy of the

...

LOUI_Configuration directory can be downloaded from the archive location. Every attempt will be made to keep this copy current.

Application Product

The LOUI applications are created as stand alone products and they only need a JVM (version 6 or later) in order to run under the appropriate operating system. We can create products for Windows, Mac OS X, and Linux. The Mac OS X version is the recommended one to use.

The plan is to keep the most recent version of all the products on a network drive. For now it is on (login as guest)
mh-dct-archive-cifs:/RCP_Products/latest

 

 

Windows Additional Setup

 

In order to configure LOUI properly in windows, you need to follow some special steps.

Because LOUI is run mostly on mac machines, the configuration files are in different locations. You will need to set up a symbolic link that points LOUI to the windows file locations.

Symbolic links can be created by running a command line as an administrator. In your C:/ drive (or in whichever drive you've stored your workspace) create a folder named opt. Then, navigate to it in the command line, and type:

mklink LOUI <to workspace>\LOUI_Configuration\dev\

This should set LOUI to retrieve configuration files from the proper location.

 

You may also need to switch your clock to synchronize with lowell's. To do so, right-click your date and time and press Adjust Date and Time. Click the Internet Time tab, then "change settings". Change the time server to gps1.lowell.edu