Commit 2b7dcac0 by Feanil Patel

Merge pull request #1235 from edx/feanil/abbey_profiles

Feanil/abbey profiles
parents 35de76e1 7f4b4faa
...@@ -56,7 +56,7 @@ aws_debian_pkgs: ...@@ -56,7 +56,7 @@ aws_debian_pkgs:
aws_pip_pkgs: aws_pip_pkgs:
- https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz - https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz
- awscli - awscli
- boto==2.20.1 - boto==2.29.1
aws_redhat_pkgs: [] aws_redhat_pkgs: []
aws_s3cmd_version: s3cmd-1.5.0-beta1 aws_s3cmd_version: s3cmd-1.5.0-beta1
......
...@@ -3,7 +3,7 @@ PyYAML==3.11 ...@@ -3,7 +3,7 @@ PyYAML==3.11
Jinja2==2.7.2 Jinja2==2.7.2
MarkupSafe==0.23 MarkupSafe==0.23
argparse==1.2.1 argparse==1.2.1
boto==2.28.0 boto==2.29.1
ecdsa==0.11 ecdsa==0.11
paramiko==1.14.0 paramiko==1.14.0
pycrypto==2.6.1 pycrypto==2.6.1
......
...@@ -61,17 +61,9 @@ fi ...@@ -61,17 +61,9 @@ fi
export PYTHONUNBUFFERED=1 export PYTHONUNBUFFERED=1
if [[ -z $configuration ]]; then cd $WORKSPACE/configuration
cd configuration configuration=`git rev-parse --short HEAD`
configuration=`git rev-parse HEAD` cd $WORKSPACE
cd ..
fi
if [[ -z $configuration_secure ]]; then
cd configuration-secure
configuration_secure=`git rev-parse HEAD`
cd ..
fi
base_params="" base_params=""
if [[ -n "$base_ami" ]]; then if [[ -n "$base_ami" ]]; then
...@@ -96,11 +88,6 @@ if [[ ! -z "$configurationprivaterepo" ]]; then ...@@ -96,11 +88,6 @@ if [[ ! -z "$configurationprivaterepo" ]]; then
fi fi
fi fi
stackname_params=""
if [[ ! -z "$playbook_dir" ]]; then
stackname_params="--playbook-dir $playbook_dir"
fi
hipchat_params="" hipchat_params=""
if [[ ! -z "$hipchat_room_id" ]] && [[ ! -z "$hipchat_api_token" ]]; then if [[ ! -z "$hipchat_room_id" ]] && [[ ! -z "$hipchat_api_token" ]]; then
hipchat_params="--hipchat-room-id $hipchat_room_id --hipchat-api-token $hipchat_api_token" hipchat_params="--hipchat-room-id $hipchat_room_id --hipchat-api-token $hipchat_api_token"
......
...@@ -647,6 +647,7 @@ def launch_and_configure(ec2_args): ...@@ -647,6 +647,7 @@ def launch_and_configure(ec2_args):
def send_hipchat_message(message): def send_hipchat_message(message):
print(message)
#If hipchat is configured send the details to the specified room #If hipchat is configured send the details to the specified room
if args.hipchat_api_token and args.hipchat_room_id: if args.hipchat_api_token and args.hipchat_room_id:
import hipchat import hipchat
...@@ -710,6 +711,7 @@ if __name__ == '__main__': ...@@ -710,6 +711,7 @@ if __name__ == '__main__':
else: else:
base_ami = args.base_ami base_ami = args.base_ami
error_in_abbey_run = False
try: try:
sqs_queue = None sqs_queue = None
instance_id = None instance_id = None
...@@ -749,6 +751,7 @@ if __name__ == '__main__': ...@@ -749,6 +751,7 @@ if __name__ == '__main__':
play=args.play, play=args.play,
exception=repr(e)) exception=repr(e))
send_hipchat_message(message) send_hipchat_message(message)
error_in_abbey_run = True
finally: finally:
print print
if not args.no_cleanup and not args.noop: if not args.no_cleanup and not args.noop:
...@@ -761,3 +764,5 @@ if __name__ == '__main__': ...@@ -761,3 +764,5 @@ if __name__ == '__main__':
# Check to make sure we have an instance id. # Check to make sure we have an instance id.
if instance_id: if instance_id:
ec2.terminate_instances(instance_ids=[instance_id]) ec2.terminate_instances(instance_ids=[instance_id])
if error_in_abbey_run:
exit(1)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment