Skip to content

Commit

Permalink
Add convenient start-local.sh, and update documentation (#14)
Browse files Browse the repository at this point in the history
* Add convenient start-local.sh, and update documentation
  • Loading branch information
fahdsiddiqui committed Aug 25, 2016
1 parent 04515fa commit 7b26658
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 10 deletions.
17 changes: 10 additions & 7 deletions QuickStart.md
@@ -1,19 +1,22 @@
### Starting EmoDB locally using only EmoDB binaries

To start EmoDB locally, simply download the binaries, and run the following:

```
java -jar bin/emodb-web-local-*.jar server conf/config-local.yaml conf/config-ddl-local.yaml conf/cassandra.yaml -z
To start EmoDB locally, simply download the [EmoDB binaries] (https://github.com/bazaarvoice/emodb/releases), and run the following:

```
$> ./start-local.sh
```

The above will start the following services:

- In-memory Cassandra
- Zookeeper on port 2181
- EmoDB on port 8080/8081

If you would like to use your own configured cassandra, then skip providing cassandra.yaml and update Emo's config file to point to the correct Cassandra node.

To skip starting zookeeper, leave out `-z` switch.
If you would like to use your own configured cassandra, then start the local jar directly:
```
java -jar bin/emodb-web-local-*.jar server conf/config-local.yaml conf/config-ddl-local.yaml conf/cassandra.yaml -z
```
To skip starting a local zookeeper, leave out `-z` switch.



6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -51,11 +51,11 @@ Quick Start

#### Using binaries:

1. Download the [EmoDB binaries] (https://github.com/bazaarvoice/emodb/releases)
1. Download the tarball from [EmoDB binaries] (https://github.com/bazaarvoice/emodb/releases)

2. Run the Emodb server locally. This will start zookeeper and cassandra locally.

$ bin/start-local.sh
$ ./start-local.sh
...
INFO [2012-05-14 19:12:19,802] org.eclipse.jetty.server.AbstractConnector: Started InstrumentedBlockingChannelConnector@0.0.0.0:8080
INFO [2012-05-14 19:12:19,805] org.eclipse.jetty.server.AbstractConnector: Started SocketConnector@0.0.0.0:8081
Expand Down Expand Up @@ -111,7 +111,7 @@ Quick Start
$ cd web-local
$ ./start-clean.sh

### Examples
### Quick Tutorial

The following examples assume you have [jq] (https://stedolan.github.io/jq/) or an equivalent (see Recommended
Software below). It is optional-- `jq .` just formats the JSON responses to make them easier to read.
Expand Down
8 changes: 8 additions & 0 deletions yum/dep.xml
Expand Up @@ -34,5 +34,13 @@ http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 ">
<include>cassandra.yaml</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.basedir}</directory>
<outputDirectory>/</outputDirectory>
<fileMode>755</fileMode>
<includes>
<include>start-local.sh</include>
</includes>
</fileSet>
</fileSets>
</assembly>
24 changes: 24 additions & 0 deletions yum/start-local.sh
@@ -0,0 +1,24 @@
#!/bin/bash

#
# Starts the following servers locally:
# - EmoDB (ports 8080, 8081)
# - Cassandra (port 9160)
# - ZooKeeper (port 2181)
#
# The first time this is run, Cassandra will be initialized with a default
# schema and an empty # data set. Data will be stored in "bin/data".
# On subsequent runs where "bin/data/" already exists, the Cassandra
# schema and data will not be modified.
#
# Once the server is running you can access Emodb using the following commands:
# Note: For local testing, we have enabled anonymous access. In production you should be using API Keys. Read more about it in "API Keys" section.
#
# curl localhost:8081/ping
# curl localhost:8080/sor/1/_table
#
# For production, use the web jar not web-local, and also you shouldn't be providing cassandra.yaml or -z switch since you wouldn't want to start a local cassandra or zookeeper
# java -jar bin/emodb-web.jar server conf/config-local.yaml conf/config-ddl-local.yaml
#

java -jar bin/emodb-web-local-*.jar server conf/config-local.yaml conf/config-ddl-local.yaml conf/cassandra.yaml -z

0 comments on commit 7b26658

Please sign in to comment.