Chapter 9 Configuration as Code Flashcards
Difference b/t ( aws Opworks for Chef Automate / AWS OpsWorks for Puppet Enterprise) and AWS OpsWorks Stack
OpsWorks Stacks does not provision an EC2 instance w/ puppet/chef software. Thee other two do.
OpsWorks Stacks uses and ‘in memory’ chef server and a ‘chef client’.
T/F: You must replace instances in order to update cookbooks in AWS OpsWorks
True
How to package cookbook dependencies?
Use a tool called berkshelf. Good for packaging dependencies before you upload it to S3 (and then set it as cookbook source)
T/F: When you create a resource in the stack, such as an instance, it is available only from the endpoint you specify when you create the stack.
True
If you want to use a custom AMI in OpsWorks, what are the requirements?
- AMI must be based off of AMI which OpsWorks supports
- must be 64 bit
- must support instance types you want to launch
In chef terminology, a ‘layer’ is equivalent to what?
a ‘role’
For EBS backed instances, the IP address will 1. ___ when instance restarts; for instance store backed instances, it will 2. ____.
- stay the same
2. change
In regard to EBS volumes, when volumes are added or removed from a layer, only ______ will receive the updated configuration.
New instances. Existing instance volumes do not change.
What are the three types of instances supported by OpsWorks Stacks?
- 24/7: they run until you stop them
- Time based instances: they run on specified schedules. (good for handling predictable load on your stack)
- Load based instances: they start and stop based on load metrics like ‘NetworkOut’ and ‘CPUUtilization’
Caveat about using load based and time based instances with OpsWorks Stacks
Unlike auto scaling groups, you must set these up ahead of time via console or CLI.
Do instances automatically install security and package updates?
No, this occurs only when the instance is first started.
An alternative to updating instances directly via OpsWorks is to ….
regularly launch new instances to replace old ones
Within OpsWorks can you register instances in separate accounts or even on prem instances? How?
Yes, by installing the OpsWorks agent on the target instances.
What is ‘auto healing’ in the context of OpsWorks?
When an instance can’t communicate with the OpsWorks service for 5 minutes, it will restart automatically. Enabled by default.
NOTE: health check itself performed every minute
When an app update occurs, will instances in OpsWorks automatically update with the new app?
No, but new instances will.
T/F: OpWorks stack users are associated with a specific region and cannot be given access to stacks in another region.
True
What are the four stack level permissions you can give a user?
- Deny: no action allowed on stack
- Show: user can only view stack configuration
- Deploy: user can view and deploy stacks
- Manage: view, deploy, manage
How are Chef recipes executed?
Via lifecycle events or manually.
Any time an instance in a stack comes online or goes offline, all instances in the same stack will undergo a ______ lifecycle event
Configure
When will an instance run the ‘DEPLOY’ lifecycle event?
Only after it has run the initial SETUP and CONFIGURE lifecycle events. After this, it must be run manually each time you want to run it.
What is the name of the lifecycle event which removes an app from an OpsWorks layer?
UNDEPLOY