M9 Automation
Opswork
definition
Comparison between Opswork and Cloudformation
AWS OpsWorks Stacks supports a narrower range of application-oriented AWS resource types including Amazon EC2 instances, Amazon EBS volumes, Elastic IPs, and Amazon CloudWatch metrics.
type
Opwork stack
feature
click to edit
And also highly complex custome appiication can be supported
Also can use Opswork chef and puppet to launch your EC2, RDS and ELB
Software version control
can support on-prem
yes
1.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
limitation
O/S supported
Deploy your applications by using Chef in local mode(Chef solo).
Cookbook
Cookbook contain receipe
deploy RDS , PostgreSQL, MySQL, Cassandra, or MongoDB
to deploy Solr
Solr is a NoSQL databse sw
can use exernal cookbook from community
Recipe
Usage: installing and configuring packages and deploying apps
deploy and configure software components on Amazon EC2 instance
Confguration management for application
mazon Linux, Ubuntu 12.04 LTS, Ubuntu 14.04 LTS, and Windows Server 2012 R2.
can't use User data
Can run in VPC & support auto scaling, cloudwatch
deploy NGIGX (SW Load balncer
Example: you can use Chef RECEIPE IS TO CREATE a PHP server and PHP app.
You can define the application’s architecture, including package and programming languages installation, software configuration and resources such as storage.
Opwork for Chef
Opswork for Puppet
Create puppet server
Deploy Chef Server
can use existing recipe such as Test Kitchen and Vagrant
cloudformation
beanstalk
create environment for your code
you just upload your code or app into beanstalk
environment that will handle
capacity planing
load balancing
scaling
health monitoring
support app develop underJava, Node.js, PHP, Phyton, Ruby
can customize
the size of fleet in Ec2
ELB
Alarm
upgrade the version of your programing language
can also save the environment
demo
click to edit
stack
draw a diagram explain production stack (contain 4 box)
Contain web server that run on window 2016 (1 st sub-box)running IIS10.0 ( 2nd sub- box)
Contain 1 box (linux enterpise) run MySQL (another box)
Instead manuall config this, configure chef or puppet to automate
demo
layers
can create addditional layer
can add receiipe to configure, deploy, shutdown the app
change set
to verify and approve changes
quckstart
only charge for the resources you used
JSON template
AWS OpsWorks Stacks uses templates to create files such as configuration files, If you use custom JSON or custom cookbook attributes to override the AWS OpsWorks Stacks definitions, your preferred settings are incorporated into the configuration files in place of the AWS OpsWorks Stacks settings. However, AWS OpsWorks Stacks does not necessarily specify an attribute for every possible configuration setting; it accepts the defaults for some settings and hardcodes others directly in the template. You can't use custom JSON or custom cookbook attributes to specify preferred settings if there is no corresponding AWS OpsWorks Stacks attribute.
deletion policy
click to edit
eleting a stack on CloudFormation also removes all the provisioned resources in it. In some cases, you want
some resources to be retained even after deleting its stack. The good thing is that you can do this by defining
its DeletionPolicy.
This is pretty straightforward - you just need to define DeletionPolicy with Retain value and for the resources
that support snapshot, (like RDS databases) you can set Snapshot as its value. With DeletionPolicy: Snapshot, a
snapshot is created before a resource is deleted. This allows you to have a backup of the resource that's been
deleted from the stack.
Let’s say for example that you want to delete a deployed application. This app uses S3 for storing its object
and RDS as its database, and you want to keep a copy of this resource as your reference. You may want to
update its stack and add DeletionPolicy: Retain for S3 and DeletionPolicy: Snapshot for RDS before deleting it.
By default, deleting a stack will also delete its provisioned resources like the AWS::S3::Bucket that was
launched using the below CloudFormation template.
click to edit