parent
d98bef05c2
commit
4bd9c782ce
@ -0,0 +1,22 @@ |
||||
version: 0.0 |
||||
os: linux |
||||
files: |
||||
- source: ./ |
||||
destination: /home/ec2-user/projects/ |
||||
hooks: |
||||
BeforeInstall: |
||||
- location: aws-scripts/say_hello.sh |
||||
timeout: 300 |
||||
runas: root |
||||
AfterInstall: |
||||
- location: aws-scripts/say_hello.sh #maybe start the server |
||||
timeout: 300 |
||||
runas: root |
||||
ApplicationStart: |
||||
- location: aws-scripts/say_hello.sh #maybe start the server. |
||||
timeout: 300 |
||||
runas: root |
||||
ApplicationStop: |
||||
- location: aws-scripts/say_hello.sh |
||||
timeout: 300 |
||||
runas: root |
@ -1,7 +1,9 @@ |
||||
sudo yum update |
||||
sudo yum install wget |
||||
REGION=$(curl 16.9.254.169.254/latest/meta-data/placement/availability-zone | sed 's/[a-z]$//' ) |
||||
#!/bin/bash -x |
||||
REGION=$(curl 169.254.169.254/latest/meta-data/placement/availability-zone/ | sed 's/[a-z]$//') |
||||
yum update -y |
||||
yum install ruby wget -y |
||||
cd /home/ec2-user |
||||
wget https://aws-codedeploy-$REGION.s3.amazonaws.com/lates/install |
||||
wget https://aws-codedeploy-$REGION.s3.amazonaws.com/latest/install |
||||
chmod +x ./install |
||||
sudo ./install auto |
||||
./install auto |
||||
mkdir projects |
Loading…
Reference in new issue