6. Pivotal invests heavily in open-source software
“Pivotal is currently contributing as much software
to open source projects as IBM.”
Source: https://redmonk.com/jgovernor/2017/10/25/some-thoughts-on-the-top-contributors-to-github-2017/
7. vSphere Openstack AWS
Google
Cloud
Azure &
Azure Stack
Shared Services
Shared Security
Shared Networking
Logging & Metrics / Services Brokers / API Management
Credhub / UAA / Single Sign On
VMWare NSX
Embedded Operating System (Windows / Linux)
Application Code & Frameworks
Buildpacks / Spring Boot / Spring Cloud / Steeltoe
PAS
Pivotal Application
Service
PKS
Pivotal Container
Service
PFS
Pivotal Function
Service
Pivotal Services
Marketplace
Pivotal and
Partner Products
Any App
Every Cloud
One Platform
Concourse
Pivotal Cloud Foundry
10. What does cloud native mean?
● Designing the solution as a collection of
microservices that follow the recommendations
in the free ebook Beyond the 12 Factor App:
Exploring the DNA of Highly Scalable, Resilient
Cloud Applications
● Leveraging a container platform to enable
continuous delivery and continuous
deployment
● Eliminating tickets and working in a fully
automated way leveraging DevOps best
practices
● Increasing speed, security, scalability,
scalability, and saving by optimizing the right
mix of DevOps / Microservices / Continuous
Delivery and containers
11. I. One Codebase, One App*
II. Dependency Management*
V. Build, Release, Run*
III. Configuration*
XI. Logs*
IX. Disposability
IV. Backing Services
X. Environmental Parity*
XII. Administrative Process
VII. Port Binding*
VI. Process
VIII. Concurrency
VALUE & APPROACH
= Time to Market; find the seams; use good SDLC practices
= Dev Productivity; standardize & remove surprises
= Release Mgmt Hygiene; use CI/CD automation /w PCF
= Release Mgmt Hygiene; move to environment vars
= Real-Time Metrics; use PCF features; stdout / stderr
= Auto-Scale; move slow processes to backing services
= Resiliency / Agility; use circuit breaker; loose binding
= Reliability; use well architected PCF, get parity
= Reliability; move to backing service(s), expose as REST
= Ops Efficiency; use PCF features like routing, scaling, etc.
= Cloud Compatibility; move state to backing service(s)
= Auto-Scale, ZDD; design for cloud, use PCF features
Cloud Native Implementation
12. Looking Beyond 12-Factors
▪ 12-Factor Published in 2012
- In context of Heroku
- A LOT has changed
▪ New Guidance
- Emphasis on Enterprise Java
- 3 new “factors”
• API First
• Telemetry – APM, Logs, Domain-Specific
• Authn / Authz – Security First Design
▪ Must Read for Application Architects
14. “ Loosely coupled service oriented
architecture with bounded contexts"
- Adrian Cokcroft -
If every service has to be updated in concert, it’s not loosely coupled!
If you have to know about surrounding services you don’t have a bounded context.
15. The structure of a microservice
http://chrisrichardson.net/post/microservices/general/2019/02/16/whats-a-service-part-1.html
17. Maintaining leadership
position through
Business Model
Maintaining leadership
position through
Business Model
Maintaining leadership
position through
Business Model
Maintaining leadership
position through
Experience
Maintaining leadership
position through
Product
Maintaining leadership
position through
Product
Maintaining leadership
position through
Product
Maintaining leadership
position through
Experience
Maintaining leadership
position through
Business Model
Maintaining leadership
position through
Business Model
Maintaining leadership
position through
Experience
Maintaining leadership
position through
Product
18. monolithic vs microservices architecture
Business Logic
User Interface
Data Access
Layer
User Interface
Microservice
Microservice Microservice Microservice Microservice
21. Microservices 의 장단점
Pros Cons
Strong Modular Boundaries Distributed Systems
Independent Deployment Eventual Consistency
Technology Diversity Operational Complexity
22. 분산시스템의 허점
● The network is reliable
● Latency is zero
● Bandwidth is infinite
● The network is secure
● Topology doesn’t change
● There is one administrator
● Transport cost is zero
● The network is homogeneous
23. Spring Boot
Build Anything
Spring Cloud
Coordinate Anything
Spring Cloud Data Flow
Connect Anything
Spring by Pivotal: The Standard for Cloud Native Java
Code Clarity | Lower Complexity | Less Tech Debt | Focus on Business Logic | Better Test Coverage | Faster Code Completion
25. Spring Boot
● Create stand-alone Spring applications
● Embed Tomcat, Jetty or Undertow directly (no need to deploy WAR files)
● Provide opinionated 'starter' dependencies to simplify your build configuration
● Automatically configure Spring and 3rd party libraries whenever possible
● Provide production-ready features such as metrics, health checks and
externalized configuration
● Absolutely no code generation and no requirement for XML configuration
26. Make a Web Application in 144 Char.
Simple Spring Boot Application
27. Netflix OSS
● Netflix needed to be faster to win / disrupt
● Pioneer and vocal proponent of microservices –
the key to their speed and success
● Netflix OSS supplies parts, but it’s not a solution
29. Spring Cloud
+ =
Spring Cloud
✓ Service registration and discovery
✓ API gateway
✓ Client-side load balancing
✓ Git-backed configuration store
✓ Circuit breakers
✓ OAuth 2.0 security support
✓ Distributed tracing
✓ Event-driven microservices
✓ Orchestrated data pipelines
30.
31. Netflix OSS and Spring Boot
https://medium.com/netflix-techblog/netflix-oss-and-spring-boot-coming-full-circle-4855947713a0
32. Circuit Breaker
Dashboard for PCF
Visualizes a stream of Turbine health
and metric data from the circuit
breakers inside your microservices or
applications.
Service Registry for
PCF
Provides an implementation of the
NetflixOSS Eureka Service Discovery
pattern, as a service.
Config Server for PCF
Delivers a dynamic, central
configuration service to manage an
application’s external properties
across all environments.
Build & Operate Microservices with Spring Cloud
Services
33. Spring Cloud Config Server
@SpringBootApplication
@EnableConfigServer
public class ConfigServer {
public static void main(String[] args) {
SpringApplication.run(ConfigServer.class, args);
}
}
spring:
cloud:
config:
server:
git:
uri: http://github.com/<repo>/<my-repo>.git
Greeting: Bonjour
application.yml http://github.com/<repo>/<my-repo>/blob/master/demo.yml
34. Spring Cloud Config Client
@Configuration
@EnableAutoConfiguration
@RestController
public class GreetingService {
@AutoWired Greeter greeter;
@RequestMapping("/")
public String home() {
return String.format("%s World",
greeter.greeting);
}
@Component
@RefreshScope
public class Greeter {
@Value("${greeting}")
String name = "World";
}
}
spring:
application
name: demo
cloud:
config:
uri: http://my-config-server.com
bootstrap.yml
35. Refreshing Configuration Context
1. Update Git Repository
2. Send a POST refresh request to the application(s) to refresh
eg. curl –X POST http://my-app.com/refresh
@Component
@RefreshScope
public class Greeter {
@Value("${greeting}")
String name = "World";
}
36. Client Service Discovery
@SpringBootApplication
@EnableDiscoveryClient
public class MyClientApp{
public static void main(String[] args) {
SpringApplication.run(MyClientApp.class, args);
}
}
public Portfolio accountLookup(String acctId) {
Portfolio p = restTemplate.getForObject(
“http://portfolio-
service/portfolio/{accId}”,
Portfolio.class
acctId);
return p;
}
37. Spring Cloud Services: Service Registry
Automated deployment of server
component
Security-optimized Eureka service
instance using Oauth2
Bind into CF client application(s)
Cloud Connectors for auto-
reconfiguration
38. Microservice API Gateways
Netflix uses Zuul and Ribbon for
● Authentication
● Stress Testing
● Canary Testing
● Dynamic Routing
● Service Migration
● Load Shedding
● Security
● Static Response handling
● Active/Active
management
39. How?
public Portfolio accountLookup(String[acctId) {
Portfolio p = restTemplate.getForObject(
“http://portfolio-
service/portfolio/{accId}”,
Portfolio.class
acctId);
return p;
}
MAGIC!!
@Autowired LoadBalancerClient loadBalancer;
public void doStuff() {
ServiceInstance instance = loadBalancer.choose("stores");
URI storesUri = URI.create(String.format("http://%s:%s",
instance.getHost(), instance.getPort()));
// Do some stuff…
}
40. How?
API proxy will be created
at /myusers
Ribbon/Zuul creates load
balancer for Eureka
service “users_service”
All requests are
executed in a Hystrix
command
@SpringBootApplication
@EnableZuulProxy
@EnableDiscoveryClient
public class MyAPIGateway {
public static void main(String[] args) {
SpringApplication.run(MyAPIGateway.class, args);
}
}
MAGIC!!
zuul:
routes:
users:
path: /myusers/**
serviceId: users_service
45. Hystrix Dashboard
Automated deployment dashboard
+ Turbine + RabbitMQ
Bind service into app
Include starter dependency in app:
<dependency>
<groupId>io.pivotal.spring.cloud</groupId>
<artifactId>spring-cloud-services-starter-
circuit-breaker</artifactId>
</dependency>
46. Spring Cloud Services
Config Server
Circuit Breaker
Service Registry
Pivotal has bundled a number of these
OSS projects into Spring Cloud Services
for PCF
52. Reduce Complexity with Kubernetes and Istio
Config Server
Service Registry
Circuit Breaker
Kubernetes Configmap
Kubernetes Services / CoreDNS, Labels
Service Mesh
53.
54. A Service Mesh for Microservices
https://istio.io/docs/concepts/what-is-istio/
• Service to Service Communication
(Service Discovery)
• Routing Rules
(A/B testing, Mirror)
• Retries
• Circuit Breaker
• Performance Monitoring
• Tracing
59. Istio or Spring Cloud ??
Applications – Spring Cloud
○ Fallbacks
○ Tracing Propagation
○ Security
Polyglot environments – Istio
Istio GA in July 2018.
Istio Control Plane Performance Issues
60. Storage NetworkingCompute
Dev / Apps
App User
IT / Ops
> kubectl
Kubernetes Dashboard
Load Balancing / Routing
Container Image
Registry
App Monitoring
App Logging
OS Updates
OS Images
K8S Updates
K8S Images
Log & Monitor
Recover & Restart
Backup & Restore
External
Data Services
Cluster
Provisioning
Provision & Scale
Command
Line / API
Management
GUI
Monitoring
GUI
...Kubernetes alone is not enough for enterprises
62. Don’t Forget About
Learning
HA Design
Hardening
Installation & Integration
Platform Continuous Delivery
DR/BC/Backup
Production Support
Auditing
Monitoring
Logging
Scaling
Upgrades & Lifecycle
Product Development & Planning...Across All of This
63. Comparing Spring Boot app deployment processes
Spring Boot app deployed to K8s
- Compile Spring Boot app
- Choose base Docker image
- Author Dockerfile w/ app entrypoint
- Build Docker image
- Upload image to container registry
- Decide on JVM tuning parameters to
use when starting pods
- Create kubernetes deployment config
- Use CI/CD tool or kubectl to apply
kubernetes configuration and deploy
pods
- Create service to expose pod for users
- Profit!
Spring Boot app deployed to PAS
- Compile Spring Boot app
- Create manifest.yml to describe the app
- Use CI/CD tool or cf push to deploy
- Profit!
Standardized container images
Governance enforced by the platform
Snowflake container images
Governance enforced by corporate process
66. Everything
you need to
transform Process &
Culture
Build for
change
Tools
Continuously
Improve
Platform
Any App, Every Cloud,
One Platform
PCF 2.0
Tracker / Spring /
Concourse
Pivotal Labs
Data / AI
Apps
Culture, tools, and platform