improvements for demo

- add demo cluster
- add example mugshot.com data and queries
- automatic configuration of a cluster
- set MANAGIX_HOME implicitly
- better AQL lexer error reporting
- better eror reporting in ADM parser
- fix and optimize construction of asterix zip for deployment

Change-Id: I9d80402cef72a15271766031b6f06c7220e4ad5a
Reviewed-on: http://fulliautomatix.ics.uci.edu:8443/95
Reviewed-by: Ian Maxon <imaxon@uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Raman Grover <ramang@uci.edu>
diff --git a/asterix-installer/src/main/resources/clusters/demo/demo.xml b/asterix-installer/src/main/resources/clusters/demo/demo.xml
new file mode 100644
index 0000000..3d45d0c
--- /dev/null
+++ b/asterix-installer/src/main/resources/clusters/demo/demo.xml
@@ -0,0 +1,51 @@
+<!--
+ ! Copyright 2009-2013 by The Regents of the University of California
+ ! Licensed under the Apache License, Version 2.0 (the "License");
+ ! you may not use this file except in compliance with the License.
+ ! you may obtain a copy of the License from
+ !
+ !     http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing, software
+ ! distributed under the License is distributed on an "AS IS" BASIS,
+ ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ! See the License for the specific language governing permissions and
+ ! limitations under the License.
+ !-->
+<cluster xmlns="cluster">
+	<!--
+		This defines a cluster that runs 2 worker nodes on a single machine.
+		Also, each worker node is assigned to 2 partitions in the same
+		directory (and thus on the same external storage device).
+		Both of these decisions are usually not advisable for production
+		use.
+	-->
+	<name>demo</name>
+	<working_dir>
+		<dir>/tmp/asterix-installer</dir>
+		<NFS>true</NFS>
+	</working_dir>
+	<log_dir>/tmp/asterix/logs</log_dir>
+	<store>storage</store>
+	<java_home></java_home>
+	<master_node>
+		<id>master</id>
+		<client_ip>127.0.0.1</client_ip>
+		<cluster_ip>127.0.0.1</cluster_ip>
+		<cluster_port>1099</cluster_port>
+		<client_port>1098</client_port>
+		<http_port>8888</http_port>
+	</master_node>
+	<node>
+		<id>node1</id>
+		<cluster_ip>127.0.0.1</cluster_ip>
+		<txn_log_dir>/tmp/asterix/node1/txnLogs</txn_log_dir>
+		<iodevices>/tmp/asterix/node1/1,/tmp/asterix/node1/2</iodevices>
+	</node>
+	<node>
+		<id>node2</id>
+		<cluster_ip>127.0.0.1</cluster_ip>
+		<txn_log_dir>/tmp/asterix/node2/txnLogs</txn_log_dir>
+		<iodevices>/tmp/asterix/node2/1,/tmp/asterix/node2/2</iodevices>
+	</node>
+</cluster>