16. Aptoma Media Platform (AMP)
SaaS
Dr*
PaaS (AMP)
Chef
AWS Cloudformation
IaaS
AWS EC2
IBM Softlayer - Zetta - Dell Poweredge
17. Consistent and predictable platform for the developers
● Same Ubuntu
● Munin, Nagios, New Relic, log shipping, SSH access,
NTP, firewall, swap, etc.
● Same Apache+PHP
● Same MySQL
● Same MongoDB
● etc.
.. Achieved with Chef.
Aptoma Media Platform (AMP)
18. Primary vendor is AWS
Primary region eu-central-1 (Frankfurt)
Secondary region eu-west-1 (Dublin)
IaaS/PaaS providers
20. Chef is a configuration management and automation
platform from Opscode.
Chef
21. Can be used in multiple ways:
● Chef Server mode
● Chef Solo mode
○ With Vagrant
Chef
22. Building blocks:
● Cookbooks contains recipes
○ Write your own cookbook or leverage community
cookboks from the Supermarket
○ Or a combination, with wrapper cookbooks
Chef
23. Building blocks:
● Cookbooks contains recipes
● A role consists of one or more re-usable recipes
● chef-client on the node (server)
Chef
30. Base role common-bootstrap on all manually provisioned
servers
knife bootstrap --bootstrap-version 11.18.12 <hostname> --hint ec2 --environment
production-v2 -x tech --sudo -r “role[common-bootstrap],role[apache-server],role
[service-drfront-web]”
Chef
41. 1. Develop a template
2. Parameterize input values
3. Define resources
a. Launch Configuration for an Auto Scaling Group
b. Instance type, storage configuration
c. OS via AMI ID
d. Elastic Load Balancer to attach to (optional)
4. Scaling thresholds
5. .. etc
AWS Cloudformation
42. Now you can create a new stack (a collection of resources)
AWS Cloudformation
48. In Cloudformation Launch Configuration user-data:
● Download and install private stuff from S3
○ Aptoma Chef bootstrap validator key
○ amp-aws-auto-bootstrap-v1.1.0.py bootstrap script
○ chef-client installer
● If all OK, Cloudformation signal OK to the
Auto Scaling Group
AWS Cloudformation + Chef
49. The ASG should now have instances attached to a load
balancer
ELB instance health check /status fails because no
application is deployed
AWS Cloudformation + Chef
56. 1. Provision servers manually or with Cloudformation
2. Use the same Chef cookbooks for any IaaS
3. Leverage Auto Scaling with Cloudformation and
CodeDeploy
Summary
57. We achieve:
● Automated, repeatable infrastructure with re-usable
code
● Predictable and scalable setup
● Easy and efficient for developers to set up new services
Summary