-
Notifications
You must be signed in to change notification settings - Fork 11
/
autoscalling
74 lines (66 loc) · 2.19 KB
/
autoscalling
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
/**************************
Auto scale
**************************/
Scale in and scale out
=> Launch Configure = Instance Type, AMI, SG, Storage
=> Scaling Policy = Scale In and scale out
connect ec2=>
bash
=> stress
=> remove stress
prequest
==> You must have one AMI
=>Step
=> create auto scale group
=> Select AMI
=>Configuration Detail
name
myautoscale
=>Advanced Details
=>User data
Add bootstrap
"#!/bin/bash
sudo yum install stress -y
"
=>Create Launch Configuration
Add http
=>Create Auto Scaling Group
=>Groupname
=>Number of instance =1
=> Select alteast 3 subnet
=>check Load Balancing
=>Add loadBlacancer
=>Use scaling policies to adjust the capacity of this group
=>Scale the Auto Scaling group using step or simple scaling policies
=>Add Alarm (for both scaleup and scale down)
=>whenever=>CPu
=>is lessthan or greater = provide %
=>Add Tags
/**************************
Strees Testing ******HW
**************************/
=> Connect with launched Ec2
=>Open terminal
=>type "stress"
=>type "remove stress"
launch AS group every machine must have stree package
after it add undeer load balancer
=> Connect with launched Ec2
=>Open terminal
=>type "stress"
check new machine got added or not
=>type "remove stress"
check machine got removed or not
> First configure AS Configuration
> Lauch auto AS in the script
> Make sure to install http
> create indexfile
> start httpd server
> install stress
----------
Put AS under loadBlacancer
Connect with any machinee
type "stress"
and check is it adding new machine under loadBlacancer
type "remove stree"
and check is it removing machine under loadBlacancer