Voxxed Days Ticino - Spring Boot for Devops
-
Upload
nicolas-frankel -
Category
Software
-
view
667 -
download
0
Transcript of Voxxed Days Ticino - Spring Boot for Devops
![Page 1: Voxxed Days Ticino - Spring Boot for Devops](https://reader030.fdocuments.us/reader030/viewer/2022033100/58e791fa1a28abc52e8b519f/html5/thumbnails/1.jpg)
SPRINGONE2GXWASHINGTON, DC
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and l icensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/
Spring Boot for DevOpsNicolas Fränkel
@nicolas_frankel
![Page 2: Voxxed Days Ticino - Spring Boot for Devops](https://reader030.fdocuments.us/reader030/viewer/2022033100/58e791fa1a28abc52e8b519f/html5/thumbnails/2.jpg)
@nicolas_frankel 2
Me, Myself and I• By day
– hybris consultant• By night
– Teacher/trainer– Blogger– Book author
![Page 3: Voxxed Days Ticino - Spring Boot for Devops](https://reader030.fdocuments.us/reader030/viewer/2022033100/58e791fa1a28abc52e8b519f/html5/thumbnails/3.jpg)
@nicolas_frankel 3
DevOps• Devs and Ops collaboration?• Treat your infrastructure as
code?• Automate everything?
![Page 4: Voxxed Days Ticino - Spring Boot for Devops](https://reader030.fdocuments.us/reader030/viewer/2022033100/58e791fa1a28abc52e8b519f/html5/thumbnails/4.jpg)
@nicolas_frankel 4
DevOps• Meta-data• Health checks• Metrics
![Page 5: Voxxed Days Ticino - Spring Boot for Devops](https://reader030.fdocuments.us/reader030/viewer/2022033100/58e791fa1a28abc52e8b519f/html5/thumbnails/5.jpg)
@nicolas_frankel 5
A little story
![Page 6: Voxxed Days Ticino - Spring Boot for Devops](https://reader030.fdocuments.us/reader030/viewer/2022033100/58e791fa1a28abc52e8b519f/html5/thumbnails/6.jpg)
@nicolas_frankel 6
Spring Boot to the rescue
![Page 7: Voxxed Days Ticino - Spring Boot for Devops](https://reader030.fdocuments.us/reader030/viewer/2022033100/58e791fa1a28abc52e8b519f/html5/thumbnails/7.jpg)
@nicolas_frankel 7
Non-Functional Requirements• Meta data• Monitoring
– Health checks– Metrics
![Page 8: Voxxed Days Ticino - Spring Boot for Devops](https://reader030.fdocuments.us/reader030/viewer/2022033100/58e791fa1a28abc52e8b519f/html5/thumbnails/8.jpg)
@nicolas_frankel 8
Non-Functional Requirements• Configuration
– Beans– Property values– Controller mappings– etc.
![Page 9: Voxxed Days Ticino - Spring Boot for Devops](https://reader030.fdocuments.us/reader030/viewer/2022033100/58e791fa1a28abc52e8b519f/html5/thumbnails/9.jpg)
@nicolas_frankel 9
Enough talk, time for a demo
![Page 10: Voxxed Days Ticino - Spring Boot for Devops](https://reader030.fdocuments.us/reader030/viewer/2022033100/58e791fa1a28abc52e8b519f/html5/thumbnails/10.jpg)
@nicolas_frankel 14
1. Meta data
![Page 11: Voxxed Days Ticino - Spring Boot for Devops](https://reader030.fdocuments.us/reader030/viewer/2022033100/58e791fa1a28abc52e8b519f/html5/thumbnails/11.jpg)
@nicolas_frankel 15
Meta data• Which application?
– groupId– applicationId
• Version– From Maven– From Git
• Anything!!!
![Page 12: Voxxed Days Ticino - Spring Boot for Devops](https://reader030.fdocuments.us/reader030/viewer/2022033100/58e791fa1a28abc52e8b519f/html5/thumbnails/12.jpg)
@nicolas_frankel 16
Demo time
![Page 13: Voxxed Days Ticino - Spring Boot for Devops](https://reader030.fdocuments.us/reader030/viewer/2022033100/58e791fa1a28abc52e8b519f/html5/thumbnails/13.jpg)
@nicolas_frankel 17
2. Health checks
![Page 14: Voxxed Days Ticino - Spring Boot for Devops](https://reader030.fdocuments.us/reader030/viewer/2022033100/58e791fa1a28abc52e8b519f/html5/thumbnails/14.jpg)
@nicolas_frankel 18
Health checks• A good way to monitor your
application• Each check wraps a
dependency• e.g. a datasource
![Page 15: Voxxed Days Ticino - Spring Boot for Devops](https://reader030.fdocuments.us/reader030/viewer/2022033100/58e791fa1a28abc52e8b519f/html5/thumbnails/15.jpg)
@nicolas_frankel 19
Health checks• Each check returns an Health
object– Status
• UP • DOWN• UNKWOWN• OUT_OF_SERVICE
– Possibly with details
![Page 16: Voxxed Days Ticino - Spring Boot for Devops](https://reader030.fdocuments.us/reader030/viewer/2022033100/58e791fa1a28abc52e8b519f/html5/thumbnails/16.jpg)
@nicolas_frankel 20
Health checks endpoint• /health aggregates all checks• Health are objects
– Serialized in JSON• If only one is down, the HTTP
code is set to 5xx
![Page 17: Voxxed Days Ticino - Spring Boot for Devops](https://reader030.fdocuments.us/reader030/viewer/2022033100/58e791fa1a28abc52e8b519f/html5/thumbnails/17.jpg)
@nicolas_frankel 21
Health checks• Bean must implement
HealthIndicator• Doesn’t use Dropwizard
HealthCheck
![Page 18: Voxxed Days Ticino - Spring Boot for Devops](https://reader030.fdocuments.us/reader030/viewer/2022033100/58e791fa1a28abc52e8b519f/html5/thumbnails/18.jpg)
@nicolas_frankel 22
Demo time
![Page 19: Voxxed Days Ticino - Spring Boot for Devops](https://reader030.fdocuments.us/reader030/viewer/2022033100/58e791fa1a28abc52e8b519f/html5/thumbnails/19.jpg)
@nicolas_frankel 23
3. Metrics
![Page 20: Voxxed Days Ticino - Spring Boot for Devops](https://reader030.fdocuments.us/reader030/viewer/2022033100/58e791fa1a28abc52e8b519f/html5/thumbnails/20.jpg)
@nicolas_frankel 24
Dropwizard Metrics• A metrics model• Exporters to backends• And more…
![Page 21: Voxxed Days Ticino - Spring Boot for Devops](https://reader030.fdocuments.us/reader030/viewer/2022033100/58e791fa1a28abc52e8b519f/html5/thumbnails/21.jpg)
@nicolas_frankel 25
Simple metrics• Gauge
– Simple value• Counter
– Incrementable gauge
![Page 22: Voxxed Days Ticino - Spring Boot for Devops](https://reader030.fdocuments.us/reader030/viewer/2022033100/58e791fa1a28abc52e8b519f/html5/thumbnails/22.jpg)
@nicolas_frankel 26
jconsole• JMX-compliant GUI for
monitoring JVM
![Page 23: Voxxed Days Ticino - Spring Boot for Devops](https://reader030.fdocuments.us/reader030/viewer/2022033100/58e791fa1a28abc52e8b519f/html5/thumbnails/23.jpg)
@nicolas_frankel 27
![Page 24: Voxxed Days Ticino - Spring Boot for Devops](https://reader030.fdocuments.us/reader030/viewer/2022033100/58e791fa1a28abc52e8b519f/html5/thumbnails/24.jpg)
@nicolas_frankel 28
Demo time
![Page 25: Voxxed Days Ticino - Spring Boot for Devops](https://reader030.fdocuments.us/reader030/viewer/2022033100/58e791fa1a28abc52e8b519f/html5/thumbnails/25.jpg)
@nicolas_frankel 29
Dropwizard reporters• (HTTP)• (JMX)• Graphite
![Page 26: Voxxed Days Ticino - Spring Boot for Devops](https://reader030.fdocuments.us/reader030/viewer/2022033100/58e791fa1a28abc52e8b519f/html5/thumbnails/26.jpg)
@nicolas_frankel 32
Graphite• Store numeric time-series data• Render graphs of this data on
demand
![Page 27: Voxxed Days Ticino - Spring Boot for Devops](https://reader030.fdocuments.us/reader030/viewer/2022033100/58e791fa1a28abc52e8b519f/html5/thumbnails/27.jpg)
@nicolas_frankel 33
Demo time
![Page 28: Voxxed Days Ticino - Spring Boot for Devops](https://reader030.fdocuments.us/reader030/viewer/2022033100/58e791fa1a28abc52e8b519f/html5/thumbnails/28.jpg)
@nicolas_frankel 36
For development• Either define the 2 reporters
– Set @ConditionalOnMissingBean
– Use a "Development" profile• Or define only the JMX reporter
– In production, use JMXTrans
![Page 29: Voxxed Days Ticino - Spring Boot for Devops](https://reader030.fdocuments.us/reader030/viewer/2022033100/58e791fa1a28abc52e8b519f/html5/thumbnails/29.jpg)
@nicolas_frankel 37
Metrics are not only technical
![Page 30: Voxxed Days Ticino - Spring Boot for Devops](https://reader030.fdocuments.us/reader030/viewer/2022033100/58e791fa1a28abc52e8b519f/html5/thumbnails/30.jpg)
@nicolas_frankel 38
Q&Ahttps://github.com/nfrankel/enhanced-pet-clinic@nicolas_frankel http://frankel.in/http://blog.frankel.ch/