cloud foundry meetup stuttgart 2017 - spring cloud development
Post on 22-Jan-2018
167 Views
Preview:
TRANSCRIPT
„Cloud-Native“ Java (Kotlin)
Applications & Cloud Foundry
Spring Boot Spring Cloud
https://projects.spring.io/spring-boot/ https://projects.spring.io/spring-cloud/
Cloud Foundry Stuttgart Meetup - 26.4.2017
Spring Cloud
Spring IO Platform
Spring Boot
Spring Cloud Config Spring Cloud Netflix
Spring Cloud for
CloudFoundry
Spring Cloud Bus
Spring Cloud Security
Spring Cloud Data Flow Spring Cloud Sleuth
Spring Cloud Stream
Spring Cloud Task Spring Cloud Connectors
Spring Cloud Contract Spring Cloud
for AWS
Spring Cloud Function https://github.com/markfisher/spring-cloud-function Spring Cloud Gateway
https://github.com/spring-cloud-incubator/spring-
cloud-gateway Spring Cloud Pipelines
buildscript {
ext {
springBootVersion = '1.5.3.RELEASE'
}
…
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-actuator')
compile('org.springframework.boot:spring-boot-starter-web')
testCompile('org.springframework.boot:spring-boot-starter-test')
}
Spring Boot
II. Dependencies
Explicitly declare and isolate dependencies
http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#appendix-dependency-versions
$ java -jar helloworld-0.0.1-SNAPSHOT.jar
$ ./helloworld-0.0.1-SNAPSHOT.jar
…
… --- [main] HelloworldApplication : Started HelloworldApplication in 3.801 seconds (JVM running for 4.403)
$ <Ctrl-C>
…Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext
…Stopping beans in phase 0
…Unregistering JMX-exposed beans on shutdown
$ ./helloworld-0.0.1-SNAPSHOT.jar
…
… --- [main] HelloworldApplication : Started HelloworldApplication in 3.801 seconds (JVM running for 4.403)
…
Spring Boot
IX. Disposability
Maximize robustness with fast startup and graceful shutdown
Spring Boot Actuator
Monitor & manage via HTTP, JMX, SSH, Telnet
Auditing, health and metrics
CloudFoundry integration Spring Boot
Transparent about state / health
cf push
❤
Here is my source code
Run it on the cloud for me
I do not care how
cf push my-app …
“Here is my source code
Run it on the cloud for me
I do not care how!” ONSI FAKHOURI (VP Cloud R&D, Pivotal)
$ cf login -a api.run.pivotal.io -u andreas.falk@novatec-gmbh.de -p xxx -s development
API endpoint: api.run.pivotal.io
Authenticating...
OK
API endpoint: https://api.run.pivotal.io (API version: 2.78.0)
User: andreas.falk@novatec-gmbh.de
Org: NT-Labs
Space: development
$ cf login -a api.local.pcfdev.io -u admin -p admin -o pcfdev-org -s pcfdev-space
…
IV. Backing services
Treat backing services as attached resources
Microservice
Service Service Binding
Credentials
$ cf marketplace
…
$ cf create-service mysql 1gb mysqldb
…
$ cf bind-service myapp mysqldb
…
$ cf restage myapp
Spring Cloud Config
Externalize configuration to git repository
Refresh application configuration without restart
Store encrypted sensible configuration data Spring Cloud
https://cloud.spring.io/spring-cloud-config/
III. Config
Store config in the environment
Spring Cloud Sleuth
Distributed tracing
PCF Metrics
Logs, metrics and event data from apps
Trace explorer
Spring Cloud
https://content.pivotal.io/blog/distributed-tracing-in-pcf-metrics-breakthrough-insight-for-microservices
XI. Logs
Treat logs as event streams
https://docs.pivotal.io/pcf-metrics/1-3/index.html
https://cloud.spring.io/spring-cloud-sleuth
top related