Version 7 (modified by ibaldin, 9 years ago)

--

Best practices for setting up a distributed production environment

Introduction

Setting up a production ORCA configuration requires careful and meticulous approach to avoid common problems. This document attempts to summarize best practices used at RENCI for deploying ORCA.

Prerequisites

Software prerequisites

Build ORCA from source

Understanding container configuration: ORCA_HOME, ORCA_LOCAL, and all that

Actor configuration

Preparation

Preparing the infrastructure

  1. You must decide and document the topology of the ORCA actors in the future deployment - how many Tomcat containers you will have, which hosts they will be located on and which actors will be deployed in which container.
  2. Setup tomcat on each of the hosts. The canonical way, in which RENCI sets up ORCA is to have $ORCA_HOME=/opt/orca on each of the deployment hosts. ORCA-modified tomcat is installed under $ORCA_HOME/tomcat and $ORCA_HOME/tomcat/start.sh and $ORCA_HOME/tomcat/stop.sh scripts are modified to reflect the $ORCA_HOME setting by prepending them with
    export ORCA_HOME=/opt/orca
    
  3. MySQL database on each of the hosts must be initialized with the schema and initial data. Loading inventory files is optional.
  4. Verify that tomcat starts and stops properly without ORCA

Preparing the configuration

  1. Build ORCA as usual
    $ cd $ORCA_SRC
    $ mvn install
    
  2. Prepare the directory structure with configuration files on the build host. Basically for each host with a container you should have a separate copy of $ORCA_SRC/webapp (or $ORCA_SRC/webapp2, if present). One way to do this:
    $ cd $HOME
    $ mkdir host1 host2 host3
    $ cd $ORCA_SRC/webapp2
    $ tar -cf - . | tar -xf - -C $HOME/host1
    $ tar -cf - . | tar -xf - -C $HOME/host2
    $ tar -cf - . | tar -xf - -C $HOME/host3
    
  3. For each host, generate a new container GUID. This can be done in a number of ways
  4. $ORCA_HOME should also contain

The deployment can use a single source tree located on the machine, where you build ORCA, which has Java, Ant and Maven. The hosts with Tomcat containers should have the same version of Java as is used on the build machine.

Attachments