Organizers Top Media Partner Media Partner Supporter Antons Kranga DevOps:Cloud Automation October 11, 2013
May 06, 2015
Organizers Top Media Partner Media Partner Supporter
Antons Kranga DevOps:Cloud Automation October 11, 2013
Presenter
- Technology Architect at Accenture
- 10+ years experience in Enterprise Development
- Projects: - Accenture Foundation Platform for Java - Accenture Cloud Platform
- ALPJ - Monsoon
www.sli.do/openslavaAsk questions online
Copyright © 2013 Accenture All rights reserved.
Cloud
This is cloud
Copyright © 2013 Accenture All rights reserved.
Definition of Cloud Computing
Copyright © 2013 Accenture All rights reserved.
Cloud Computing
Copyright © 2013 Accenture All rights reserved.
Accenture Cloud Platform
Testing as Service Monsoon ALPJ etc
Cloud Broker API
Copyright © 2012 Accenture All rights reserved.
Challenges of Cloud (What IaaS Offers)
Web Tier
Application Tier
Database
Copyright © 2012 Accenture All rights reserved.
Challenges of Cloud (What Users Want)
Web Tier
Application Tier
Database
Infrastructure services and patterns
example
include_recipe “java“ package "tomcat6“ artifact_deploy "tomcat6“ do version "latest“ artifact_location "foo.war" deploy_to node[:tomcat][:work_dir] end service "tomcat6" do action [:enable, :start] end
OS Type: RedHat OS Version: 6.2
Tomcat Home: /etc/tomcatTomcat Port: 8080
MySQL IP: 10.10.0.1 MySQL Root Password: password
RecipeAttributes
OS Specific Instructions
Copyright © 2012 Accenture All rights reserved.
Chef Workstation Virtualized Infrastructure
Copyright © 2012 Accenture All rights reserved.
Chef Workstation Virtualized Infrastructure
Chef Server
...Roles
Cookbooks
REST
CMDB
Copyright © 2012 Accenture All rights reserved.
Chef Workstation Virtualized Infrastructure
Chef Server
...Roles
Cookbooks
REST
CMDB
Copyright © 2012 Accenture All rights reserved.
Chef Workstation Virtualized Infrastructure
Chef Server
knife
...Roles
Cookbooks
REST
CMDB
Uses SSH tobootstraps Chef
client
Copyright © 2012 Accenture All rights reserved.
Chef Workstation Virtualized Infrastructure
Chef Server
knife
...Roles
Cookbooks
REST
CMDB
chef client
tomcat6
Chef Workstation Virtualized Infrastructure
Chef Server
knife
...Roles
Cookbooks
REST
CMDB
chef client
tomcat6
HTTP call signed with certificate
Chef Workstation Virtualized Infrastructure
Chef Server
knife
...Roles
Cookbooks
REST
CMDB
chef client
tomcat6
Copyright © 2012 Accenture All rights reserved.
Chef Workstation Virtualized Infrastructure
Chef Server
knife
...Roles
Cookbooks
REST
CMDB
chef client
tomcat6
tomca
t6
java
iptab
les
Cookbooks
Copyright © 2012 Accenture All rights reserved.
Chef Workstation Virtualized Infrastructure
Chef Server
knife
...Roles
Cookbooks
REST
CMDB
chef client
tomcat6
tomca
t6
java
iptab
les
Cookbooks
upload facts
ohai
Service discovery
Node 1 Node 2 Node 3 Node N
Node 1 Node 2 Node 3 Node N
Database
Register RegisterRegisterRegister
Node 1 Node 2 Node 3 Node N
Database
Register RegisterRegisterRegister
Discover nodes
Node 1 Node 2 Node 3 Node N
Database
Register RegisterRegisterRegister
Discover nodes
Load balancing
Node 1 Node 2 Node 3 Node N
LB
Node 1 Node 2 Node 3 Node N
LBSingle point of
failure
Node 1 Node 2 Node 3 Node N
LB LB2Heartbeat
Node 1 Node 2 Node 3 Node N
LB LB2Heartbeat
Shared virtual IP
Dealing with sticky sessions
Tomcat 1 Tomcat 2 Tomcat 3 Tomcat N
LB LB2Heartbeat
Shared virtual IP
Tomcat 1 Tomcat 2 Tomcat 3 Tomcat N
LB LB2Heartbeat
Shared virtual IP
Memcached 1 Memcached 2 Memcached 3 Memcached N
Save session Save session Save session Save session
Same ServerSame ServerSame ServerSame Server
Tomcat 1 Tomcat 2 Tomcat 3 Tomcat N
LB LB2Heartbeat
Shared virtual IP
Memcached 1 Memcached 2 Memcached 3 Memcached N
Save session Save session Save session Save session
Same ServerSame ServerSame ServerSame Server
Repl Repl Repl
Tomcat 1 Tomcat 2 Tomcat 3 Tomcat N
LB LB2Heartbeat
Shared virtual IP
Memcached 1 Memcached 2 Memcached 3 Memcached N
Save session Save session Save session Save session
Same ServerSame ServerSame ServerSame Server
Repl Repl Repl
If session repl not hitting netw capacity
Tomcat 1 Tomcat 2 Tomcat 3 Tomcat N
LB LB2Heartbeat
Shared virtual IP
Memcached
save session
Large RAM VM
Elasticity
Tomcat 1 Tomcat 2 Tomcat 3 Tomcat N
LB LB2Heartbeat
Shared virtual IP
Memcached 1 Memcached 2 Memcached 3 Memcached N
Save session Save session Save session Save session
Same ServerSame ServerSame ServerSame Server
Repl Repl Repl
Tomcat 1 Tomcat 2 Tomcat 3 Tomcat N
LB LB2Heartbeat
Shared virtual IP
Memcached 1 Memcached 2 Memcached 3 Memcached N
Save session Save session Save session Save session
Same ServerSame ServerSame ServerSame Server
Repl Repl Repl
Auto scaling group
Dealing with sticky sessions
Node 1 Node 2 Node 3 Node N
Database
Register RegisterRegisterRegister
Discover nodes
Node 1 Node 2 Node 3 Node N
Message Broker
publish facts publish facts publish facts publish facts
Node 1 Node 2 Node 3 Node N
Message Broker
publish facts publish facts publish facts publish factssubscribe events subscribe events subscribe events subscribe events
Node 1 Node 2 Node 3 Node N
Message Broker
publish facts publish facts publish facts publish factssubscribe events subscribe events subscribe events subscribe events
heartbeat heartbeatheartbeatheartbeat
Virtualized Infrastructure
Chef Server
Message BrokerCMDB
Infra Management: 1. Provisioning 2. Service Discovery
Operating Scenarios: Operations
Virtualized Infrastructure
Chef Server
mCollectiveCMDB
Server Orchestration: 1. Cluster Orchestration 2. Scalability 3. Deployment Orchestration
Infra Management: 1. Provisioning 2. Patching
Multi zone example
Distributed logging
Node 1 Node 2 Node 3 Node N
Auto scaling group
Node 1 Node 2 Node 3 Node N
Cloud storage
Auto scaling group
Node 1 Node 2 Node 3 Node N
Log collector
Cloud storage
Auto scaling group
Log agent Log agent Log agent Log agent
Phoenix Server
Node 1 Node 2 Node 3 Node N
Node 1 Node 2 Node 3 Node N
Want to apply change/patch
Node 1 Node 2 Node 3 Node N Node M
Node 1 Node 2 Node 3 Node N Node M
Migrate data
All changes included
Node 1 Node 2 Node 3 Node N Node M
Shared data
Cloud storage
Test and learn
Virtualized Infrastructure
Chef Server
CMDB
Virtualized Infrastructure
Chef Server
CMDB
Chaos Monkey
Cookbook development
Stop forking, really!!!
community cookbook
wrapper cookbook
wrapper cookbook adds new functionality to community version of the cookbook instead of changing it directly
community cookbook
wrapper cookbook
include_recipe “tomcat“ chef_gem "chef-rewind“ rewind "template[catalina.xml]“ do # add your custom staff end
Copyright © 2012 Accenture All rights reserved.
• Food Critic: Cookbook style analysis tool
• URL: http://acrmp.github.com/foodcritic/
• Integration: Travis CI
• Cookbook Style Guide: https://github.com/ampledata/cookbook-style-guide
Cookbook Quality
Takeaways
- Accenture Cloud Platform
- Monsoon
- Accenture Lightweight Platform for Java
- Accenture Foundation Platform for Java
- Opscode Chef