...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
TODO: Alexander Torres (see
...
...
)
Table of Contents
Table of Contents |
---|
Introduction
This guide will teach you
...
to run a stand alone MATLAB application (i.e. Hello World) locally and in a HySDS cluster. This tutorial uses a compiled Hello_World MATLAB executable which does require a MATLAB license to run. The process used to create the MATLAB executable was followed by the following link: Compiling MATLAB Scripts into Executables to Reduce the Use of Licenses*
*Note that the executable must be compiled on the same OS platform (e.g. Linux, Mac OS, Windows) that it will be executed from
Requirements
Docker
MATLAB
Configured HySDS Cluster
Running Hello World (Locally)
Git pull the docker_matlab repo into work directory
Code Block git pull https://github.com/aria-jpl/docker_matlab.git .
Build Docker Hello World image from docker_matlab/
Code Block docker build . -f docker/Dockerfile.hello_world -t hello_world:latest
Run hello_world:latest in a Docker container
Code Block docker run --name "hello_world" -ti hello_world:latest /bin/bash
Execute the hello_world script inside the container
Code Block /home/ops/verdi/ops/hello_world/hello_world
The output should look like the following:
Code Block $ /home/ops/verdi/ops/hello_world/hello_world Hello World!
Running Hello World (HySDS)
Ensure that your HySDS cluster is up and running by logging into the MOZART instance and running:
Code Block sds status
If it is not running, run:
Code Block sds start all
Configure the docker_matlab repo as a new job type for continuous integration and deployment
Code Block sds ci add_job -b master https://github.com/aria-jpl/docker_matlab.git s3
Navigate to
...
your
ci
...
instance (e.g. http://<your-ci-instance>:8080) to validate that the jenkins job was configured.
...
You should see your jenkins job named as "container-builder_<your repo name>_<branch>" (e.g. container-builder_gmanipon_hello_world_master).
...
Verify that the jenkins job runs to completion by manually scheduling a build. The jenkins job will build the docker image, publish it to your S3 code bucket, and register the job types into you HySDS cluster. Click on the green arrow and view the console output to validate.
Navigate to
...
your
grq
...
instance (e.g. http://<your-grq-instance>/search)
...
and click on the "On-Demand" button.
From the On-Demand screen, fill in the highlighted parameters as shown in the figure below and click "Process Now":
Navigate to
...
your
mozart
...
instance (e.g. http://<your-mozart-instance>/figaro)* to view your job. You can facet on it by looking for the "my_hello_world" tag. The job should go through the "Queued", "Started", and "Completed" states.
From your completed job, click on the "work directory" link to view the live work directory on factotum. All STDOUT output will go into
...
the
_stdout.txt
...
file.
Here's
...
what
_stdout.txt
...
should show: