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

Add elasticsearch cli tool #2977

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

gnz00
Copy link
Contributor

@gnz00 gnz00 commented Jun 9, 2022

What changed?

  • A new elasticsearch-cli-tool that replaces curl invocations
  • ClusterPutSettings and Ping methods added to the ES client wrappers

Why?
Currently, there are scripts referenced in the dockerfiles and the helm charts that rely on curl to create ES indices and poll for ES availability, e.g.

https://github.com/temporalio/docker-builds/blob/main/docker/auto-setup.sh#L245-L263
https://github.com/temporalio/docker-builds/blob/main/docker/auto-setup.sh#L265-L278
https://github.com/temporalio/temporal/blob/master/Makefile#L372-L377
https://github.com/temporalio/helm-charts/blob/master/templates/server-job.yaml#L281
https://github.com/temporalio/helm-charts/blob/master/templates/server-job.yaml#L288-L289
https://github.com/temporalio/helm-charts/blob/master/templates/server-deployment.yaml#L76

It would be better if there was a tool that leveraged the built-in temporal ES auth providers (#1011) and a place to put common ES operations

How did you test it?

  • Verified the tool using a new AWS Opensearch domain running Elasticsearch 7.10
  • Ran the test suites

Potential risks

  • An additional tool to maintain
  • May be a better place for this
  • Curl supports AWSv4 signature signing, but this would allow other providers to be implemented and keep things consistent with the core temporal ES auth provider implementation

Is hotfix candidate?
No

gnz00 added 4 commits June 8, 2022 16:30
Signed-off-by: Alexander Mays <alex@eastside.io>
Signed-off-by: Alexander Mays <alex@eastside.io>
Signed-off-by: Alexander Mays <alex@eastside.io>
Signed-off-by: Alexander Mays <alex@eastside.io>
@gnz00 gnz00 requested a review from a team as a code owner June 9, 2022 00:16
@gnz00 gnz00 changed the title Feature/elasticsearch cli tool Add elasticsearch-cli-tool Jun 9, 2022
@alexshtin
Copy link
Member

alexshtin commented Jun 9, 2022

😮 this is great! I've never had time for it and honestly curl was good enough. Is the auth a main motivation for you? I need to review this.

@gnz00
Copy link
Contributor Author

gnz00 commented Jun 9, 2022

😮 this is great! I've never had time for it and honestly curl was good enough. Is the auth a main motivation for you? I need to review this.

Hah, yea I'm trying to write a Terraform module that can deploy to an AWS stack with RDS + Opensearch. The necessary piece was #2830, but this will allow me to avoid having to wrap the Dockerfile or modify the helm-chart. I'll have to PR both of those with some adjustments I've made for these changes as well.

@robholland robholland changed the title Add elasticsearch-cli-tool Add elasticsearch cli tool Jun 17, 2022
@sync-by-unito sync-by-unito bot closed this Mar 3, 2023
@yycptt yycptt reopened this Mar 3, 2023
@yiminc yiminc requested a review from rodrigozhou October 6, 2023 16:26
Copy link

This PR was marked as stale. Please update or close it.

@github-actions github-actions bot added the stale label May 19, 2024
@github-actions github-actions bot removed the stale label Dec 1, 2024
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.

3 participants