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

Staging #23

Merged
merged 18 commits into from
Aug 6, 2016
Prev Previous commit
Code cleanup
  • Loading branch information
andjelx committed Aug 6, 2016
commit 92fb5ed3f17ea1a3c6b8f2705c13ff4f244b899f
1 change: 0 additions & 1 deletion scripts/00-aws-ec2-configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ if [ -n "$XDCONFIG" ]; then
#instance_id=$($aws ec2 describe-instances --filters "Name=key-name,Values=${KEY}" | jq -r .Reservations[0].Instances[0].InstanceId)
#echo "Instance ID to modify: ${instance_id}"
#$aws ec2 modify-instance-attribute --groups ${SSH_SECURITY_GID} --instance-id $instance_id
#$aws ec2 modify-instance-attribute --instance-id $instance_id --instance-initiated-shutdown-behavior "Terminate"

$aws autoscaling create-auto-scaling-group \
--auto-scaling-group "$autoscale_group" \
Expand Down
10 changes: 0 additions & 10 deletions scripts/00-aws-ec2-deconfigure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,15 @@ NODRY=$2

if [ -n "$XDCONFIG" ]; then
source $XDCONFIG
# source config
# ami_id=ami-5189a661 #Ubuntu Server 14.04 LTS (HVM)

autoscale_group=xd-as-group
launch_config=xd-launch-config
#zone=${REGION}a
#AUTH="--access-key-id ${AWS_ACCESS_KEY} --secret-key ${AWS_SECRET_KEY}"

# one-time setup of xd-scraper
#echo aws iam create-instance-profile --instance-profile-name xd-scraper
#echo aws iam add-role-to-instance-profile --instance-profile-name xd-scraper --role-name xd-scraper

if [ -n "$NODRY" ]; then
aws="aws"
else
aws="echo -e \naws"
fi

# from https://alestic.com/2011/11/ec2-schedule-instance/
$aws autoscaling delete-scheduled-action \
--scheduled-action-name "xd-schedule-start" \
--auto-scaling-group-name "$autoscale_group"
Expand Down