- Standalone vs. multiple instancing
- automaIT server
- Apache Tomcat
- Testing installation
Standalone vs. multiple instancing
In some cases the installation of multiple automaIT server instances on one machine may be required to, for example, separate test and production environments or to separately manage hosts of several principals.
The following documentation describes an automaIT server installation prepared for multiple instancing. If just a single automaIT server should be installed, the specially marked sections for the second instance can be ignored.
Please read the System Requirements first. They provide a hint about supported software versions in the following server installation also including the requirements for automaIT agent and command line interface (CLI).
automaIT server should run on every Unix operating system fulfilling the software prerequisites.
Recommended operating systems are:
- SuSE Linux Enterprise Server (Version 11 SP2)
- Solaris (Version 11)
Supported are all Oracle compatible Java Runtime Environment (JRE) implementations in 64-bit starting at version 7.
|Java 5 64-bit||not supported|
Java 6 64-bit
Java 7 64-bit
|Java 8 64-bit||supported|
Apache Tomcat 6
|supported (≥ 6.0.18 recommended)|
Apache Tomcat 7
The underlying database for automaIT is PostgreSQL. It is available in most Linux distributions through the packet management and can alternatively be downloaded from www.postgresql.org.
|PostgreSQL 8||supported (≥ 8.3 recommended)|
The server is the central component of automaIT. It manages agents, plug-ins and logs and provides the user interface. All models for provisioning software are executed on the server and the resulting commands send to the agent.
The following table displays the absolutely minimum hardware requirements for automaIT server and a recommended size for a good startup with little resources. Keep in mind that the really needed hardware resources vary greatly in size, depending on the environment to manage.
|CPU||800 MHz||4.0 GHz|
|RAM||1 GB||2 GB|
It is strongly recommended to separate at least operating system and automaIT data into different devices. The volume size needed for the automaIT data depends on the number of jobs running each day (which increases the database size) and component resources to provision (which increases the space needed for the file repository). It is entirely possible to provision resources with a size of a few gigabytes.
Regarding the limits for filename length, file size and volume size all typical Linux file systems are supported except FAT and ReiserFS (version 3.5 and lower).
It's recommended to create at least two separated volumes, once again the file system sizing is just a recommendation (the minimum required disk space for automaIT is 250 MB):
|10 GB||Operating system, swap, ...|
|80 GB||automaIT data|
It's recommended to create a dedicated user for the automaIT server which will run the web server. To do so create a system user called
automait and a dedicated system group
automait as well.
If it doesn't exist yet create the installation directory
/opt/automait and make user
automait its owner.
The database server will be configured to store all its data inside a separate folder under
db. Again, it would be advisable to outsource
/opt/automait/db to a separate file system.
For some succeeding operations a locale is needed. Following command will provide all valid locale strings.
One can pick any ID from the output. Following commands regarding the database will be attributed with
en_GB.utf8 in this example.
initdb creates a new database instance and asks for a superuser password. All subsequent database commands will ask for that password.
The database instance(s) will be created with default settings. The port and the listen address need to be updated. Locate the file
postgresql.conf inside the database directory and adjust these two settings:
Naturally, each instance needs its own port. The value
listen_addresses means that requests on any network interface will be served.
Now that a new database was created it should be added to the startup scripts. In this case the standard startup script will be modified to point to the new location.
Therefore in file
/etc/sysconfig/postgresql the following line
needs to be replaced by
Now the new configuration of the startup scripts needs to be reloaded in order to start the new instance(s) of PostgreSQL.
Make sure that PostgreSQL will be started automatically at every system reboot:
This will install the init script for service postgresql (named through info field Provides in the script) in its default runlevels (here 3 and 5).
User and database
automaIT needs a user that has access to the database. For security reasons this user should only be used to access the automaIT database with least possible permissions. The password for the user needs to match the user password pair from JDBC configuration.
It is important to create the database with UTF-8 as encoding.
To test the setup simply log in to the command line interface of PostgreSQL. Exiting the command-line is done with
Apache Tomcat is used as application server providing the user interface. Binary distributions for Apache Tomcat Core 7 can be obtained from http://tomcat.apache.org/download-70.cgi. Please read the System Requirements for verified Tomcat versions. After successfully downloading the package it needs to be extracted to the automaIT folder and set up for the user
automait as the owner of the directory.
It is recommended to create a link
/usr/local/tomcat to the extracted directory (
/opt/automait/apache-tomcat-7.0.35 in this case). This makes it easier to change Tomcat version in the future. The following steps will refer to this link as
Using a single instance copy all files from
np-release-<VERSION>.zip/server-lib into the directory
To work properly automaIT server needs at least 512 MB of RAM. Depending on the number of concurrent users the value may be set much higher. For production usage it's recommended to reserve 1.5 GB of RAM for automaIT server. The following file needs to be placed at
The file needs to be executable as well.
SSL connection configuration
To secure the connection between the user and the web interface, SSL needs to be enabled. The configuration file
$CATALINA_BASE/conf/server.xml already contains a section for SSL secured connections ("Define a SSL HTTP/1.1 Connector on port 8443"). Usually this section is not activated (commented out). The following snippet activates SSL with a custom keystore for the SSL certificate on port 8443. The keystore will be named
https.server.keystore and stored in the directory
$CATALINA_BASE/certs in the next step.
The code snippet above is an example for a keystore containing only one private key which is not password encrypted. To use a key store containing several private keys add the parameter
keyAlias to the Connector configuration defining the alias of the key to use. To secure the private key itself (which should be not mixed up with the key store password) the parameter
keyPass is needed. Unfortunately this configuration parameter only works correctly in Tomcat 7.0.12 and above.
It is heavily advised to change the password for the keystore. To do so the value of the attribute
keystorePass needs to be adjusted. The standard keystore resides under
$HOME/.keystore which is the default save path for
keytool. The attribute
keystoreFile is used to point the server to an alternate keystore as defined in the following code snippet.
Generating the keystore,
keytool will prompt for two passwords. First one is to secure the key store (=
keystorePass) and should be always set. The second password secures the private key itself (=
keyPass) and should be left empty, especially when using a Tomcat version less than 7.0.12.
If no Apache Webserver with mod_jk is used in front of the Tomcat server the AJP-Connector on port 8009 can be removed resp. commented out. For further details regarding configuration please refer to the documentation of Apache Tomcat.
Enabling gzip compression
When working with huge data sets it is advisable to use gzip compression to minimize the transferred data (between web client and server).
The attribute compressionMinSize specifies the amount of data before compression is used and can can be adjusted. The following is an example of an SSL and gzip enabled connector.
To grant automaIT access to the database the corresponding settings need to be published via JNDI entries in Apache Tomcat. Following lines need to be inserted into
$CATALINA_BASE/conf/context.xml between the
password have to match the values defined in section before. The attribute
maxWait defines how long (in milliseconds) the pool waits to obtain a connection if all are taken before reporting an error.
-1 will wait an infinite time.
As last step the folder
file.repository.root needs to be created. It is advisable to outsource this folder to a separate file system.
To deploy automaIT to the application server the file
np-server.war has to be copied from
$CATALINA_BASE/webapps/automait.war. Apache Tomcat will extract the war file upon first startup and install the contained application.
Tomcat as system service
To easily start or stop the Tomcat instance create an init script like the following:
Install it resp. them in the runlevels to automatically startup on system reboot.
Congratulations, the installation procedure has been completed!
Start the database if not done yet and the the Tomcat instance.
Prove running of the instances using
ps. There should be results similar to the following for PostgreSQL:
And results like this for Tomcat:
Open a web browser and surf to
https://your.server.name:8443/automait to check if your automaIT instance is online.
The default login for automaIT is user admin with password admin. After logging in successfully the password has to be changed to something different.