Scott M. Mcdermott

UNIX Systems & Network Administrator
available for contract or salaried positions

Colo Slot Admin HOWTO

The following sections describe important commands to know in order to interact with a colo slot, including service restarts, file uploads, shell logins, application server and database server administration.


SSH Login

First, before doing anything, you must be able to use ssh to log into the systems. The usernames used for your slot are listed in the slot definition file for your slot. You must arrange for a public key to be generated and copied to the system to enable passwordless access by the holder of the private key (you). Otherwise, you must use the password specified in the slot definition file for your site.

The procedure works like this:

  • contact myadmin@mycompany.com to get your key enabled or to be given the passwords for your logins.
  • login via ssh with your username, e.g:
     ssh -l <slotuser> <host> 

The username is a generic one based on the slot number, and access to particular slots occurs only through this account. SSH logins can be used for these purposes:

  1. use of the sudo command to restart server instances relating to your slot
  2. how to connect to the app server management console, database instances, etc. for your slot
  3. file uploads to the application server using sftp or scp

The procedures are explained in more detail below.


Restarting the Database Server instances for your slot

On either database server, to stop/start database service for your slot, just login and issue one of the following commands to restart the transaction or analytics databases, respectively:

(new method) (allows both databases to be run on the same host):

sudo service company-anlslot-<number> stop
sudo service company-anlslot-<number> start
sudo service company-anlslot-<number> restart

sudo service company-txnslot-<number> stop
sudo service company-txnslot-<number> start
sudo service company-txnslot-<number> restart

(old method)

sudo service company-dbslot-<number> stop
sudo service company-dbslot-<number> start
sudo service company-dbslot-<number> restart

Restarting the Application Server instance for your slot

On the application server, to stop or start the appserver administration console and the 3 managed servers comprising an instantiation of the software, login to the application server for your slot and issue one of the following commands:

sudo service company-appslot-<number> stop
sudo service company-appslot-<number> start
sudo service company-appslot-<number> restart

Redeploying changes that have been made to app source files

To make your changes visible and hot-reload after making changes to the source files within the application web roots, you can either use the appserver web console, or execute the following easy commands:

sudo service company-appslot-<number> reload <name>

For instance using <name> of "mysite" would redeploy in the usual application configuration. Using this technique, there is never any need to actually use the web console for any purpose.


Connecting to database and the appserver management console

In order to access ports on the Database and Application servers, an IP VPN has been set up between some parts of the company WAN and the colocation site firewall. Contact an administrator for access.

Once configured, if your source IP address is correct, you will be able to access the machines at the colocation site without restriction. You will still need to use SSH to login to the systems or transfer files, but there is no need to foward SSH ports to access the database, for example.

So, simply use the usual procedures for administering the database (i.e. connect to TCP management port using a management application), and app server (connect to the listed admin server's /manageserver/ URL.


File Uploads to the Application Server

Customized pages, images or other changes to application server files for your instance can be copied to the remote systems with SSH, using the scp (Secure Copy) command. The path to the root of your application server instance is the home directory of your login for the instance, on the particular application server used by the slot. This is the directory that contains the appserver config files and application subdirectory, which houses all the Mycorp application files.

So, for instance, to upload a local, expanded myapp/site/ directory tree to your application server instance, you can do like this:

scp -r /path/to/myapp/site <slotuser>@<app_host>:myapp/

You can also use the sftp client to upload via Secure Copy using an FTP-like interface, or simply archive the files and copy over to the application server for extraction. You can combine these two methods using ssh to transport your archive over stdio, which is much faster than using scp directly:

tar --directory /path/to/myapp -zcf - |
ssh <slotuser>@<app_host> tar -zxf -
Please mail the colo administrator for details, for comments on this page, or any other reason.