From edd92bbf68c3df7ba18a1ca623c8fd8a6f8b0612 Mon Sep 17 00:00:00 2001 From: Michael Snowden Date: Fri, 24 Feb 2023 14:24:32 -0800 Subject: [PATCH] Streamline localstack s3 development (#3976) --- common/archiver/s3store/README.md | 32 +--------- config/development-cass-s3.yaml | 101 ++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+), 30 deletions(-) create mode 100644 config/development-cass-s3.yaml diff --git a/common/archiver/s3store/README.md b/common/archiver/s3store/README.md index 6111071f7b3..7dd290b25c5 100644 --- a/common/archiver/s3store/README.md +++ b/common/archiver/s3store/README.md @@ -74,33 +74,5 @@ s3://// 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` diff --git a/config/development-cass-s3.yaml b/config/development-cass-s3.yaml new file mode 100644 index 00000000000..97342c03cd6 --- /dev/null +++ b/config/development-cass-s3.yaml @@ -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"