WARNING: This web is not used anymore. Please use PDBService.DeployWebApps instead!
 

Deploy RLS App using automatic scripts

This document describes how to use a script that sets up the Oracle 9iAS and deploy the EDG Local Replica Catalogue (LRC) and EDG Replica Metadata Catalogue (RMC) web services (version 2.x).

Content :

  1. Getting the script files.
  2. Using the script
  3. Undeployment
  4. Troubleshooting
  5. Start-up scripts for iAS

1. Getting and prepare the script files

The scripts are in CERN's CVS system in lcg-orat1 project under the <font face="Courier New, Courier, mono">Applications/RLS/as-deployment directory.

  • Copy the scripts into an empty directory on the target machine with execution permissions.
  • Login as oracle in the target machine

It is assumed that Oracle9i Application Server Release 2 (9.0.3) is correctly configured and running normally . Also the $ORACLE_HOME environment variable should be set.


2. Using the script

The script to do a deployment is called 'deploy-webapps'. There are two different usage options:

  • App Only : If the container already exists for the VO (perhaps a <font face="Courier New, Courier, mono">undeploy-webapp had been carried out.) This only deploys the applications, into the configured container. In particular, no datasource configuration is done.
  • Full Deployment : this is the default - when there is no container for the VO, it deploys and configures the container, and then deploys the applications into it.

The usage is:

<font face="Courier New, Courier, mono">

$usage: ./deploy-webapps --version=VERSION --lxuser=USER --vo=VO
      [--lrc --lrcdbusername=DBUSERNAME --lrcdbpassword=DBPASSWORD]
      [--rmc --rmcdbusername=DBUSERNAME --rmcdbpassword=DBPASSWORD]
      [--db_host=DBHOSTNAME --sid=DBSID] [--stop] [--app_only]

Options:
      version         version to be deployed
      lxuser          your login in lxplus
      vo              name of the virtual organization (atlas, cms, ...)
      lrc             deploy LRC - local replica catalog
      lrcdbusername   username to connect database that hosts LRC
      lrcdbpassword   password to connect database that hosts LRC
      rmc             deploy RMC - replica metadata catalog
      rmcdbusername   username to connect database that hosts RMC
      rmcdbpassword   password to connect database that hosts RMC
      db_host         hostname of the database server of LRC and RMC
      sid             SID of the database of LRC and RMC
      stop            stop the server while deploying applications
      app_only        only adds new application to VO (does not
                      create container or data-sources)

Example (not following the standard username/password convention):
  ./deploy-webapps --version=2.0.2 --lxuser=manjo --vo=atlas
  --lrc --lrcdbusername=atlas1 --lrcdbpassword=atlasp1
  --rmc --rmcdbusername=atlasrmc --rmcdbpassword=atlasprmc
  --db_host=lxshare00d --sid=db1

Example (App only) :
  ./deploy-webapps --version=2.0.2 --lxuser=manjo --vo=atlas --lrc --rmc --app_only

2.5 Note:

  • The script will ask one or two times your password in lxplus in order to copy necessary files
  • It takes about 6 minutes to deploy both LRC and RMC applications

3. Undeployment

Scripts to do undeployment of web applications are provided as well. They not only do the undeployment from the container via dcmctl, but also remove log configuration files, data-source descriptions, VO container, etc... They are in the same directory as the deployment script (Applications/RLS/as-deployment).

The usage is:

<font face="Courier New, Courier, mono">

usage: ./undeploy-webapps --version=VERSION --vo=VO [--lrc] [--rmc] [--app_only]

Options:
      version         version to be deployed
      vo              name of the virtual organization (atlas, cms, ...)
      lrc             undeploy LRC - local replica catalog
      rmc             undeploy RMC - replica metadata catalog
      app_only        only removes web applications from VO (does not
                      remove container or data-sources)

Example (not following the standard username/password convention):
  ./undeploy-webapps --version=2.2.1 --vo=atlas --lrc --rmc

