Here, we will understand the basics of OpsWorks.
- It is a configuration management service
- configure and operate applications in AWS by using
- Chef
- Puppet
- There are 2 variants: AWS OpsWorks Stacks and AWS OpsWorks for Chef Automate.
- OpsWorks Stacks Chef Automate can use Chef cookbooks
- Puppet Enterprise configure Puppet Enterprise master server in AWS.
OpsWorks Structure
- OpsWorks Stack – collection of resources for specific purpose
- OpsWorks Layer – set of shared functionailty applied to a group of components
- OpsWorks Instance – actaul units of compute; inherits some from stack/layer
- OpsWorks Application – app deployed into one or more instances
OpsWorks Details
- OpsWorks Agent –
- CHEF, responsible for configuration/reconfiguration of machines as per recipes
- OpsWorks Automation Engine –
- responsible for creating, deleting, updating EC2 instances and other services; handle load balancing, Autoscaling, Auto healing, Lifecycle events
- Recipes & Cookbooks – Desired state engines;
- Recipes tell OpsWorks WHAT you want the end result to be; Cookbooks contain recipes and all associated data to support them.
AWS OpsWorks for Puppet Enterprise
- Can create AWS-managed Puppet master servers
- A Puppet master server can
- manages nodes
- stores facts about those nodes
- serve as central repository for Puppet modules.
- Puppet modules are Puppet code for infrastructure configuration, which are
- Reusable
- shareable units
- For custom modules
- Download community modules from Puppet Forge
- Can also use Puppet Development Kit
- manage module deployment with Puppet Code Manager.
- Use Puppet to automate how nodes are
- Configured
- Deployed
- Managed
- Full-stack automation is provided which includes
- software and operating system configurations
- package installations
- database setups
- change management
- policy enforcement
- monitoring
AWS OpsWorks for Chef Automate
- Create AWS-managed Chef servers having Chef Automate premium features
- Use the Chef DK and other Chef tooling
- A Chef server is used to
- manage nodes in AWS
- stores information about those nodes
- serve as central repository for Chef cookbooks
- Cookbooks contain recipes executed by Chef Infra client agent on each node
- Available Chef tools to manage nodes and
cookbooks on a Chef server
- knife
- Test Kitchen
- Chef Automate installs and manages
- Chef Automate
- Chef Infra
- Chef InSpec
- Can also use community-authored or custom Chef cookbooks
AWS OpsWorks Stacks
- AWS involves groups of resources, and group of instances is called stack.
- OpsWorks Stacks, creates and manages stacks and applications.
- Deploy and monitor applications in stacks.
- Manage AWS resources in specialized groups called layers.
- A layer is a set of EC2 instances serving a particular purpose like database, web hosting
- Does not require or create Chef servers
- Can be accessed globally
- use to create and manage instances globally
- Can integrate with IAM for resource access control
- Stacks can
- monitor instance health
- provision new instances, if needed
- makes use of Auto Healing and Auto Scaling.
Opsworks Events
- Events can run manually using events stack run command functionality; When event occurs it runs set of recipes assigned to that event.
- Each layer has own recipes for that event.
- SETUP – Occurs when an instance has finished booting
- CONFIGURE – Occurs when instance enters/leaves online, associate/disassociate EIP, attach/detach LB to a layer
- DEPLOY – Occurs when run the deploy command on an instance
- UNDEPLOY – Occurs when delete an application or run Undeploy command
- SHUTDOWN – Occurs when an instance is shutdown, but before its terminated; allows cleanup by running recipes
AWS Certified DevOps Engineer Free Practice TestTake a Quiz