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

Another bash script to power up|down aiven services using service tags #71

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

olivierhuber-aiven
Copy link

This is bash script exemple to power up|down aiven services in a defined order|sequence using services tags
The service tags could look like this in the Aiven console:
services-tags-env-screenshot

@troysellers
Copy link
Contributor

@lornajane - what do you think about this from Olivier. An example of why you might want to tag Aiven services?

@@ -0,0 +1,101 @@
#!/bin/bash

# jq needs to be installed https://stedolan.github.io/jq/
Copy link
Contributor

Choose a reason for hiding this comment

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

Would this (or a smaller version of it?) be useful in the USAGE output? For those folks like me who just download and run things :)

Copy link
Author

Choose a reason for hiding this comment

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

I like this idea! A bit like Git that says "no no but you might have wanted to write this instead?" ;)

done

echo "Turning [$POWER] services for project [$PROJECT] tagged [$TAG_ENV]"

Copy link
Contributor

Choose a reason for hiding this comment

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

There are services that either have complete data loss (e.g. Kafka) or run the risk of partial data loss (e.g. Redis) when being powered off. Is a confirmation dialog that acknowledges this risk important here?

Copy link
Author

Choose a reason for hiding this comment

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

Oh right! Why not. Let's go for a confirmation dialog then!

@lornajane
Copy link
Contributor

I really like the start sequence as a reason to tag services, it's a nice real-world use case! @olivierhuber-aiven would you consider writing this as a blog post with explanation and the avn and jq examples included? I think the bash script is pretty cool here in the examples repo, but for a blog post we'd write more words and probably just get the user to run each command at the different stages of the post to show them some tips - then we can link to this script as a final "ta-da!" gesture. Ping me if this sounds like something you'd be interested in doing and I'll show you how our blog post process works?

@olivierhuber-aiven
Copy link
Author

Thanks @lornajane
I would like to write this Blog post indeed!
Let me ping you on Slack ...

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