Articles Tagged ‘docker’
Thursday, February 28th, 2019
Writing our manifest files for Kubernetes / Openshift often forces us to edit xml, json and yml files by hand.
A new library, ap4k allows to specify metadata for these manifest files directly in our Java code using annotations.
In the following short example I am going to demonstrate how to generate manifest files using Maven and ap4k.
(more…)
Tags: annotation, ap4k, aws, azure, container, docker, kubernetes, manifest, monitor, mounts, openshift, prometheus, s2i, tools, volumes
Posted in Development, Java | 1 Comment »
Wednesday, January 30th, 2019
A lot of boilerplate code is written when developers need to test their applications with different connected systems like databases, stream platforms and other collaborators.
Docker allows to handle those dependencies but there is still some glue code required to bind the container’s lifecycle and the configuration to the concrete integration test.
Testcontainers is a testing library that offers lightweight throwaway instances of anything able to run in a Docker container, with bindings to configure the specific containers and also provides wrappers to manage our own custom containers.
In the following short tutorial I am going to demonstrate how to start Apache Kafka as well as a classical Postgresql database from a JUnit 5 integration test.
(more…)
Tags: bom, container, database, db, docker, jdbc, junit, junit5, jupiter, kafka, maven, postgres, tdd, testcontainers, testing
Posted in Java, testing | 2 Comments »
Sunday, July 29th, 2018
When implementing distributed systems, client-server architectures and simple applications with network related functionalities, everything is fine when we’re in the development or in the testing stage because the network is reliable and the communicating systems are not as stressed as they are in production.
But to sleep well we want to validate how resilient we have implemented our systems, how they behave when the network fails, the latency rises, the bandwidth is limited, connections time out and so on.
In the following tutorial I will demonstrate how to set up a testing environment to simulate different classical network problems with a tool named Toxiproxy and I will show how to integrate it with the well known Java testing stack with Maven and JUnit.
(more…)
Tags: architecture, bandwidth, container, docker, docker-maven, downstream, failsafe, http, http-client, jigsaw, jitter, junit, latency, maven, module, network, resilient, surefire, testing, testrule, toxic, toxiproxy, toxiproxy-cli, upstream, wiremock
Posted in Java, testing | No Comments »
Wednesday, March 28th, 2018
When writing test for applications that interact with Kafka brokers we often need to setup a decent environment including an instance of Kafka and ZooKeeper.
Though Kafka ships with some classes for testing, setting up a simple testing environment is quite easier with the kafka-unit library that offers JUnit test rule support or a fast programmatic setup within no time.
In the following short example, I’d like to show how create a simple setup using Maven, Surefire and kafka-unit. (more…)
Tags: Apache, docker, integration-testing, it, junit, kafka, maven, surefire, tdd, testing, testrule, zookeeper
Posted in Java, testing | 1 Comment »
Sunday, November 26th, 2017
Communicating with identity and access management systems is a common task for many web-applications exposing secured resources.
Keycloak is an open source software that provides not also such authorization services but also offers a lot of features from Single-Sign-On, Identity-Brokering, Social-Login, User-Federation, multiple client-adapters up to the administration console or support for protocols like OpenID, SAML, OAuth2, Kerberos and more.
I will demonstrate how to integrate a Spring Boot web application with Keycloak and configure an authentication flow that requires a two-factor-authentication with user credentials and also one-time-passwords. (more…)
Tags: docker, freeotp, identity, kerberos, keycloak, maven, oauth, oauth2, openid, otp, principal, qr, realm, redhat, saml, security, spring, spring-boot, sso, thymeleaf
Posted in Java | No Comments »
Friday, July 1st, 2016
Atlassian has added a continuous integration service as a new feature to their Bitbucket Cloud product. It’s called Bitbucket Pipelines and it is similar to Travis CI for GitHub offering a nice integration for continuous integration/delivery pipelines for projects hosted on Bitbucket.
It’s still in the beta phase and requires a sign-up but nevertheless I’d like to demonstrate the current state of this service and how easy it is to add scripted pipelines to a project.
(more…)
Tags: Atlassian, bitbucket, cd, ci, cloud, continuous delivery, continuous deployment, continuous integration, docker, dockerhub, gradle, integration, jira, pipeline, test, vert.x, vertx, yaml
Posted in Development, testing | No Comments »