Spring + Kubernetes Best Practices

Nov 28 2019 Talk @ Toronto Java Users Group

A video of my talk about Spring + Kubernetes Best Practices on Nov 28 2019 at the Toronto Java User Group

Abstract:

Both Spring and Kubernetes have massive ecosystems leading to lots of ways to use Spring on Kubernetes. Which way is the best, what are the pros and cons of different approaches to using Spring and Kubernetes. This talk is organized as a series of recommendations for how to best use Spring and Kubernetes together in the Style of the Effective Java book. We will cover the things you should do with Spring and Kubernetes along with common mistakes and pitfalls.

Storing JKS files in Spring Cloud Config Sever

A customer asked me how they can store a JKS file with certificates in a spring cloud config server, retrieve it on application startup and use it to setup a a Java SSLContext for doing mutual TLS with a backend system, that was using self signed certificates.

The config server can’t store binary files, so you have to first encode the JKS file as a base64 string, put in the config server then pull it at startup with regular Spring @Value annotation which is then used to setup the context. I created a sample application which you can find at https://github.com/asaikali/mtls-demo

Test Driven Development for Microservices Using Spring Cloud Contracts & Cloud Foundry

April 19 2018 Talk @ Cloud Foundry Summit Boston

A video of my talk Test Driven Development for Microservices Using Spring Cloud Contracts & Cloud Foundry with my colleague Reshmi Krishna On April 19 2018 at Cloud Foundry Summit in Boston.

Abstract:

Test Driven Development for Microservices Using Spring Cloud Contracts & Cloud Foundry – Reshmi Krishna & Adib Saikali, Pivotal

TDD introduced many improvements into the development process, but in our opinion the biggest impact relates to code design. Looking at the code from the usage perspective (by first writing an acceptance test) allows us to focus on usability rather than concrete implementation. Unfortunately, we usually rest on our laurels not trying to uplift this practice to the architecture level.

Consumer driven contracts (CDC) are like TDD applied to the API. It’s especially important in the world of microservices. Since it’s driven by consumers, it’s much more user friendly. Of course microservices are really cool, but most people do not take into consideration plenty of potential obstacles that should be tackled. Then instead of frequent, fully automated deploys via a delivery pipeline, you might end up in an asylum due to frequent mental breakdowns caused by production disasters.

This presentation will show you how you can use the Spring Cloud Contracts to have a fully automated solution to a consumer driven testing disasters. We will then deploy all these applications to Cloud Foundry. At the end, you will see how easy is it to write applications that have a consumer driven API and that will allow a developer to speed up the time of writing his better quality software.

Consumer Driven Contracts and Your Microservice Architecture

Video of my talk Consumer Driven Contracts and Your Microservice Architecture co-delivered with my friend Marcin Grzejszczak at Spring One Platform 2017

Abstract:

Consumer driven contracts (CDC) are like TDD applied to the API. It’s especially important in the world of microservices. Since it’s driven by consumers, it’s much more user friendly. Of course microservices are really cool, but most people do not take into consideration plenty of potential obstacles that should be tackled. Then instead of frequent, fully automated deploys via a delivery pipeline, you might end up in an asylum due to frequent mental breakdowns caused by production disasters.

We will write a system using the CDC approach together with Spring Boot, Spring Cloud Contract verifier. We’ll show you how easy it is to write applications that have a consumer driven API and that will allow a developer to speed up the time of writing his better quality software.