Layer
- Group of instances within a stack
- Recipes are added to its lifecycle events
- Contains 1+ instance
- Add new or existing instance
- Online instance (member of layer already) cannot be added to another layer
- Must be added prior to starting the instance
Layer Configuration
- Custom Recipes
- Configure, Deploy, Setup, Shutdown, Undeploy
- Networking
- ELB
- Public IP assignment
- EIPs
- Load based scaling
- EBS
- Mount Point
- Number of volumes
- RAID Type
- None
- 0
- 1
- 10
- Watch out for conflict with ephemeral disks (autofs)
- Security Groups
- Instance Profile
Security Groups
- OpsWorks creates built-in Security Group for a layer
- Use OpsWorks security groups
- YES
- Custom SG can be added but cannot restrict access this way (UNION)
- NO
- Associate custom SG with a layer
- YES
Auto Healing
- Automatic replacement of failed instance
- Compare ASG: instance replacement
- If no communication with OpsWorks Agent for ~5 minutes instance consider failed
- Configured on the Layer level (each instance in the layer inherits it)
- If instance belongs to many layers the flag is AND'ed
- Enabled by default
- Behavior
- Instance Store
- Terminate EC2 instance and verify it has shut down
- Delete data on root volume
- Launch instance with the same hostname, configuration, layer membership
- Assign new public and private IP
- Associate existing EIP (if applicatble)
- EBS-backed
- Stop the instance
- Start the instance
- When online trigger "Configure" event on all instances
- Instance Store
Elastic Load Balancing Layer Type
- Elastic Load Balancing is part of OpsWorks Layer
- Attach to existing layer
- OpsWorks deregisters existing instances in ELB
- Registers layer instances
- Connection Draining
- OpsWorks delays Shutdown event
- Attach to existing layer
RDS Layer Type
- Represents existing RDS instance
- Can register existing RDS instance
- OW adds RDS configuration to [:opsworks][:stack] attribute
ECS Layer Type
- Linux only
- Represents single ECS Cluster
- 1-1 relationship with stack
- ECS cluster is registered with a stack and then a layer is created
- Settings
- ELB attachment
- EIP/Public IP management
Custom Layer Type
- Minimal set of recipes
No comments:
Post a Comment