First let’s start with OpsWorks. AWS OpsWorks is a configuration management service that helps you configure and operate applications in a cloud enterprise by using Puppet or Chef.
AWS OpsWorks Stacks and AWS OpsWorks for Chef Automate let you use Chef cookbooks and solutions for configuration management, while OpsWorks for Puppet Enterprise lets you configure a Puppet Enterprise master server in AWS. Puppet offers a set of tools for enforcing the desired state of your infrastructure, and automating on-demand tasks.
While Elastic Beanstalk is sufficient for deploying web applications and CloudFormation for standing up AWS infrastructure, neither is able to manage detailed configuration of the operating systems and infrastructure such as updates and configuration of EC2 instances.
Often when migrating from on premise, Chef and Puppet were used to manage the infrastructure and hence the same toolsets and configuration can be repurposed for use of the cloud or for managing a hybrid cloud environment. OpsWorks for Puppet Enterprise lets you use Puppet to automate how nodes are configured, deployed, and managed, whether they are Amazon EC2 instances or on-premises devices
AWS OpsWorks Stacks, provides a simple and flexible way to create and manage stacks and applications. and deploy and monitor applications in your stacks. You can create stacks that help you manage cloud resources in specialized groups called layers. A layer represents a set of EC2 instances that serve a particular purpose, such as serving applications or hosting a database server. Layers depend on Chef recipes to handle tasks such as installing packages on instances, deploying apps, and running scripts.
Automatic scaling is based on two instance types, which adjust a layer’s online instances based on different criteria:
They allow a stack to handle loads that follow a predictable pattern by including instances that run only at certain times or on certain days. For example, you could start some instances after 6PM to perform nightly backup tasks or stop some instances on weekends when traffic is lower.
They allow a stack to handle variable loads by starting additional instances when traffic is high and stopping instances when traffic is low, based on any of several load metrics. For example, you can have AWS OpsWorks Stacks start instances when the average CPU utilization exceeds 80% and stop instances when the average CPU load falls below 60%.
Both time-based and load-based instances are supported for Linux stacks, while only time-based instances are supported for Windows stacks.
A common practice is to use all three instance types together, as follows.