Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add convenient start-local.sh, and update documentation (#14)
* Add convenient start-local.sh, and update documentation
- Loading branch information
1 parent
04515fa
commit 7b26658
Showing
4 changed files
with
45 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |