The easiest way to install Jug is to use Pacman. Once you have
Pacman installed and set up (which is extremely easy to do), you can
install Jug like this:
mkdir install-dir
cd install-dir
pacman -get http://www.hep.wisc.edu/~dan/jug/pacman3:Jug-DB
If you are using pacman version 2 instead of version 3, substitute pacman2 for pacman3 in the above.
Most of the installation questions are answered automatically during this process. You will just need to pick a password and location for the MySQL database.
Once this finishes, you can go ahead and play around in a test database if you like. To use the main database, continue with the final setup.
If you do not use Pacman to install Jug, you can do it by hand. The following software is required:
There are many variations on the following steps. This is just one way that works.
Keep in mind that Jug workers do not need access to any other parts of the Jug software from wherever they run, since they interact with the master via RPC calls over the network. So the installation of Jug does not need to be on a filesystem that is accessible from the worker nodes.
jug_make_worker
. However, you can install it separately
on each host instead of using a network filesystem.
jug_init
. It will ask you for
various configuration information, such as the path to JUG_HOME, where
the configuration information will be stored.
jug_init
asks if you want to create the
database, choose yes. Otherwise, you can do this later by running
jug_create_db
.
jug_daemon
. To have
it start up automatically when the computer boots, symlink (or copy)
$JUG_HOME/libexec/jug to /etc/init.d/jug and run
'chkconfig --add jug'
or whatever you have
to do on your version of linux to get the init.d script added to the
appropriate run levels.
setup.sh
to configure your environment first.
admin
, master
, and reader
each
contain login information used to access the database for various
purposes. (These are called "roles".) The stored password can be
controlled by using jug_login_db
and
jug_logout_db
. Information gathering commands, such as
jug_batch_status
require "reader" level access. Database
modifying operations, such as jug_submit
and the
JugMasterRPC daemons, require "master" level access. After creation
of the database, only the human administrator should require "admin"
level access, so the saved password for the admin user is removed once
the database is created.
jug_daemon
. You can
augment or replace this with additional RPC servers on other machines.
The daemons automatically register themselves in the database so that
when you use jug_make_worker
, the URL of the RPC
server(s) will be automatically inserted into the worker, so that it
knows how to phone home when it starts up.
installation-dir/jug/var/storage
). See Storage Workers.
execution_class="condor"
and they will
use the generic condor worker class. Otherwise, you can create your
own class of workers. See JugWorker.
There is also a "test" execution class and a test worker running on
the machine where you installed JugMaster (see it with
jug_daemon list
and jug_worker_setup view
).
If you run jobs with an execution class of "test", they will be run by
this worker. So using the "test" execution class and the "test"
storage class provides a simple way to experiment with running jobs
and storing output directly on the machine where you installed
JugMaster. It is obviously not intended for running large-scale
work. To do that, you need to run workers on other machines, for
example, by using the "condor" execution class or by running some
other queue manager or by starting workers
through any other means.
$JUG_SYS/JugCGI.py --install
/path/to/cgi-bin/JugMaster.cgi
. If it is not convenient to
install the CGI script in this way, you may access the same
information by pointing your browser at the port used by the
JugMasterRPC daemon(s).
For a simple environment to play around in, take a look in jug/examples.
JugWorker exits immediately with an error related to xml.sax.
This problem is due to a broken python installation. Installing a newer version of PyXML is the easiest way to fix the problem.