To install Tron you will need:
The easiest way to install Tron is from PyPI:
$ sudo pip install tron
You can also get a copy of the current developmnent release from github. See setup.py in the source package for a full list of required packages.
If you are interested in working on Tron development see Contributing to Tron for additional requirements and setting up a dev environment.
Tron runs as a single daemon, trond.
On your management node, run:
$ sudo -u <tron user> trond
The chosen user will need SSH access to all your worker nodes, as well as permission to write to the working directory, log file, and pid file (see trond --help for defaults). You can change these directories using command line options. Also see Logging on how to change the default logging settings.
Once trond is running, you can view its status using tronview (by default tronview will connect to localhost, use --server=<host>:<port> -s to specify a different server, and have that setting saved in ~/.tron):
$ tronview Services: No services Jobs: No jobs
There are a few options on how to configure tron, but the most straightforward is through tronfig:
This will open your configured $EDITOR with the current configuration file. Edit your file to be something like this:
ssh_options: agent: true notification_options: smtp_host: localhost notification_addr: <your email address> nodes: - name: local hostname: 'localhost' jobs: - name: "getting_node_info" node: local schedule: "interval 10 mins" actions: - name: "uname" command: "uname -a" - name: "cpu_info" command: "cat /proc/cpuinfo" requires: [uname]
After you exit your editor, the configuration will be validated and uploaded to trond.
Now if you run tronview again, you’ll see getting_node_info as a configured job. Note that it is configured to run 10 minutes from now. This should give you time to examine the job to ensure you really want to run it.
Services: No services Jobs: Name State Scheduler Last Success getting_node_info ENABLED INTERVAL:0:10:00 None
You can quickly disable a job by using tronctl:
$ tronctl disable getting_node_info Job getting_node_info is disabled
This will stop scheduled jobs and prevent anymore from being scheduled. You are now in manual control. To manually execute a job immediately, do this:
$ tronctl start getting_node_info New job getting_node_info.1 created
You can monitor this job run by using tronview:
$ tronview getting_node_info.1 Job Run: getting_node_info.1 State: SUCC Node: localhost Action ID & Command State Start Time End Time Duration .uname SUCC 2011-02-28 16:57:48 2011-02-28 16:57:48 0:00:00 .cpu_info SUCC 2011-02-28 16:57:48 2011-02-28 16:57:48 0:00:00 $ tronview getting_node_info.1.uname Action Run: getting_node_info.1.uname State: SUCC Node: localhost uname -a Requirements: Stdout: Linux dev05 2.6.24-24-server #1 SMP Wed Apr 15 15:41:09 UTC 2009 x86_64 GNU/Linux Stderr:
Tron also provides a simple, optional web UI that can be used to get tronview data in a browser. See tronweb for setup instructions.
That’s it for the basics. You might want to look at Overview for a more comprehensive description of how Tron works.