SlideShare a Scribd company logo
Continuous Deployment
of your Application
By Cora Iberkleid
@ciberkleid
1
By Marcin Grzejszczak
@mgrzejszczak
Senior Platform Architect at Pivotal
Working on
● Pivotal Cloud Foundry
● Cloud Native Architecture
● Dev Practices Modernization
Twitter: @ciberkleid
About us
Spring Cloud developer at Pivotal
Working on
● Spring Cloud Sleuth
● Spring Cloud Contract
● Spring Cloud Pipelines
About us
Twitter: @mgrzejszczak
Blog: http://toomuchcoding.com
What problem are we trying to solve?
The necessity to create a deployment
pipeline from scratch for each new project
Spring Cloud Pipelines
• opinionated template of a deployment pipeline
• based on good practices from different projects
• we believe in the “Infrastructure as Code” approach
• in case of automation server going down you can recover everything in no time
• the automation server setup should be automated too!
• you can even write tests for your pipelines
Spring Cloud Pipelines
• we support following automation servers out of the box
• Concourse
• Jenkins using Jenkins Job DSL plugin
• Jenkins using Jenkinsfile with Blue Ocean
• logic of all steps done via Bash scripts
• you can convert the internals to suit your needs
• you can use whatever automation server you want
• supports Maven & Gradle
• Over 150 Bash tests (using https://github.com/sstephenson/bats)
Spring Cloud Pipelines
Spring Cloud Pipelines
Spring Cloud Pipelines
Spring Cloud Pipelines
Spring Cloud Pipelines
Spring Cloud Pipelines - PaaS Types
Spring Cloud Pipelines - CF example
Spring Cloud Pipelines - Concourse
Concourse
Spring Cloud Pipelines - Jenkins Job DSL
Jenkins Job DSL
Spring Cloud Pipelines - Jenkinsfile & Blue Ocean
Jenkinsfile
WHAT ARE WE GOING TO WORK WITH?
Demo - flow
GITHUB-WEBHOOK GITHUB-ANALYTICS
AMQPHOOK
Why do we deploy software?
• We’re paid for delivering business value
• Features are done when they are deployed to production
• It’s better to deploy frequently for faster feedback
• It’s better to fail the deployment pipeline as fast as possible
• Deployments should take place in a standardised, automated fashion
• Your deployment pipeline should test rollback
• That way you can perform A/B or zero downtime deployment to production
Spring Cloud Pipelines
• We’re paid for delivering business value
• Features are done when they are deployed to production
• It’s better to deploy frequently for faster feedback
• It’s better to fail the deployment pipeline as fast as possible
• Deployments should take place in a standardised, automated fashion
• Your deployment pipeline should test rollback
• That way you can perform A/B or zero downtime deployment to production
Spring Cloud Pipelines
Problem - slow feedback
• Nobody wants to wait until the end of the pipeline to see that something is not
working fine
• We want to fail fast - even during build time
• If integration is faulty
• If our API is backward incompatible
• There should be no need to wait until end to end tests are executed
Solution - fail fast
• We’re running unit and integration tests during build time
• To test faulty integration we use Spring Cloud Contract for HTTP / messaging
• Producer defines a contract
• From the contract
o tests are generated to see if the producer is not lying
o stubs are generated for consumers to use
• Consumer can reuse it without running the producer
• Fail at build time if integration fails (fail fast!)
• All stubs reside in Nexus / Artifactory (thus can be reused)
CONTRACT TESTS DEMO
(BREAKING CONSUMER)
Initial contract (producer)
Body contains username and
repository
Generated test (producer)
Body contains username and
repository
Expected model (consumer)
Passing contract test (consumer)
Breaking contract (producer)
Was username and repository
and we’ve made a breaking
change by converting those to
user and repo
Installing broken stubs locally (producer)
New stubs with backward
incompatible changes
installed in Maven local
Broken build (consumer)
Broken contract test (consumer)
Broken contract test(consumer)
Expected repository and
username but got repo
and user
CONTRACT TESTS DEMO
(BREAKING PRODUCER)
Demo - backward incompatible API change
GITHUB-ANALYTICS V1
with DELETE
@ /issues
Contracts
V1
with
DELETE @
/issues
Generated test
sends DELETE
to /issues
Contract for deletion of issues
Generated test for deleting issues
Demo - backward incompatible API change
GITHUB-ANALYTICS V1
with DELETE
@ /issues
Contracts
V1
with
DELETE @
/issues
Generated test
sends DELETE
to /issues
GITHUB-ANALYTICS V2
removed DELETE
@ /issues
Contracts
V2
removed
DELETE @
/issues
No generated
test for this
endpoint
Backward incompatible changes of the API
We delete
the
contract
and the
DELETE
endpoint
Demo - backward incompatible API change
GITHUB-ANALYTICS V1
with DELETE
@ /issues
Contracts
V1
with
DELETE @
/issues
Generated test
sends DELETE
to /issues
GITHUB-ANALYTICS V2
removed DELETE
@ /issues
Contracts
V2
removed
DELETE @
/issues
No generated
test for this
endpoint
GITHUB-ANALYTICS V2
removed DELETE
@ /issues
Contracts
V1
with
DELETE @
/issues
Generated test
sends DELETE
to /issues
Broken build Current implementation (V2)
does not support old
contracts (V1)
Broken - generated test from old contracts (V1)
Broken - generated test from old contracts (V1)
Spring Cloud Pipelines
• We’re paid for delivering business value
• Features are done when they are deployed to production
• It’s better to deploy frequently for faster feedback
• It’s better to fail the deployment pipeline as fast as possible
• Deployments should take place in a standardised, automated fashion
• Your deployment pipeline should test rollback
• That way you can perform A/B or zero downtime deployment to production
Spring Cloud Pipelines
STANDARDISATION GIVES LOWER
SUPPORT COSTS AND MORE CHANCES
OF PEOPLE ROTATION
Solution - PaaS & tooling
• Use a PaaS to standardise the way you deploy and monitor your software
• Spring Cloud Pipelines uses Cloud Foundry [1] or Kubernetes [2] as a PaaS
implementation
• For the demo purposes we’re using PCF Dev [3] or Minikube [4]
• PaaS abstracts the application governance from underlying infrastructure
• you can deploy, scale, manage applications in the same way if PaaS was running on your laptop,
Amazon, Google, Azure etc.
• Database schema upgrade is done via tools like Flyway [5] or Liquibase [6]
[1] https://www.cloudfoundry.org, [2] https://kubernetes.io/
[3] https://pivotal.io/pcf-dev, [4] https://github.com/kubernetes/minikube
[5] https://flywaydb.org/, [6] http://www.liquibase.org/
Spring Cloud Pipelines
Spring Cloud Pipelines
After the application got deployed to test environment
• The database schema gets updated upon application startup
• We run a handful of smoke tests to see if crucial parts of our application are
working fine
• We want to test if the app is properly packaged
• The application is surrounded by stubs - no real integrations take place
• Spring Cloud Contract Stub Runner Boot app is responsible for serving stubs
Problem - rollback DB
• Deployment pipelines should test whether the application can be rolled back
• Rolling back database changes is extremely difficult
• Especially if you deploy once every 6 months (the number of changes is gigantic)
• How can you roll back a deletion of a column?
Spring Cloud Pipelines
Solution - application rollback
• The easiest solution is… NOT TO DB ROLLBACK
• Perform only backward compatible changes (always add data)
• Or perform backward incompatible changes in a backward compatible way [1]
• Roll back the application only (the JAR)
• The application and DB changes need to be backward compatible
• That way you can ensure that two applications (old / new versions) can run
simultaneously at the same time
[1] https://spring.io/blog/2016/05/31/zero-downtime-deployment-with-a-database
BACKWARD INCOMPATIBLE
DB CHANGE DEMO
Demo - backward incompatible DB change
GITHUB-ANALYTICS V1
CODE
with repository
DB
V1
with
repository
Demo - initial DB state (Flyway)
Demo - first run
Demo - initial state
Demo - backward incompatible DB change
GITHUB-ANALYTICS V1
CODE
with repository
DB
V1
with
repository
GITHUB-ANALYTICS V2
CODE
with repo
DB
V2
with
repo
Demo - backward incompatible DB change
Demo - backward incompatible DB change
Demo - backward incompatible DB change
GITHUB-ANALYTICS V1
CODE
with repository
DB
V1
with
repository
GITHUB-ANALYTICS V2
CODE
with repo
DB
V2
with
repo
GITHUB-ANALYTICS V1
CODE
with repository
DB
V2
with
repo
Demo - backward incompatible DB change
New application (V2) works
against new database (V2)
Demo - backward incompatible DB change
Old application (V1) can’t
work with new database (V2)
Deploy (V1) and connect to
the new database (V2)
Demo - errors in the app logs Old version can’t insert
data to a missing DB
column
Spring Cloud Pipelines
Problem - end to end tests
• End to end tests are slow and brittle
• QA department writes an E2E for every feature we have
• E2E environment setup
• one environment shared between all applications?
• one environment per application?
• Surrounding apps should be deployed in
• production versions?
• development versions?
Solution - don’t do E2E?
• Regardless of the time spent on QA / UAT you can still have bugs on
production
• Assuming that you ...
• embrace failure
• introduce monitoring of business key performance indicators (KPIs)
• introduce alerting over the metrics
• ensure that you can rollback on production
• … you could stop doing any end to end tests
Spring Cloud Pipelines
• Deploy to stage and running e2e tests are manual steps
• you have to wait for your turn for the env
• some manual work has to be done to purge stale data etc.
Spring Cloud Pipelines
• We’re paid for delivering business value
• Features are done when they are deployed to production
• It’s better to deploy frequently for faster feedback
• It’s better to fail the deployment pipeline as fast as possible
• Deployments should take place in a standardised, automated fashion
• Your deployment pipeline should test rollback
• That way you can perform A/B or zero downtime deployment to production
Spring Cloud Pipelines
Problem - deployment to production
• We don’t want to deploy the application to production at night
• We want to treat a production deployment like any other deployment
• We’d like to be able to perform A/B testing and zero downtime deployment
• We’d like to easily rollback when sth goes wrong
Solution - PaaS + SC Pipelines
• Our application has KPI monitoring in place
• Alerting are set for KPIs
• It has been tested that the application can be easily rolled back
• PaaS (CF or K8S) can take care of zero downtime deployment
Spring Cloud Pipelines
• prod-deploy deploys the pipeline version of the app to production next to
the current production version
• Once deployed we tag the repo with prod/VERSION_NUMBER
• prod-complete allows to stop the old instance and leave only the new one
running
• prod-rollback deletes the new instance, removes the
prod/VERSION_NUMBER tag and leaves only the old one running
A/B ON CF
DEMO
Two versions running at the same time
Two versions registered
under same hostname
Old instance
New instance
MIGRATING TO SPRING CLOUD
PIPELINES DEMO
Application Refactoring for
Spring Cloud Pipelines
A Story in Three Acts
Premise
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Main Characters
84
Greeting UI Fortune
Service
Fortune DB
Simon
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Supporting Characters
85
The SCS Triplets
and their pet Rabbit
Greeting UI Fortune
Service
Fortune DB
Simon
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
The Setting
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Story Line
87
Greeting UI
Simon
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Story Line
88
Greeting UI
Simon
Hey Greeting!
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Story Line
89
Greeting UI
The SCS Triplets
and their pet Rabbit
Simon
Hey Greeting!
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Story Line
90
Greeting UI
The SCS Triplets
and their pet Rabbit
???
Simon
Hey Greeting!
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Story Line
91
Greeting UI
The SCS Triplets
and their pet Rabbit
!!!
Fortune
ServiceSimon
Hey Greeting!
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Story Line
92
Greeting UI
The SCS Triplets
and their pet Rabbit
Fortune
ServiceSimon
Hey Greeting!
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Story Line
93
Greeting UI
The SCS Triplets
and their pet Rabbit
Fortune
Service
Fortune DB
Simon
Hey Greeting!
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Story Line
94
Greeting UI
The SCS Triplets
and their pet Rabbit
Fortune
Service
Fortune DB
Simon
Hey Greeting!
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Story Line
95
Greeting UI
The SCS Triplets
and their pet Rabbit
Fortune
Service
Fortune DB
Simon
Hey Greeting!
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Story Line
96
Greeting UI
“Do What Works”
Simon
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Story Line
97
Greeting UI
Simon
Great advice!
Who said it?
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Story Line
98
Greeting UI Fortune
ServiceSimon
Great advice!
Who said it?
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Story Line
99
Greeting UI Fortune
ServiceSimon
Great advice!
Who said it?
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Story Line
100
Greeting UI Fortune
Service
Fortune DB
Simon
Great advice!
Who said it?
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Story Line
101
Greeting UI Fortune
Service
Fortune DB
Simon
Great advice!
Who said it?
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Story Line
102
Greeting UI Fortune
Service
Fortune DB
Simon
It’s not that
hard a question...
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Story Line
103
Greeting UI Fortune
Service
Fortune DB
Simon
It’s not that
hard a question...
The SCS Triplets
and their pet Rabbit
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Story Line
104
Greeting UI Fortune
Service
Fortune DB
Simon
I just want to
know...
The SCS Triplets
and their pet Rabbit
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Story Line
105
Greeting UI Fortune
Service
Fortune DB
Simon
PIPELINE ALL
THE THINGS!!!
The SCS Triplets
and their pet Rabbit
Act I
The Scaffold
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Act I: The Scaffold
107
● Objective:
○ Automate the deployment of greeting-ui and fortune-service
a.k.a. Make the pipelines run green
○ Establish environments (PCF spaces) in accordance with SCP
recommendations
● Approach:
○ Minimum changes to apps (scaffolding, not code)
○ Create a pipeline for each
○ Create PCF spaces
○ Run the pipelines
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Greeting and Fortune
● Spring Boot apps
● Source code on GitHub
● Maven
● No tests
● Use 5 services
○ MySQL database (for Fortune)
○ Spring Cloud Services: Eureka, Hystrix/Turbine, Config Server
○ Rabbit - for Config Server refresh trigger propagation
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
● Add 2 new branches to the app repos
App Scaffold
109
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
● Add 2 new branches to the app repos
● Add a Maven wrapper
○ mvn -N io.takari:maven:wrapper
App Scaffold
110
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
● Add 2 new branches to the app repos
● Add a Maven wrapper
○ mvn -N io.takari:maven:wrapper
● Add artifact repo info to app pom.xml (and ~/.m2/settings.xml)
○ distributionManagement.repository.id
○ distributionManagement.repository.url
App Scaffold
111
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
● Add 2 new branches to the app repos
● Add a Maven wrapper
○ mvn -N io.takari:maven:wrapper
● Add artifact repo info to app pom.xml
○ distributionManagement.repository.id
○ distributionManagement.repository.url
● git push!
App Scaffold
112
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Pipeline Configuration - Git and Mvn
113
● Create a credentials file for each app (copy sample in SCP)
○ Git url and branch of your app
○ Git url and branch of the SCP code base (cf or v1.0.0.M8, coming soon!)
○ Your git name, email, and private key
○ Your maven repo info and credentials
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Build - Success!
114
● At this point, the Build jobs should all succeed
● App builds, jar uploads to maven repo, git tagged as “dev/<version>”
● The api compatibility job runs “mvn clean verify -P apicompatibility”, but the
profile does not exist yet, so it really isn’t doing much
● Takes place on Concourse worker
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
● Create app manifest.yml
● Create a new manifest for SCP (e.g. sc-pipelines.yml)
○ Provide info for SCP to provision services on CF (test* & stage)
● Git push!
App Scaffold
115
test:
services:
- name: fortune-db
type: broker
broker: cleardb
plan: spark
- name: config-server
type: broker
broker: p-config-server
plan: standard
params:
git:
uri: https://github.com/ciberkleid/app-config
useExisting: true
...
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Pipeline Configuration - CF
116
● Add general CF info to the credentials file
○ paas-type: cf
○ pipeline-descriptor (the sc-pipelines manifest)
○ paas-hostname-uuid (to avoid route collision)
● Add target & login info for Test, Stage and Prod
○ For Test, you specify a prefix. SCP appends the app name
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Cloud Foundry Setup: Test, Stage, Prod
117
● Create the Test, Stage, and Prod spaces
● Manually provision services in Prod
○ And maybe Stage
○ But not Test
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Full Pipeline - Success!
118
● App deployed to PCF through Prod
● Git tagged as prod/<version>
● Ability to trigger rollback through Concourse
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 119
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 120
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Act I: The Scaffold
121
● Objective:
○ Automate the deployment of greeting-ui and fortune-service
a.k.a. Make the pipelines run green
○ Establish environments (PCF spaces) in accordance with SCP
recommendations
● Approach:
○ Minimum changes to apps (scaffolding, not code)
○ Create a pipeline for each
○ Create PCF spaces
○ Run the pipelines
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Is That Enough?
122
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Nope!
123
Same for apicompatibility
and e2e
Act II: The Test
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Act II: The Test
125
● Objective:
○ Increase effectiveness of and confidence in the pipelines
○ Standardize approach to testing
● Approach:
○ Use mvn profiles to control test executions
○ Add/organize tests in agreement with SCP framework
○ Enable DB backward compatibility testing
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Test Control - Maven Profiles
126
● Add profiles to the app pom.xml
○ default
○ apicompatibility
○ smoke
○ e2e
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>**/*Tests.java</include>
<include>**/*Test.java</include>
</includes>
<excludes>
<exclude>**/smoke/**</exclude>
<exclude>**/e2e/**</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-
plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Test Control - Organize Tests
127
● Organize tests into packages matching the profiles
● Add tests for each profile
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Test Coverage - Fortune Smoke
128
fortune-service
fortune-db
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Test Coverage - Fortune E2E
129
greeting-ui
fortune-db
fortune-service
Assuming same domain...
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Test Coverage - Greeting Smoke
130
greeting-ui
circuit breaker fallback
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Test Coverage - Greeting E2E
131
greeting-ui
fortune-service
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Enable Database Rollback Testing
132
● Flyway
○ OSS DB migration tool
○ For relational databases
○ Convention over configuration
○ Database versioning
○ Migration on app startup (good for CD!)
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
DB Schema Creation With Flyway
133
● Disable JPA auto-generated schemas; let flyway do it
● Follow flyway conventions for SQL file name
● Tada! Schema is now versioned!
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
DB Schema Population With Flyway
134
● Add INSERT statements to V1__init.sql
● Data is populated upon app startup, but only once per DB version
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Act II: The Test
135
● Objective:
○ Increase effectiveness of and confidence in the pipelines
○ Standardize approach to testing
● Approach:
○ Use mvn profiles to control test executions
○ Add/organize tests in agreement with SCP framework
○ Enable DB backward compatibility testing
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Is THAT Enough?
136
● Good:
○ You are in a great position to include well-organized, robust testing and
derive a high level of confidence from your pipelines
○ You can ensure safe rollbacks in case of database schema changes
● Better:
○ Implementing a contract-driven approach will have additional benefits to
your general development practice
○ Inter-team communication will be simpler
○ Contract tests will catch breaking API changes in build rather than stage
○ Troubleshooting will be easier
○ Failure and feedback will be faster
Act III: The Contract
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Act III: The Contract
138
● Objective:
○ Increase reliability - strive to maximize pipeline benefits
○ Encourage contract-based programming practices
● Approach:
○ Add contracts, stubs, and a stubrunner
○ Enable API backward compatibility testing
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
The Greeting/Fortune Contract
139
import org.springframework.cloud.contract.spec.Contract
Contract.make {
description("""
should return a fortune string
""")
request {
method GET()
url "/"
}
response {
status 200
body "foo fortune"
}
}
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Spring Cloud Contract Basics
140
● Add the Spring Cloud Contract Maven Plugin to your pom.xml (Fortune)
○ Plugin requires a base class to set up the context and stub out the service
that satisfies the API call (e.g. the DB)
public class BaseClass {
@Before
public void setup() {
FortuneService service = BDDMockito.mock(FortuneService.class);
BDDMockito.given(service.getFortune()).willReturn("foo fortune");
RestAssuredMockMvc.standaloneSetup(new FortuneController(service));
}
}
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Spring Cloud Contract Basics
141
● Add the Spring Cloud Contract Maven Plugin to your pom.xml (Fortune)
○ Plugin will auto-generate tests and stubs (and a stub.jar)
○ Stub jar is uploaded to the maven repo, along with the app jar
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
For Back-Compatibility, Use Prod Contracts
142
<profile>
<id>apicompatibility</id>
<plugin>
<configuration>
<contractsRepositoryUrl>${repo.with.binaries}</contractsRepositoryUrl>
<contractDependency>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<classifier>stubs</classifier>
<version>${latest.production.version}</version>
</contractDependency>
...
In this case, we want the contracts plugin to generate tests
based on contracts outside of the project (the ones from the
latest prod jar on our maven repo). Pipeline injects values in red
dynamically
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Greeting: Build with Stubrunner
greeting-ui
circuit breaker fallback
or manually
configured WireMock
greeting-ui
stubs
without stubrunner with stubrunner
● Greeting starts an in-process stubrunner that automatically configures
WireMock
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Greeting: Integration Tests Aligned with Stubs
144
For in-process stubrunner, the
server-side Wiremock port
For in-process stubrunner, the
client-side endpoint config
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Greeting: Test with Stubrunner (standalone)
greeting-ui
circuit breaker fallback
greeting-ui
stubrunner
without stubrunner with stubrunner
Note: Update the
greeting smoke tests
accordingly
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Home Stretch: Standalone Stubrunner Config
● You need a stubrunner app!
○ Clone spring-cloud-samples/cloudfoundry-stub-runner-boot
○ Build it, and upload the jar to your maven repo
● Your stubrunner app needs a manifest!
○ Put it in your app repo (e.g. greeting-ui repo)
● You need to tell SCP to deploy the stubrunner app!
○ Do it through the pipeline descriptor (e.g. sc-pipelines.yml)
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Home Stretch: Standalone Stubrunner Config
● Specify the server side (stubrunner) ports
<properties>
<stubrunner.ids>io.pivotal:fortune-service:_latest:stubs:10000</stubrunner.ids>
</properties>
● Disable Eureka lookup for smoke tests
● Provide URLs to non-8080 stubrunner ports explicitly
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Act III: The Contract
148
● Objective:
○ Increase reliability - strive to maximize pipeline benefits
○ Encourage contract-based programming practices
● Approach:
○ Add contracts, stubs, and a stubrunner
○ Enable API back compatibility testing
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
So what have we achieved
149
● The Scaffold:
○ Automate the deployment of greeting-ui and fortune-service
a.k.a. Make the pipelines run green
○ Establish environments (PCF spaces) in accordance with SCP
recommendations
● The Test:
○ Increase effectiveness of and confidence in the pipelines
○ Standardize approach to testing
● The Contract
○ Increase reliability - strive to maximize pipeline benefits
○ Encourage contract-based programming practices
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Finally...
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
One More Thing...
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Just Kidding :-)
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
You’re Done!
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Though Really, You’re Just Beginning...
154
Because now…
● You can evolve your app faster
● With (hopefully) better code
● Consistent testing practices
● Fast failure and feedback
● Contract-based API definitions
● API and DB rollback assurance
● And…. instant pipelines from source to production!
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
What About Poor Simon?
155
Greeting UI Fortune
Service
Fortune DB
Simon
WHO SAID
Do What Works!?
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
What About Poor Simon?
156
Greeting UI Fortune
Service
Fortune DB
Simon
WHO SAID
Do What Works!?
Contract.make{“””
should return author name
“””)
...
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
What About Poor Simon?
157
Greeting UI Fortune
Service
Fortune DB
Simon
WHO SAID
Do What Works!?
Fortune
Service
Stub
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
What About Poor Simon?
158
Greeting UI Fortune
Service
Fortune DB
Simon
WHO SAID
Do What Works!?
V2:
ALTER TABLE fortune
CHANGE COLUMN text TO fortune,
ADD author CHAR (50);
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
What About Poor Simon?
159
Greeting UI Fortune
Service
Fortune DB
Simon
WHO SAID
Do What Works!?
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
What About Poor Simon?
160
Greeting UI Fortune
Service
Fortune DB
Simon
Pivotal says it all
the time!
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Simon Spring Cloud Pipelines
161
Greeting UI Fortune
Service
Fortune DB
Oh, right!
I knew that.
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-
NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/
Sample Code...
162
● Github repos showing the
end-state of each “act”
● Step-by-step instructions will
be published soon and made
accessible through the repo
Readmes
Back to Marcin
Spring Cloud Pipelines
Customizing Spring Cloud Pipelines
Customizing Spring Cloud Pipelines
$ curl -LOk https://github.com/spring-cloud/spring-cloud-
pipelines/archive/v1.0.0.M8.zip
$ unzip v1.0.0.M8.zip
$ cd spring-cloud-pipelines-v1.0.0.M8
$ git init
$ # modify the pipelines to suit your needs
$ ./gradlew customize
$ …
$ git add .
$ git commit -a -m “Initial commit”
$ git remote add origin ${YOUR_REPOSITORY_URL}
$ git push origin master
Customizing Spring Cloud Pipelines
Summary
• Continuous Deployment allows you to continuously deliver business value
• Spring Cloud Pipelines gives you OOB tooling to test your software via
• unit and integration testing
• contract testing
• rollback testing
• You can gradually migrate your applications to start using SC Pipelines
• SC Pipelines allows you to easily adjust the deployment pipeline to suit your
company’s needs
• Thanks to PaaS you can easily do A/B & zero downtime deployment
● Github Analytics: https://github.com/spring-cloud-samples/github-analytics
● Github Webhook: https://github.com/spring-cloud-samples/github-webhook
● Fortune Service: https://github.com/ciberkleid/fortune-service
● Greeting UI: https://github.com/ciberkleid/greeting-ui/
● SC-Pipelines documentation: https://cloud.spring.io/spring-cloud-pipelines/
● Pivotal Web Services trial : https://run.pivotal.io/
● PCF Dev (CF on your laptop) : https://docs.pivotal.io/pcf-dev/
Links
Learn More. Stay Connected.
▪ Read the docs
http://cloud.spring.io/spring-cloud-pipelines/
▪ Talk to us on Gitter
https://gitter.im/spring-cloud/spring-cloud-pipelines
Twitter: twitter.com/springcentral
YouTube: spring.io/video
LinkedIn: spring.io/linkedin
Google Plus: spring.io/gplus
ciberkleid
mgrzejszczak

More Related Content

What's hot

Continuous Performance Testing: The New Standard
Continuous Performance Testing: The New StandardContinuous Performance Testing: The New Standard
Continuous Performance Testing: The New Standard
TechWell
 
Continuous Testing using Shippable and Docker
Continuous Testing using Shippable and DockerContinuous Testing using Shippable and Docker
Continuous Testing using Shippable and Docker
Mukta Aphale
 
Delivery With Chef - ChefConf 2015
Delivery With Chef - ChefConf 2015 Delivery With Chef - ChefConf 2015
Delivery With Chef - ChefConf 2015
Chef
 
Anatomy of a Build Pipeline
Anatomy of a Build PipelineAnatomy of a Build Pipeline
Anatomy of a Build Pipeline
Samuel Brown
 
Microservices Testing at Scale
Microservices Testing at ScaleMicroservices Testing at Scale
Microservices Testing at Scale
VMware Tanzu
 
Chef for DevOps - an Introduction
Chef for DevOps - an IntroductionChef for DevOps - an Introduction
Chef for DevOps - an Introduction
Sanjeev Sharma
 
CI/CD
CI/CDCI/CD
CI/CD
AmitDhodi
 
Continuous Testing
Continuous TestingContinuous Testing
Continuous Testing
Crevise Technologies
 
Continous integration and delivery for single page applications
Continous integration and delivery for single page applicationsContinous integration and delivery for single page applications
Continous integration and delivery for single page applications
Sunil Dalal
 
Succesful testing-continuous-delivery-testnet
Succesful testing-continuous-delivery-testnetSuccesful testing-continuous-delivery-testnet
Succesful testing-continuous-delivery-testnetHarald Rietman
 
Anatomy of a Continuous Integration and Delivery (CICD) Pipeline
Anatomy of a Continuous Integration and Delivery (CICD) PipelineAnatomy of a Continuous Integration and Delivery (CICD) Pipeline
Anatomy of a Continuous Integration and Delivery (CICD) Pipeline
Robert McDermott
 
How To Be a Java Automated Testing Superstar
How To Be a Java Automated Testing SuperstarHow To Be a Java Automated Testing Superstar
How To Be a Java Automated Testing Superstar
VMware Tanzu
 
Software Architecture for DevOps and Continuous Delivery
Software Architecture for DevOps and Continuous DeliverySoftware Architecture for DevOps and Continuous Delivery
Software Architecture for DevOps and Continuous Delivery
Eberhard Wolff
 
Serverless Delivery
Serverless DeliveryServerless Delivery
Serverless Delivery
Casey Lee
 
Using Docker for Testing
Using Docker for TestingUsing Docker for Testing
Using Docker for Testing
Mukta Aphale
 
Journée DevOps : De l'intégration continue au déploiement continu avec Jenkins
Journée DevOps : De l'intégration continue au déploiement continu avec JenkinsJournée DevOps : De l'intégration continue au déploiement continu avec Jenkins
Journée DevOps : De l'intégration continue au déploiement continu avec Jenkins
Publicis Sapient Engineering
 
QConSP 2014 - Continuous Delivery - Part 03 - Continuous Integration
QConSP 2014 - Continuous Delivery - Part 03 - Continuous IntegrationQConSP 2014 - Continuous Delivery - Part 03 - Continuous Integration
QConSP 2014 - Continuous Delivery - Part 03 - Continuous IntegrationRodrigo Russo
 
SkyBase - a Devops Platform for Hybrid Cloud
SkyBase - a Devops Platform for Hybrid CloudSkyBase - a Devops Platform for Hybrid Cloud
SkyBase - a Devops Platform for Hybrid Cloud
Vlad Kuusk
 
Continuous Delivery Distilled
Continuous Delivery DistilledContinuous Delivery Distilled
Continuous Delivery Distilled
Matt Callanan
 
Top10 Characteristics of Awesome Apps
Top10 Characteristics of Awesome AppsTop10 Characteristics of Awesome Apps
Top10 Characteristics of Awesome Apps
Casey Lee
 

What's hot (20)

Continuous Performance Testing: The New Standard
Continuous Performance Testing: The New StandardContinuous Performance Testing: The New Standard
Continuous Performance Testing: The New Standard
 
Continuous Testing using Shippable and Docker
Continuous Testing using Shippable and DockerContinuous Testing using Shippable and Docker
Continuous Testing using Shippable and Docker
 
Delivery With Chef - ChefConf 2015
Delivery With Chef - ChefConf 2015 Delivery With Chef - ChefConf 2015
Delivery With Chef - ChefConf 2015
 
Anatomy of a Build Pipeline
Anatomy of a Build PipelineAnatomy of a Build Pipeline
Anatomy of a Build Pipeline
 
Microservices Testing at Scale
Microservices Testing at ScaleMicroservices Testing at Scale
Microservices Testing at Scale
 
Chef for DevOps - an Introduction
Chef for DevOps - an IntroductionChef for DevOps - an Introduction
Chef for DevOps - an Introduction
 
CI/CD
CI/CDCI/CD
CI/CD
 
Continuous Testing
Continuous TestingContinuous Testing
Continuous Testing
 
Continous integration and delivery for single page applications
Continous integration and delivery for single page applicationsContinous integration and delivery for single page applications
Continous integration and delivery for single page applications
 
Succesful testing-continuous-delivery-testnet
Succesful testing-continuous-delivery-testnetSuccesful testing-continuous-delivery-testnet
Succesful testing-continuous-delivery-testnet
 
Anatomy of a Continuous Integration and Delivery (CICD) Pipeline
Anatomy of a Continuous Integration and Delivery (CICD) PipelineAnatomy of a Continuous Integration and Delivery (CICD) Pipeline
Anatomy of a Continuous Integration and Delivery (CICD) Pipeline
 
How To Be a Java Automated Testing Superstar
How To Be a Java Automated Testing SuperstarHow To Be a Java Automated Testing Superstar
How To Be a Java Automated Testing Superstar
 
Software Architecture for DevOps and Continuous Delivery
Software Architecture for DevOps and Continuous DeliverySoftware Architecture for DevOps and Continuous Delivery
Software Architecture for DevOps and Continuous Delivery
 
Serverless Delivery
Serverless DeliveryServerless Delivery
Serverless Delivery
 
Using Docker for Testing
Using Docker for TestingUsing Docker for Testing
Using Docker for Testing
 
Journée DevOps : De l'intégration continue au déploiement continu avec Jenkins
Journée DevOps : De l'intégration continue au déploiement continu avec JenkinsJournée DevOps : De l'intégration continue au déploiement continu avec Jenkins
Journée DevOps : De l'intégration continue au déploiement continu avec Jenkins
 
QConSP 2014 - Continuous Delivery - Part 03 - Continuous Integration
QConSP 2014 - Continuous Delivery - Part 03 - Continuous IntegrationQConSP 2014 - Continuous Delivery - Part 03 - Continuous Integration
QConSP 2014 - Continuous Delivery - Part 03 - Continuous Integration
 
SkyBase - a Devops Platform for Hybrid Cloud
SkyBase - a Devops Platform for Hybrid CloudSkyBase - a Devops Platform for Hybrid Cloud
SkyBase - a Devops Platform for Hybrid Cloud
 
Continuous Delivery Distilled
Continuous Delivery DistilledContinuous Delivery Distilled
Continuous Delivery Distilled
 
Top10 Characteristics of Awesome Apps
Top10 Characteristics of Awesome AppsTop10 Characteristics of Awesome Apps
Top10 Characteristics of Awesome Apps
 

Similar to Continuous Deployment to the cloud

Dev/Test scenarios in DevOps world
Dev/Test scenarios in DevOps worldDev/Test scenarios in DevOps world
Dev/Test scenarios in DevOps world
Davide Benvegnù
 
SQL Server DevOps Jumpstart
SQL Server DevOps JumpstartSQL Server DevOps Jumpstart
SQL Server DevOps Jumpstart
Ori Donner
 
Orchestrate Your End-to-end Mainframe Application Release Pipeline
Orchestrate Your End-to-end Mainframe Application Release PipelineOrchestrate Your End-to-end Mainframe Application Release Pipeline
Orchestrate Your End-to-end Mainframe Application Release Pipeline
DevOps.com
 
Getting to Walk with DevOps
Getting to Walk with DevOpsGetting to Walk with DevOps
Getting to Walk with DevOps
Eklove Mohan
 
Continuous Integration as a Way of Life
Continuous Integration as a Way of LifeContinuous Integration as a Way of Life
Continuous Integration as a Way of Life
Melissa Benua
 
CI/CD with Azure DevOps and Azure Databricks
CI/CD with Azure DevOps and Azure DatabricksCI/CD with Azure DevOps and Azure Databricks
CI/CD with Azure DevOps and Azure Databricks
GoDataDriven
 
Building and Managing Reliable Infrastructure with Chef and Chef Delivery
Building and Managing Reliable Infrastructure with Chef and Chef DeliveryBuilding and Managing Reliable Infrastructure with Chef and Chef Delivery
Building and Managing Reliable Infrastructure with Chef and Chef Delivery
Mandi Walls
 
A Pathway to Continuous Integration/Continuous Delivery on AWS
A Pathway to Continuous Integration/Continuous Delivery on AWSA Pathway to Continuous Integration/Continuous Delivery on AWS
A Pathway to Continuous Integration/Continuous Delivery on AWS
Bhuvaneswari Subramani
 
CI/CD on AWS
CI/CD on AWSCI/CD on AWS
CI/CD on AWS
Bhargav Amin
 
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...
SmartBear
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development Pipeline
GlobalLogic Ukraine
 
Containers, microservices and serverless for realists
Containers, microservices and serverless for realistsContainers, microservices and serverless for realists
Containers, microservices and serverless for realists
Karthik Gaekwad
 
Achieving Full Stack DevOps at Colonial Life
Achieving Full Stack DevOps at Colonial Life Achieving Full Stack DevOps at Colonial Life
Achieving Full Stack DevOps at Colonial Life
DevOps.com
 
2016 09-dev opsjourney-devopsdaysoslo
2016 09-dev opsjourney-devopsdaysoslo2016 09-dev opsjourney-devopsdaysoslo
2016 09-dev opsjourney-devopsdaysoslo
Jon Arild Tørresdal
 
IaC? VSTS to the rescue! Abbreviations explained
IaC? VSTS to the rescue! Abbreviations explainedIaC? VSTS to the rescue! Abbreviations explained
IaC? VSTS to the rescue! Abbreviations explained
Jeroen Niesen
 
The Rocky Cloud Road
The Rocky Cloud RoadThe Rocky Cloud Road
The Rocky Cloud Road
Gert Drapers
 
Application Lifecycle Management
Application Lifecycle ManagementApplication Lifecycle Management
Application Lifecycle Management
Amazon Web Services
 
Infrastructure as Code for Network
Infrastructure as Code for NetworkInfrastructure as Code for Network
Infrastructure as Code for Network
Damien Garros
 
Vagrant to-aws-flow
Vagrant to-aws-flowVagrant to-aws-flow
Vagrant to-aws-flow
Kimberly Macias
 
Continuous Load Testing with CloudTest and Jenkins
Continuous Load Testing with CloudTest and JenkinsContinuous Load Testing with CloudTest and Jenkins
Continuous Load Testing with CloudTest and Jenkins
SOASTA
 

Similar to Continuous Deployment to the cloud (20)

Dev/Test scenarios in DevOps world
Dev/Test scenarios in DevOps worldDev/Test scenarios in DevOps world
Dev/Test scenarios in DevOps world
 
SQL Server DevOps Jumpstart
SQL Server DevOps JumpstartSQL Server DevOps Jumpstart
SQL Server DevOps Jumpstart
 
Orchestrate Your End-to-end Mainframe Application Release Pipeline
Orchestrate Your End-to-end Mainframe Application Release PipelineOrchestrate Your End-to-end Mainframe Application Release Pipeline
Orchestrate Your End-to-end Mainframe Application Release Pipeline
 
Getting to Walk with DevOps
Getting to Walk with DevOpsGetting to Walk with DevOps
Getting to Walk with DevOps
 
Continuous Integration as a Way of Life
Continuous Integration as a Way of LifeContinuous Integration as a Way of Life
Continuous Integration as a Way of Life
 
CI/CD with Azure DevOps and Azure Databricks
CI/CD with Azure DevOps and Azure DatabricksCI/CD with Azure DevOps and Azure Databricks
CI/CD with Azure DevOps and Azure Databricks
 
Building and Managing Reliable Infrastructure with Chef and Chef Delivery
Building and Managing Reliable Infrastructure with Chef and Chef DeliveryBuilding and Managing Reliable Infrastructure with Chef and Chef Delivery
Building and Managing Reliable Infrastructure with Chef and Chef Delivery
 
A Pathway to Continuous Integration/Continuous Delivery on AWS
A Pathway to Continuous Integration/Continuous Delivery on AWSA Pathway to Continuous Integration/Continuous Delivery on AWS
A Pathway to Continuous Integration/Continuous Delivery on AWS
 
CI/CD on AWS
CI/CD on AWSCI/CD on AWS
CI/CD on AWS
 
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development Pipeline
 
Containers, microservices and serverless for realists
Containers, microservices and serverless for realistsContainers, microservices and serverless for realists
Containers, microservices and serverless for realists
 
Achieving Full Stack DevOps at Colonial Life
Achieving Full Stack DevOps at Colonial Life Achieving Full Stack DevOps at Colonial Life
Achieving Full Stack DevOps at Colonial Life
 
2016 09-dev opsjourney-devopsdaysoslo
2016 09-dev opsjourney-devopsdaysoslo2016 09-dev opsjourney-devopsdaysoslo
2016 09-dev opsjourney-devopsdaysoslo
 
IaC? VSTS to the rescue! Abbreviations explained
IaC? VSTS to the rescue! Abbreviations explainedIaC? VSTS to the rescue! Abbreviations explained
IaC? VSTS to the rescue! Abbreviations explained
 
The Rocky Cloud Road
The Rocky Cloud RoadThe Rocky Cloud Road
The Rocky Cloud Road
 
Application Lifecycle Management
Application Lifecycle ManagementApplication Lifecycle Management
Application Lifecycle Management
 
Infrastructure as Code for Network
Infrastructure as Code for NetworkInfrastructure as Code for Network
Infrastructure as Code for Network
 
Vagrant to-aws-flow
Vagrant to-aws-flowVagrant to-aws-flow
Vagrant to-aws-flow
 
Continuous Load Testing with CloudTest and Jenkins
Continuous Load Testing with CloudTest and JenkinsContinuous Load Testing with CloudTest and Jenkins
Continuous Load Testing with CloudTest and Jenkins
 

More from VMware Tanzu

Spring into AI presented by Dan Vega 5/14
Spring into AI presented by Dan Vega 5/14Spring into AI presented by Dan Vega 5/14
Spring into AI presented by Dan Vega 5/14
VMware Tanzu
 
What AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About ItWhat AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About It
VMware Tanzu
 
Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023
VMware Tanzu
 
Enhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at ScaleEnhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at Scale
VMware Tanzu
 
Spring Update | July 2023
Spring Update | July 2023Spring Update | July 2023
Spring Update | July 2023
VMware Tanzu
 
Platforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a ProductPlatforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a Product
VMware Tanzu
 
Building Cloud Ready Apps
Building Cloud Ready AppsBuilding Cloud Ready Apps
Building Cloud Ready Apps
VMware Tanzu
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And Beyond
VMware Tanzu
 
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdfSpring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
VMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
VMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
VMware Tanzu
 
tanzu_developer_connect.pptx
tanzu_developer_connect.pptxtanzu_developer_connect.pptx
tanzu_developer_connect.pptx
VMware Tanzu
 
Tanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - FrenchTanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - French
VMware Tanzu
 
Tanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - EnglishTanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - English
VMware Tanzu
 
Virtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - EnglishVirtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - English
VMware Tanzu
 
Tanzu Developer Connect - French
Tanzu Developer Connect - FrenchTanzu Developer Connect - French
Tanzu Developer Connect - French
VMware Tanzu
 
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
VMware Tanzu
 
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring BootSpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
VMware Tanzu
 
SpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software EngineerSpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software Engineer
VMware Tanzu
 
SpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs PracticeSpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs Practice
VMware Tanzu
 

More from VMware Tanzu (20)

Spring into AI presented by Dan Vega 5/14
Spring into AI presented by Dan Vega 5/14Spring into AI presented by Dan Vega 5/14
Spring into AI presented by Dan Vega 5/14
 
What AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About ItWhat AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About It
 
Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023
 
Enhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at ScaleEnhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at Scale
 
Spring Update | July 2023
Spring Update | July 2023Spring Update | July 2023
Spring Update | July 2023
 
Platforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a ProductPlatforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a Product
 
Building Cloud Ready Apps
Building Cloud Ready AppsBuilding Cloud Ready Apps
Building Cloud Ready Apps
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And Beyond
 
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdfSpring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
 
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
 
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
 
tanzu_developer_connect.pptx
tanzu_developer_connect.pptxtanzu_developer_connect.pptx
tanzu_developer_connect.pptx
 
Tanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - FrenchTanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - French
 
Tanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - EnglishTanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - English
 
Virtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - EnglishVirtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - English
 
Tanzu Developer Connect - French
Tanzu Developer Connect - FrenchTanzu Developer Connect - French
Tanzu Developer Connect - French
 
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
 
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring BootSpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
 
SpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software EngineerSpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software Engineer
 
SpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs PracticeSpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs Practice
 

Recently uploaded

Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Enhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZEnhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZ
Globus
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 

Recently uploaded (20)

Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Enhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZEnhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZ
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 

Continuous Deployment to the cloud

  • 1. Continuous Deployment of your Application By Cora Iberkleid @ciberkleid 1 By Marcin Grzejszczak @mgrzejszczak
  • 2. Senior Platform Architect at Pivotal Working on ● Pivotal Cloud Foundry ● Cloud Native Architecture ● Dev Practices Modernization Twitter: @ciberkleid About us
  • 3. Spring Cloud developer at Pivotal Working on ● Spring Cloud Sleuth ● Spring Cloud Contract ● Spring Cloud Pipelines About us Twitter: @mgrzejszczak Blog: http://toomuchcoding.com
  • 4. What problem are we trying to solve?
  • 5. The necessity to create a deployment pipeline from scratch for each new project
  • 6. Spring Cloud Pipelines • opinionated template of a deployment pipeline • based on good practices from different projects • we believe in the “Infrastructure as Code” approach • in case of automation server going down you can recover everything in no time • the automation server setup should be automated too! • you can even write tests for your pipelines
  • 7. Spring Cloud Pipelines • we support following automation servers out of the box • Concourse • Jenkins using Jenkins Job DSL plugin • Jenkins using Jenkinsfile with Blue Ocean • logic of all steps done via Bash scripts • you can convert the internals to suit your needs • you can use whatever automation server you want • supports Maven & Gradle • Over 150 Bash tests (using https://github.com/sstephenson/bats)
  • 13. Spring Cloud Pipelines - PaaS Types
  • 14. Spring Cloud Pipelines - CF example
  • 15. Spring Cloud Pipelines - Concourse
  • 17. Spring Cloud Pipelines - Jenkins Job DSL
  • 19. Spring Cloud Pipelines - Jenkinsfile & Blue Ocean
  • 21. WHAT ARE WE GOING TO WORK WITH?
  • 22. Demo - flow GITHUB-WEBHOOK GITHUB-ANALYTICS AMQPHOOK
  • 23. Why do we deploy software? • We’re paid for delivering business value • Features are done when they are deployed to production • It’s better to deploy frequently for faster feedback • It’s better to fail the deployment pipeline as fast as possible • Deployments should take place in a standardised, automated fashion • Your deployment pipeline should test rollback • That way you can perform A/B or zero downtime deployment to production
  • 24. Spring Cloud Pipelines • We’re paid for delivering business value • Features are done when they are deployed to production • It’s better to deploy frequently for faster feedback • It’s better to fail the deployment pipeline as fast as possible • Deployments should take place in a standardised, automated fashion • Your deployment pipeline should test rollback • That way you can perform A/B or zero downtime deployment to production
  • 26. Problem - slow feedback • Nobody wants to wait until the end of the pipeline to see that something is not working fine • We want to fail fast - even during build time • If integration is faulty • If our API is backward incompatible • There should be no need to wait until end to end tests are executed
  • 27. Solution - fail fast • We’re running unit and integration tests during build time • To test faulty integration we use Spring Cloud Contract for HTTP / messaging • Producer defines a contract • From the contract o tests are generated to see if the producer is not lying o stubs are generated for consumers to use • Consumer can reuse it without running the producer • Fail at build time if integration fails (fail fast!) • All stubs reside in Nexus / Artifactory (thus can be reused)
  • 29. Initial contract (producer) Body contains username and repository
  • 30. Generated test (producer) Body contains username and repository
  • 32. Passing contract test (consumer)
  • 33. Breaking contract (producer) Was username and repository and we’ve made a breaking change by converting those to user and repo
  • 34. Installing broken stubs locally (producer) New stubs with backward incompatible changes installed in Maven local
  • 36. Broken contract test (consumer)
  • 37. Broken contract test(consumer) Expected repository and username but got repo and user
  • 39. Demo - backward incompatible API change GITHUB-ANALYTICS V1 with DELETE @ /issues Contracts V1 with DELETE @ /issues Generated test sends DELETE to /issues
  • 41. Generated test for deleting issues
  • 42. Demo - backward incompatible API change GITHUB-ANALYTICS V1 with DELETE @ /issues Contracts V1 with DELETE @ /issues Generated test sends DELETE to /issues GITHUB-ANALYTICS V2 removed DELETE @ /issues Contracts V2 removed DELETE @ /issues No generated test for this endpoint
  • 43. Backward incompatible changes of the API We delete the contract and the DELETE endpoint
  • 44. Demo - backward incompatible API change GITHUB-ANALYTICS V1 with DELETE @ /issues Contracts V1 with DELETE @ /issues Generated test sends DELETE to /issues GITHUB-ANALYTICS V2 removed DELETE @ /issues Contracts V2 removed DELETE @ /issues No generated test for this endpoint GITHUB-ANALYTICS V2 removed DELETE @ /issues Contracts V1 with DELETE @ /issues Generated test sends DELETE to /issues
  • 45. Broken build Current implementation (V2) does not support old contracts (V1)
  • 46. Broken - generated test from old contracts (V1)
  • 47. Broken - generated test from old contracts (V1)
  • 48. Spring Cloud Pipelines • We’re paid for delivering business value • Features are done when they are deployed to production • It’s better to deploy frequently for faster feedback • It’s better to fail the deployment pipeline as fast as possible • Deployments should take place in a standardised, automated fashion • Your deployment pipeline should test rollback • That way you can perform A/B or zero downtime deployment to production
  • 50. STANDARDISATION GIVES LOWER SUPPORT COSTS AND MORE CHANCES OF PEOPLE ROTATION
  • 51. Solution - PaaS & tooling • Use a PaaS to standardise the way you deploy and monitor your software • Spring Cloud Pipelines uses Cloud Foundry [1] or Kubernetes [2] as a PaaS implementation • For the demo purposes we’re using PCF Dev [3] or Minikube [4] • PaaS abstracts the application governance from underlying infrastructure • you can deploy, scale, manage applications in the same way if PaaS was running on your laptop, Amazon, Google, Azure etc. • Database schema upgrade is done via tools like Flyway [5] or Liquibase [6] [1] https://www.cloudfoundry.org, [2] https://kubernetes.io/ [3] https://pivotal.io/pcf-dev, [4] https://github.com/kubernetes/minikube [5] https://flywaydb.org/, [6] http://www.liquibase.org/
  • 53. Spring Cloud Pipelines After the application got deployed to test environment • The database schema gets updated upon application startup • We run a handful of smoke tests to see if crucial parts of our application are working fine • We want to test if the app is properly packaged • The application is surrounded by stubs - no real integrations take place • Spring Cloud Contract Stub Runner Boot app is responsible for serving stubs
  • 54. Problem - rollback DB • Deployment pipelines should test whether the application can be rolled back • Rolling back database changes is extremely difficult • Especially if you deploy once every 6 months (the number of changes is gigantic) • How can you roll back a deletion of a column?
  • 56. Solution - application rollback • The easiest solution is… NOT TO DB ROLLBACK • Perform only backward compatible changes (always add data) • Or perform backward incompatible changes in a backward compatible way [1] • Roll back the application only (the JAR) • The application and DB changes need to be backward compatible • That way you can ensure that two applications (old / new versions) can run simultaneously at the same time [1] https://spring.io/blog/2016/05/31/zero-downtime-deployment-with-a-database
  • 58. Demo - backward incompatible DB change GITHUB-ANALYTICS V1 CODE with repository DB V1 with repository
  • 59. Demo - initial DB state (Flyway)
  • 61. Demo - initial state
  • 62. Demo - backward incompatible DB change GITHUB-ANALYTICS V1 CODE with repository DB V1 with repository GITHUB-ANALYTICS V2 CODE with repo DB V2 with repo
  • 63. Demo - backward incompatible DB change
  • 64. Demo - backward incompatible DB change
  • 65. Demo - backward incompatible DB change GITHUB-ANALYTICS V1 CODE with repository DB V1 with repository GITHUB-ANALYTICS V2 CODE with repo DB V2 with repo GITHUB-ANALYTICS V1 CODE with repository DB V2 with repo
  • 66. Demo - backward incompatible DB change New application (V2) works against new database (V2)
  • 67. Demo - backward incompatible DB change Old application (V1) can’t work with new database (V2) Deploy (V1) and connect to the new database (V2)
  • 68. Demo - errors in the app logs Old version can’t insert data to a missing DB column
  • 70.
  • 71. Problem - end to end tests • End to end tests are slow and brittle • QA department writes an E2E for every feature we have • E2E environment setup • one environment shared between all applications? • one environment per application? • Surrounding apps should be deployed in • production versions? • development versions?
  • 72. Solution - don’t do E2E? • Regardless of the time spent on QA / UAT you can still have bugs on production • Assuming that you ... • embrace failure • introduce monitoring of business key performance indicators (KPIs) • introduce alerting over the metrics • ensure that you can rollback on production • … you could stop doing any end to end tests
  • 73. Spring Cloud Pipelines • Deploy to stage and running e2e tests are manual steps • you have to wait for your turn for the env • some manual work has to be done to purge stale data etc.
  • 74. Spring Cloud Pipelines • We’re paid for delivering business value • Features are done when they are deployed to production • It’s better to deploy frequently for faster feedback • It’s better to fail the deployment pipeline as fast as possible • Deployments should take place in a standardised, automated fashion • Your deployment pipeline should test rollback • That way you can perform A/B or zero downtime deployment to production
  • 76. Problem - deployment to production • We don’t want to deploy the application to production at night • We want to treat a production deployment like any other deployment • We’d like to be able to perform A/B testing and zero downtime deployment • We’d like to easily rollback when sth goes wrong
  • 77. Solution - PaaS + SC Pipelines • Our application has KPI monitoring in place • Alerting are set for KPIs • It has been tested that the application can be easily rolled back • PaaS (CF or K8S) can take care of zero downtime deployment
  • 78. Spring Cloud Pipelines • prod-deploy deploys the pipeline version of the app to production next to the current production version • Once deployed we tag the repo with prod/VERSION_NUMBER • prod-complete allows to stop the old instance and leave only the new one running • prod-rollback deletes the new instance, removes the prod/VERSION_NUMBER tag and leaves only the old one running
  • 80. Two versions running at the same time Two versions registered under same hostname Old instance New instance
  • 81. MIGRATING TO SPRING CLOUD PIPELINES DEMO
  • 82. Application Refactoring for Spring Cloud Pipelines A Story in Three Acts
  • 84. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Main Characters 84 Greeting UI Fortune Service Fortune DB Simon
  • 85. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Supporting Characters 85 The SCS Triplets and their pet Rabbit Greeting UI Fortune Service Fortune DB Simon
  • 86. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ The Setting
  • 87. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Story Line 87 Greeting UI Simon
  • 88. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Story Line 88 Greeting UI Simon Hey Greeting!
  • 89. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Story Line 89 Greeting UI The SCS Triplets and their pet Rabbit Simon Hey Greeting!
  • 90. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Story Line 90 Greeting UI The SCS Triplets and their pet Rabbit ??? Simon Hey Greeting!
  • 91. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Story Line 91 Greeting UI The SCS Triplets and their pet Rabbit !!! Fortune ServiceSimon Hey Greeting!
  • 92. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Story Line 92 Greeting UI The SCS Triplets and their pet Rabbit Fortune ServiceSimon Hey Greeting!
  • 93. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Story Line 93 Greeting UI The SCS Triplets and their pet Rabbit Fortune Service Fortune DB Simon Hey Greeting!
  • 94. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Story Line 94 Greeting UI The SCS Triplets and their pet Rabbit Fortune Service Fortune DB Simon Hey Greeting!
  • 95. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Story Line 95 Greeting UI The SCS Triplets and their pet Rabbit Fortune Service Fortune DB Simon Hey Greeting!
  • 96. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Story Line 96 Greeting UI “Do What Works” Simon
  • 97. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Story Line 97 Greeting UI Simon Great advice! Who said it?
  • 98. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Story Line 98 Greeting UI Fortune ServiceSimon Great advice! Who said it?
  • 99. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Story Line 99 Greeting UI Fortune ServiceSimon Great advice! Who said it?
  • 100. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Story Line 100 Greeting UI Fortune Service Fortune DB Simon Great advice! Who said it?
  • 101. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Story Line 101 Greeting UI Fortune Service Fortune DB Simon Great advice! Who said it?
  • 102. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Story Line 102 Greeting UI Fortune Service Fortune DB Simon It’s not that hard a question...
  • 103. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Story Line 103 Greeting UI Fortune Service Fortune DB Simon It’s not that hard a question... The SCS Triplets and their pet Rabbit
  • 104. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Story Line 104 Greeting UI Fortune Service Fortune DB Simon I just want to know... The SCS Triplets and their pet Rabbit
  • 105. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Story Line 105 Greeting UI Fortune Service Fortune DB Simon PIPELINE ALL THE THINGS!!! The SCS Triplets and their pet Rabbit
  • 107. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Act I: The Scaffold 107 ● Objective: ○ Automate the deployment of greeting-ui and fortune-service a.k.a. Make the pipelines run green ○ Establish environments (PCF spaces) in accordance with SCP recommendations ● Approach: ○ Minimum changes to apps (scaffolding, not code) ○ Create a pipeline for each ○ Create PCF spaces ○ Run the pipelines
  • 108. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Greeting and Fortune ● Spring Boot apps ● Source code on GitHub ● Maven ● No tests ● Use 5 services ○ MySQL database (for Fortune) ○ Spring Cloud Services: Eureka, Hystrix/Turbine, Config Server ○ Rabbit - for Config Server refresh trigger propagation
  • 109. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ ● Add 2 new branches to the app repos App Scaffold 109
  • 110. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ ● Add 2 new branches to the app repos ● Add a Maven wrapper ○ mvn -N io.takari:maven:wrapper App Scaffold 110
  • 111. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ ● Add 2 new branches to the app repos ● Add a Maven wrapper ○ mvn -N io.takari:maven:wrapper ● Add artifact repo info to app pom.xml (and ~/.m2/settings.xml) ○ distributionManagement.repository.id ○ distributionManagement.repository.url App Scaffold 111
  • 112. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ ● Add 2 new branches to the app repos ● Add a Maven wrapper ○ mvn -N io.takari:maven:wrapper ● Add artifact repo info to app pom.xml ○ distributionManagement.repository.id ○ distributionManagement.repository.url ● git push! App Scaffold 112
  • 113. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Pipeline Configuration - Git and Mvn 113 ● Create a credentials file for each app (copy sample in SCP) ○ Git url and branch of your app ○ Git url and branch of the SCP code base (cf or v1.0.0.M8, coming soon!) ○ Your git name, email, and private key ○ Your maven repo info and credentials
  • 114. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Build - Success! 114 ● At this point, the Build jobs should all succeed ● App builds, jar uploads to maven repo, git tagged as “dev/<version>” ● The api compatibility job runs “mvn clean verify -P apicompatibility”, but the profile does not exist yet, so it really isn’t doing much ● Takes place on Concourse worker
  • 115. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ ● Create app manifest.yml ● Create a new manifest for SCP (e.g. sc-pipelines.yml) ○ Provide info for SCP to provision services on CF (test* & stage) ● Git push! App Scaffold 115 test: services: - name: fortune-db type: broker broker: cleardb plan: spark - name: config-server type: broker broker: p-config-server plan: standard params: git: uri: https://github.com/ciberkleid/app-config useExisting: true ...
  • 116. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Pipeline Configuration - CF 116 ● Add general CF info to the credentials file ○ paas-type: cf ○ pipeline-descriptor (the sc-pipelines manifest) ○ paas-hostname-uuid (to avoid route collision) ● Add target & login info for Test, Stage and Prod ○ For Test, you specify a prefix. SCP appends the app name
  • 117. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Cloud Foundry Setup: Test, Stage, Prod 117 ● Create the Test, Stage, and Prod spaces ● Manually provision services in Prod ○ And maybe Stage ○ But not Test
  • 118. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Full Pipeline - Success! 118 ● App deployed to PCF through Prod ● Git tagged as prod/<version> ● Ability to trigger rollback through Concourse
  • 119. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 119
  • 120. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 120
  • 121. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Act I: The Scaffold 121 ● Objective: ○ Automate the deployment of greeting-ui and fortune-service a.k.a. Make the pipelines run green ○ Establish environments (PCF spaces) in accordance with SCP recommendations ● Approach: ○ Minimum changes to apps (scaffolding, not code) ○ Create a pipeline for each ○ Create PCF spaces ○ Run the pipelines
  • 122. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Is That Enough? 122
  • 123. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Nope! 123 Same for apicompatibility and e2e
  • 124. Act II: The Test
  • 125. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Act II: The Test 125 ● Objective: ○ Increase effectiveness of and confidence in the pipelines ○ Standardize approach to testing ● Approach: ○ Use mvn profiles to control test executions ○ Add/organize tests in agreement with SCP framework ○ Enable DB backward compatibility testing
  • 126. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Test Control - Maven Profiles 126 ● Add profiles to the app pom.xml ○ default ○ apicompatibility ○ smoke ○ e2e <profile> <id>default</id> <activation> <activeByDefault>true</activeByDefault> </activation> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <includes> <include>**/*Tests.java</include> <include>**/*Test.java</include> </includes> <excludes> <exclude>**/smoke/**</exclude> <exclude>**/e2e/**</exclude> </excludes> </configuration> </plugin> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven- plugin</artifactId> </plugin> </plugins> </build> </profile>
  • 127. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Test Control - Organize Tests 127 ● Organize tests into packages matching the profiles ● Add tests for each profile
  • 128. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Test Coverage - Fortune Smoke 128 fortune-service fortune-db
  • 129. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Test Coverage - Fortune E2E 129 greeting-ui fortune-db fortune-service Assuming same domain...
  • 130. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Test Coverage - Greeting Smoke 130 greeting-ui circuit breaker fallback
  • 131. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Test Coverage - Greeting E2E 131 greeting-ui fortune-service
  • 132. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Enable Database Rollback Testing 132 ● Flyway ○ OSS DB migration tool ○ For relational databases ○ Convention over configuration ○ Database versioning ○ Migration on app startup (good for CD!)
  • 133. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ DB Schema Creation With Flyway 133 ● Disable JPA auto-generated schemas; let flyway do it ● Follow flyway conventions for SQL file name ● Tada! Schema is now versioned!
  • 134. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ DB Schema Population With Flyway 134 ● Add INSERT statements to V1__init.sql ● Data is populated upon app startup, but only once per DB version
  • 135. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Act II: The Test 135 ● Objective: ○ Increase effectiveness of and confidence in the pipelines ○ Standardize approach to testing ● Approach: ○ Use mvn profiles to control test executions ○ Add/organize tests in agreement with SCP framework ○ Enable DB backward compatibility testing
  • 136. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Is THAT Enough? 136 ● Good: ○ You are in a great position to include well-organized, robust testing and derive a high level of confidence from your pipelines ○ You can ensure safe rollbacks in case of database schema changes ● Better: ○ Implementing a contract-driven approach will have additional benefits to your general development practice ○ Inter-team communication will be simpler ○ Contract tests will catch breaking API changes in build rather than stage ○ Troubleshooting will be easier ○ Failure and feedback will be faster
  • 137. Act III: The Contract
  • 138. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Act III: The Contract 138 ● Objective: ○ Increase reliability - strive to maximize pipeline benefits ○ Encourage contract-based programming practices ● Approach: ○ Add contracts, stubs, and a stubrunner ○ Enable API backward compatibility testing
  • 139. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ The Greeting/Fortune Contract 139 import org.springframework.cloud.contract.spec.Contract Contract.make { description(""" should return a fortune string """) request { method GET() url "/" } response { status 200 body "foo fortune" } }
  • 140. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Cloud Contract Basics 140 ● Add the Spring Cloud Contract Maven Plugin to your pom.xml (Fortune) ○ Plugin requires a base class to set up the context and stub out the service that satisfies the API call (e.g. the DB) public class BaseClass { @Before public void setup() { FortuneService service = BDDMockito.mock(FortuneService.class); BDDMockito.given(service.getFortune()).willReturn("foo fortune"); RestAssuredMockMvc.standaloneSetup(new FortuneController(service)); } }
  • 141. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Cloud Contract Basics 141 ● Add the Spring Cloud Contract Maven Plugin to your pom.xml (Fortune) ○ Plugin will auto-generate tests and stubs (and a stub.jar) ○ Stub jar is uploaded to the maven repo, along with the app jar
  • 142. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ For Back-Compatibility, Use Prod Contracts 142 <profile> <id>apicompatibility</id> <plugin> <configuration> <contractsRepositoryUrl>${repo.with.binaries}</contractsRepositoryUrl> <contractDependency> <groupId>${project.groupId}</groupId> <artifactId>${project.artifactId}</artifactId> <classifier>stubs</classifier> <version>${latest.production.version}</version> </contractDependency> ... In this case, we want the contracts plugin to generate tests based on contracts outside of the project (the ones from the latest prod jar on our maven repo). Pipeline injects values in red dynamically
  • 143. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Greeting: Build with Stubrunner greeting-ui circuit breaker fallback or manually configured WireMock greeting-ui stubs without stubrunner with stubrunner ● Greeting starts an in-process stubrunner that automatically configures WireMock
  • 144. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Greeting: Integration Tests Aligned with Stubs 144 For in-process stubrunner, the server-side Wiremock port For in-process stubrunner, the client-side endpoint config
  • 145. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Greeting: Test with Stubrunner (standalone) greeting-ui circuit breaker fallback greeting-ui stubrunner without stubrunner with stubrunner Note: Update the greeting smoke tests accordingly
  • 146. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Home Stretch: Standalone Stubrunner Config ● You need a stubrunner app! ○ Clone spring-cloud-samples/cloudfoundry-stub-runner-boot ○ Build it, and upload the jar to your maven repo ● Your stubrunner app needs a manifest! ○ Put it in your app repo (e.g. greeting-ui repo) ● You need to tell SCP to deploy the stubrunner app! ○ Do it through the pipeline descriptor (e.g. sc-pipelines.yml)
  • 147. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Home Stretch: Standalone Stubrunner Config ● Specify the server side (stubrunner) ports <properties> <stubrunner.ids>io.pivotal:fortune-service:_latest:stubs:10000</stubrunner.ids> </properties> ● Disable Eureka lookup for smoke tests ● Provide URLs to non-8080 stubrunner ports explicitly
  • 148. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Act III: The Contract 148 ● Objective: ○ Increase reliability - strive to maximize pipeline benefits ○ Encourage contract-based programming practices ● Approach: ○ Add contracts, stubs, and a stubrunner ○ Enable API back compatibility testing
  • 149. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ So what have we achieved 149 ● The Scaffold: ○ Automate the deployment of greeting-ui and fortune-service a.k.a. Make the pipelines run green ○ Establish environments (PCF spaces) in accordance with SCP recommendations ● The Test: ○ Increase effectiveness of and confidence in the pipelines ○ Standardize approach to testing ● The Contract ○ Increase reliability - strive to maximize pipeline benefits ○ Encourage contract-based programming practices
  • 150. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Finally...
  • 151. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ One More Thing...
  • 152. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Just Kidding :-)
  • 153. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ You’re Done!
  • 154. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Though Really, You’re Just Beginning... 154 Because now… ● You can evolve your app faster ● With (hopefully) better code ● Consistent testing practices ● Fast failure and feedback ● Contract-based API definitions ● API and DB rollback assurance ● And…. instant pipelines from source to production!
  • 155. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ What About Poor Simon? 155 Greeting UI Fortune Service Fortune DB Simon WHO SAID Do What Works!?
  • 156. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ What About Poor Simon? 156 Greeting UI Fortune Service Fortune DB Simon WHO SAID Do What Works!? Contract.make{“”” should return author name “””) ...
  • 157. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ What About Poor Simon? 157 Greeting UI Fortune Service Fortune DB Simon WHO SAID Do What Works!? Fortune Service Stub
  • 158. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ What About Poor Simon? 158 Greeting UI Fortune Service Fortune DB Simon WHO SAID Do What Works!? V2: ALTER TABLE fortune CHANGE COLUMN text TO fortune, ADD author CHAR (50);
  • 159. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ What About Poor Simon? 159 Greeting UI Fortune Service Fortune DB Simon WHO SAID Do What Works!?
  • 160. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ What About Poor Simon? 160 Greeting UI Fortune Service Fortune DB Simon Pivotal says it all the time!
  • 161. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Simon Spring Cloud Pipelines 161 Greeting UI Fortune Service Fortune DB Oh, right! I knew that.
  • 162. Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution- NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Sample Code... 162 ● Github repos showing the end-state of each “act” ● Step-by-step instructions will be published soon and made accessible through the repo Readmes
  • 166. Customizing Spring Cloud Pipelines $ curl -LOk https://github.com/spring-cloud/spring-cloud- pipelines/archive/v1.0.0.M8.zip $ unzip v1.0.0.M8.zip $ cd spring-cloud-pipelines-v1.0.0.M8 $ git init $ # modify the pipelines to suit your needs $ ./gradlew customize $ … $ git add . $ git commit -a -m “Initial commit” $ git remote add origin ${YOUR_REPOSITORY_URL} $ git push origin master
  • 168. Summary • Continuous Deployment allows you to continuously deliver business value • Spring Cloud Pipelines gives you OOB tooling to test your software via • unit and integration testing • contract testing • rollback testing • You can gradually migrate your applications to start using SC Pipelines • SC Pipelines allows you to easily adjust the deployment pipeline to suit your company’s needs • Thanks to PaaS you can easily do A/B & zero downtime deployment
  • 169.
  • 170. ● Github Analytics: https://github.com/spring-cloud-samples/github-analytics ● Github Webhook: https://github.com/spring-cloud-samples/github-webhook ● Fortune Service: https://github.com/ciberkleid/fortune-service ● Greeting UI: https://github.com/ciberkleid/greeting-ui/ ● SC-Pipelines documentation: https://cloud.spring.io/spring-cloud-pipelines/ ● Pivotal Web Services trial : https://run.pivotal.io/ ● PCF Dev (CF on your laptop) : https://docs.pivotal.io/pcf-dev/ Links
  • 171. Learn More. Stay Connected. ▪ Read the docs http://cloud.spring.io/spring-cloud-pipelines/ ▪ Talk to us on Gitter https://gitter.im/spring-cloud/spring-cloud-pipelines Twitter: twitter.com/springcentral YouTube: spring.io/video LinkedIn: spring.io/linkedin Google Plus: spring.io/gplus