1© 2015 Pivotal Software, Inc. All rights reserved. 1© 2015 Pivotal Software, Inc. All rights reserved.
Spring Boot and Spring Cloud
Dev101 - Workshop
Sufyaan Kazi (@sufyaan_kazi) & Sara Mitchell
Manager, Field Engineering UK & I
2© 2015 Pivotal Software, Inc. All rights reserved.
Powering Digital Transformation
Pivotal enables enterprises to provide
modern software-driven experiences for
their customers and workforces.
3© 2015 Pivotal Software, Inc. All rights reserved.
Modern Approach for Digital Business
AGILE PRODUCT DEVELOPMENT
Agile practices and collaboration for
product and culture transformation
•  World class application
development services
•  Proven transformational
methodology
BIG DATA
Modern, open, highly
parallelized platform
•  Hadoop, in-memory, and
database software
•  Industries most complete big
data analytics offering
CLOUD NATIVE PLATFORM
Modern, open, highly
automated cloud platform
•  Platform-as-a-Service (PaaS)
software with multi-cloud support
•  Record-breaking sales growth
and adoption
4© 2015 Pivotal Software, Inc. All rights reserved.
How We Deliver Transformation
Build product with us in
our office
Undergo leadership
training
Take back what you’ve
learned
5© 2015 Pivotal Software, Inc. All rights reserved.5
Cloud Native
DevOps Continuous
Delivery
ContainersMicro services
6© 2015 Pivotal Software, Inc. All rights reserved.
Microservices are key for CLOUD NATIVE JAVA
Application Framework
Infrastructure Automation
Platform Runtime
Language framework for microservice-based architectures including
components for service discovery, metrics and circuit breakers.
Application container runtime with attachable backing services,
automated CI/CD, routing, health management and logging.
A single deployment API for provisioning for bit-for-bit, consistent, self-
healing deployments across any private or public cloud.
Dev
Dev Ops
Ops
Spring
Cloud
Spring
Boot
BOSH
Contract: 12 Factor Application
Contract: BOSH Release
7© 2015 Pivotal Software, Inc. All rights reserved.
7
Spring
Boot
Dynamic language productivity
with maturity of enterprise Java
Cloud Native: Direct support for
Microservices, NetflixOSS++
Fully automated app server
configuration and deployment
Production ready Ops metrics
out of the box, with a switch
8© 2015 Pivotal Software, Inc. All rights reserved.
Spring Boot Capabilities
8
•  Quick start project generation
•  Automatic project dependency mapping
•  Configuration drift prevention
•  Conditional configuration with profiles
•  Developer productivity tooling
•  Auto configuration
•  Monitoring and management endpoints
•  Micro-services friendly
9© 2015 Pivotal Software, Inc. All rights reserved.
10© 2015 Pivotal Software, Inc. All rights reserved.
10
Spring
Cloud
Spring
BootDev
Spring Boot
From 0 to app in < 5 min
Enterprise Java with dynamic
language productivity
Spring Cloud
Designed for fragile infrastructure in
partnership with Netflix
Java Microservice Framework
100% Spring Boot enabled
Application Framework
11© 2015 Pivotal Software, Inc. All rights reserved.
DEMO!
12© 2015 Pivotal Software, Inc. All rights reserved.
Enhanced Application with Spring Boot
package hello;
import java.util.Arrays;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(HelloSpringBootApplication.class, args);
}
}
MAGIC!!
•  Tags the class as a
source for Spring
Beans
•  Asks Boot to
automatically add
beans based on
classpath
•  Tell Spring to look for
other components,
configs etc. in the
same package
13© 2015 Pivotal Software, Inc. All rights reserved.
Simple Spring MVC with Annotations
package hello;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;
@RestController
public class HelloController {
@RequestMapping("/")
public String index() {
return "Greetings from Spring Boot!";
}
}
Ready for SpringMVC
to handle Web requests
Maps ‘/’ to this method
14© 2015 Pivotal Software, Inc. All rights reserved.
TO THE
LABS!!
15© 2015 Pivotal Software, Inc. All rights reserved.
http://bit.ly/
1SryunD
16© 2015 Pivotal Software, Inc. All rights reserved.
SKIP STRAIGHT
TO LAB 3
17© 2015 Pivotal Software, Inc. All rights reserved.
Spring Boot Actuator
Actuator, production ready features exposed as endpoints. There are many built-in endpoints but this can be extended.
18© Copyright 2013 Pivotal. All rights reserved.
Elastic Runtime High Level Architecture
•  Turnkey, fully automated Platform-
as-a-Service
•  Scalable runtime environment,
extensible to most modern
frameworks and languages running
on Linux
•  Instant expansion or upgrade with
no downtime
•  Deploy, scale and manage
applications with bindable services
using simplified semantics and APIs
Pivotal CF Elastic Runtime
Dynamic	Router	
OAuth	2.0	Server	(UAA)	
CELL	
Garden	
Build	Packs	
Login	Server	
CC	&	CC	Bridge	
Blob	Store	
BBS/etcd	
Sys	Log		
Service	Brokers	
Collector	 App	Log		
ROUTING	
AUTHENTICATION	
APP	LIFECYCLE	
APP	STORAGE	
&	EXECUTION	
MESSAGING	
METRICS	&	LOGGING	
Pivotal CF OpsManager/BOSH
BBS	 Converger	
VMware OpenStack AWS Azure Google
19© Copyright 2013 Pivotal. All rights reserved.
Container Scheduling
Application Framework
ServicesPlatform Runtime
Routing DatabaseConfigurationService Discovery
Big Data
Object Storage
Mobile
Build CI
User ProvidedLogging & Metrics Messaging
Circuit Breakers12 Factor Apps
RESTful
Services
Microservices
.NETSpring Boot Node.jsRuby on Rails
Operations
Zero Downtime
Deployments
Failover &
Recovery
Scaling
Security
Patching
Platform
Upgrades
Infrastructure OpenStack AmazonVMware Azure
20© 2015 Pivotal Software, Inc. All rights reserved.
1.  Upload app
bits and
metadata
push app
Router	
2.  Create and bind services
3.  Stage application
4.  Deploy application
5.  Manage application health
Blobstore DB
Service Broker
Node(s)
Cloud Controller
DEA
DEA
DEA
CELL
+ app MD
Service
credentials
Cloud Controller
Bridge
Auctioneer
BBS
Overview: Deploying App to
Cloud Foundry Runtime
+ =
21© 2015 Pivotal Software, Inc. All rights reserved.
Stage an ApplicationRouter	
Cloud	Foundry	
ElasQc	RunQme	
Blobstore DB
CELL
Detect Compile Upload
NoYes
System
Buildpacks
Cloud Controller
Service
credentialscreds
Cloud Controller
Bridge
Task
+ =
22© 2015 Pivotal Software, Inc. All rights reserved.
											Router	
