springone 2gx - spring boot for devops
TRANSCRIPT
![Page 1: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/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: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/2.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/ 2
Pardon my French…
![Page 3: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/3.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/ 3
Those don’t go well together
![Page 4: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/4.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/
Me, Myself and I• Developer & Architect
– As Consultant• Teacher/trainer• Blogger
![Page 5: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/5.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/ 5
hybris, an SAP company
![Page 6: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/6.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/ 6
Shameless self-promotion
![Page 7: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/7.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/
DevOps• Devs and Ops collaboration?• Treat your infrastructure as
code?• Automate everything?
![Page 8: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/8.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/
DevOps• Meta-data• Health checks• Metrics
![Page 9: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/9.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/
A little story
![Page 10: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/10.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/ 10
Spring Boot to the rescue
![Page 11: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/11.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/
Non-Functional Requirements• Meta data• Monitoring
– Health checks– Metrics
![Page 12: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/12.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/
Non-Functional Requirements• Configuration
– Beans– Property values– Controller mappings– etc.
![Page 13: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/13.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/
Enough talk, time for a demo
![Page 14: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/14.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/ 18
1. Meta data
![Page 15: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/15.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/ 19
Meta data• Which application?
– groupId– applicationId
• Version– From Maven– From Git
• Anything!!!
![Page 16: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/16.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/
Demo time
![Page 17: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/17.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/ 21
2. Health checks
![Page 18: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/18.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/
Health checks• A good way to monitor your
application• Each check wraps a
dependency• e.g. a datasource
![Page 19: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/19.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/
Health checks• Each check returns an Health
object– Status
• UP • DOWN• UNKWOWN• OUT_OF_SERVICE
– Possibly with details
![Page 20: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/20.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/
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 21: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/21.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/
Health checks• Bean must implement
HealthIndicator• Doesn’t use Dropwizard
HealthCheck
![Page 22: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/22.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/
Demo time
![Page 23: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/23.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/ 27
3. Metrics
![Page 24: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/24.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/
Dropwizard Metrics• A metrics model• Exporters to backends• And more…
![Page 25: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/25.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/
Simple metrics• Gauge
– Simple value• Counter
– Incrementable gauge
![Page 26: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/26.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/
Dropwizard reporters• JMX• Graphite• (HTTP)
![Page 27: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/27.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/
jconsole• JMX-compliant GUI for
monitoring JVM
![Page 28: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/28.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/
![Page 29: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/29.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/
Demo time
![Page 30: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/30.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/
Graphite• Store numeric time-series data• Render graphs of this data on
demand
![Page 31: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/31.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/
For development• Either define the 2 reporters
– Set @ConditionalOnMissingBean
– Use a "Development" profile• Or define only the JMX reporter
– In production, use JMXTrans
![Page 32: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/32.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/
Metrics are not only technical
![Page 33: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/33.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/
Q&Ahttps://github.com/nfrankel/enhanced-pet-clinic@nicolas_frankel http://frankel.in/http://blog.frankel.ch/https://leanpub.com/integrationtest/c/SpringOne
-20%
![Page 34: SpringOne 2GX - Spring Boot for Devops](https://reader035.vdocuments.us/reader035/viewer/2022070518/58e791fa1a28abc52e8b519d/html5/thumbnails/34.jpg)
Unless otherwise indicated, these slides are © 2013-2015 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/l icenses/by-nc/3.0/ 42
Spring Boot for DevOps
Learn More. Stay Connected.
@springcentral Spring.io/video