Team :
- Nikhil Katre (nkatre@ncsu.edu)
- Pengyu Li (pli5@ncsu.edu)
Submission: Milestone#Deploy
Link To Sample Repository Used: WebGoat
Submission Files:
- README.md
All servers are hosted in AWS using EC2 service
- Master = 52.4.40.18
- Canary 1 (Blue) = 52.5.33.235
- Canary 2 (Green) = 52.5.15.126
Install the following ON ALL THREE INSTANCES (master, canary1 and canary2) to achieve this Milestone
- Download and install salt
- Download and Install git
- ON ALL THREE INSTANCES (master, canary1 and canary2) allow all traffic option selected from security group in AWS
The following steps should be followed to make canary1 and canary2 as remote repository of master
-- Steps for Master
-
ssh
to master usingssh -i Nikhil.pem ubuntu@52.4.40.18
whereNikhil.pem
is the AWS key file attached with this submission -
Create a folder
Proj@Master
usingmkdir
-
Inside this folder initialize a bare repository using
git init --bare
-
Clone WebGoat repository inside this folder
-
Transfer the key file Nikhil.pem to master from local using the command :
scp -i Nikhil.pem Nikhil.pem ubuntu@52.4.40.18
-
Generate ssh key at master and bind AWS key (Nikhil.pem) with this ssh key as follows
ssh-keygen
cat ~/.ssh/id_rsa.pub | ssh -i Nikhil.pem ubuntu@52.5.33.235 "cat >> .ssh/authorized_keys"
cat ~/.ssh/id_rsa.pub | ssh -i Nikhil.pem ubuntu@52.5.15.126 "cat >> .ssh/authorized_keys"
-
Bind this key with ssh command at master for authentication
ssh-add Nikhil.pem
-
Setup SSH at MASTER
$ ssh-add Nikhil.pem
- Add git remote
$ git remote add blue ssh://ubuntu@52.5.33.235/blue.git
$ git remote add green ssh://ubuntu@52.5.15.126/green.git
$ mkdir blue.git
$ cd blue.git
$ git init --bare
$ mkdir /home/ubuntu/blue-www/
$ cat > hooks/post-receive
#!/bin/sh
GIT_WORK_TREE=/home/ubuntu/blue-www/ git checkout -f
Make post-receive executable:
$ chmod +x hooks/post-receive
$ mkdir green.git
$ cd green.git
$ git init --bare
$ mkdir /home/ubuntu/green-www/
$ cat > hooks/post-receive
#!/bin/sh
GIT_WORK_TREE=/home/ubuntu/green-www/ git checkout -f
Make post-receive executable:
$ chmod +x hooks/post-receive
Milestone#Deploy is evaluated based on the following Evaluation Parameters:
-
Automatic deployment environment configuration: 20%
-
Deployment of binaries created by build step: 20%
-
Remote deployment: 20%
-
Canary releasing: 20%
-
Canary analysis: 20%