Use the bsub command to submit jobs that require instances that are
launched from Microsoft Azure as the resource provider. Use the bhosts to monitor
borrowed hosts. Use the bhosts command to monitor host status.
Before you begin
On the LSF
management host,
verify that the ebrokerd process is running after enabling the LSF
resource connector.
ps -ef | grep ebrokerd
About this task
In this task, ip-10-11-13-19 is a sample instance from Microsoft
Azure.
Procedure
-
Use the bsub command to submit jobs that require instances that are launched
from Microsoft Azure as the resource provider.
The following
bsub command with no options submits a job that triggers a
launch demand when no resources are available in the
LSF
cluster:
bsub myjob
You also can use the
azurehost resource in a
select[] resource requirement
string. Because the
azurehost resource is defined in a template as a Boolean
attribute, it triggers a launch
demand:
bsub -R "select[azurehost]" myjob
-
Use the bhosts command to monitor instances.
The status of the instances becomes ok when they join the
LSF cluster as dynamic hosts.
Verify that the job runs on
ip-10-11-13-19:
bhosts -a
HOST_NAME STATUS JL/U MAX NJOBS RUN SSUSP USUSP RSV
lsfmanagement ok - 1 0 0 0 0 0
ip-10-11-13-19 ok - 1 1 1 0 0 0
-
Use the bhosts command to monitor the status of the instances.
Run
bhosts with
-a option, which shows all hosts,
including terminated instances. If an instance from Azure has no jobs running on it in the number of
minutes specified by the
LSF_EXTERNAL_HOST_IDLE_TIME parameter, the instance is
relinquished and its host status changes to
closed. When the instance
is terminated, the host status becomes
unavail.
You cannot use the
badmin hopen command to open a borrowed host in
closed_RC status.
bhosts -a
HOST_NAME STATUS JL/U MAX NJOBS RUN SSUSP USUSP RSV
lsfmanagement ok - 1 0 0 0 0 0
ip-10-11-13-19 unavail - 1 0 0 0 0 0
If an instance is in the cluster for longer than the number of minutes specified by
the LSB_RC_EXTERNAL_HOST_MAX_TTL parameter, the instance is closed and any jobs
that are running on the instance are allowed to run to completion. Once the instance is idle, it is
terminated and its status becomes
unavail.
bhosts -a
HOST_NAME STATUS JL/U MAX NJOBS RUN SSUSP USUSP RSV
lsfmanagement ok - 1 0 0 0 0 0
host-10-11-13-19 closed - 1 1 1 0 0 0
- Optional:
Use external job submission and execution controls.
Use the job submission and execution controls feature to use external, site-specific
executable files to validate, modify, and reject jobs, transfer data, and modify the job execution
environment.
To control job submissions such as permission checks before instances are
launched from Azure, you can set up an external submission (esub) script. For
more information, see External Job Submission and Execution
Controls
.