Various Scripts for an Easier Life
This script was written mainly for Riak on EC2 but can be used anywhere. When spinning up a new machine, or when a new IP address is assigned to an existing machine you need to tell Riak about the change. To quickly do this in an automated fashion, just run reip.sh and pass in the old IP Address as a single parameter.
bash reip.sh 127.0.0.1
Behind the scenes, the following actions are taken:
- A backup of the current vm.args and app.config files are made.
- The vm.args and app.config files are updated with the eth0 IP Address.
- A reip command is issues to Riak to update the node.
The script works great on an Amazon Linux but currently assumes the configuration files are in the /etc/riak folder