Skip to content

Commit

Permalink
Streamline localstack s3 development (#3976)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelSnowden committed Feb 24, 2023
1 parent 3b98258 commit edd92bb
Show file tree
Hide file tree
Showing 2 changed files with 103 additions and 30 deletions.
32 changes: 2 additions & 30 deletions common/archiver/s3store/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,33 +74,5 @@ s3://<bucket-name>/<namespace-id>/
1. Install awscli from [here](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)
2. Install localstack from [here](https://github.com/localstack/localstack#installing)
3. Launch localstack with `SERVICES=s3 localstack start`
4. Create a bucket using `aws --endpoint-url=http://localhost:4572 s3 mb s3://temporal-development`
5. Configure archival and namespaceDefaults with the following configuration
```
archival:
history:
state: "enabled"
enableRead: true
provider:
s3store:
region: "us-east-1"
endpoint: "http://127.0.0.1:4572"
s3ForcePathStyle: true
visibility:
state: "enabled"
enableRead: true
provider:
s3store:
region: "us-east-1"
endpoint: "http://127.0.0.1:4572"
s3ForcePathStyle: true
namespaceDefaults:
archival:
history:
state: "enabled"
URI: "s3://temporal-development"
visibility:
state: "enabled"
URI: "s3://temporal-development"
```
4. Create a bucket using `aws --endpoint-url=http://localhost:4566 s3 mb s3://temporal-development`
5. Launch the server with the localstack s3 environment config`--env development-cass-s3 start`
101 changes: 101 additions & 0 deletions config/development-cass-s3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
log:
stdout: true
level: info

persistence:
defaultStore: cass-default
visibilityStore: cass-visibility
numHistoryShards: 4
datastores:
cass-default:
cassandra:
hosts: "127.0.0.1"
keyspace: "temporal"
cass-visibility:
cassandra:
hosts: "127.0.0.1"
keyspace: "temporal_visibility"
global:
membership:
maxJoinDuration: 30s
broadcastAddress: "127.0.0.1"
pprof:
port: 7936
metrics:
prometheus:
framework: "tally"
timerType: "histogram"
listenAddress: "127.0.0.1:8000"

services:
frontend:
rpc:
grpcPort: 7233
membershipPort: 6933
bindOnLocalHost: true

matching:
rpc:
grpcPort: 7235
membershipPort: 6935
bindOnLocalHost: true

history:
rpc:
grpcPort: 7234
membershipPort: 6934
bindOnLocalHost: true

worker:
rpc:
grpcPort: 7239
membershipPort: 6939
bindOnLocalHost: true

clusterMetadata:
enableGlobalNamespace: false
failoverVersionIncrement: 10
masterClusterName: "active"
currentClusterName: "active"
clusterInformation:
active:
enabled: true
initialFailoverVersion: 1
rpcName: "frontend"
rpcAddress: "localhost:7233"

dcRedirectionPolicy:
policy: "noop"
toDC: ""

archival:
history:
state: "enabled"
enableRead: true
provider:
s3store:
region: "us-east-1"
endpoint: "http://127.0.0.1:4566"
s3ForcePathStyle: true
visibility:
state: "enabled"
enableRead: true
provider:
s3store:
region: "us-east-1"
endpoint: "http://127.0.0.1:4566"
s3ForcePathStyle: true

namespaceDefaults:
archival:
history:
state: "enabled"
URI: "s3://temporal-development"
visibility:
state: "enabled"
URI: "s3://temporal-development"


dynamicConfigClient:
filepath: "./config/dynamicconfig/development-cass.yaml"
pollInterval: "10s"

0 comments on commit edd92bb

Please sign in to comment.