Using HTCondor Annex for the First Time
We assume you already have an AWS account, as well as a log-in account on a Linux machine with a public IP address and an administrator who's willing to open a port for you. If so, you can follow the instructions for using HTCondor Annex for the first time .
If you're not sure if you've configured
before, you may enter the following to check.
$ . ~/condor-8.7.1/condor.sh $ condor_annex -check-setup Checking for configuration bucket... OK. Checking for Lambda functions... OK. Checking for instance profile... OK. Checking for security group... OK. Your setup looks OK.
If you see anything else, follow the instructions above.
What You'll Need to Know
To create a HTCondor annex with on-demand instances, you'll need to know two things:
- A name for it. " MyFirstAnnex " is a fine name for your first annex.
- How many instances you want. For your first annex, when you're checking to make sure things work, you may only want one instance.
Start an Annex
Entering the following will start an annex named "
" with one instance.
will print out what it's going to do, and then ask you if that's OK. You must type 'yes' (and hit enter) at the prompt to start an annex; if you do not,
will print out instructions about how to change whatever you may not like about what it said it was going to do, and then exit.
$ condor_annex -count 1 -annex-name MyFirstAnnex Will request 1 m4.large on-demand instance for 0.83 hours. Each instance will terminate after being idle for 0.25 hours. Is that OK? (Type 'yes' or 'no'): yes MyFirstAnnex_041c0538be-14b6-40ce-83d8-47a8ac696639
The last line of output can be used to identify annex instances; you won't have to do that unless something goes wrong.
Before starting the annex,
will check to make sure that the instances will be able to contact your pool. Contact your machine's administrator if
reports a problem with this step.
provides a different number (and/or type) of CPU cores, amount of RAM, local storage, and the like. If you're not sure, we recommend starting with 'm4.large', which has 2 CPU cores and 8 GiB of RAM. As noted in the example output above, you can specify an instance type with the
arranges for your annex's instances to be terminated after
hours (50 minutes) have passed. Once it's in place, this lease doesn't depend on your machine, but it's only checked every five minutes, so give your deadlines a lot of cushion to make you don't get charged for an extra hour. The lease is intended to help you conserve money by preventing the annex instances from accidentally running forever. As noted in the example output above, you can specify a lease duration (in decimal hours) with the
will configure your annex's instances to terminate themselves after being idle for
hours (fifteen minutes). This is intended to help you conserve money in case of problems or an extended shortage of work. As noted in the example output above, you can specify a max idle time (in decimal hours) with the
considers an instance idle if it's
, so it won't get tricked by jobs with long quiescent periods.
You may have up to fifty (or fewer, depending what else you're doing with your AWS account) differently-named annexes running at the same time. Running
again with the same annex name before stopping that annex will both add instances to it and change its duration. Only instances which start up after an invocation of
will respect that invocation's max idle time. That may include instances still starting up from your previous (first) invocation of
, so be sure your instances have all joined the pool before running
again with the same annex name if you're changing the max idle time. Each invocation of
requests a fixed number of instances of a given type; you may specify either or both with each invocation, but neither will change either about the previous request.
Monitor your Annex
You can find out if that instance has successfully joined the pool in the following way.
$ condor_status -annex MyFirstAnnex email@example.com LINUX X86_64 Unclaimed Idle 0.640 3767 firstname.lastname@example.org LINUX X86_64 Unclaimed Idle 0.640 3767 Total Owner Claimed Unclaimed Matched Preempting Backfill Drain X86_64/LINUX 2 0 0 2 0 0 0 0 Total 2 0 0 2 0 0 0 0
This example shows that the annex instance you requested has joined your pool. (The default annex image configures one static slot for each CPU it finds on start-up.)
Run a Job
Starting in v8.7.1, the default behaviour for an annex instance is to run only jobs submitted by the user who ran the
command. If you'd like to allow other users to run jobs, list them (separated by commas; be sure to include yourself) as arguments to the
flag when you start the instance. If you're creating an annex for general use, use the
flag to run jobs from anyone.
Also starting in v8.7.1, the default behaviour for an annex instance is to run only jobs which have the
attribute set (to true). To submit a job with
set to true, add
+MayUseAWS = TRUE
to the submit file somewhere before the
command. To allow an existing job to run in the annex, use
. For instance, if you'd like cluster 1234 to run on AWS:
$ condor_qedit 1234 "MayUseAWS = TRUE" Set attribute "MayUseAWS" for 21 matching jobs.
Stop an Annex
The following command shuts HTCondor off on each instance in the annex; if you're using the default annex image, doing so causes each instance to shut itself down.
$ condor_off -master -annex MyFirstAnnex Sent "Kill-Daemon" command for "master" to master ip-172-31-48-84.ec2.internal
The information is this section is for advanced users and may not apply (or make sense) to everyone.
Configure the Annex
You can customize the configuration of your annex. If you pass the full path to a directory (for example,
option, condor_annex will copy the files in that directory to the HTCondor config directory on each annex instance. This does
replace the customization that
is already doing to configure security and tell the annex instances which pool to join; those changes will be laid down on top of (a temporary copy of) the directory you specified before being transferred to the instances.