-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0871fef
Showing
6 changed files
with
169 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
COMPOSE_PROJECT_NAME=temporal-cqlproxy | ||
ASTRA_TOKEN=updateme | ||
ASTRA_DATABASE_ID=updateme | ||
CQL_PROXY_VERSION=0.1.2 | ||
ELASTICSEARCH_VERSION=7.16.2 | ||
MYSQL_VERSION=8 | ||
POSTGRESQL_VERSION=13 | ||
TEMPORAL_VERSION=1.15.2 | ||
TEMPORAL_WEB_VERSION=1.14.0 | ||
TEMPORAL_UI_VERSION=0.8.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Using Temporal (temporal.io) on Astra | ||
|
||
* Create an Astra DB at [https://astra.datastax.com/](https://astra.datastax.com/) | ||
* Add two keyspaces in the Astra DB UI via "Add Keyspace": `temporal` and `temporal_visibility` | ||
* Create a new Astra token and get your DB's identifier | ||
* Update `.env` with your Astra token and DB identifier | ||
* Update the Temporal schema by running `./schema.sh` or: | ||
```sh | ||
docker-compose -f docker-compose-cqlproxy-schema.yml run temporal-admin-tools -ep cql-proxy -k temporal setup-schema -v 0.0 | ||
docker-compose -f docker-compose-cqlproxy-schema.yml run temporal-admin-tools -ep cql-proxy -k temporal update-schema -d schema/cassandra/temporal/versioned/ | ||
|
||
docker-compose -f docker-compose-cqlproxy-schema.yml run temporal-admin-tools -ep cql-proxy -k temporal_visibility setup-schema -v 0.0 | ||
docker-compose -f docker-compose-cqlproxy-schema.yml run temporal-admin-tools -ep cql-proxy -k temporal_visibility update-schema -d schema/cassandra/visibility/versioned/ | ||
``` | ||
|
||
* Start up Temporal! | ||
```sh | ||
docker-compose -f docker-compose-cqlproxy.yml up | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
version: "3.5" | ||
services: | ||
cql-proxy: | ||
container_name: temporal-schema-cqlproxy | ||
image: datastax/cql-proxy:v${CQL_PROXY_VERSION} | ||
healthcheck: | ||
test: 'printf "GET /readiness HTTP/1.0\r\nHost: localhost\r\n\r\n" | nc localhost 8000 | grep "200 OK"' | ||
interval: 1s | ||
timeout: 5s | ||
retries: 5 | ||
networks: | ||
- temporal-network | ||
ports: | ||
- 9042:9042 | ||
- 8000:8000 | ||
environment: | ||
- ASTRA_TOKEN=${ASTRA_TOKEN} | ||
- ASTRA_DATABASE_ID=${ASTRA_DATABASE_ID} | ||
- HEALTH_CHECK=true | ||
temporal-admin-tools: | ||
container_name: temporal-admin-tools | ||
depends_on: | ||
cql-proxy: | ||
condition: service_healthy | ||
environment: | ||
- TEMPORAL_CLI_ADDRESS=temporal:7233 | ||
image: temporalio/admin-tools:${TEMPORAL_VERSION} | ||
entrypoint: /usr/local/bin/temporal-cassandra-tool | ||
networks: | ||
- temporal-network | ||
#stdin_open: true | ||
#tty: true | ||
networks: | ||
temporal-network: | ||
driver: bridge | ||
name: temporal-network |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
version: "3.5" | ||
services: | ||
cql-proxy: | ||
container_name: temporal-cqlproxy | ||
image: datastax/cql-proxy:v${CQL_PROXY_VERSION} | ||
healthcheck: | ||
test: 'printf "GET /readiness HTTP/1.0\r\nHost: localhost\r\n\r\n" | nc localhost 8000 | grep "200 OK"' | ||
interval: 1s | ||
timeout: 5s | ||
retries: 5 | ||
networks: | ||
- temporal-network | ||
ports: | ||
- 9042:9042 | ||
- 8000:8000 | ||
environment: | ||
- ASTRA_TOKEN=${ASTRA_TOKEN} | ||
- ASTRA_DATABASE_ID=${ASTRA_DATABASE_ID} | ||
- HEALTH_CHECK=true | ||
temporal: | ||
container_name: temporal | ||
depends_on: | ||
cql-proxy: | ||
condition: service_healthy | ||
environment: | ||
- CASSANDRA_SEEDS=cqlproxy | ||
- DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development.yaml | ||
- SKIP_SCHEMA_SETUP=true | ||
image: temporalio/auto-setup:${TEMPORAL_VERSION} | ||
networks: | ||
- temporal-network | ||
ports: | ||
- 7233:7233 | ||
volumes: | ||
- ./dynamicconfig:/etc/temporal/config/dynamicconfig | ||
temporal-admin-tools: | ||
container_name: temporal-admin-tools | ||
depends_on: | ||
- temporal | ||
environment: | ||
- TEMPORAL_CLI_ADDRESS=temporal:7233 | ||
image: temporalio/admin-tools:${TEMPORAL_VERSION} | ||
networks: | ||
- temporal-network | ||
stdin_open: true | ||
tty: true | ||
temporal-web: | ||
container_name: temporal-web | ||
depends_on: | ||
- temporal | ||
environment: | ||
- TEMPORAL_GRPC_ENDPOINT=temporal:7233 | ||
- TEMPORAL_PERMIT_WRITE_API=true | ||
image: temporalio/web:${TEMPORAL_WEB_VERSION} | ||
networks: | ||
- temporal-network | ||
ports: | ||
- 8088:8088 | ||
networks: | ||
temporal-network: | ||
driver: bridge | ||
name: temporal-network |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
frontend.enableClientVersionCheck: | ||
- value: true | ||
constraints: {} | ||
history.persistenceMaxQPS: | ||
- value: 3000 | ||
constraints: {} | ||
frontend.persistenceMaxQPS: | ||
- value: 3000 | ||
constraints: {} | ||
frontend.historyMgrNumConns: | ||
- value: 10 | ||
constraints: {} | ||
frontend.throttledLogRPS: | ||
- value: 20 | ||
constraints: {} | ||
history.historyMgrNumConns: | ||
- value: 50 | ||
constraints: {} | ||
history.defaultActivityRetryPolicy: | ||
- value: | ||
InitialIntervalInSeconds: 1 | ||
MaximumIntervalCoefficient: 100.0 | ||
BackoffCoefficient: 2.0 | ||
MaximumAttempts: 0 | ||
history.defaultWorkflowRetryPolicy: | ||
- value: | ||
InitialIntervalInSeconds: 1 | ||
MaximumIntervalCoefficient: 100.0 | ||
BackoffCoefficient: 2.0 | ||
MaximumAttempts: 0 | ||
system.advancedVisibilityWritingMode: | ||
- value: "off" | ||
constraints: {} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
docker-compose -f docker-compose-cqlproxy-schema.yml run temporal-admin-tools -ep cql-proxy -k temporal setup-schema -v 0.0 | ||
docker-compose -f docker-compose-cqlproxy-schema.yml run temporal-admin-tools -ep cql-proxy -k temporal update-schema -d schema/cassandra/temporal/versioned/ | ||
|
||
docker-compose -f docker-compose-cqlproxy-schema.yml run temporal-admin-tools -ep cql-proxy -k temporal_visibility setup-schema -v 0.0 | ||
docker-compose -f docker-compose-cqlproxy-schema.yml run temporal-admin-tools -ep cql-proxy -k temporal_visibility update-schema -d schema/cassandra/visibility/versioned/ |