From 98aec7f029d5cc3a84bba1deec406a5d586f761e Mon Sep 17 00:00:00 2001 From: Andy Kramolisch Date: Fri, 15 Mar 2013 12:21:28 -0700 Subject: [PATCH] [docs] Updating docs to discuss asset building and fixed links in ToC. --- README.md | 46 +++++++++++++++++++++++----------------------- bin/installer.bash | 2 ++ docs/FAQ.md | 4 ++++ docs/WEBUI.md | 37 +++++++++++++++++++++++++++++++++++++ 4 files changed, 66 insertions(+), 23 deletions(-) create mode 100644 docs/WEBUI.md diff --git a/README.md b/README.md index f60bd6eeb..ecb798863 100644 --- a/README.md +++ b/README.md @@ -11,39 +11,39 @@ Chronos has a number of advantages over regular cron. It allows you to schedule your jobs using [ISO8601][ISO8601] repeating interval notation, which enables more flexibility in job scheduling. Chronos also supports the definition of jobs triggered by the completion of other jobs. It supports arbitrarily long dependency chains. -* Quick Start -* License -* Contributors -* GUI -* API - - Leaders - - Listing Jobs - - Deleting a Job - - Deleting All Jobs - - Manually Starting a Job - - Adding a Scheduled Job - - Adding a Dependent Job - - Describing the Dependency Graph - - Asynchronous Jobs - - Obtaining Remote Executables -* Debugging Chronos Jobs -* Notes -* Appendix - - Finding a Node to Talk to - - Zookeeper +* [Quick Start](#quick-start) +* [License](#license) +* [Contributors](#contributors) +* [GUI](#gui) +* [API](#api) + - [Leader](#leaders) + - [Listing Jobs](#listing-jobs) + - [Deleting a Job](#deleting-a-job) + - [Deleting All Jobs](#deleting-all-jobs) + - [Manually Starting a Job](#manually-starting-a-job) + - [Adding a Scheduled Job](#adding-a-scheduled-job) + - [Adding a Dependent Job](#adding-a-dependent-job) + - [Describing the Dependency Graph](#describing-the-dependency-graph) + - [Asynchronous Jobs](#asynchronous-jobs) + - [Obtaining Remote Executables](#obtaining-remote-executables) +* [Debugging Chronos Jobs](#debugging-chronos-jobs) +* [Notes](#notes) +* [Appendix](#appendix) + - [Finding a Node to Talk To](#finding-a-node-to-talk-to) + - [Zookeeper](#zookeeper) ## Quick Start There is a file called 'installer.bash' that can be found in the bin directory of the repo. It will compile and install mesos and Chronos. -After successful installation a local version of Chronos with a built-in ZK server is started. You will need Maven 3.X, a JDK and build tools to get up and running. +After successful installation, a local version of Chronos with a built-in ZK server is started. You will need Maven 3.X, a JDK and build tools to get up and running. This is how you run this installer: $./bin/installer.bash -If you get an error while compiling [][mesos], please consult the [FAQ](https://github.com/airbnb/chronos/blob/master/docs/FAQ.md). +If you get an error while compiling [mesos][mesos], please consult the [FAQ](https://github.com/airbnb/chronos/blob/master/docs/FAQ.md). ## License @@ -283,7 +283,7 @@ If you use the cURL command line tool, you can use the "-L" flag and hit any Chr ### Zookeeper -Chronos registers itself with [][Zookeeper] at the location `/airbnb/service/chronos`. This value can be changed via the configuration file. +Chronos registers itself with [Zookeeper][Zookeeper] at the location `/airbnb/service/chronos`. This value can be changed via the configuration file. [arx]: https://github.com/solidsnack/arx diff --git a/bin/installer.bash b/bin/installer.bash index e947f7c2c..f1b82ac1d 100755 --- a/bin/installer.bash +++ b/bin/installer.bash @@ -54,6 +54,8 @@ function install_chronos { sed -i '' -e "s/$DEFAULT_MESOS_JAR_STRING/$mesos_version_string/g" "$BIN_DIRECTORY/../pom.xml" popd pushd "$BIN_DIRECTORY" ; cd .. + echo "Building chronos assets" + mvn requirejs:optimize -P requirejs echo "Installing chronos" mvn package popd diff --git a/docs/FAQ.md b/docs/FAQ.md index 6fd1543f5..fe328759e 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -1,6 +1,7 @@ # Chronos FAQ ## Table of Contents 1. [[osx] making mesos fails on `warning: 'JNI_CreateJavaVM' is deprecated`](#osx-making-mesos-fails-on-deprecated-warning) +2. [My Web UI is not showing up!](#my-web-ui-is-not-showing-up) ## [osx] Making mesos fails on deprecated header warning @@ -22,3 +23,6 @@ This error is the result of OSX shipping with an outdated version of the JDK and **Example:** `JAVA_CPPFLAGS='-I/Library/Java/JavaVirtualMachines/jdk1.7.0_12.jdk/Contents/Home/include/ -I/Library/Java/JavaVirtualMachines/jdk1.7.0_12.jdk/Contents/Home/include/darwin/' ../configure` + +## My Web UI is not showing up! +See diff --git a/docs/WEBUI.md b/docs/WEBUI.md new file mode 100644 index 000000000..1fd564317 --- /dev/null +++ b/docs/WEBUI.md @@ -0,0 +1,37 @@ +# Chronos Web UI + +Compiling assets for the web ui is simple and done on demand, in order to speed the main build process. + +You *must* have built assets before packaging. + +* [Compiling Assets](#compiling-assets) +* [Modifying Assets](#modifying-assets) +* [Assets and Order of Operations](#assets-and-order-of-operations) +* [Rebuild Assets by Default](#rebuild-assets-by-default) + +## Compiling Assets + +To compile assets simply run: +`mvn requirejs:optimize -P requirejs` + +## Modifying Assets + +To modify assets and have changes reflected on the fly, you will need to start Chronos with a specially configured YAML file. The configuration is quite simple and is documented at [dropwizard-configurable-assets-bundle](https://github.com/bazaarvoice/dropwizard-configurable-assets-bundle/blob/master/README.md). + +There are also two included example YAML files that make use of this configuration: +* [config/local_scheduler.yml](/airbnb/chronos/blob/master/config/local_scheduler.yml#L4) +* [config/local_scheduler_nozk.yml](/airbnb/chronos/blob/master/config/local_scheduler_nozk.yml#L7) + +## Assets and Order of Operations + +If you wish to deploy, or otherwise run, a production build of Chronos with full Web UI, you must ensure that you have [built assets](#compiling-assets) before running `mvn package`. + +## Rebuild Assets by Default + +If you don't want to worry about which order you build Chronos in, you can modify `pom.xml` and switch the requirejs profile's activation from + +`false` + +to + +`true` \ No newline at end of file