This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# How to use: Pass to cloud-init as user data, or run as a script. When | |
# port 80 is open, your cloud is ready. | |
set -e | |
MYIP=`ifconfig eth1 | grep "inet addr" | awk -F: '{print $2}' | awk '{print $1}'` | |
HEADNODE=${1:-$MYIP} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# How to use: Pass to cloud-init as user data, or run as a script. When | |
# port 80 is open, your cloud is ready. | |
set -e | |
MYIP=`ifconfig eth0 | grep "inet addr" | awk -F: '{print $2}' | awk '{print $1}'` | |
# Fix hosts | |
echo 127.0.0.1 $(hostname) | sudo tee -a /etc/hosts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# How to use: Pass to cloud-init as user data, or run as a script. When | |
# port 80 is open, your cloud is ready. | |
set -e | |
MYIP=`ifconfig eth1 | grep "inet addr" | awk -F: '{print $2}' | awk '{print $1}'` | |
HEADNODE=${1:-$MYIP} |