Upload
amazon-web-services
View
313
Download
0
Tags:
Embed Size (px)
Citation preview
AWS OpsWorks Model, control and automate infrastructure of
any scale or complexity
Application Management Service
No additional cost running on AWS
Deployment & Management Services
AWS Elastic Beanstalk AWS OpsWorks AWS CloudFormation
AWS CodeDeploy AWS CodePipeline AWS CodeCommit
Deployment & Management Services
Convenience Control
AWS Elastic Beanstalk AWS OpsWorks AWS CloudFormation
AWS Elastic Beanstalk andAWS OpsWorks can be controlled viaAWS CloudFormation.
AWS CloudFormation integration
OpsWorks Elastic Beanstalk
CloudFormation
Deep service integration with Elastic Load Balancing Amazon RDS AWS CloudFormation AWS IAM (users and profiles)
OpsWorks apps and deployments
You define the source of your application Apps can be deployed manually Apps are deployed automatically on instance boot Set environment variables
Operational tooling
Streamlined provisioning Continuous configuration Manage users and permissions Manage remote desktop access (RDP) Time-based instances to manage load OpsWorks auto heals unhealthy instances
OpsWorks architecture
OpsWorksBackend
OpsWorksAgent
EC2, EBS, EIP, VPC, ELB, Auto-Scaling, Auto-Healing On-instance execution via
CommandJSON
CommandLog+Status
Setup event
• Sent when instance boots• Includes the deploy event• Use for initial installation of
software & services
Configure event
• Sent to all instances when any instance enters or leaves online state
• Used for making sure the configuration is up-to-date
Shutdown event
• Sent when an instance is shut down
• Specify shutdown timeout• Used for clean shutdown
Example event on a Stack
Setup Configure Deploy Undeploy Shutdown
Reverse Proxy (cache)
Install and configure IIS
Sync appserver IPs
- -Drain connections
.Net AppServer
Install app server
Updates DB IP& restart
Updates app
Removes app
Ship logs
DatabaseInstall database
Sync DB ACLs
- - Make backup
Recipe setup.rb
windows_feature 'Web-FTP-Server'
windows_package '7zip' dosource 'http://www.7-zip.org/a/7z938-x64.msi'checksum '7c8e873991c82ad9cfc123415254ea6101e9a645e12977dcd518979e50fdedf3'action :install
end
Chef resources
Resources describe the desired state Resources have attributes and actions
registry_key "set background color" dokey "HKCU\\Control Panel\\Colors”values [{ name: "Background",
type: :string, data: "86 63 127" }]
action :createend
Chef resources#apt_package, #bash, #batch, #chef_gem, #chef_handler,
#cookbook_file, #cron, #csh, #deploy, #directory, #dpkg_package,
#dsc_resource, #dsc_script, #env, #erl_call, #execute, #file,
#gem_package, #git, #group, #http_request, #ifconfig, #ips_package, #link, #log, #mount, #ohai, #perl, #portage_package,
#powershell_script, #python, #reboot, #registry_key,
#remote_directory, #remote_file, #route, #ruby, #ruby_block, #script,
#subversion, #template, #user, #windows_package,
#windows_service
Lifecycle Events trigger Chef runs
The OpsWorks agents controls the Chef client on the instance
The agent keeps your Cookbooks on the instance up to date
Each Lifecycle event contains list of recipes to run All Lifecycle Events can be triggered manually You can also run single recipes
Stack information
OpsWorks tracks the Stack state This information is accessible in your recipes Use Chef search to access information like the list
of all nodes (instances) in your Stack or Layer
nodes = search(:aws_opsworks_instance, "hostname:db-slave*")
nodes.each do |node|
... node[:private_dns]
end
Conclusion
OpsWorks let you group your projects in logical units (Stacks and Layers)
It automates setup of instances through Chef and Lifecycle Events
It gives you operational tooling like user management