Configuring the EC2E AMI:

On the EC2 AMI the ec2-enhanced RPM will need to be installed which will
depend on Condor, and Condor needs to be configured to use job hooks.  The
following example configures the Job Hooks for EC2 Enhanced with a fetch
interval of 10 seconds, and an update interval of 30 seconds:

# Startd hooks
EC2ENHANCED_HOOK_FETCH_WORK = $(LIBEXEC)/hooks/hook_fetch_work.py
EC2ENHANCED_HOOK_REPLY_FETCH = $(LIBEXEC)/hooks/hook_reply_fetch.py

# Starter hooks
EC2ENHANCED_HOOK_PREPARE_JOB = $(LIBEXEC)/hooks/hook_prepare_job.py
EC2ENHANCED_HOOK_UPDATE_JOB_INFO = $(LIBEXEC)/hooks/hook_update_job_status.py
EC2ENHANCED_HOOK_JOB_EXIT = $(LIBEXEC)/hooks/hook_job_exit.py

STARTD_JOB_HOOK_KEYWORD = EC2ENHANCED
STARTER_JOB_HOOK_KEYWORD = EC2ENHANCED

FetchWorkDelay = 10
STARTER_UPDATE_INTERVAL = 30

EC2E_DAEMON = $(SBIN)/caroniad
DAEMON_LIST = $(DAEMON_LIST), EC2E_DAEMON

An RSA private key needs to be stored in '/root/.ec2/rsa_key" on the AMI.
This key must be able to decrypt data encrypted with the RSA public key
provided in a route's configuration (set_rsapublickey) or in the
job's submit file (+RSAPublicKey).

Next the caroniad daemon must be configured.  The caroniad daemon will
first look for its configuration in condor's configuration files.  The
following parameters can be placed in a condor configuration file to
configure caroniad:

EC2E_DAEMON_IP:
   Type: IP Address
   Desc: The IP address of the interface carod use for connections

EC2E_DAEMON_PORT:
   Type: Integer
   Desc: The port carod should use to listen for connections

EC2E_DAEMON_QUEUED_CONNECTIONS:
   Type: Integer
   Desc: The number of allowed outstanding connections

EC2E_DAEMON_LEASE_TIME:
   Type: Integer
   Desc: The maximum amount of time a job is allowed to run without providing
         an update

EC2E_DAEMON_LEASE_CHECK_INTERVAL:
   Type: Integer
   Desc: How often to check for lease expiration

If the configuration is not found in condor's configuration files, then
caroniad will look in /etc/condor/caroniad.conf.

Then edit the job hook configuration file to communicate with caroniad.
See /usr/share/doc/condor-job-hooks-1.0/INSTALL for details.

Once the configuration is complete, restart condor.