Example (App only) :
  ./undeploy-webapps --version=2.2.1 --vo=atlas --lrc --rmc --app_only


4. Troubleshooting

In case you get any "ADM-xxxxxx" error and the validation of the applications is not succeed, you might need to repair the Oracle9 iAS before running again the scripts.

3.1 Run dcmctl updateconfig -d -v

If you get an error, then probably there is an inconsistency between the repository and the configuration files. The better solution is to create consistency with all the existing containers. To get a list of existing containers run dcmctl getstate -v .

To have consistency among the containers, check the name of directories in: $ORACLE_HOME/j2ee/ and the file $ORACLE_HOME/opmn/conf/opmn.xml . They should have the same entries and ,if not, either:

  • add a directory and contents in $ORACLE_HOME/j2ee/ by copy the contens of other one.
  • add an oc4j entry with the name of the missing container in the $ORACLE_HOME/opmn/conf/opmn.xml

After this, run again the dcmctl updateconfig -d -v command and hopefully the error is corrected. Then you can make delete the container (as is not correctly configured) as explained in step 3.2 and install again.

If you don't get an error, then the HTTP Server should be stopped. To start it, run dcmctl start -ct ohs and try the validation again.

3.2 Miscellaneous operations

In this section it' s listed a set of commands that can be used to correct the server after a problem:

  • Stop everything: dcmctl stop and then opmnctl stopall
  • Start only HTTP Server: dcmctl start -ct ohs
  • Start only one container: dcmctl start -co <CONTAINERNAME>
  • Get the state of containers: dcmctl getstate -v (should be the Sync Status = True)
  • Start/Stop Enterprise Manager: emctl start / emctl stop
  • Check if iAS is completely down: ps aux and should not be any process java, opmn or httpd. Use sudo killall -9 <processtype> to kill them if with dcmctl and opmnctl doesn't work.

Start Up scripts for iAS

This note describes the scripts for automatic startup and shutdown for iAS and its VO containers in the framework of GDM services (RLS & RMC). Usage

The scripts are part of the OS 'init' procedure and as such executed on e.g. every system startup/shutdown/reboot. The may also be executed manually by a operating system user with root privileges.

/etc/rc.d/init.d/oracle_ias {start|stop|restart}

This scripts starts/stops the iAS EM and HTTP server and reads the VO containers to startup/shutdown via /etc/iastab. /etc/iastab

This configuration file contains one line per VO: :<Y|N> e.g.

home:N alice:N atlas:Y cms:Y lhcb:N

and controls the iAS OC4J containers which are started/stopped by oracle_ias. After editing this file the OS service has to be restarted.

The EM part is handled by to wrapper scripts to `emctl', oem_start.sh and oem_stop.sh which are located in ~oracle/scripts, whereas the HTTP and containers are controlled via 'dcmctl' in oracle_ias itself. Installation

The scripts will be automatically installed and configured by the IT/DB Oracle iAS deploy scripts for the RLS/RMC services. Currently they have to be installed manually.

All the files are located in ~oracle/scripts. To configure and install them, edit the local file iastab to enable the containers for the particular iAS, enter the 'ias_admin' password in the file ias_admin and execute install.sh. This installs all necessary files in /etc and /etc/rc.d/init.d and activates the oracle_ias service in the different OS runlevels via 'chkconfig'.

Note: Make sure the oracle OS user has the following environment variables correctly defined at login:

ORACLE_HOME PATH includes ORACLE_HOME/bin and ORACLE_HOME/dcm/bin Files

The set of scripts consists of the following files in ~oracle/scripts/:

oracle_ias oem_start.sh oem_stop.sh iastab ias_admin install.sh

where the following files are copied to /etc by the install script:

/etc/iastab /etc/rc.d/init.d/oracle_ias To be done

The automatic installation and configuration of the scripts and configuration files need to built in the IT/DB RLS/RMC iAS deploy scripts.

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r2 - 2005-12-07 - unknown
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    PSSGroup All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback