Switch branches/tags
Find file
Fetching contributors…
Cannot retrieve contributors at this time
396 lines (254 sloc) 12.6 KB
Cloud Sidekick Cato
Third party open source packages required for the base install:
MySQL 5.1+, Tcl >= 8.5
Third party open source packages required for the web install:
Apache 2, mod_mono
Third party open source packages required for the services install:
Tcl >= 8.5, mysqltcl, TclCurl, Tcl tls, MySQL client, Tdom, Tcllib, Expect and
TclOO if Tcl version 8.5 is used.
Optional components:
FreeTDS, tcltds, Oracle client, OraTcl
Base Install
These installation instructions cover installing Cato on a single linux
machine with web, database and services residing under the same home
directory. Other installation options such as a multiple server install
are possible and may be recommended under different circumstances and will
be covered in future revisions of this document.
1. If installing Cato from binaries prebuilt for your linux distribution
and architecture, extract from the tar file into an application directory such
as /opt/cato.
Note: you will need write privileges in the target directory.
tar xvzf <cato_tar_file>.tar.gz -C /opt
2. If installing Cato from source, first make sure to perform the build
instructions located in the web and services directories. After the build
processes have been completed, run the install script located in the source
root. This install script will copy the appropriate files from the source
directories to the target directory.
Note: you will need write privileges in the target directory.
You may need to use sudo to run the install script.
cd <cato source directory>
./ [-s] [-t targetpath] [-c component (web|service|all)
or for interactive installation:
NOTE: If sudo was used to run the install script, some of the instructions below
may require sudo to as well.
3. With the binaries in the new cato home, the next step is to create and
populate the database. Switch to the cato home directory and use the MySql
command line tool to create the database and run the following scripts.
cd /opt/cato
If MySQL is not installed, install it using the following for Debian / Ubuntu
NOTE: MySQL 5.1 or higher is required for Cato. You will be prompted for the
database root password. Make sure to remember this for later steps.
sudo apt-get install mysql-server
Create the database, where username is a database user with CREATE and GRANT
privileges (typically root).
mysqladmin -u root -p create cato
mysql -u root -p
At the MySQL prompt (change password to something appropriate):
NOTE: change the password value below!
LOCK TABLES, CREATE TEMPORARY TABLES ON `cato`.* TO 'cato'@'localhost' IDENTIFIED BY 'password';
3. Install tcl, required for encrypting the conf file entries in later steps.
sudo apt-get install tcl8.5 tcl8.5-dev
4. Now setup the configuration file that will allow the web and services
to connect to the database. Make a copy of the default conf file and edit
with your favorite tool.
NOTE: sudo may be required for the following commands if sudo was used to install
cp conf/default.cato.conf conf/cato.conf
vi conf/cato.conf
Change the database parameter values as appropriate (skip the encryption
key and password for now). Save and quit.
The database password and encryption key values will themselves need to
be stored in the conf file encrypted.
Using the setup_conf script create the encrypted versions of these values.
This script prompts for the encryption key and database password and updates
the cato.conf file. It also encrypts the default application admin password
which will be used to login to the user interface.
NOTE: sudo may be required for the following commands if sudo was used to install
Verify that the encrypted values where saved in data load sql file. The value
#ADMINPASSWORD# should be replaced with a encrypted password value on the first
two lines.
head -n2 conf/data/cato_data.sql
Next verify that the cato.conf file was updated.
grep "^key" conf/cato.conf
grep "^password" conf/cato.conf
5. Run the following commands to create and populate the database tables.
Use the super user and password.
mysql -u root -p cato < ./conf/data/cato_ddl.sql
mysql -u root -p cato < ./conf/data/cato_data.sql
6. Proceed with the web install instructions below.
Web Install
The following instructions are specific to Debian / Ubuntu linux and cover the installation
of Apache, mod_mono and the Cato web application.
1. Install Apache and mod_mono, skip this step if Apache is already installed.
NOTE: Make sure to stop the apache2 service or else the mono install will hang.
sudo apt-get update
sudo apt-get install apache2
sudo service apache2 stop
2. Install mono server and mod_mono
NOTE: Make sure to stop the apache2 service or else the mono install will hang.
See step above!
sudo apt-get install mono-apache-server2 libapache2-mod-mono
3. Add the following lines to the default sites available file below the
last </Directory> line but above the </VirtualHost> line.
NOTE: on the next couple of steps, if Cato was installed in a directory
different from the default, you will need to edit the path locations
to point Apache and mod_mono appropriately.
sudo vi /etc/apache2/sites-available/default
Alias /cato "/opt/cato/web/"
<Directory /opt/cato/web/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
SetHandler mono
DirectoryIndex login.aspx
<FilesMatch "\.conf">
Order allow,deny
Deny from all
Satisfy All
4. Make sure the following file contents are pointing to mod_mono "2" for
.net 2 runtime (this should be the default). See the comments in the file.
sudo vi /etc/apache2/mods-available/mod_mono.conf
5. Let mono know about the cato application. Add the following lines to the default.webapp file.
sudo vi /etc/mono-server2/default.webapp
6. Install root ssl certificates and the AWS ssl certificate. Enter "yes" if prompted.
NOTE: the second command, certmgr, is onlt require if you are using Cato to manage
sudo mozroots --import --machine --sync
sudo certmgr -ssl -m
7. Create a link to the conf directory if it doesn't already exist.
NOTE: this may have been automatically created by the script
if build from source.
cd /opt/cato/web
sudo ln -s /opt/cato/conf conf
8. Restart apache.
sudo service apache2 restart
sudo a2enmod mod_mono
9. Access the webpage by using the following url, replacing <host address> with the
ip address or FQDN of the install server.
http://<host address>/cato/login.aspx
You should see a login screen and the "New Cato Install" message. This message is
confirmation that the web component is connecting to the database.
10. Login with the user id "administrator". The intial password is "password", you
will be required to change it on first login.
Services Install
The following build instructions document the install process assuming Debian
Linux. Other flavors of linux will be covered as well in the future.
NOTE: these installation instructions assume the root install directory as being
/opt/cato. Change in the commands below as appropriate.
1. Download and install third party packages.
Use the following command to download the required third party packages.
On Debian / Ubuntu:
sudo apt-get update
NOTE: if the build instructions have already been performed on this machine
(tcl8.5 and tcl8.5-dev installed) then skip the next line.
sudo apt-get install tcl8.5 tcl8.5-dev
sudo apt-get install tcllib mysqltcl tclcurl tcl-tls tdom expect
2. Download and install tclcloud
NOTE: perform this step only if tclcloud was not included in your distribution.
Perform the ls command below. If there are no files in the tclcloud directory,
continue with this step.
ls -l /opt/cato/services/lib/tclcloud
wget -O /tmp/tclcloud.tar.gz
cd /tmp
tar -xvzf tclcloud.tar.gz
Change to the directory that was created and copy the files to the install,
services/lib/tclcloud directory.
cd cloudsidekick-tclcloud-*
cp * /opt/cato/services/lib/tclcloud/.
3. Optional third party libraries are listed below. Install if needed in your
automation environment.
3.a Connectivity to Sybase and Microsoft SQL Server databases: FreeTDS and Tcltds.
On Debian / Ubuntu:
sudo apt-get install libaprutil1-dbd-freetds
Also, you will need the Tcltds library which exposes FreeTDS to Tcl.
wget -O tcltds.tar.gz
tar xvzf tcltds.tar.gz
Change into the tcltds directory and view the README file for build and install instructions.
3.b Oracle connectivity: Oracle client and Oratcl
The Oracle client will need to be installed on any Cato Task Engine server
that needs Oracle database connectivity. See form client options.
It should be noted that the Task Engine has been tested with most of the Oracle
Client options, including the Instant Client.
Once the Oracle Client has been installed, See the following link for the Oratcl
3.c Tclwinrm: to connect to MS Windows servers using the Winrm protocol
NOTE: perform this step only if tclwinrm was not included in your distribution.
Perform the ls command below. If there are no files in the tclwinrm directory,
continue with this step.
ls -l /opt/cato/services/lib/tclwinrm
wget -O /tmp/tclwinrm.tar.gz
cd /tmp
tar -xvzf tclwinrm.tar.gz
Change to the directory that was created.
cd cloudsidekick-tclwinrm-*
cp * /opt/cato/services/lib/tclwinrm/.
4. Create a link to the conf directory if it doesn't already exist.
cd /opt/cato/services
sudo ln -s /opt/cato/conf conf
5. Ensure that cron is installed and enabled for the user. If using sudo to start the services,
enable cron for root.
6. Determine log files location.
The Cato services produce logfiles during the normal course of execution. The logs
can be used to troubleshoot and monitor the processes. The logfile location is
is setting in the cato.conf file and can be customized to the installation.
The default logfile location is /var/cato/logs. If the default is used, create a directory
structure as follows. Another potential logfile location can be under the services directory.
First edit or note the logfile location in conf/cato.conf. Look for the logfiles setting.
vi conf/cato.conf
Create a directory structure for the logfiles.
sudo mkdir -p /var/cato/log/ce
7. Run the script in the services directory.
cd /opt/cato
sudo ./services/
Assuming all goes well, you should see the following output
CATO_HOME not set, assuming /opt/cato
Looking for processes to start
Starting /opt/cato/services/bin/cato_poller.tcl
Starting /opt/cato/services/bin/cato_scheduler.tcl
Starting /opt/cato/services/bin/cato_messenger.tcl
Starting /opt/cato/services/bin/cato_ecosync.tcl
Ending starting processes
NOTE: the start services script will register itself with the cron file for the user
under which it is run. The script will be run once a minute to make sure the services
processes are running, if not it will restart them.
8. Verify services are running.
Now check to see that all processes are running:
ps -eafl|grep cato_ |grep -v grep
If all four processes are not running, check the logfiles for errors.
cd /var/cato/log
ls -l *.log
more cato_poller.log
Login to the Cato user interface (Web install instructions above), go to the
Information, System Status page and check that the services are have a current
timestamp value.
NOTE: if at any time the services need to be shutdown, the services/
script can be run to kill the processes and remove them from the user's cron entry.
sudo ./services/