Spring Boot 1.5 and Pivotal Cloud Foundry

Post on 20-Mar-2017

948 views 2 download

transcript

1© 2017 Pivotal

Spring Boot 1.5 and Pivotal Cloud Foundry

Pieter Humphrey, Principal PMM@pieterhumphreyMadhura Bhave, Senior Software Engineer@madhurabhave23

2

Safe Harbor Statement

The following is intended to outline the general direction of Pivotal's offerings. It is intended for information purposes only and may not be incorporated into any contract. Any information

regarding pre-release of Pivotal offerings, future updates or other planned modifications is subject to ongoing evaluation by Pivotal and is subject to change. This information is provided without

warranty or any kind, express or implied, and is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions regarding Pivotal's

offerings. These purchasing decisions should only be based on features currently available. The development, release, and timing of any features or functionality described for Pivotal's offerings in

this presentation remain at the sole discretion of Pivotal. Pivotal has no obligation to update forward looking information in this presentation.

3

Agenda Spring Boot 1.4 Recap Spring Boot 1.5 highlights Spring Boot 1.5 and Pivotal Cloud Foundry Looking ahead for Spring on Cloud Foundry

<3

4

Spring Boot 1.4 recap

TESTINGDATAACTUATORERRORHANDLING

Spring Boot 1.4

5

Spring Boot 1.4 recap: testing

REST, DATAJSON SZ ++

@MVCTest

AUTOCONFIG FOR TESTING

SIMPLESLICES

ZERO SETUP MOCKING

6

7© 2017 Pivotal

Spring Boot 1.5 Highlights

8

New in Spring Boot 1.5: Spring for Apache Kafka support

Autoconfiguration

• Add maven dependency

• Configure properties• Done!

9

Demo

Spring for Apache Kafka

Demo

10

Actuators in Spring Boot

About Actuators/health/info/env /metrics /shutdown

Example endpoints

/health/info/env /metrics /trace/auditevents/autoconfig/shutdown…

Built in JMX / HTTP endpoints to help you monitor and manage your application

Potentially sensitive information available

11

Actuator Security before Spring Boot 1.5 No Spring Security – everything exposed! With Spring Security – login with default user

12

Actuator Security in Spring Boot 1.5

DISABLE VIA PROPERTY FLAG

RIGHT PERMISSIONS

REQUIRED

SECURE BY DEFAULT

Boot 1.5 Security

13

New Actuator: Loggers Get all loggers Get individual logger Change configuration for specific logger

14

Demo

Logging Configuration

15© 2017 Pivotal

Spring Boot <3 Pivotal Cloud Foundry

16

Spring Boot <3 Pivotal Cloud Foundry?

Actuator integration into Apps Manager• Eye-catcher to indicate it’s a boot

application

• Augmented health information

• Git information

• Runtime configuration of loggers

• Transparent security integration with Pivotal Cloud Foundry UAA

17

Demo

Pivotal Cloud Foundry

Apps Manager

18

How does it work?

Expose

• Expose via/cloudfoundryapplication

Protect

• UAA Tokens• Cloud Controller roles

19

Other 1.5 Highlights

Audit events endpoint

• Authentication and Authorization audited by default

• Extensible for your audit events

LDAP Support

• Autoconfiguration for any LDAP-compliant server

• In-memory LDAP from UnboundID for easier testing

20© 2017 Pivotal

Looking ahead

21

What’s ahead for Spring Boot 2.0? Spring Boot 2.0 will support Spring WebFlux and Spring Framework 5.0 Autoconfiguration for full-stack reactive applications Support for Java 9 Support for Java EE 8 (e.g. Servlet 4 and Bean Validation) Support major generation updates of Spring projects• e.g. Spring Integration 5.0, Spring Session 2.0, etc

Pluggable reactive runtimes - Apache Tomcat, Reactor Netty, Jetty, Undertow*

22

What’s ahead for Spring Boot & Pivotal Cloud Foundry

Working on the next set of Spring Boot Actuators!

/heapdump/dump/trace

23

What’s ahead for Spring Boot & Pivotal Cloud Foundry? MOAR Actuators! Like, all of them except /shutdown and /logfile Piping Spring Boot Actuator custom /metrics into PCF Metrics UX Considering reactive Actuator endpoints Considering Microservices Dashboard

What else? If you use Boot & Pivotal Cloud Foundry, we’d like to hear from you!

http://ethn.io/13291 75.00 gift card for participating

24

Spring and Pivotal Cloud Foundry: Spring Cloud Services

What is Spring Cloud Services (SCS)?• 100% PCF managed NetflixOSS Eureka, Hystrix and Pivotal Config server

• Now in public beta on Pivotal Web Services (PWS)

Things we’re considering for SCS 1.3 + • Config Server composite backends (Vault & Git)

• Spring Cloud Data Flow support

• Support PCF surgical routing, C2C networking in SCS Connector client

• Service Registry sharing across more than CF Orgs/Spaces, arbitrary linking

• Evolve config server into a more self-contained config management product

• Service registry dynamic routing (pair Eureka instances with Zuul instances)

25

PCF Metrics and Spring Cloud Sleuth: Trace Explorer

Detect in logs that Zipkin trace output is present

Examine in PCF Metrics time series user interface• Will find all logs with that trace ID

• Which services did it touch

• Will give span (timing)

• Call hierarchy

26

Learn More. Stay Connected.

Try out Spring Boot on PWS Try out public beta of SCS,

C2C networking UX interview for Boot/Pivotal Cloud

Foundry: $75 gift card!

Twitter: twitter.com/springcentral

YouTube: spring.io/video

LinkedIn: spring.io/linkedin