-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathTask_1
More file actions
125 lines (75 loc) · 3.39 KB
/
Task_1
File metadata and controls
125 lines (75 loc) · 3.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
AWS SysOps Administrator- Associate Project – Recreation Domain: Recreation
DESCRIPTION
Your development team has asked you to create a small Linux instance and deploy a PHP application to it.
Prerequisites to run the application are apache (httpd) + mod_php.
Application is uploaded to an S3 bucket.
A few days later, after tests are successfully performed, the development team asks you to deploy the application to a secure, load balanced environment.
#---------------------------------------------------------#
STEP-1 : Write PHP Code
STEP-2 : Code Should Versioned i.e. Github or S3
STEP-3 : Create a VPC(Default or Custom) & Resources
STEP-4 : EC2 instance of Linux/Windows
STEP-5 : Install Apache WebServer i.e. httpd
STEP-6 : Deploy the PHP code from github on DocumentRoot i.e. /var/www/html
STEP-7 : Test the Application using WebBrowser
STEP-8 : Create HostedZone part of Route53 (keshavkummari.com) :
- NS
- SOA
- A
Note : Create A Record & Copy the NS and update under Domain Register
STEP-9 : Load Balancer & Update the Route53 A record
STEP-10 : Create a Centralized Storage for Code Deployment i.e. EFS
STEP-11 : Create Launch Configuration (Write the Script)
STEP-12 : Create AutoScaling : 2
- Increasing Group : >=80 (1-5) add 1 server
- Decreasing Group : <=40 (1-5) remove 1 server
STEP-13 : Test and Validate the Application by going to Various Browsers
#---------------------------------------------------------#
#---------------------------------------------------------#
STEP-1 : Write PHP Code
https://www.free-css.com/assets/files/free-css-templates/download/page231/bizexpress-v1.0.1.zip
STEP-2 : Code Should Versioned i.e. Github or S3
File : bizexpress-v1.0.1.zip
STEP-3 : Create a VPC(Default or Custom) & Resources
STEP-4 : EC2 instance of Linux/Windows
STEP-5 : Install Apache WebServer i.e. httpd
STEP-6 : Deploy the PHP code from github on DocumentRoot i.e. /var/www/html
STEP-7 : Test the Application using WebBrowser
STEP-8 : Create HostedZone part of Route53 (keshavkummari.com) :
- NS
- SOA
- A
Note : Create A Record & Copy the NS and update under Domain Register
STEP-9 : Load Balancer & Update the Route53 A record
###STEP-10 : Create a Centralized Storage for Code Deployment i.e. EFS
STEP-11 : Create Launch Configuration (Write the Script)
#!/bin/bash
cd /opt/
yum install wget* curl* vim* unzip* -y
yum update -y
wget https://www.free-css.com/assets/files/free-css-templates/download/page231/bizexpress-v1.0.1.zip
unzip *.zip
cd Biz*
yum install http* --skip-broken -y
mv * /var/www/html/
service httpd start
# systemct start httpd.service
STEP-12 : Create AutoScaling : 2
- Increasing Group : >=80 (1-5) add 1 server
- Decreasing Group : <=40 (1-5) remove 1 server
STEP-13 : Test and Validate the Application by going to Various Browsers
#-------------------------------------------------------#
Launch Configuration Script:
#!/bin/bash
yum update -y
yum install vim* curl* wget* unzip* nfs* -y
yum install http* --skip-broken -y
service httpd start
chkconfig httpd on
sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport fs-4463510f.efs.us-east-1.amazonaws.com:/ /var/www/html/
service httpd restart
wget https://www.free-css.com/assets/files/free-css-templates/download/page231/bizexpress-v1.0.1.zip
unzip *.zip
cd Biz*
mv * /var/www/html/
service httpd restart