Skip to content

Commit

Permalink
Use --env instead of --zone to start the server in development enviro…
Browse files Browse the repository at this point in the history
…nment (#2878)
  • Loading branch information
alexshtin committed May 20, 2022
1 parent 98f4525 commit faa215f
Show file tree
Hide file tree
Showing 17 changed files with 73 additions and 29 deletions.
20 changes: 13 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -416,25 +416,31 @@ stop-dependencies-cdc:
docker-compose $(DOCKER_COMPOSE_FILES) $(DOCKER_COMPOSE_CDC_FILES) down

start: temporal-server
./temporal-server --zone cass start
./temporal-server --env development-cass start

start-es: temporal-server
./temporal-server --zone cass-es start
./temporal-server --env development-cass-es start

start-mysql: temporal-server
./temporal-server --zone mysql start
./temporal-server --env development-mysql start

start-mysql-es: temporal-server
./temporal-server --zone mysql-es start
./temporal-server --env development-mysql-es start

start-postgres: temporal-server
./temporal-server --env development-postgres start

start-sqlite: temporal-server
./temporal-server --env development-sqlite start

start-cdc-active: temporal-server
./temporal-server --zone active start
./temporal-server --env development-active start

start-cdc-standby: temporal-server
./temporal-server --zone standby start
./temporal-server --env development-standby start

start-cdc-other: temporal-server
./temporal-server --zone other start
./temporal-server --env development-other start

##### Mocks #####
AWS_SDK_VERSION := $(lastword $(shell grep "github.com/aws/aws-sdk-go v1" go.mod))
Expand Down
3 changes: 0 additions & 3 deletions config/base.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
log:
stdout: true
level: info

persistence:
defaultStore: cass-default
visibilityStore:
Expand Down Expand Up @@ -117,5 +121,5 @@ publicClient:
hostPort: "localhost:7233"

dynamicConfigClient:
filepath: "config/dynamicconfig/development_cass.yaml"
filepath: "config/dynamicconfig/development-cass.yaml"
pollInterval: "10s"
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
log:
stdout: true
level: info

persistence:
defaultStore: cass-default
visibilityStore: cass-visibility
Expand Down Expand Up @@ -97,5 +101,5 @@ publicClient:
hostPort: "localhost:7233"

dynamicConfigClient:
filepath: "./config/dynamicconfig/development_cass.yaml"
filepath: "./config/dynamicconfig/development-cass.yaml"
pollInterval: "10s"
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
log:
stdout: true
level: info

persistence:
defaultStore: cass-default
visibilityStore:
Expand Down Expand Up @@ -105,5 +109,5 @@ publicClient:
hostPort: "localhost:7233"

dynamicConfigClient:
filepath: "config/dynamicconfig/development_cass.yaml"
filepath: "config/dynamicconfig/development-cass.yaml"
pollInterval: "10s"
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
log:
stdout: true
level: info

persistence:
defaultStore: cass-default
visibilityStore: cass-visibility
Expand Down Expand Up @@ -121,5 +125,5 @@ publicClient:
hostPort: "localhost:7233"

dynamicConfigClient:
filepath: "./config/dynamicconfig/development_cass.yaml"
filepath: "./config/dynamicconfig/development-cass.yaml"
pollInterval: "10s"
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
log:
stdout: true
level: info

persistence:
defaultStore: mysql-default
visibilityStore:
Expand Down Expand Up @@ -111,5 +115,5 @@ publicClient:
hostPort: "localhost:7233"

dynamicConfigClient:
filepath: "config/dynamicconfig/development_sql.yaml"
filepath: "config/dynamicconfig/development-sql.yaml"
pollInterval: "10s"
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
log:
stdout: true
level: info

persistence:
defaultStore: mysql-default
visibilityStore: mysql-visibility
Expand Down Expand Up @@ -112,5 +116,5 @@ publicClient:
hostPort: "localhost:7233"

dynamicConfigClient:
filepath: "config/dynamicconfig/development_sql.yaml"
filepath: "config/dynamicconfig/development-sql.yaml"
pollInterval: "10s"
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
log:
stdout: true
level: info

persistence:
defaultStore: cass-default
visibilityStore:
Expand Down Expand Up @@ -122,5 +126,5 @@ publicClient:
hostPort: "localhost:9233"

dynamicConfigClient:
filepath: "config/dynamicconfig/development_cass.yaml"
filepath: "config/dynamicconfig/development-cass.yaml"
pollInterval: "10s"
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
log:
stdout: true
level: info

persistence:
defaultStore: postgres-default
visibilityStore: postgres-visibility
Expand Down Expand Up @@ -112,5 +116,5 @@ publicClient:
hostPort: "localhost:7233"

dynamicConfigClient:
filepath: "config/dynamicconfig/development_sql.yaml"
filepath: "config/dynamicconfig/development-sql.yaml"
pollInterval: "10s"
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
log:
stdout: true
level: info

persistence:
defaultStore: sqlite-default
visibilityStore: sqlite-visibility
Expand Down Expand Up @@ -132,5 +136,5 @@ publicClient:
hostPort: "localhost:7233"

dynamicConfigClient:
filepath: "config/dynamicconfig/development_sql.yaml"
filepath: "config/dynamicconfig/development-sql.yaml"
pollInterval: "10s"
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
log:
stdout: true
level: info

persistence:
defaultStore: cass-default
visibilityStore:
Expand Down Expand Up @@ -122,5 +126,5 @@ publicClient:
hostPort: "localhost:8233"

dynamicConfigClient:
filepath: "config/dynamicconfig/development_cass.yaml"
filepath: "config/dynamicconfig/development-cass.yaml"
pollInterval: "10s"
1 change: 1 addition & 0 deletions config/development.yaml
2 changes: 1 addition & 1 deletion config/dynamicconfig/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Use development_*.yaml file to override the default dynamic config value (they are specified
Use `development-*.yaml` file to override the default dynamic config value (they are specified
when creating the service config).

Each key can have zero or more values and each value can have zero or more
Expand Down
File renamed without changes.
File renamed without changes.
16 changes: 8 additions & 8 deletions service/worker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,34 @@ can be applied to local Temporal cluster.
### Quickstart for localhost development

1. Start Temporal development server for active zone:
```
./temporal-server --zone active start
```bash
make start-cdc-active
```

2. Start Temporal development server for standby(passive) zone:
```
./temporal-server --zone standby start
```bash
make start-cdc-standby
```

3. Connect two Temporal clusters:
```
```bash
tctl --ad 127.0.0.1:7233 adm cl upsert-remote-cluster --frontend_address "localhost:8233"
tctl --ad 127.0.0.1:8233 adm cl upsert-remote-cluster --frontend_address "localhost:7233"
```

4. Create global namespaces
```
```bash
tctl --ns sample namespace register --gd true --ac active --cl active standby
```

5. Failover between zones:

Failover to standby:
```
```bash
tctl --ns sample namespace update --ac standby
```
Failback to active:
```
```bash
tctl --ns sample namespace update --ac active
```

Expand Down

0 comments on commit faa215f

Please sign in to comment.