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

More debugging and use new tag #6

Merged
merged 2 commits into from Mar 27, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions bin/plow
Expand Up @@ -75,9 +75,9 @@ else
TAG=${PWD##*/}
[[ $ROLE ]] && TAG+="_$ROLE"
TAG+="_$ENVIRONMENT"
DESCRIBE_TAG=$(ec2-describe-tags --filter "key=name" --filter "value=$TAG")
[[ $DESCRIBE_TAG ]] || bail "no target server found matching '$TAG'"

DESCRIBE_TAG=$(ec2-describe-tags --filter "key=Name" --filter "value=$TAG")
[[ $DESCRIBE_TAG ]] || bail "no target server found matching '$TAG'"
INSTANCE_NAMES=($(echo "${DESCRIBE_TAG}" | grep TAG | awk {'print $3'}))

for instance in ${INSTANCE_NAMES[@]}; do
Expand Down Expand Up @@ -107,5 +107,6 @@ fi

mkdir -p .plow/files && cp ${FILES[@]} .plow/files/ && cd .plow
for server in ${SERVERS[@]}; do
echo -e "\033[1;35m== Plowing $server\033[0m"
tar cz . | ssh $USER@$server "rm -rf plow && mkdir plow && cd plow && tar xz && $SUDO bash plow.sh"
done