Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds check-health command to temporal-cassandra-tool and switches start.sh to use that instead of cqlsh #885

Merged
merged 7 commits into from
Oct 21, 2020

Conversation

mastermanu
Copy link
Member

There are two changes:

  1. Add check-health to the temporal-cassandra-tool. This enables us to test connectivity to a Cassandra Cluster using username, password and any TLS settings.
  2. Switch startup.sh to use this new check-health command instead of cqlsh for auto-setup.

This change will enable auto-setup to work against a Cassandra DB configured with TLS or username/password when launching from the docker-compose file.

Tested auto-setup locally and the check-health command against a deployed Cassandra environment with username/password and mTLS enabled.

Low risk change

Copy link

@markmark206 markmark206 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice!

return handleErr(fmt.Errorf("unable to establish CQL session:%+v", err))
}

defer client.Close()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i guess we don't even need to defer, but this is good regression-proofing. ; )

tools/cassandra/handler.go Outdated Show resolved Hide resolved
tools/cassandra/main.go Outdated Show resolved Hide resolved
@markmark206
Copy link

(PS oh and it might be worthwhile to create a ticket to track adding this to temporal-sql-tool for feature parity, and to maybe let @rylandg / @cullywakelin know, in case we add docs for these tools.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No way to set cassandra configs (creds, tls option, etc) via docker-compose
4 participants