Register a new EC2 instance as a Tutum node on launch.
This script is run at startup on new EC2 instances (user-data
) to register the instance as a Tutum node.
At Vidsy we wanted to use Tutum, but also benefit from the controls and features of AWS.
Currently the script:
- Installs
tutum-cli
andaws-cli
. - Sets environment variables for Tutum authentication.
- Uses "Bring Your Own Node" CLI command to register new instance as Tutum node.
- Remove nodes from Tutum which have become "
Unreachable
". - Waits for Tutum deployment to finish.
- Retrieves EC2 instance tags.
- Adds each tag as a Tutum tag.
- Sends a Slack notification telling the team that a new instance was launched.
- Delete all installed packages and Bash history.
Look at any open issues labeled as to-do
.
- Tutum does not allow tags to be added to a node until it has finished deploying.
- Help improve this repo!
- Feel free to ping me (
@revett
) with any questions, on the Tutum community Slack. - A lot of these ideas came from
@jskeates
, he helped a lot. - MIT License (MIT).