Skip to content

Commit

Permalink
Modified scripts to cinfigure aws
Browse files Browse the repository at this point in the history
  • Loading branch information
tilaks26 committed Jan 25, 2017
1 parent 99403c3 commit 8f8dd84
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
28 changes: 28 additions & 0 deletions scripts/before-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,34 @@ mkdir /home/ec2-user/laravel-portal/
echo 'Update OS'
sudo yum -y update

echo 'Installing git version control'
sudo yum install -y git-all.noarch

echo 'Install aws-cli'
sudo yum install -y aws-cli

echo 'Move to user home directory'
cd /home/ec2-user/

echo 'Configure AWS'
echo "$AWS_ACCESS_KEY
$AWS_SECRET_ACCESS_KEY
" | aws configure

echo 'Set up S3 access for aws code deploy'
aws s3 cp s3://aws-codedeploy-us-west-2/latest/install . --region us-west-2
chmod +x ./install
sed -i "s/sleep(.*)/sleep(10)/" install
sudo ./install auto

echo 'Start AWS code deploy agent'
sudo service codedeploy-agent start

echo 'Change directory'
cd /home/ec2-user/laravel-portal

echo 'Check if PHP is installed'
php --version
if [ "$?" -ne 0 ]; then
Expand Down
2 changes: 1 addition & 1 deletion scripts/install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
echo 'Deploying Laravel Portal'
cd '/home/ec2-user/laravel-portal'
cd /home/ec2-user/laravel-portal

echo 'Run Laravel'
php -S localhost:4000

0 comments on commit 8f8dd84

Please sign in to comment.