Skip to content

Commit

Permalink
Rename dockers default cluster name to match the other config files. (u…
Browse files Browse the repository at this point in the history
…ber#4885)

This allows an easy workflow for building/running a custom cadence server: docker-compose up, docker stop cadence, cadence-server start.

Also add documentation of this workflow.
  • Loading branch information
ZackLK authored Jun 30, 2022
1 parent 650cf8a commit e9915ae
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
11 changes: 11 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,17 @@ docker-compose down
docker-compose up
```

DIY: Running a custom cadence server locally alongside cadence requirements
---------------------------------------------------------------------------
If you want to test out a custom-built cadence server, while running all the normal cadence dependencies, there's a simple workflow to do that:

Make your cadence server changes and build using "make bins". Then start everything, stop cadence server, and run your own cadence-server:
```
docker-compose up
docker stop docker-cadence-1
./cadence-server start
```

Using docker image for production
=========================
In a typical production setting, dependencies (cassandra / statsd server) are
Expand Down
10 changes: 5 additions & 5 deletions docker/config_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,14 @@ clusterGroupMetadata:
clusterRedirectionPolicy:
policy: {{ default .Env.CLUSTER_REDIRECT_POLICY "all-domain-apis-forwarding" }}
failoverVersionIncrement: 10
primaryClusterName: "primary"
primaryClusterName: "cluster0"
{{- if .Env.IS_NOT_PRIMARY }}
currentClusterName: "secondary"
currentClusterName: "cluster1"
{{- else }}
currentClusterName: "primary"
currentClusterName: "cluster0"
{{- end }}
clusterGroup:
primary:
cluster0:
enabled: true
initialFailoverVersion: 0
rpcName: "cadence-frontend"
Expand All @@ -222,7 +222,7 @@ clusterGroupMetadata:
type: "OAuthAuthorization"
privateKey: {{ default .Env.OAUTH_PRIVATE_KEY "" }}
{{- if .Env.ENABLE_GLOBAL_DOMAIN }}
secondary:
cluster1:
enabled: true
initialFailoverVersion: 2
rpcName: "cadence-frontend"
Expand Down

0 comments on commit e9915ae

Please sign in to comment.