-
Notifications
You must be signed in to change notification settings - Fork 277
Performance testing script: cleanup, bugfixes, new features #3517
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
Changes from all commits
4857bf0
5d9e0c3
810bc88
7a2d2f4
72129a4
3d55685
03aa2b8
1614a5f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
### BEGIN INIT INFO | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❓ I don't know what the next 8 lines of code do...? That aren't informative to me? |
||
# Provides: ec2-terminate | ||
# Required-Start: $network $syslog | ||
# Required-Stop: | ||
# Default-Start: | ||
# Default-Stop: 0 1 6 | ||
# Short-Description: ec2-terminate | ||
# Description: send termination email | ||
### END INIT INFO | ||
# | ||
|
||
case "$1" in | ||
start|status) | ||
exit 0 | ||
;; | ||
stop) | ||
# run the below | ||
;; | ||
*) | ||
exit 1 | ||
;; | ||
esac | ||
|
||
# send instance-terminated message | ||
# http://rogueleaderr.com/post/48795010760/how-to-notifyemail-yourself-when-an-ec2-instance/amp | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❓ Is this the source of this code? Probably want to make it more obvious that's what this link is for, e.g.
|
||
ut=$(cat /proc/uptime | cut -f1 -d" ") | ||
aws --region us-east-1 sns publish \ | ||
--topic-arn #SNSTOPIC# \ | ||
--message "instance terminating after $ut s at #MAXPRICE# USD/h" | ||
sleep 3 # make sure the message has time to send | ||
aws s3 cp /var/log/cloud-init-output.log \ | ||
s3://#S3BUCKET#/#PERFTESTID#/$HOSTNAME.cloud-init-output.log | ||
|
||
exit 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⛏️ Add docs at the top for how to run this (e.g. it looks like it should be called
ec2-terminate.sh start|status
)