welcome back to back space Academy so what is AWS opsworks it's a 2
configuration management platform so what that means is that we have assets 3
that we want to deploy our application on and they will consist of instances 4
maybe ec2 instances they could consist of elastic load balancers a number of 5
things and the way that those assets or those resources and instances are 6
configured we need to define and that is done with op works in code so this 7
provides us much more control over infrastructure design and management 8
that we would get with elastic beanstalk and we use chef we use chef recipes and 9
they enable us to have that infrastructure designed as code and 10
gives us very fine-grained control over our infrastructure now opt works it 11
consists as a configuration management model and it's based upon stacks layers 12
and recipes which we'll go through right now so a stack that is the top level op 13
works entity and it represents a set of instances and applications that you want 14
to manage collectively so that could be a web server it could be an enterprise 15
resource planning application so it's a set of instances and applications for 16
that that are managed collectively so for example if we had a web server stack 17
that may contain a load balancer server instances and a database so within a 18
stack we have layers and those layers define how to set up and configure 19
instances and resources and you can mix and match these layers so a layer can be 20
used in multiple stacks ok and a stack can be made up of one layer or can be 21
made up of multiple layers but a stack must contain at least one layer and 22
layers they must contain at least one instance 23
now these instances can also be a member of multiple layers so you can reuse 24
instances you can better utilize them across multiple layers and the 25
applications will there the code that will run on your server so if it's a 26
node.js server that will be your node.js application code and that will run on 27
your no junior server if that is what you are setting up with ODS works so 28
scaling so we have three different types of scaling that we can use lies with 29
opsworks so you can have 24/7 instances and they can be added to a layer and you 30
can mentally start or stop or reboot those corresponding ec2 instances that 31
have been defined and we also have automatic scaling so that can be on a 32
time-based or low base so it would be time-based if it's based upon a schedule 33
so between 7:00 and 8:00 o'clock at night we're going to have X capacity we 34
could be load based so that would be based upon a load metrics a network 35
traffic or CPU utilization so when demand is high that would scale up so an 36
effective strategy would be to use all three different types of scaling so you 37
would have for your baseline capacity you would have a 24-7 instance and then 38
for automatic scaling for your peak periods you could have a time-based 39
instance based upon a schedule and you could also have a load based instances 40
that would react to network traffic or CPU utilization to take advantage that 41
that you didn't expect and you need excess capacity that you didn't have so 42
then once we've got those layers we've got our stack we can then look at 43
deployment and customizations so our app and its associated infrastructure that 44
is needed for that app to run will be deployed automatically through opsworks 45
and our chef recipes they define our infrastructure as 46
so we can use a chef recipes to further customize we can use those chef recipes 47
to redeploy our environment again we can also use those chef recipes under 48
version control so we can not only have our our infrastructure as code we can 49
have it manage our infrastructure managed under version control and we can 50
also reuse a reuse our code so that's a very big difference between what you 51
would have with elastic Beanstalk okay so less expense talk just looks after 52
deploying your application to resources so this looks but a lot more it's a lot 53
more advanced and a lot more fine-grained and far more integrated 54
with with the infrastructure