mirror of
https://github.com/hanzoai/tasks.git
synced 2026-10-04 02:04:03 +00:00
## What changed? https://github.com/temporalio/temporal/pull/6155 introduced the config value `allowedAuthenticators`. This PR updates the `temporal-cassandra-tool` to use this config value. It also updates `config_template.yaml` so that the config value can be set in docker images as well. ## Why? Cassandra supports several authenticators to verify the login credentials. Gocql implements a subset of them as [default allowed list of authenticators](https://github.com/gocql/gocql/blob/34fdeebefcbf183ed7f916f931aa0586fdaa1b40/conn.go#L27). It allows customization of this list to allow supporting additional authenticators. So with this change Temporal can connect to Cassandra clusters that have authenticators other than the default ones provided by Gocql. ## How did you test it? Ran `./temporal-cassandra-tool` and verified that it picked up the values in environment variable `CASSANDRA_ALLOWED_AUTHENTICATORS`. Couldn't test docker build since it's in a different repo. ## Potential risks <!-- Assuming the worst case, what can be broken when deploying this change to production? --> ## Documentation <!-- Have you made sure this change doesn't falsify anything currently stated in `docs/`? If significant new behavior is added, have you described that in `docs/`? --> ## Is hotfix candidate? No --------- Co-authored-by: Rob Holland <[email protected]>
Using the cassandra schema tool
This package contains the tooling for temporal cassandra operations.
For localhost development
For the very first time run:
make
then run:
make install-schema-cass
to create schema in your cassandra instance.
For production
Create the binaries
- Run
make - You should see an executable
temporal-cassandra-tool
Do one time database creation and schema setup for a new cluster
This uses Cassandra's SimpleStratagey for replication. For production, we recommend using a replication factor of 3 with NetworkTopologyStrategy.
temporal-cassandra-tool --ep $CASSANDRA_SEEDS create -k $KEYSPACE --rf $RF
See https://www.ecyrd.com/cassandracalculator for an easy way to determine how many nodes and what replication factor you will want to use. Note that Temporal by default uses LOCAL_QUORUM and LOCAL_SERIAL for read and write consistency.
./temporal-cassandra-tool -ep 127.0.0.1 -k temporal setup-schema -v 0.0 -- this sets up just the schema version tables with initial version of 0.0
./temporal-cassandra-tool -ep 127.0.0.1 -k temporal update-schema -d ./schema/cassandra/temporal/versioned -- upgrades your schema to the latest version
Update schema as part of a release
You can only upgrade to a new version after the initial setup done above.
./temporal-cassandra-tool -ep 127.0.0.1 -k temporal update-schema -d ./schema/cassandra/temporal/versioned -v x.x -- executes the upgrade to version x.x