AWS OpsWorks Stacks | Application Configuration and Management Flashcards
How do I get started with AWS OpsWorks Stacks?
Application Configuration and Management
AWS OpsWorks Stacks | Management Tools
The best way to get started with AWS OpsWorks Stacks is to work through the AWS OpsWorks Stacks Getting Started Guide (Linux | Windows), part of our technical documentation. Within a few minutes, you will be able to deploy and use your application.
What elements of my application can I control when using AWS OpsWorks Stacks?
Application Configuration and Management
AWS OpsWorks Stacks | Management Tools
An AWS OpsWorks Stack defines the configuration of your entire application: the load balancers, server software, database, etc. You control every part of the stack by building layers that define the software packages deployed to your instances and other configuration details such as Elastic IPs and security groups. You can also deploy your software onto layers by identifying the repository and optionally using Chef recipes to automate everything Chef can do, such as creating directories and users, configuring databases, etc. You can use OpsWorks Stacks’ built-in automation to scale your application and automatically recover from instance failures. You can control who can view and manage the resources that are used by your application, including ssh access to the instances that your application uses.
What software versioning and revision control systems does AWS OpsWorks Stacks support?
Application Configuration and Management
AWS OpsWorks Stacks | Management Tools
AWS OpsWorks Stacks can retrieve the code you want to deploy from common version control systems like Git and Subversion as well as HTTP and private or public S3 bundles. For example, you can deploy a specific version of your application by adding the version or branch from your Git repository into your OpsWorks Stacks app definition. You can also use Chef recipes to deploy your apps from anywhere you like using rsync or scp.
What operating systems does AWS OpsWorks Stacks support?
Application Configuration and Management
AWS OpsWorks Stacks | Management Tools
AWS OpsWorks Stacks currently supports Amazon Linux, Ubuntu 12.04 LTS, Ubuntu 14.04 LTS, and Windows Server 2012 R2.
Does AWS OpsWorks Stacks support Microsoft Windows?
Application Configuration and Management
AWS OpsWorks Stacks | Management Tools
Yes. AWS OpsWorks Stacks supports Windows Server 2012 R2.
Can I use AWS OpsWorks Stacks to deploy applications that are highly available?
Application Configuration and Management
AWS OpsWorks Stacks | Management Tools
Yes. If your application supports horizontal scaling, you can create instances in multiple availability zones, and your load balancer will route traffic among your instances. If any instance fails, OpsWorks Stacks’ auto healing can replace it. If your application uses other techniques to achieve availability goals, such as a database with an active and a passive node, you can use Chef recipes to configure it.
How do I model my application in AWS OpsWorks Stacks?
Application Configuration and Management
AWS OpsWorks Stacks | Management Tools
AWS OpsWorks Stacks provides three concepts to model your application:
A Stack is the highest-level management unit. A stack contains the set of Amazon EC2 instances and instance blueprints, called layers, used to launch and manage these instances. Applications, user permissions, and other resources are scoped and controlled in the context of the Stack. For example, you might create a stack for your development web application that includes a front-end load balancer, the PHP servers, your PHP apps, and the MySQL database. You can also create a stack for your production web application with a similar configuration by cloning the development stack.
A Layer is a blueprint for how to setup and configure an instance and related resources such as volumes, Elastic IPs, and can automatically take care of infrastructure configuration like SSL settings. You can also define the software configuration for each layer, including installation scripts, initialization tasks, and packages. For example, if you use a Ruby layer, OpsWorks Stacks can install not only Rails, but also all the Gems your application requires. Layers also include lifecycle events that let you automate configuration actions in response to changes in an instance’s status (see “What are Lifecycle Events” for details) using Chef recipes (see “What is Chef and how does AWS OpsWorks Stacks use it” for details). Layers can include time- or load-based auto scaling to handle demand peaks without manual interaction.
An App is software downloaded from a repository (e.g., Git, S3) and deployed to a layer. You can use the deploy lifecycle event to automate configuration steps such as connecting your application to a database. OpsWorks Stacks supports the ability to deploy multiple apps per stack and per layer.
What is Chef and how does AWS OpsWorks Stacks use it?
Application Configuration and Management
AWS OpsWorks Stacks | Management Tools
Chef is an open source framework sponsored by Chef Software, Inc. that automates how applications are configured, deployed, and managed through the use of code. AWS OpsWorks Stacks uses Chef recipes to deploy and configure software components on Amazon EC2 instances. Chef has a rich ecosystem with hundreds of Cookbooks that can be used with AWS OpsWorks Stacks such as PostgreSQL, Nginx, and Solr.
What are lifecycle events?
Application Configuration and Management
AWS OpsWorks Stacks | Management Tools
AWS OpsWorks Stacks creates events that correspond to lifecycle stages. These events can be used to trigger Chef recipes on each instance to perform specific configuration tasks. OpsWorks Stacks leverages Chef recipes to perform basic management for each event based on the type of layer. You can also create custom recipes to script any configuration change that your application needs for a specific lifecycle event. The following lifecycle events are supported:
Setup is sent to the instance when it is instantiated or successfully booted. For example, you could trigger a Chef recipe for a Rails application server that installs dependencies like Apache, Ruby, Passenger, and Ruby on Rails.
Configure notifies all instances whenever the state of the stack changes. For example, when a new instance is successfully added to an application server layer, the configure event triggers a Chef recipe that updates the OpsWorks Stacks Load Balancer layer configuration to reflect the added application server instance.
Deploy is triggered whenever an application is deployed. For example, you could trigger a Chef recipe for a Rails application server that executes the tasks needed to check out and download your application and tells Passenger to reload it.
Undeploy is sent when you delete an application. For example, the undeploy event can trigger a custom Chef recipe that specifies any cleanup steps that need to be run, such as deleting database tables.
Shutdown is sent to an instance 45 seconds before actually stopping the instance. For example, the shutdown event can trigger a custom Chef recipe that shuts down services.
Does AWS OpsWorks Stacks support existing Chef cookbooks?
Application Configuration and Management
AWS OpsWorks Stacks | Management Tools
Yes. You can use existing Chef recipes. For more information, see the documentation.
How do I create Chef cookbooks and recipes?
Application Configuration and Management
AWS OpsWorks Stacks | Management Tools
Probably the easiest way to get started is to use existing Chef recipes. There is a rich ecosystem of public repositories containing Chef cookbooks with recipes that can run with little to no modification. The OpsWorks Stacks Getting Started Guide also includes an example Chef recipe and describes how it works.
Can I use my own AMIs?
Application Configuration and Management
AWS OpsWorks Stacks | Management Tools
Yes. You can use your own AMIs or customize the AMIs OpsWorks Stacks supports using Chef scripts to install agents and other software that you require. Using your own Windows AMIs is not currently supported.
Can I use Amazon EC2 user data to customize instance setup?
Application Configuration and Management
AWS OpsWorks Stacks | Management Tools
No. Instance setup is done exclusively through Chef recipes.
What load balancing options does AWS OpsWorks Stacks support?
Application Configuration and Management
AWS OpsWorks Stacks | Management Tools
OpsWorks Stacks supports Elastic Load Balancing, HAProxy using community Chef recipes, or any load balancer you choose to install on your EC2 instances using a custom layer and Chef recipes. This gives you rich customization options and fine-grained control of your application’s load balancer.
What automatic instance scaling options does AWS OpsWorks Stacks support?
Application Configuration and Management
AWS OpsWorks Stacks | Management Tools
OpsWorks Stacks supports automatic time and load-based instance scaling to adapt the number of running instances to match your load. With load-based auto scaling, you can set thresholds for CPU, memory, or load to define when additional instances will be started. Once the load spike is gone and your down-scaling thresholds are met, OpsWorks Stacks will shut down the additional instances. With time-based auto scaling, you can define at what time of the day instances will be started and stopped. The instances in your auto scaling pool can vary in size, letting you scale gradually or quickly, and can be configured for multiple availability zones to improve reliability. OpsWorks Stacks does not support EC2 Auto Scaling at this time.