Cloud Controller
Cloud Controller
Bridge
Auctioneer BBS
CELL Rep
Executor
CELL Rep
Executor
CELL Rep
Executor
ACCESS
APP
Deploying an Application
23© 2015 Pivotal Software, Inc. All rights reserved.
Containers Pre-date the Docker Hype
Google started
Linux container
effort “Control
Groups”
Added to the
Linux Kernel in
2007
Cloud Foundry
uses Linux
container
technology -
“Warden
containers”
early 2012
Docker is like
github for
container
images
Docker joins
Cloud Foundry
Foundation
Google, MSFT,
IBM working on
orchestration of
multiple Docker
containers
2006 2014
Cloud Foundry has been using container
technology pre-Docker
2012
24© 2015 Pivotal Software, Inc. All rights reserved.
BUILD PACKS
25© 2015 Pivotal Software, Inc. All rights reserved.
Platform provides standard
Buildpack for runtime*
Platform provides fixed OS
container image
Developer brings app
Developer brings runtime
Docker image
Developer brings Docker
OS image
Developer brings app
Buildpacks Docker
* Devs may also provide their own buildpacks
Platform provides fixed
host OS Kernel
Platform provides fixed
host OS Kernel
Application
Container
Standardization or Customization is Your Choice
AND
26© 2015 Pivotal Software, Inc. All rights reserved.
What does it mean to have a “Platform” ?
The minimum features needed…
PaaS
Routing
Load
Balancing
Service
Brokers
Infrastructure
automation
Log
aggregation
Health
monitoring &
recovery
Immutable
artifact
repository
27© 2015 Pivotal Software, Inc. All rights reserved.
AND
RELAX …
28© 2015 Pivotal Software, Inc. All rights reserved.
GIVE ME
MORE…
Local	Profile	
@RepositoryRestResource	 @EnQty	
City	Microservice	-	@SpringBootApplicaQon	
Cloud	Profile	
Spring	Boot	&	Cloud	Magic!	
In-Memory	DB	
Spring	Boot	Magic!
Pivotal   spring boot-cloud workshop
31© 2015 Pivotal Software, Inc. All rights reserved.
NETFLIX
…
32© 2015 Pivotal Software, Inc. All rights reserved.
Spring Cloud Services for Pivotal Cloud Foundry
•  Install
•  Config
•  Manage
•  Secure
Spring Cloud Services
Config
Server
Service
Registry
Circuit Breaker
Dashboard
33© 2015 Pivotal Software, Inc. All rights reserved.
Config Server
34© 2015 Pivotal Software, Inc. All rights reserved.
Service Registration/Discovery
@SpringBootApplication
@EnableCircuitBreaker
@EnableDiscoveryClient
public class CustomerApp extends RepositoryRestMvcConfiguration {
@Override
protected void configureRepositoryRestConfiguration(RepositoryRestConfiguration
config) {
config.exposeIdsFor(Customer.class);
}
public static void main(String[] args) {
SpringApplication.run(CustomerApp.class, args);
}
}
35© 2015 Pivotal Software, Inc. All rights reserved.
Service Registration/Discovery
36© 2015 Pivotal Software, Inc. All rights reserved.
Service Registration/Discovery
@SpringBootApplication
@EnableCircuitBreaker
@EnableDiscoveryClient
public class CustomerApp extends RepositoryRestMvcConfiguration {
@Override
protected void configureRepositoryRestConfiguration(RepositoryRestConfiguration
config) {
config.exposeIdsFor(Customer.class);
}
public static void main(String[] args) {
SpringApplication.run(CustomerApp.class, args);
}
}
37© 2015 Pivotal Software, Inc. All rights reserved.
Fault Tolerance – Circuit Breakers
38© 2015 Pivotal Software, Inc. All rights reserved.
Fault Tolerance – Circuit Breakers
@SpringBootApplication
@EnableCircuitBreaker
@EnableDiscoveryClient
public class CustomerApp extends RepositoryRestMvcConfiguration {
@Override
protected void configureRepositoryRestConfiguration(RepositoryRestConfiguration
config) {
config.exposeIdsFor(Customer.class);
}
public static void main(String[] args) {
SpringApplication.run(CustomerApp.class, args);
}
}
39© 2015 Pivotal Software, Inc. All rights reserved.
@HystrixCommand(fallbackMethod = "defaultLink")
public Link getStoresByLocationLink(Map<String, Object> parameters) {
URI storesUri = URI.create(uri);
try {
ServiceInstance instance = loadBalancer.choose("stores");
storesUri = URI.create(String.format("http://%s:%s",
instance.getHost(), instance.getPort()));
}
catch (RuntimeException e) {
// Eureka not available
}
Traverson traverson = new Traverson(storesUri, MediaTypes.HAL_JSON);
Link link = traverson.follow("stores", "search", "by-location")
.withTemplateParameters(parameters).asLink();
return link;
}
Enabling a Circuit Breaker
Client-Side Load Balancing
40© 2015 Pivotal Software, Inc. All rights reserved.
Anatomy of a cloud native framework
Application coordination boilerplate patterns
Application configuration boilerplate patterns
Enterprise application boilerplate patterns
Runtime Platform, Infrastructure Automation boilerplate patterns
(provision, deploy, secure, log, data services, etc.)
CloudDesktop
Spring Boot
Spring IO
Pivotal Cloud Foundry
Spring Cloud
+ BOSH
Pivotal   spring boot-cloud workshop

