TechnologyMarch 29, 2022

How to Connect Temporal.io to Astra DB in Just 5 Easy Steps with CQL-Proxy

This is the second post in a three-part series on how to connect Astra DB—a managed cloud-native database—with open-source Temporal.io to more easily manage even your heaviest workloads with the high performance and reliability of Apache CassandraⓇ.
Melissa Herrera
Melissa HerreraCloud Solutions Engineer
Michael Penick
Michael PenickDataStax
How to Connect Temporal.io to Astra DB in Just 5 Easy Steps with CQL-Proxy
ASTRA_TOKEN=<your Astra token>
ASTRA_DATABASE_ID=<your DB ID>
docker-compose -f docker-compose-schema.yaml run temporal-admin-tools \
  -ep cql-proxy -k temporal setup-schema -v 0.0
docker-compose -f docker-compose-schema.yaml run temporal-admin-tools \
  -ep cql-proxy -k temporal update-schema -d schema/cassandra/temporal/versioned/
2022-03-02T22:23:27.618Z INFO Validating connection to cassandra cluster. {"logging-call-at": "cqlclient.go:112"}

2022-03-02T22:42:53.526Z INFO Connection validation succeeded. {"logging-call-at": "cqlclient.go:118"}
2022-03-02T22:42:53.526Z INFO Starting schema setup {"config": {"SchemaFilePath":"","InitialVersion":"0.0","Overwrite":false,"DisableVersioning":false}, "logging-call-at": "setuptask.go:57"}
2022-03-02T22:42:53.526Z DEBUG Setting up version tables {"logging-call-at": "setuptask.go:67"}
2022-03-02T22:42:54.120Z DEBUG Current database schema version 1.6 is greater than initial schema version 0.0. Skip version upgrade {"logging-call-at": "setuptask.go:116"}
2022-03-02T22:42:54.120Z INFO Schema setup complete {"logging-call-at": "setuptask.go:131"}
services:
cql-proxy:
  container_name: cqlproxy
  image: datastax/cql-proxy:v${CQL_PROXY_VERSION}
  ...
  environment:
    - ASTRA_TOKEN=${ASTRA_TOKEN}
    - ASTRA_DATABASE_ID=${ASTRA_DATABASE_ID}
    - HEALTH_CHECK=true
 docker-compose up
% alias tctl="docker exec temporal-admin-tools tctl"
% tctl --ns test namespace register -rd 1
% Namespace test successfully registered.
c, err := client.NewClient(client.Options{HostPort: "127.0.0.1:7233", Namespace: "test"})
Discover more
MicroservicesDataStax Astra DB
Share

NoSQL and Vector DB
for Generative AI,
Instantly, At Scale

Vector search capabilities on Astra DB enable complex, context-sensitive searches across diverse data formats for use in Generative AI applications, powered by Apache Cassandra®.