3. Agenda: Application Delivery Patterns
• Why?
• What?
• How?
• The Vend Journey
• What the…?
• X Commandments
• What next?
4. Mission Statement
Deliver better features to customers, quickly, securely,
more reliably, and cheaper.
http://www.space.com/images/i/000/034/954/original/blue-origin-test-fires-new-rocket-engine-3.jpg
5. Deliver “Hello World”
package main
import “fmt”
func main() {
fmt.Printf(“Hello, World.n”)
}
#!/path/to/python
print “Hello World!”
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1 {
class Program {
static void Main(string[] args) {
Console.WriteLine("Hello, world!");
Console.ReadLine()
}
}
}
#!/path/to/ruby
puts "Hello World!";
var http = require('http');
http.createServer(function (request, response) {
response.writeHead(200, {'Content-Type': 'text/plain'});
response.end('Hello Worldn');
}).listen(8080);
6. Development Lifecycle
REPOSITORY
PM SYSTEM
CI SYSTEM
DEVELOPER
LOOKUP
TASKS
SUBMIT
CODE
SCHEDULE BUILD
AUTOMATIC
BUILD
BUILD
RESULTS
BUILD
ARTEFACTS
CLOUDFORMATION,
PUPPET,
CHEF,
ANSIBLE.
CONTAINERS,
AMIs
EXE, MSI,
RPM, DEB,
ZIP, TAR
9. PUSH / PULL
Delivery Lifecycle
REPOSITORY
PM SYSTEM
DEPLOYMENT
SYSTEM
DEVELOPER
LOOKUP
TASKS
SUBMIT
CODE
SCHEDULE BUILD
BUILD /
ARTEFACTS
BUILD
RESULTS
CI SYSTEM
ENVIRONMENTS
SYSTEST
PRE-PROD
PRODUCTION
DEPLOYMENT
RESULTS
DEPLOYMENT
CONFIG
ATOMIC UNIT OF
DEPLOYMENT
DEPLOYABLE ARTEFACT
API
TEST SCRIPTS
BUILD CONFIG
RUNTIME CONFIG
INFRASTRUCTURE CODE
DELIVERY PIPELINE
ENVIRONMENT CONFIG
SECURITY CONFIG
MONITORING CONFIG
BACKUP CONFIG
AVAILABILITY CONFIG
SLA CONFIG
10. Application Deployment Patterns
Arbitrary Snowflakes Periodic deployments Blue Green Deployments
Canary Deployment Dark Launch /
Feature Toggle
Environment Promotion
11. Orchestrate Delivery with Pipelines
A pipeline models your release process as a series of stages that promote
changes along a set of environments into the hands of your customers.
A pipeline is a model of your standard procedure for deploying software.
13. Characteristics of a Good Pipeline
Fast Feedback Validation Idempotent
SecureDesired State
Consistency
Roll Forward API Driven Visualisation ExtensibleAs Code
14. Pipeline Design
Blockers
Simple Integral Security
Metrics Driven
Chained
Andon Cord Process Events
Loosely Coupled
Corollary to Conways Law :
Your pipelines design will be a copy of your organization's communication structure.
15. Pipeline Metrics
• Number of Builds
• Number of Deployments
• Average Time For Changes to Reach Production
• Average Time From First Pipeline Stage to Each Stage
• Number of Changes Reaching Production
• Average Build Time
16. Let us Deliver a Polyglot Beast
Packer/Puppet/Chef scripts
Foundation SOE pipeline
Foundation SOE AMI/Container
Nginx SOE
pipeline
Java SOE
pipeline
Tomcat SOE
pipeline
Developer
SOE pipeline
Nginx SOE Java SOE Tomcat SOE Developer
Workstation
17. Nginx SOE Java SOE Tomcat SOE HAProxy SOE
Let us Deliver a Polyglot Beast
IIS SOE
Application 1
on EC2
Application 2
on ECS
Application 3
on Beanstalk
19. Introduction to Vend
SaaS Point-of-Sale, Ecommerce and
Reporting
18,000+ retail stores in 150+ countries
I’m part of the Platform team - we’re
responsible for internal dev platform
20. Pipeline Goals / Metrics
We try to release features as fast as possible, while limiting risk and retaining quality
Important metrics:
Developer Velocity
Release Quality
Developer Happiness
21. What Slows Developers Down?
Fear of breaking things
Application complexity and coupling
Constantly re-inventing the wheel
22. Vend Deployment Pipeline
Push to GitHub
Build container
Run unit tests
Run integration tests (against other containers)
Deploy to AWS ECS if master
23. Containerisation
Start shaping the unit of testing and deployment
Forces developers to think about interfaces and
bounded contexts
Makes it easier to create development and test
environments
24. Standardisation
Containers without a sprinkle of best
practices are a recipe for disaster
Developers have to learn “this is how we do
things in this service!”
Our early containerisation approach - great
for Dev, terrible for Ops
26. Request Routing
Our routing layer handles API requests from
the edge to port on a container
Authentication, Authorisation and Rate Limiting
all handled
Common libraries in a few languages to parse
authentication tokens
27. Container Configuration
Standardised config directory location
Bake development configuration into
the container
Container platform mounts volume over
the top of the config directory
28. Feature Management
Simple conditional around a “risky” piece of
code
Control the conditional by some external
process
Decouples deployment from feature
releases - less nervous developers!
if (hasFeature("new_thing")) {
// New code path
} else {
// Old path
}
29. Feature Management Rules
Feature true/false can be driven by a set of
rules, considering the context of the user
- Percentage of all customers
- Time (n customers per y time)
- Account Size / Value
- Market / Region
- Opt in attributes
30. Monitoring Service Health and Usage
Is my service up? Is it logging errors?
Statsd, Kibana, Redash
Are people using it in the way that I
expect?
We should check that our assumptions
about user behaviour are correct
31. We’re Still Improving
Docker Compose / Docker for Mac instead
of Vagrant
Automated service discovery
Dynamic configuration instead of static
Puppet-based ones
32. Lessons Learned
Start with a automated pipeline, optimise the slow
parts as you find them
Going down the container route? Create a “best
practices” document!
Decouple feature releases from deployment and
stage rollouts to reduce risk
37. Commandments for Application Delivery
I. Acknowledge time. Version control everything
II. Be the master of your dependencies
III. Externalising configurations shall set you free
IV. Don’t be a prisoner of state
V. Loosely couple
VI. Audits that don’t kill you, make you stronger
VII. Everyone sees everything, all the time
VIII. Measure success
IX. Continuous practice
X. Own your Destiny, end to end
39. AWS Training & Certification
Intro Videos & Labs
Free videos and labs to
help you learn to work
with 30+ AWS services
– in minutes!
Training Classes
In-person and online
courses to build
technical skills –
taught by accredited
AWS instructors
Online Labs
Practice working with
AWS services in live
environment –
Learn how related
services work
together
AWS Certification
Validate technical
skills and expertise –
identify qualified IT
talent or show you
are AWS cloud ready
Learn more: aws.amazon.com/training
40. Your Training Next Steps:
Visit the AWS Training & Certification pod to discuss your
training plan & AWS Summit training offer
Register & attend AWS instructor led training
Get Certified
AWS Certified? Visit the AWS Summit Certification Lounge to pick up your swag
Learn more: aws.amazon.com/training