More Related Content

PDF
Pivotal microservices spring_pcf_skillsmatter.pptx
PDF
Manchester geek night pcf 101
PDF
How to Architect and Develop Cloud Native Applications
PDF
Pivotal Power Lunch - Why Cloud Native?
PDF
Cloud native Microservices using Spring Boot
PPTX
Unlock your VMWare Investment with Pivotal Cloud Foundry (VMworld 2014)
PDF
PCF Cloud-Native Workshop Slides
PDF
Cloud Foundry Technical Overview
Pivotal microservices spring_pcf_skillsmatter.pptx
Manchester geek night pcf 101
How to Architect and Develop Cloud Native Applications
Pivotal Power Lunch - Why Cloud Native?
Cloud native Microservices using Spring Boot
Unlock your VMWare Investment with Pivotal Cloud Foundry (VMworld 2014)
PCF Cloud-Native Workshop Slides
Cloud Foundry Technical Overview

What's hot (20)

PPTX
Declarative Infrastructure with Cloud Foundry BOSH
PDF
Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)
PDF
Cloud Foundry vs Docker vs Kubernetes - http://bit.ly/2rzUM2U
PDF
Pivotal Cloud Foundry 2.5: A First Look
PPTX
Architecture & Operations
PPTX
vCloud Automation Center and Pivotal Cloud Foundry – Better PaaS Solution (VM...
PPTX
Building REST APIs with Spring Boot and Spring Cloud
PDF
Spring Boot Whirlwind Tour
PPTX
Monitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamics
PPTX
Building a University Community PaaS Using Cloud Foundry (Cloud Foundry Summ...
PDF
Cloud native pitch-younjin-20150925-v2
PDF
Pivotal Web Services - a Real World Example of Running Cloud Foundry at Scale...
PDF
Pivotal Cloud Foundry: A Technical Overview
PPTX
PCF Architecture
PDF
How to Scale Operations for a Multi-Cloud Platform using PCF
PDF
James Watters - PCF Roadshow@Seoul
PDF
Building Cloud Native Architectures with Spring
PPTX
Cloud Foundry Platform Operations - CF Summit 2015
PDF
PCF: Platform for a New Era - Kubernetes for the Enterprise - London
PDF
Pivotal Cloud Foundry 2.0: First Look
Declarative Infrastructure with Cloud Foundry BOSH
Part 1: The Developer Experience (Pivotal Cloud Platform Roadshow)
Cloud Foundry vs Docker vs Kubernetes - http://bit.ly/2rzUM2U
Pivotal Cloud Foundry 2.5: A First Look
Architecture & Operations
vCloud Automation Center and Pivotal Cloud Foundry – Better PaaS Solution (VM...
Building REST APIs with Spring Boot and Spring Cloud
Spring Boot Whirlwind Tour
Monitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamics
Building a University Community PaaS Using Cloud Foundry (Cloud Foundry Summ...
Cloud native pitch-younjin-20150925-v2
Pivotal Web Services - a Real World Example of Running Cloud Foundry at Scale...
Pivotal Cloud Foundry: A Technical Overview
PCF Architecture
How to Scale Operations for a Multi-Cloud Platform using PCF
James Watters - PCF Roadshow@Seoul
Building Cloud Native Architectures with Spring
Cloud Foundry Platform Operations - CF Summit 2015
PCF: Platform for a New Era - Kubernetes for the Enterprise - London
Pivotal Cloud Foundry 2.0: First Look
Ad

Viewers also liked (18)

PDF
Pivotal Cloud Foundry: A Technical Overview
PDF
Cloud Foundry Compared With Other PaaSes (Cloud Foundry Summit 2014)
PPTX
IBM Relay 2015: Expect More From Private Cloud
 
PDF
Integrating MongoDB into Cloud Foundry App
 
PDF
Pivotal Cloud Foundry
PDF
Continuous Delivery of the Cloud Foundry Platform (as a service!)
PDF
Modernisation of Legacy PHP Applications to Symfony2 - Symfony Live Berlin 2012
PDF
Cloud Native Unleashed
PDF
Pivotal Digital Transformation Forum: Journey to Become a Data-Driven Enterprise
PDF
Per Anhalter durch den Cloud Native Stack (extended edition)
PDF
Pivotal Digital Transformation Forum: Requirements to Deliver Business Innova...
PPTX
From 0 to 1000 Apps: The First Year of Cloud Foundry at the Home Depot
PDF
Cloud Foundry: The Best Place to Run Microservices
PPTX
Pivotal Cloud Foundry: Cloud Native Architecture
PDF
Managing Redis with Kubernetes - Kelsey Hightower, Google
PDF
Cloud Native Java Microservices
PDF
The Cloud Native Stack
PDF
Introduction to Platform-as-a-Service and Cloud Foundry
Pivotal Cloud Foundry: A Technical Overview
Cloud Foundry Compared With Other PaaSes (Cloud Foundry Summit 2014)
IBM Relay 2015: Expect More From Private Cloud
 
Integrating MongoDB into Cloud Foundry App
 
Pivotal Cloud Foundry
Continuous Delivery of the Cloud Foundry Platform (as a service!)
Modernisation of Legacy PHP Applications to Symfony2 - Symfony Live Berlin 2012
Cloud Native Unleashed
Pivotal Digital Transformation Forum: Journey to Become a Data-Driven Enterprise
Per Anhalter durch den Cloud Native Stack (extended edition)
Pivotal Digital Transformation Forum: Requirements to Deliver Business Innova...
From 0 to 1000 Apps: The First Year of Cloud Foundry at the Home Depot
Cloud Foundry: The Best Place to Run Microservices
Pivotal Cloud Foundry: Cloud Native Architecture
Managing Redis with Kubernetes - Kelsey Hightower, Google
Cloud Native Java Microservices
The Cloud Native Stack
Introduction to Platform-as-a-Service and Cloud Foundry
Ad

Similar to Pivotal spring boot-cloud workshop (20)

PPTX
[2015-11월 정기 세미나] Cloud Native Platform - Pivotal
PPTX
Removing Barriers Between Dev and Ops
PPTX
Pivotal Cloud Platform Roadshow Keynote
PDF
Removing Barriers Between Dev and Ops
PDF
[OpenStack Day in Korea 2015] Track 2-2 - OpenStack for PaaS: Why it's Hot
PPTX
Anypoint Platform for Pivotal Cloud Foundry
PPTX
What's new in Pivotal Cloud Foundry 1.6
PDF
Removing Barriers Between Dev and Ops
PPTX
Perth DevOps Meetup - Introducing the IBM Innovation Lab - 12112015
PPTX
Cloud Native Infrastructure Automation
PDF
Concevoir et déployer vos applications a base de microservices sur Cloud Foundry
PDF
Embracing SOA and the Cloud
PDF
Pivotal CF 소개
PPT
Deploying IBM WebSphere Application Server to the Cloud_GWC_3-24-2015
PDF
Cloud Roundtable | Pivoltal: Agile platform
PDF
Moderniser le legacy JEE avec les containers et les microservices: patterns a...
PPTX
Competing with Software: It Takes a Platform -- Devops @ EMC World
PDF
D-DAY 2015 Paas ORACLE
PDF
Solving todays problems with oracle integration cloud
PDF
Building Cloud Native Applications with Oracle Autonomous Database.
[2015-11월 정기 세미나] Cloud Native Platform - Pivotal
Removing Barriers Between Dev and Ops
Pivotal Cloud Platform Roadshow Keynote
Removing Barriers Between Dev and Ops
[OpenStack Day in Korea 2015] Track 2-2 - OpenStack for PaaS: Why it's Hot
Anypoint Platform for Pivotal Cloud Foundry
What's new in Pivotal Cloud Foundry 1.6
Removing Barriers Between Dev and Ops
Perth DevOps Meetup - Introducing the IBM Innovation Lab - 12112015
Cloud Native Infrastructure Automation
Concevoir et déployer vos applications a base de microservices sur Cloud Foundry
Embracing SOA and the Cloud
Pivotal CF 소개
Deploying IBM WebSphere Application Server to the Cloud_GWC_3-24-2015
Cloud Roundtable | Pivoltal: Agile platform
Moderniser le legacy JEE avec les containers et les microservices: patterns a...
Competing with Software: It Takes a Platform -- Devops @ EMC World
D-DAY 2015 Paas ORACLE
Solving todays problems with oracle integration cloud
Building Cloud Native Applications with Oracle Autonomous Database.

Recently uploaded (20)

PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Developing a website for English-speaking practice to English as a foreign la...
PPTX
observCloud-Native Containerability and monitoring.pptx
PDF
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PDF
Five Habits of High-Impact Board Members
PDF
Enhancing emotion recognition model for a student engagement use case through...
PPTX
Modernising the Digital Integration Hub
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
STKI Israel Market Study 2025 version august
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PPTX
The various Industrial Revolutions .pptx
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
sustainability-14-14877-v2.pddhzftheheeeee
DOCX
search engine optimization ppt fir known well about this
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
A novel scalable deep ensemble learning framework for big data classification...
PPT
Module 1.ppt Iot fundamentals and Architecture
Assigned Numbers - 2025 - Bluetooth® Document
Developing a website for English-speaking practice to English as a foreign la...
observCloud-Native Containerability and monitoring.pptx
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
Hindi spoken digit analysis for native and non-native speakers
NewMind AI Weekly Chronicles – August ’25 Week III
Taming the Chaos: How to Turn Unstructured Data into Decisions
Five Habits of High-Impact Board Members
Enhancing emotion recognition model for a student engagement use case through...
Modernising the Digital Integration Hub
WOOl fibre morphology and structure.pdf for textiles
STKI Israel Market Study 2025 version august
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
The various Industrial Revolutions .pptx
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
sustainability-14-14877-v2.pddhzftheheeeee
search engine optimization ppt fir known well about this
A comparative study of natural language inference in Swahili using monolingua...
A novel scalable deep ensemble learning framework for big data classification...
Module 1.ppt Iot fundamentals and Architecture

Pivotal spring boot-cloud workshop

  • 1. 1© 2015 Pivotal Software, Inc. All rights reserved. 1© 2015 Pivotal Software, Inc. All rights reserved. Spring Boot and Spring Cloud Dev101 - Workshop Sufyaan Kazi (@sufyaan_kazi) & Sara Mitchell Manager, Field Engineering UK & I
  • 2. 2© 2015 Pivotal Software, Inc. All rights reserved. Powering Digital Transformation Pivotal enables enterprises to provide modern software-driven experiences for their customers and workforces.
  • 3. 3© 2015 Pivotal Software, Inc. All rights reserved. Modern Approach for Digital Business AGILE PRODUCT DEVELOPMENT Agile practices and collaboration for product and culture transformation •  World class application development services •  Proven transformational methodology BIG DATA Modern, open, highly parallelized platform •  Hadoop, in-memory, and database software •  Industries most complete big data analytics offering CLOUD NATIVE PLATFORM Modern, open, highly automated cloud platform •  Platform-as-a-Service (PaaS) software with multi-cloud support •  Record-breaking sales growth and adoption
  • 4. 4© 2015 Pivotal Software, Inc. All rights reserved. How We Deliver Transformation Build product with us in our office Undergo leadership training Take back what you’ve learned
  • 5. 5© 2015 Pivotal Software, Inc. All rights reserved.5 Cloud Native DevOps Continuous Delivery ContainersMicro services
  • 6. 6© 2015 Pivotal Software, Inc. All rights reserved. Microservices are key for CLOUD NATIVE JAVA Application Framework Infrastructure Automation Platform Runtime Language framework for microservice-based architectures including components for service discovery, metrics and circuit breakers. Application container runtime with attachable backing services, automated CI/CD, routing, health management and logging. A single deployment API for provisioning for bit-for-bit, consistent, self- healing deployments across any private or public cloud. Dev Dev Ops Ops Spring Cloud Spring Boot BOSH Contract: 12 Factor Application Contract: BOSH Release
  • 7. 7© 2015 Pivotal Software, Inc. All rights reserved. 7 Spring Boot Dynamic language productivity with maturity of enterprise Java Cloud Native: Direct support for Microservices, NetflixOSS++ Fully automated app server configuration and deployment Production ready Ops metrics out of the box, with a switch
  • 8. 8© 2015 Pivotal Software, Inc. All rights reserved. Spring Boot Capabilities 8 •  Quick start project generation •  Automatic project dependency mapping •  Configuration drift prevention •  Conditional configuration with profiles •  Developer productivity tooling •  Auto configuration •  Monitoring and management endpoints •  Micro-services friendly
  • 9. 9© 2015 Pivotal Software, Inc. All rights reserved.
  • 10. 10© 2015 Pivotal Software, Inc. All rights reserved. 10 Spring Cloud Spring BootDev Spring Boot From 0 to app in < 5 min Enterprise Java with dynamic language productivity Spring Cloud Designed for fragile infrastructure in partnership with Netflix Java Microservice Framework 100% Spring Boot enabled Application Framework
  • 11. 11© 2015 Pivotal Software, Inc. All rights reserved. DEMO!
  • 12. 12© 2015 Pivotal Software, Inc. All rights reserved. Enhanced Application with Spring Boot package hello; import java.util.Arrays; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.ApplicationContext; @SpringBootApplication public class Application { public static void main(String[] args) { SpringApplication.run(HelloSpringBootApplication.class, args); } } MAGIC!! •  Tags the class as a source for Spring Beans •  Asks Boot to automatically add beans based on classpath •  Tell Spring to look for other components, configs etc. in the same package
  • 13. 13© 2015 Pivotal Software, Inc. All rights reserved. Simple Spring MVC with Annotations package hello; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RequestMapping; @RestController public class HelloController { @RequestMapping("/") public String index() { return "Greetings from Spring Boot!"; } } Ready for SpringMVC to handle Web requests Maps ‘/’ to this method
  • 14. 14© 2015 Pivotal Software, Inc. All rights reserved. TO THE LABS!!
  • 15. 15© 2015 Pivotal Software, Inc. All rights reserved. http://bit.ly/ 1SryunD
  • 16. 16© 2015 Pivotal Software, Inc. All rights reserved. SKIP STRAIGHT TO LAB 3
  • 17. 17© 2015 Pivotal Software, Inc. All rights reserved. Spring Boot Actuator Actuator, production ready features exposed as endpoints. There are many built-in endpoints but this can be extended.
  • 18. 18© Copyright 2013 Pivotal. All rights reserved. Elastic Runtime High Level Architecture •  Turnkey, fully automated Platform- as-a-Service •  Scalable runtime environment, extensible to most modern frameworks and languages running on Linux •  Instant expansion or upgrade with no downtime •  Deploy, scale and manage applications with bindable services using simplified semantics and APIs Pivotal CF Elastic Runtime Dynamic Router OAuth 2.0 Server (UAA) CELL Garden Build Packs Login Server CC & CC Bridge Blob Store BBS/etcd Sys Log Service Brokers Collector App Log ROUTING AUTHENTICATION APP LIFECYCLE APP STORAGE & EXECUTION MESSAGING METRICS & LOGGING Pivotal CF OpsManager/BOSH BBS Converger VMware OpenStack AWS Azure Google
  • 19. 19© Copyright 2013 Pivotal. All rights reserved. Container Scheduling Application Framework ServicesPlatform Runtime Routing DatabaseConfigurationService Discovery Big Data Object Storage Mobile Build CI User ProvidedLogging & Metrics Messaging Circuit Breakers12 Factor Apps RESTful Services Microservices .NETSpring Boot Node.jsRuby on Rails Operations Zero Downtime Deployments Failover & Recovery Scaling Security Patching Platform Upgrades Infrastructure OpenStack AmazonVMware Azure
  • 20. 20© 2015 Pivotal Software, Inc. All rights reserved. 1.  Upload app bits and metadata push app Router 2.  Create and bind services 3.  Stage application 4.  Deploy application 5.  Manage application health Blobstore DB Service Broker Node(s) Cloud Controller DEA DEA DEA CELL + app MD Service credentials Cloud Controller Bridge Auctioneer BBS Overview: Deploying App to Cloud Foundry Runtime + =
  • 21. 21© 2015 Pivotal Software, Inc. All rights reserved. Stage an ApplicationRouter Cloud Foundry ElasQc RunQme Blobstore DB CELL Detect Compile Upload NoYes System Buildpacks Cloud Controller Service credentialscreds Cloud Controller Bridge Task + =
  • 22. 22© 2015 Pivotal Software, Inc. All rights reserved. Router Cloud Controller Cloud Controller Bridge Auctioneer BBS CELL Rep Executor CELL Rep Executor CELL Rep Executor ACCESS APP Deploying an Application
  • 23. 23© 2015 Pivotal Software, Inc. All rights reserved. Containers Pre-date the Docker Hype Google started Linux container effort “Control Groups” Added to the Linux Kernel in 2007 Cloud Foundry uses Linux container technology - “Warden containers” early 2012 Docker is like github for container images Docker joins Cloud Foundry Foundation Google, MSFT, IBM working on orchestration of multiple Docker containers 2006 2014 Cloud Foundry has been using container technology pre-Docker 2012
  • 24. 24© 2015 Pivotal Software, Inc. All rights reserved. BUILD PACKS
  • 25. 25© 2015 Pivotal Software, Inc. All rights reserved. Platform provides standard Buildpack for runtime* Platform provides fixed OS container image Developer brings app Developer brings runtime Docker image Developer brings Docker OS image Developer brings app Buildpacks Docker * Devs may also provide their own buildpacks Platform provides fixed host OS Kernel Platform provides fixed host OS Kernel Application Container Standardization or Customization is Your Choice AND
  • 26. 26© 2015 Pivotal Software, Inc. All rights reserved. What does it mean to have a “Platform” ? The minimum features needed… PaaS Routing Load Balancing Service Brokers Infrastructure automation Log aggregation Health monitoring & recovery Immutable artifact repository
  • 27. 27© 2015 Pivotal Software, Inc. All rights reserved. AND RELAX …
  • 28. 28© 2015 Pivotal Software, Inc. All rights reserved. GIVE ME MORE…
  • 31. 31© 2015 Pivotal Software, Inc. All rights reserved. NETFLIX …
  • 32. 32© 2015 Pivotal Software, Inc. All rights reserved. Spring Cloud Services for Pivotal Cloud Foundry •  Install •  Config •  Manage •  Secure Spring Cloud Services Config Server Service Registry Circuit Breaker Dashboard
  • 33. 33© 2015 Pivotal Software, Inc. All rights reserved. Config Server
  • 34. 34© 2015 Pivotal Software, Inc. All rights reserved. Service Registration/Discovery @SpringBootApplication @EnableCircuitBreaker @EnableDiscoveryClient public class CustomerApp extends RepositoryRestMvcConfiguration { @Override protected void configureRepositoryRestConfiguration(RepositoryRestConfiguration config) { config.exposeIdsFor(Customer.class); } public static void main(String[] args) { SpringApplication.run(CustomerApp.class, args); } }
  • 35. 35© 2015 Pivotal Software, Inc. All rights reserved. Service Registration/Discovery
  • 36. 36© 2015 Pivotal Software, Inc. All rights reserved. Service Registration/Discovery @SpringBootApplication @EnableCircuitBreaker @EnableDiscoveryClient public class CustomerApp extends RepositoryRestMvcConfiguration { @Override protected void configureRepositoryRestConfiguration(RepositoryRestConfiguration config) { config.exposeIdsFor(Customer.class); } public static void main(String[] args) { SpringApplication.run(CustomerApp.class, args); } }
  • 37. 37© 2015 Pivotal Software, Inc. All rights reserved. Fault Tolerance – Circuit Breakers
  • 38. 38© 2015 Pivotal Software, Inc. All rights reserved. Fault Tolerance – Circuit Breakers @SpringBootApplication @EnableCircuitBreaker @EnableDiscoveryClient public class CustomerApp extends RepositoryRestMvcConfiguration { @Override protected void configureRepositoryRestConfiguration(RepositoryRestConfiguration config) { config.exposeIdsFor(Customer.class); } public static void main(String[] args) { SpringApplication.run(CustomerApp.class, args); } }
  • 39. 39© 2015 Pivotal Software, Inc. All rights reserved. @HystrixCommand(fallbackMethod = "defaultLink") public Link getStoresByLocationLink(Map<String, Object> parameters) { URI storesUri = URI.create(uri); try { ServiceInstance instance = loadBalancer.choose("stores"); storesUri = URI.create(String.format("http://%s:%s", instance.getHost(), instance.getPort())); } catch (RuntimeException e) { // Eureka not available } Traverson traverson = new Traverson(storesUri, MediaTypes.HAL_JSON); Link link = traverson.follow("stores", "search", "by-location") .withTemplateParameters(parameters).asLink(); return link; } Enabling a Circuit Breaker Client-Side Load Balancing
  • 40. 40© 2015 Pivotal Software, Inc. All rights reserved. Anatomy of a cloud native framework Application coordination boilerplate patterns Application configuration boilerplate patterns Enterprise application boilerplate patterns Runtime Platform, Infrastructure Automation boilerplate patterns (provision, deploy, secure, log, data services, etc.) CloudDesktop Spring Boot Spring IO Pivotal Cloud Foundry Spring Cloud + BOSH