,           ,
 /             \ 
((__-^^-,-^^-__))
 `-_---' `---_-'
  `--|o` 'o|--'     TWiki . EBR
     \  `  /
      ): :(
      :o_o:
       "-"
::: CaiSoftware :::
 
  TWiki . EBR . CaiSoftware # Edit # Attach # Diffs # Printable # Skin # More :::
Logged in as VladimirAbramychev

Main

      EBR
      LatestNews
      EbrCalendar
      OpenIssues
      TodoItems
      WebTopicList
      WebSearch
      WebChanges
      WebIndex
      WebNotify
      WebStatistics

          CAI FS

              CUI FS

                  GTEAM

                      Help FS

                          Orchid

                              TWiki System

                                  Table Of Contents

                                  IDEA! Anyone who has installed the first version of the CAI will need to update the database slightly. The SQL for this is:

                                  alter table accounts change account_type account_type varchar(30);

                                  Introduction

                                  The CommonAdminInterface, or CAI, provides a Web interface allowing to create groups, accounts and users for the CAI.

                                  The CAI is available as a Java Servlet web application. It is available to download and install locally for EbrPartners that wish to offer the service to a set of customers.

                                  Requirements

                                  • a network / systems administrator to install the application. Familiarity with the installation of Java™ Servlets would be highly beneficial.
                                  • if modifications to the CAI are to be made, a developer with XML/XSLT/HTML skills is desirable
                                  • a computer system connected to the Internet (with specific ports open to the EBR network) capable of running Java™ 1.4.X
                                  • a valid and operational EBR Core Software LD/ND Node. The CAI communicates with the EBR network entirely by sending EBR MIME messages via the LD/ND Node.
                                  • a Java™ Servlet container that meets the Sun Java™ Servlet Specification level 2.3. A comprehensive list of leading Java™ Servlet containers can be found here
                                  • a relational database management system and corresponding Java™ JDBC driver

                                  Installation

                                  • This section assumes you are using Apache Tomcat v4.1.18. If you are using a different Java™ Servlet container then the installation may differ.

                                  • Download the CAI distribution from the AdminSite. It is packaged as a Zip file and will have a filename of the form cai_VX_XXX.zip, where the X's are the current version.
                                  • Extract the CAI distribution and move the cai directory (which is now a folder created from extracting the zip) to a convenient location, such that it can be accessed by your servlet container. For the purposes of the remainder of this document, this folder shall be referred to as $CAI_HOME.

                                  Configuration

                                  Edit Configuration File

                                  Under this cai directory there is a web.xml ($CAI_HOME/WEB-INF/web.xml) file which needs to be edited to suit your needs (see web.xml for detailed instructions).

                                  Register The Servlet

                                  For the CAI to run correctly it must be registered with your servlet container. Please refer to your vendors documentation on how to do this. We will continue to focus on Apache Tomcat. With Apache Tomcat, we need to edit the servers configuration file $CATALINA_HOME/conf/server.xml, where $CATALINA_HOME refers to the installation directory of Apache Tomcat. We must then add a new 'Context' to the localhost Host element. The path attribute specifies the url of the cai relative to the server. The docBase represents the absolute path to the directory for the CAI.

                                  <Host name="localhost" ...>
                                  ...
                                  ...
                                  <Context path="/MyCAIInstallation" docBase="$CAI_HOME/cai"/>
                                  ...
                                  ...
                                  </Context>
                                  </Host>

                                  Register The Access Controller

                                  From the CuiMilestoneSix release the CUI and CAI require an additional Environment entry to be present in the Context section of the server.xml file named EbrAccessControllerClass.

                                  <Environment name="EbrAccessControllerClass" type="java.lang.String" value="com.orctel.ebr.network.EbrDefaultAccessController" override="false"/>

                                  This entry points to the class that will be in charge of the CUI/CAI interaction with EBR orders, users and accounts. By default this should be set to to the value shown above. It is only to be altered by advanced countries who want to override the default behaviour, perhaps to hook up their own account system implementation via the AbstractClasses.

                                  ALERT! - WARNING: - this entry must appear. If it is not present the CUI/CAI will not start.

                                  Register JNDI DataSource

                                  ALERT! - WARNING: Make sure the CUI and CAI use the same database resources

                                  The CUI/CAI webapp requires a database in order to operate, however all you as the installer need to do is provide a resource reference. Your servlet container should have detailed information on how to create this.

                                  Apache Tomcat uses a Resource tag to register the object with a name and type so that the server knows how to handle a request for the object. The name must be set to jdbc/ebrusr, the type may be any class implementing the javax.sql.DataSource interface.

                                  The ResourceParams tag is used to configure parameters required for the associated Resource (NOTE: the corresponding name attributes). Here we can configure connection information for the DataSource, and also configure additional information such as the maximum number of connections allowed.

                                  <Host name="localhost" ...>
                                  ...
                                  ...
                                  ...
                                  <Context path="/MyCUIInstallation" docBase="$CUI_HOME/cui.war"/>
                                  <Environment name="cuiConfigFile" type="java.lang.String" value="file://$CUI_HOME/config/cuiconfig.xml" 
                                  override="false"/>
                                  
                                  <!--  This registers a local database for usage by the CUI.
                                  The resource name must be set to jdbc/ebrusr and 
                                  sufficient information must be given to enable the 
                                  creation of a connection to the database.
                                  -->
                                  <Resource name="jdbc/ebrusr" auth="Container" type="javax.sql.DataSource"/>
                                  <ResourceParams name="jdbc/ebrusr">
                                  <parameter>
                                  <name>factory</name>
                                  <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
                                  </parameter>
                                  <parameter>
                                  <name>username</name>
                                  <value>YOUR.DS.USERNAME</value>
                                  </parameter>
                                  <parameter>
                                  <name>password</name>
                                  <value>YOUR.DS.PASSWORD</value>
                                  </parameter>
                                  <!-- Class name for mm.mysql JDBC driver -->
                                  <parameter>
                                  <name>driverClassName</name>
                                  <value>YOUR.DS.JDBCDRIVER</value>
                                  </parameter>
                                  <!--   The JDBC connection url for connecting to your MySQL dB.
                                  The autoReconnect=true argument to the url makes sure that the
                                  mm.mysql JDBC Driver will automatically reconnect if mysqld closed the
                                  connection.  mysqld by default closes idle connections after 8 hours.
                                  -->
                                  <parameter>
                                  <name>url</name>
                                  <value>YOUR.DS.URL</value>
                                  </parameter>
                                  </ResourceParams>        
                                  </Context>
                                  </Host>

                                  ALERT! - Please ensure that the driver registered for the datasource can be found on the CLASSPATH for the webapp (in Apache Tomcat this should be placed into $CATALINA_HOME/common/lib. There are no drivers included within the CUI/CAI distribution.

                                  TIP - NOTE: Don't forget to include the 'url' making sure you add the name of the database you intend to install the CUI tables into.

                                  Creating the Prices Directory

                                  We need a folder which will hold all new prices configuration files. This can be placed anywhere but it is recommended you put it in the CUI config directory. So to do this create a directory called prices or something similar and put it in a convenient place. We also need to edit the $CAI_HOME/WEB-INF/web.xml to point to where this new directory is, eg:

                                  <init-param>
                                  <param-name>price-folder</param-name>
                                  <param-value>/home/ebruser/config/prices</param-value>
                                  </init-param>

                                  IDEA! Make sure the directory can be written to by the user that is running the servlet.

                                  You are now ready to test your CAI installation.

                                  Restart the container, any errors will result in a Servlet exception being thrown making th CAI webapp unavailable. Check both the server log and CAI log ($CAI_HOME/logs/cai.log) for details.

                                  Congratulations! You now have now installed the CAI!

                                  This should be accessible via: http://yourhost:your/ port/MyCAIInstallation/

                                  Creating Groups, Users And Accounts

                                  Once installed, you can create EbrAccounts and EbrUsers.

                                  The CUI uses the concept of users and accounts. All transactions are charged to an account, these accounts can be shared between users to enable the concept of groups of users.

                                  Available Functions

                                  • Create Ebr account

                                  • Create CUI user and attach to existing Ebr account

                                  • Search, View & Update Ebr account details

                                  • Search, View & Update CUI user details

                                  Quick Guide

                                  The main screens of the CAI are described below.

                                  Login Screen

                                  The first screen presented to you will be the CaiLoginScreen, where you will be prompted for your CAI username and password. (You should have changed this from the default in the web.xml file).

                                  Proceeding a successful login, you are presented with the CaiCreateEbrAccountScreen.

                                  Create EBR Account Screen

                                  This screen enables you to quickly add a new EBR account. An account id is generated for this account and is used to identify the account in the entire system.

                                  Follow the onscreen instructions to create a new account, on the results screen you will be able to attach a CUI user to the account using the CaiCreateCuiUserScreen.

                                  Create CUI User Screen

                                  This screen enables you to create a new CUI user. The user is created with a login id (username and password), which are requested on the frontpage of the CUI application.

                                  The user is attached to an EBR account, thus all transactions are verified against the account. If the account does not have any credit, then none of the associate users will be able to request chargeable services.

                                  When createing a new CUI user it is possible to set initial values for the users' preferences:

                                  Account Privilege If set to true the user may edit the stored account details, these details will be used for invoice generation
                                  Default Country This is the country that will be selected by default when the user accesses the system.
                                  Show Prices? If true, then the user will see cost labels for items they can select.
                                  Date Format This determines the format that dates will be displayed to users in.
                                  Language This is the default language to be used for the user.

                                  Searching With The CAI

                                  It is possible to search for EBR accounts and CUI users by accessing the search links in the left hand side menu. When mulitple matches are found a list of results will be displayed. If only one match is found, you wil be forwarded to the Update EBR Account/CUI user page.

                                  After searching for an item it is possible for the CAI user to update details associated with the item.

                                  For example, the CAI user may choose to extend the credit limit of an EBR Account.


                                  Your post will appear before this form in chronological order (newest at bottom)

                                  # Edit menu  


                                  Topic revision r1.9 - 28 Apr 2004 - 13:36 GMT - MarkEarlam
                                  Topic parents: WebHome > SoftwareInstallation
                                  Copyright © 1999-2003 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
                                  Ideas, requests, problems regarding TWiki? Send feedback.