Merge pull request #17 from simple-rules/ricl-deploy

Ricl deploy
pull/18/head
7z7 6 years ago committed by GitHub
commit 45cf34366b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      appspec.yml
  2. 1
      aws-scripts/run_instances.sh
  3. 1
      aws-scripts/say_bye.sh
  4. 2
      aws-scripts/say_hello.sh
  5. 1
      aws-scripts/setup_golang.sh
  6. 16
      aws-scripts/spot-instance/request-spot.sh
  7. 7
      aws-scripts/spot-instance/userdata.sh

@ -17,6 +17,6 @@ hooks:
timeout: 300
runas: root
ApplicationStop:
- location: aws-scripts/say_hello.sh
- location: aws-scripts/say_bye.sh
timeout: 10
runas: root

@ -1,3 +1,4 @@
#!/bin/bash -x
echo "Run Instances" >> tmplog
cd /home/ec2-user/projects/src/harmony-benchmark
./deploy_one_instance.sh global_nodes.txt

@ -0,0 +1 @@
echo "Bye" >> tmplog

@ -1 +1 @@
echo "Hi, I am in aws-scripts and its seems to have worked."
echo "Hello" >> tmplog

@ -1,4 +1,5 @@
#!/bin/bash -x
echo "Setup Golang" >> tmplog
sudo yum update -y
sudo yum install -y golang

@ -0,0 +1,16 @@
aws ec2 request-spot-instances \
--instance-count 1 \
--block-duration-minutes 60 \
--launch-specification "{ \
\"ImageId\": \"ami-f2d3638a\", \
\"InstanceType\": \"m3.medium\", \
\"SecurityGroups\": [ \
\"richard-spot-instance SSH\" \
], \
\"KeyName\": \"richard-spot-instance\", \
\"IamInstanceProfile\": { \
\"Name\": \"RichardCodeDeployInstanceRole\" \
}, \
\"UserData\": \"`base64 -w 0 userdata.sh`\" \
}" \
--dry-run # uncomment this line to send a real request.

@ -0,0 +1,7 @@
#!/bin/bash
yum -y update
yum install -y ruby
cd /home/ec2-user
curl -O https://aws-codedeploy-us-west-2.s3.amazonaws.com/latest/install
chmod +x ./install
./install auto
Loading…
Cancel
Save