IDE

From DOC

Jump to: navigation, search

Automated Installation For a First Install

Set up the Eclipse environment as specified in the standard installation instructions. In order to use the automated features, you need to carry out a few extra steps.

The first is to ensure that the ldapadd command has been used at least once with the tolvenusers.ldif during set up, as specified in the installation documentation. The ldap users must be in ldap in order to use the configPhase commands.

The second and most important configuration property to deal with, is the one asked for during the normal installation process i.e. the location to the tolven-config directory. The property used to set this directory is:

tolvenConfig.location

You will find this used in the tolven/build.xml file as ${tolvenConfig.location}. The best to set this property is in a customized build.properties file. Create a file called ant-build.propeties in the tolven/resources directory, where it will be co-located with the ant-build-default.properties. Any default properties that you wish to override, should be placed in the custom ant-build.properties file e.g.

tolvenConfig.location=c:/tolven-config

The automated installer target is located in the tolven/build.xml and can now make use of this property for the installation:

clean-build-create-run-automated-installer

This will clean the workspace of all previously compiled classes and jars. If you wish to keep those around (gambling that you know that nothing is out of sync), you can use the following target which is much quicker:

build-create-run-automated-installer

One trap here is that if you revert your source code to a previous version, then the source code is now older than the left over class files, and that means the latter will hang around causing you issues.

If this is the first time you have run the target, it will create the tolven-config directory where you specified, and it will also create a tolven installation directory based on the timestamp at which the installation is executed e.g:

c:/tolven20090415014402

Now the installation is complete, without any further intervention, but no configuration has yet been carried out e.g. the tolven-config.properties file will still need the location of the database and ldap directories, as well as other required properties.

In order to automate the setting of the properties as well, you need to create a custom properties XML file (which corresponds in format to that of the tolven-config.properties.xml file). It is a simple file. Here is a simple example:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
	<entry key="appserverId">jboss</entry>
	<entry key="database.credential.directory">c:/PostgreSQL/8.3/data</entry>
	<entry key="databaseId">postgresql1</entry>
	<entry key="ldap.credential.directory">c:/OpenLDAP</entry>
	<entry key="ldapId">openldap1</entry>
	<entry key="promptFor.appserver.password">false</entry>
</properties>

For convenience you can co-locate this with the ant-build.properties file, but its location is up to you. Its location will have to be set in the ant-build.properties file anyway as follows, for example:</p>

custom.tolven-config.properties=${tolven.home}/tolven/resources/custom-tolven-config.properties.xml

Now, whenever you execute the installer command, it will also set those properties in the tolven-config/tolven-config.properties.xml file. Any of the properties in the latter file can be set, or overridden this way.

ConfigPhases

After installation, you can go to manual configuration using the Configuration Manager GUI, or you can also use automated targets which do the same thing. There are basically three commands to arrive at a working application server. The first command is executed from the installation directory:

./tolvenClient.sh configPhase1 -conf /usr/local/tolven-config

The configPhase1 command basically takes you up to the point where you have deployed the tolven.ear to the deployment directory. It will generate any credentials, if necessary and deploy them, as well as generate and deploy all application server files. At this point you can simply (re)start the database and ldap servers. If you have not done so, you will have to manually create the tolven users in ldap, as per the main installation instructions.

Now you should be ready for the next step:

./tolvenClient.sh configPhase2 -conf /usr/local/tolven-config

configPhase2 will create database schemas. It will also create the mdbuser in ldap. If these exist, it will simply say so and no harm is done.

Finally, if you have copied the examples to your tolven-config directory, you start JBoss and execute the final command:

./tolvenClient.sh configPhase3 -conf /usr/local/tolven-config

This will begin the upload of data, and even during upload, you will be able to access the application server.

Automated Installation For an Upgrade

The automated upgrade process is fairly straight forward so long as you bare in mind that it will not damage the already existing tolven-config directory, but will use its contents to reconfigure the new installation to match that of the old, barring intentional changes.

Run the automated installer target as described in the previous section. This will automatically pick you current tolven-config as being the configuration directory, and as before it will create a new timestamped installation directory.

Since the tolven-config is the same as before, the configPhase1 command will skip creating and deploying credentials, but will generate and deploy the application server files to the new installation. Make sure you execute the configPhase1 command from the new installation and not the old. You can then follow the normal procedure and move onto configPhase2 and then configPhase3. Your system will then be upgraded, and ready to go.

Personal tools