Ihre Browserversion ist veraltet. Wir empfehlen, Ihren Browser auf die neueste Version zu aktualisieren.

JHipster

JHipster is, in a nutshell, a high-level code generator built upon an extensive list of cutting-edge development tools and platforms. 

The main components of the tool are:

JHipster creates, with just a few shell commands, a full-fledged Java web project with a friendly, responsive front-end, documented REST API, comprehensive test coverage, basic security and database integration! The resulting code is well commented and follows industries best practices.

Other key technologies leveraged by it are:

More reads...

Anyways, JHipster has a very nice feature for generating a full fledge microservice architecture using Netflix’s open source software and the Spring Cloud project, also including Docker.

JHipster microservices

JHipster and Kubernetes and Istio

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

JHipster documentation things

Spring REST API exception handling with Zalando and more

Problem is a small library with the purpose of standardizing the way Java-based Rest APIs express errors to their consumers.

Problem is an abstraction of any error we want to inform about. It contains handy information about the error. Let's see the default representation of a Problem response:

Kafka Spring

OpenAPI first development 

Following an API-first approach, we specify an API before we start coding. Via API description languages, teams can collaborate without having implemented anything, yet

Open API V3 Prism

When designing APIs, it can be difficult to get meaningful feedback until you have a real API to share. That’s a complex process if you’re prototyping APIs in code. Prism is the mock server that enables you to have a test API that behaves how you specify without having to write a single line of code. For teams working in a CI/CD workflow, enterprise companies looking to get client-side teams involved as soon as possible, or small start-ups working on a big project with fewer resources, mock servers get feedback earlier in the development process and lead to more efficient results.

Prism is a set of packages for API mocking with OpenAPI v2 (formerly known as Swagger) and OpenAPI v3. For example, given an API description document you can spin up a mock HTTP server and respond realistically based on your requests. The big advantage to this is that Prism v3 now has a dynamic example generator which will produce a large variety of data output, rather than static data for each response. This allows for a larger range of instant feedback than ever before.

Setting up and Customizing Jenkins X

Log on to Katacoda Istio training page, complete the first 2 steps and run these commands.

Install JX commandline tool

  • mkdir -p ~/.jx/bin
  • curl -L https://github.com/jenkins-x/jx/releases/download/v1.3.1096/jx-linux-amd64.tar.gz | tar xzv -C ~/.jx/bin
  • export PATH=$PATH:~/.jx/bin
  • echo 'export PATH=$PATH:~/.jx/bin' >> ~/.bashrc
  • jx version
  • jx upgrade cli

Check k8s compatibility

  • jx compliance run
  • jx compliance status
  • jx compliance results

Get Istio Ingress and install Jenkins X

  • cd /root
  • kubectl get svc -n istio-system -l istio=ingressgateway
  • Get your external IP
  • jx install --provider=kubernetes --external-ip {YOUR EXTERNAL IP} \
    --ingress-service=istio-ingressgateway \
    --ingress-deployment=istio-ingressgateway \
    --ingress-namespace=istio-system

  • kubectl describe gateway -n istio-system
  • Finish off installation by providing your github and API keys
  • check if everything is there
  • kubectl get all -n jx
  • give it a go and create your first Spring Boot app....
  • jx create spring -d web -d actuator

Customizing Jenkins X

JX ships with a default Jenkins docker image jenkinsxio/jenkinsx which has many required plugins inside, I enhanced that original image with JIRA Pipeline steps plugin. Next I will provide my own build pack to providing custom pipeline steps for integrating these steps. 

Adapt jenkinsx base image

Add custom build pack

Customizing existing pipelines

easiest way is to change the pipelines interactively on your existing build pack with jx create step. Sometimes you simply want to enhance release pipelines with additional steps to integrate with JIRA to track your release process on JIRA tickets. Read customising Pipelines.

TODO

  • Install JIRA pipeline steps plugin
  • Define your own Jenkins pipeline Shared Library to abstract away the JIRA steps work like adding a comment
  • jx create step -p release -l postbuild -m post "jiraAddComment" (jiraAddComment being one of the functions you expose through your custom shared library)

 

Client Go

Hosted by WEBLAND.CH