Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id BF805200B40 for ; Thu, 2 Jun 2016 04:16:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id BDF7D160A4D; Thu, 2 Jun 2016 02:16:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id DE502160A4C for ; Thu, 2 Jun 2016 04:16:07 +0200 (CEST) Received: (qmail 17499 invoked by uid 500); 2 Jun 2016 02:16:07 -0000 Mailing-List: contact notifications-help@asterixdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.apache.org Delivered-To: mailing list notifications@asterixdb.apache.org Received: (qmail 17490 invoked by uid 99); 2 Jun 2016 02:16:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jun 2016 02:16:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id A626F1A0986 for ; Thu, 2 Jun 2016 02:16:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.126 X-Spam-Level: ** X-Spam-Status: No, score=2.126 tagged_above=-999 required=6.31 tests=[MISSING_HEADERS=1.207, SPF_FAIL=0.919] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 4T9P82BI7pj9 for ; Thu, 2 Jun 2016 02:16:04 +0000 (UTC) Received: from unhygienix.ics.uci.edu (unhygienix.ics.uci.edu [128.195.14.130]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 1B6415F4E6 for ; Thu, 2 Jun 2016 02:16:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by unhygienix.ics.uci.edu (Postfix) with ESMTP id 07BC2241D41; Wed, 1 Jun 2016 19:16:10 -0700 (PDT) Date: Wed, 1 Jun 2016 19:16:09 -0700 From: "Till Westmann (Code Review)" CC: Chris Hillery , Jenkins Reply-To: tillw@apache.org X-Gerrit-MessageType: merged Subject: Change in asterixdb[master]: Doc for single node installation using NCService X-Gerrit-Change-Id: Id0a5ad6e88d72ce2fcaaeabc79fd86c374005ad3 X-Gerrit-ChangeURL: X-Gerrit-Commit: 58b518cb5ead9358c59b700471d4d0eb140e9171 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.8.4 Message-Id: <20160602021610.07BC2241D41@unhygienix.ics.uci.edu> archived-at: Thu, 02 Jun 2016 02:16:08 -0000 Till Westmann has submitted this change and it was merged. Change subject: Doc for single node installation using NCService ...................................................................... Doc for single node installation using NCService Change-Id: Id0a5ad6e88d72ce2fcaaeabc79fd86c374005ad3 Reviewed-on: https://asterix-gerrit.ics.uci.edu/895 Reviewed-by: Chris Hillery Reviewed-by: Jenkins Tested-by: Jenkins --- A asterixdb/asterix-doc/src/site/markdown/ncservice.md M asterixdb/asterix-doc/src/site/site.xml 2 files changed, 112 insertions(+), 0 deletions(-) Approvals: Chris Hillery: Looks good to me, approved Jenkins: Looks good to me, but someone else must approve; Verified diff --git a/asterixdb/asterix-doc/src/site/markdown/ncservice.md b/asterixdb/asterix-doc/src/site/markdown/ncservice.md new file mode 100644 index 0000000..769c551 --- /dev/null +++ b/asterixdb/asterix-doc/src/site/markdown/ncservice.md @@ -0,0 +1,111 @@ + + +# Starting a small cluster using the NCService + +When running a cluster using the `NCService` there are 3 different kind of +processes involved: + +1. `NCDriver` does the work of a NodeController +2. `NCService` configures and starts an `NCDriver` +3. `CCDriver` does the work of a ClusterController and sends the + configuration to the `NCServices` + +To start a small cluster consisting of 2 NodeControllers (`red` and `blue`) +and 1 ClusterController (`cc`) on a single machine only 2 configuration +files are required. +The first one is + +`blue.conf`: + + [ncservice] + port=9091 + +It is a configuration file for the second `NCService`. +This contains only the port that the `NCService` of the second +NodeControllers listens to as it is non-standard. +The first `NCService` does not need a configuration file, as it only uses +default parameters. +In a distributed environment with 1 NodeController per machine, no +`NCService` needs a configuration file. + +The second configuration file is + +`cc.conf`: + + [nc/red] + txnlogdir=/tmp/asterix/red/txnlog + coredumpdir=/tmp/asterix/red/coredump + iodevices=/tmp/asterix/red + + [nc/blue] + port=9091 + txnlogdir=/tmp/asterix/blue/txnlog + coredumpdir=/tmp/asterix/blue/coredump + iodevices=/tmp/asterix/blue + + [nc] + app.class=org.apache.asterix.hyracks.bootstrap.NCApplicationEntryPoint + storagedir=storage + address=127.0.0.1 + command=asterixnc + + [cc] + cluster.address = 127.0.0.1 + http.port = 12345 + +This is the configuration file for the cluster and it contains information +that each `NCService` will use when starting the corresponding `NCDriver` as +well as information for the `CCDriver`. + +To start the cluster simply use the following steps + +1. Set BASEDIR to location of an unzipped asterix-server binary assembly (in +the source tree that's at `asterixdb/asterix-server/target`). + + $ export BASEDIR=[..]/asterix-server-0.8.9-SNAPSHOT-binary-assembly + +2. Start the 2 `NCServices` for `red` and `blue`. + + $ $BASEDIR/bin/asterixncservice -config-file blue.conf > blue-service.log 2>&1 & + $ $BASEDIR/bin/asterixncservice >red-service.log 2>&1 & + +3. Start the `CCDriver`. + + $ $BASEDIR/bin/asterixcc -config-file cc.conf > cc.log 2>&1 & + +The `CCDriver` will connect to the `NCServices` and thus initiate the +configuration and the start of the `NCDrivers`. +After running these scripts, `jps` should show a result similar to this: + + $ jps + 13184 NCService + 13200 NCDriver + 13185 NCService + 13186 CCDriver + 13533 Jps + 13198 NCDriver + +The logs for the `NCDrivers` will be in `$BASEDIR/logs`. + +To stop the cluster again simply run + + $ kill `jps | egrep '(CDriver|NCService)' | awk '{print $1}'` + +to kill all processes. \ No newline at end of file diff --git a/asterixdb/asterix-doc/src/site/site.xml b/asterixdb/asterix-doc/src/site/site.xml index 4dadc09..9d5ce6e 100644 --- a/asterixdb/asterix-doc/src/site/site.xml +++ b/asterixdb/asterix-doc/src/site/site.xml @@ -74,6 +74,7 @@ + -- To view, visit https://asterix-gerrit.ics.uci.edu/895 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id0a5ad6e88d72ce2fcaaeabc79fd86c374005ad3 Gerrit-PatchSet: 8 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Till Westmann Gerrit-Reviewer: Chris Hillery Gerrit-Reviewer: Jenkins Gerrit-Reviewer: Till Westmann