Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor update to README #227

Merged
merged 3 commits into from
Jun 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 34 additions & 31 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Quickstart
==========
Quickstart for localhost development
====================================

Install docker: https://docs.docker.com/engine/installation/

Expand All @@ -14,43 +14,46 @@ docker-compose up

View metrics at localhost:8080/dashboard

Building and running the image
==============================

Build
-----
Using a pre-built image
-----------------------
With every tagged release of the cadence server, there is also a corresponding
docker image that's uploaded to docker hub. In addition, the release will also
contain a docker.tar.gz file (docker-compose startup scripts). Execute the following
commands to start a pre-built image along with all dependencies (cassandra/statsd).

```
cd $GOPATH/src/github.com/uber/cadence/docker
docker-compose build
wget https://github.com/uber/cadence/releases/download/v0.1.0-beta/docker.tar.gz
tar -xzvf docker.tar.gz
cd docker
docker-compose up
```

Run with defaults
-----------------
Updating an existing image and restarting
-----------------------------------------
```
docker-compose run cadence
cd $GOPATH/src/github.com/uber/cadence/docker
docker-compose stop
docker-compose build
docker-compose up
```

Run with all the config options
-------------------------------
Quickstart for production
=========================
In a typical production setting, dependencies (cassandra / statsd server) are
managed / started independently of the cadence-server. To use the container in
a production setting, use the following command:


```
docker-compose run -e CASSANDRA_CONSISTENCY=Quorum \ -- Default cassandra consistency level
-e BIND_ON_LOCALHOST=false \ -- Don't use localhost ip address for cadence services
-e RINGPOP_SEEDS=10.0.0.1 \ -- Use this as the gossip bootstrap hosts for ringpop
docker run -e CASSANDRA_CONSISTENCY=Quorum \ -- Default cassandra consistency level
-e CASSANDRA_SEEDS=10.x.x.x -- csv of cassandra server ipaddrs
-e KEYSPACE=<keyspace> -- Cassandra keyspace
-e VISIBILITY_KEYSPACE=<visibility_keyspace> -- Cassandra visibility keyspace
-e SKIP_SCHEMA_SETUP=true -- do not setup cassandra schema during startup
-e RINGPOP_SEEDS=10.x.x.x \ -- csv of ipaddrs for gossip bootstrap
-e STATSD_ENDPOINT=10.x.x.x:8125 -- statsd server endpoint
-e NUM_HISTORY_SHARDS=1024 \ -- Number of history shards
-e SERVICES=history,matching \ -- Spinup only the provided services
cadence
ubercadence/server:<tag>
```

Running cadence without dependencies
====================================
If you prefer to spin up your cassandra / statsd server, use the following
to just bring up cadence server
```
cd $GOPATH/src/github.com/uber/cadence/docker
docker build -t uber/cadence:master .
docker run uber/cadence
-e CASSANDRA_CONSISTENCY=Quorum \
-e CASSANDRA_SEEDS=127.0.0.1 \ -- Cassandra server seed list
-e RINGPOP_SEEDS=10.0.0.1 \ -- Use this as the gossip bootstrap hosts for ringpop
-e NUM_HISTORY_SHARDS=1024 \ -- Number of history shards
```
5 changes: 4 additions & 1 deletion docker/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ fi

init_env
wait_for_cassandra
setup_schema

if [ "$SKIP_SCHEMA_SETUP" != true ]; then
setup_schema
fi

# fix up config
envsubst < config/docker_template.yaml > config/docker.yaml
Expand Down