<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Grzegorz Smolko on Medium]]></title>
        <description><![CDATA[Stories by Grzegorz Smolko on Medium]]></description>
        <link>https://medium.com/@grzegorz.smolko?source=rss-b33905b3c77f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*7YZCgrgqachVt8uEAh5yAg.jpeg</url>
            <title>Stories by Grzegorz Smolko on Medium</title>
            <link>https://medium.com/@grzegorz.smolko?source=rss-b33905b3c77f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 21:19:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@grzegorz.smolko/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Unlocking secure multi-architecture application development to remediate Log4j-type issues]]></title>
            <link>https://medium.com/hybrid-cloud-engineering/unlocking-secure-multi-architecture-application-development-to-remediate-log4j-type-issues-1408c085fda4?source=rss-b33905b3c77f------2</link>
            <guid isPermaLink="false">https://medium.com/p/1408c085fda4</guid>
            <category><![CDATA[cloud-native]]></category>
            <category><![CDATA[dependency-scanning]]></category>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[observability]]></category>
            <category><![CDATA[image-security-scanning]]></category>
            <dc:creator><![CDATA[Grzegorz Smolko]]></dc:creator>
            <pubDate>Sat, 05 Mar 2022 20:01:21 GMT</pubDate>
            <atom:updated>2022-03-05T20:01:21.671Z</atom:updated>
            <content:encoded><![CDATA[<h3>Leveraging secure multi-architecture application development to remediate Log4j-type issues</h3><p><em>By </em><a href="https://medium.com/u/b33905b3c77f"><em>Grzegorz Smolko</em></a><em> and </em><a href="https://medium.com/u/cc63bb4ef276"><em>Greg Hintermeister</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x8krG9ZiTJwehq-3N-pDfw.jpeg" /></figure><p>Recent log4j vulnerabilities show how important is to know what libraries you use in your applications and if they are safe. In this article we will show how you can minimize such threats by introducing the following activities:</p><ol><li>Scanning legacy JEE applications using Transformation Advisor</li><li>Running dependency checking and image scanning in your application development process</li><li>Building and deploying multi architecture images (in this case we will create image that can be run on OpenShift installed on x86 and os390)</li><li>Centralizing observability across all application components</li></ol><p>Let’s get started.</p><h3>Scan legacy applications</h3><p>The first activity is to scan your legacy applications using <a href="https://www.ibm.com/garage/method/practices/learn/ibm-transformation-advisor/">Transformation Advisor</a> (TA) to see what it takes to containerize them. The benefit of a tool like TA is that it scans the binary files (.EAR files and .WAR files) to determine what libraries are present, what technology is used, and what legacy implementations need to change in order to containerize them.</p><p>For example, after scanning using TA, it shows the composition of each .EAR file. In this example it shows log4j-1.2.4.jar is in the build.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*PUFl6dpaRaEhG85WYPR5Iw.png" /><figcaption>Application dependencies</figcaption></figure><p>Another advantage in using TA to scan is that it shows all legacy technologies and how to change them so that the application can run in container. This example shows how JAX-RPC should be replaced with JAX-WS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7rVbQLpWINHyGdhC9JPsSQ.jpeg" /><figcaption>JAX-WS modernization</figcaption></figure><p>Once these suggestions are implemented, you now can containerize your application.</p><p>Why is that important? Because now you have unlocked the ability to much more quickly develop and deploy, check for dependencies, scan for vulnerabilities, and even develop for cross-architecture solutions.</p><h3>Develop and Deploy</h3><p>Now that the application is containerized and has an updated CI/CD pipeline, let’s see how you can use that to more quickly identify issues and make changes.</p><h4>Dependency checking</h4><p>Committing new code usually triggers your application CI/CD pipelines that build and deploy new version of the application. But what if added feature introduced a dependency vulnerability or your old code becomes vulnerable? Can you detect it early in the cycle?</p><p>Yes, you can. One of the methods is to integrate dependency checking in your DevSecOps. In this example, we will integrate it by creating GitHub Actions workflow, which does this checking, but similar could be achieved for example using Tekton pipelines.</p><p>GitHub Action that does the checking is quite simple, it utilizes <a href="https://snyk.io/">Snyk.io</a> for doing the check:</p><pre>- name: Run Snyk to check for vulnerabilities<br>  uses: snyk/actions/maven@master<br>  env:<br>    SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}<br>  with:<br>    args: --sarif-file-output=snyk.sarif --severity-threshold=high</pre><p>The CI workflow is triggered by creating or editing <em>pull request</em> with incoming changes. Another benefit of this approach is that you are protecting your <em>master </em>branch from direct modifications. You can see right away if any of dependencies have vulnerabilities. This is how it looks on code which has issues:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*_w0xXJpW0XCtYKSFNzueDg.png" /><figcaption>Pull request with failed check</figcaption></figure><p>You can drill down to see the details:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yYLS4szI0YqRgPmHbUgvzA.png" /><figcaption>List of found issues</figcaption></figure><p>We additionally integrate this check with GitHub Code Scanning by adding another action to the workflow:</p><pre>- name: Upload result to GitHub Code Scanning<br>  if: always()<br>  uses: github/codeql-action/upload-sarif@v1<br>  with:<br>    sarif_file: snyk.sarif</pre><p>Which allows you to see the checks directly on pull request ‘Checks’ tab:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*X3EDosSHmy2lTga28nwmLg.png" /><figcaption>Output via GitHub integration</figcaption></figure><p>You can again drill down to see details page, which gives you information about affected file, issue description and possible workarounds and remediation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*424OqB1YkQVrq2btveCMog.png" /><figcaption>Issue details</figcaption></figure><p>By running this workflow, you learnt that you have vulnerable dependency, and what to do to fix it.</p><h4>Image scanning</h4><p>Another step that you can take, is to ensure that image that you are creating does not contain known vulnerabilities. Some companies will have dedicated teams for ensuring that, but for a start, its simple and easy to just add one more step to our pipeline that will do that check.</p><p>You can implement this using action that is utilizing <a href="https://aquasecurity.github.io/trivy/v0.22.0/">Trivy</a>:</p><pre>- name: Run Trivy vulnerability scanner<br>  uses: aquasecurity/trivy-action@master<br>  with:<br>    image-ref: &#39;${{env.APP_NAME}}:${{ github.sha }}&#39;<br>    format: &#39;template&#39;<br>    template: &#39;@/contrib/sarif.tpl&#39;<br>    output: &#39;trivy-results.sarif&#39;<br>    exit-code: &#39;1&#39;<br>    ignore-unfixed: &#39;true&#39;<br>    severity: &#39;HIGH,CRITICAL&#39;<br>          <br><br>- name: Upload Trivy scan results to GitHub Security tab<br>  uses: github/codeql-action/upload-sarif@v1<br>  if: always() <br>  with:<br>    sarif_file: &#39;trivy-results.sarif&#39;</pre><p>Again, result is uploaded to GitHub Code Scanning, where you can see which system packages have issues:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*ViPQvxUokO2pxLPOh5SwZg.png" /><figcaption>Image scanning results</figcaption></figure><p>These two simple checks will ensure you, that there are no known vulnerabilities in application or system dependencies in the image you are building.</p><h4>Hybrid cloud in action — building multi architectural image</h4><p>In the hybrid cloud era, you can have your containers running on various cloud providers and various environment. These environments may utilize various cpu architectures, just to name a few x86, Power, s390x, ARM. Unfortunately, by default, a container can run <strong>only on single architecture, the one that was used to build it</strong>.</p><p>There are several approaches to by pass this problem. Here you will learn how to solve it using Docker BuildX and QEMU emulator to build image that will run on x86 and s390x.</p><p>In your pipeline, you need to replace steps that are building the image. First you set up the BuildX and QEMU defining which architectures you want to use:</p><pre># Setup buildx<br>    - name: Docker Setup Buildx<br>      uses: docker/setup-buildx-action@v1</pre><pre># setup qemu for multi platform build  <br>    - name: Docker Setup QEMU<br>      uses: docker/setup-qemu-action@v1.2.0<br>      with:<br>        platforms: amd64,s390x</pre><p>then you modify your build with additional platforms:</p><pre>- name: Build and push<br>  uses: docker/build-push-action@v2<br>  with:<br>    context: .<br>    platforms: linux/amd64,linux/s390x<br>    push: true<br>    tags: ${{env.REGISTRY}}/${{env.REGISTRY_NAMESPACE }}/${{env.IMAGE_NAME }}:${{env.GITHUB_SHA}}</pre><p>Once the action is successfully executed you should see in your image repository (Quay.io in this case), that image contains manifests for multiple architectures:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j_YKe4OQJTZgNGasRsmfww.png" /><figcaption>Image in the repository</figcaption></figure><p>You successfully built image that can be run on x64 and s390x. Now its time to deploy it.</p><h4>Deployment in hybrid cloud</h4><p>To deploy application to multiple OpenShift clusters, running on x64 and s90x, you can for example use Red Hat OpenShift GitOps that uses Argo CD to maintain continuous integration and continuous deployment (CI/CD) of applications. Current limitation of OpenShift GitOps is that it can be deployed only on x86 platforms, but it can deploy your applications to any architecture available for OCP clusters.</p><p>Argo CD gives you quick and easy insight to applications deployed to various clusters:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*w_i2hnJDi1UGT7BwNdE3FA.png" /><figcaption>Applications in Argo CD</figcaption></figure><p>You have successfully built and deployed multi architecture application, with no known security vulnerabilities in dependencies.</p><h3>Observability</h3><p>Now that you have your applications running across Dev, Test and Production environments, including OpenShift clusters running on x86 VMs and IBM Z, you will want a way to centrally observe the platforms and applications. One of such tools is <a href="https://www.instana.com/">Instana</a>.</p><p>While Instana can monitor multiple clusters, what is most compelling is the ability to group application instances into one <em>Application View</em> so that from one place you can see all that is happening across clusters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*duYXwIwQg_9G-a0oIzKFAQ.png" /><figcaption>Instana dashboard</figcaption></figure><p>In this example, we’ve gathered all content in the “stock trader” namespace from each of the clusters to monitor calls, latency, and processing time. Further, we can start analyzing calls and get down to the individual calls and even stack trace, as shown in the image below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4c7JeSoR60PbcJYS3u8F3Q.jpeg" /><figcaption>Analyzing call details</figcaption></figure><h3>Summary</h3><p>Enterprises need, more than ever, the ability to speed up deployment, innovation, and in some cases, remediation of issues as new vulnerabilities are found.</p><p>As you saw in this article, it starts with understanding how you can introduce containers, security and observability in your development and operation practices. You saw how you could scan for dependencies and vulnerabilities. You then saw how a single code change, once scanned, could be containerized and deployed across multiple locations and architectures, Finally, you saw that with this new flexibility, you could bring all those locations into one view to better manage the application.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1408c085fda4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hybrid-cloud-engineering/unlocking-secure-multi-architecture-application-development-to-remediate-log4j-type-issues-1408c085fda4">Unlocking secure multi-architecture application development to remediate Log4j-type issues</a> was originally published in <a href="https://medium.com/hybrid-cloud-engineering">AI Enterprise Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Integrating code inspection in your OpenShift Pipelines using SonarQube]]></title>
            <link>https://medium.com/hybrid-cloud-engineering/integrating-code-inspection-in-your-openshift-pipelines-using-sonarqube-a5371ca49369?source=rss-b33905b3c77f------2</link>
            <guid isPermaLink="false">https://medium.com/p/a5371ca49369</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[openshift]]></category>
            <category><![CDATA[sonarqube]]></category>
            <category><![CDATA[cloud-native]]></category>
            <dc:creator><![CDATA[Grzegorz Smolko]]></dc:creator>
            <pubDate>Fri, 30 Jul 2021 11:03:46 GMT</pubDate>
            <atom:updated>2021-07-30T11:03:46.511Z</atom:updated>
            <content:encoded><![CDATA[<p><em>How to integrate code inspection into your build pipelines</em></p><p>During my work in the Cloud Engagement Hub (CEH), we are often asked by customers how the software development lifecycle for cloud applications should look like, what are key parts in it and how to make it consistent. Today I’ll talk about integrating code inspection.</p><p>Code inspections and code reviews are important developer practices. They allow your code to be cleaner, more secure and aligned with your coding guidelines. But code review requires a senior developer, who might not be always available to do a peer review.</p><p>What if you could gather his knowledge and do review at any given time? Or even better, what if you could integrate review as a step in your continuous integration pipeline?</p><p>In this story you will learn how to install <a href="https://www.sonarqube.org/">SonarQube,</a> one of the several tools that perform code inspection, in the RedHat OpenShift Container Platform (OpenShift) and use it in your OpenShift Pipeline.</p><h3>Install SonarQube</h3><p>The most convenient way to install SonarQube in your OpenShift environment is via Helm chart. You can get the latest version of the chart from here:</p><pre>git clone https://github.com/SonarSource/helm-chart-sonarqube.git<br>cd helm-chart-sonarqube/charts/sonarqube<br>helm dependency update</pre><p>This chart is prepared for plain Kubernetes, and you need to make following changes in the helm-chart-sonarqube\charts\sonarqube\values.yamlfile for the OpenShift deployment:</p><pre>OpenShift:<br>  enabled: true<br>  <br>  securityContext:<br>    # For standard Kubernetes deployment, set enabled=true<br>    # If using OpenShift, enabled=false for restricted SCC and enabled=true for anyuid/nonroot SCC<br>    enabled: false  <br>  <br>  volumePermissions:<br>    # For standard Kubernetes deployment, set enabled=false<br>    # For OpenShift, set enabled=true and ensure to set volumepermissions.securitycontext.runAsUser below.<br>    enabled: true<br>    # if using restricted SCC set runAsUser: &quot;auto&quot; and if running under anyuid/nonroot SCC - runAsUser needs to match runAsUser above<br>    securityContext:<br>      runAsUser: &quot;auto&quot;<br>      <br># For OpenShift set create=true to ensure service account is created.<br>serviceAccount:<br>  create: true</pre><p>There is already customized version of this chart available here: <a href="https://github.com/stocktrader-ops/helm-chart-sonarqube">https://github.com/stocktrader-ops/helm-chart-sonarqube</a> which additionally automatically creates OpenShift Route to access deployed SonarQube application.</p><p>Install chart with the following commands (login to your OCP cluster first):</p><pre>oc new-project sonarqube<br>cd helm-chart-sonarqube/charts/sonarqube<br>helm upgrade --install -f values.yaml -n sonarqube sonarqube ./</pre><p>If you see the following messages the chart has installed successfully:</p><pre>I0706 12:37:25.645523    3900 request.go:621] Throttling request took 1.1159359s, request: GET:https://yourcluster/apis/route.openshift.io/v1?timeout=32s<br>Release &quot;sonarqube&quot; has been upgraded. Happy Helming!<br>NAME: sonarqube<br>LAST DEPLOYED: Tue Jul  6 12:37:26 2021<br>NAMESPACE: sonarqube<br>STATUS: deployed<br>REVISION: 2<br>NOTES:<br>1. Get the application URL by running these commands:<br>  export ROUTE_HOST=$(kubectl get route sonarqube --namespace sonarqube -o jsonpath=&quot;{.spec.host}&quot;)<br>  export PROTOCOL=&quot;http&quot;<br>     export PROTOCOL=&quot;https&quot;<br>  echo $PROTOCOL://$ROUTE_HOST</pre><h4>Create Route</h4><p>If you are NOT using my customized version of the chart, you need to create route to access SonarQube.<br>Either create route via web UI in your sonarqube project <strong>Networking &gt; Routes</strong> with the following settings:</p><ul><li>Name: sonarqube</li><li>Service: sonarqube-sonarqube</li><li>Target Port: 9000 -&gt; http (TCP)</li><li>Secure route: checked</li><li>TLS termination: edge</li></ul><p>Or apply the following yaml:</p><pre>kind: Route<br>apiVersion: route.openshift.io/v1<br>metadata:<br>  annotations:<br>    meta.helm.sh/release-name: sonarqube<br>    meta.helm.sh/release-namespace: sonarqube<br>    openshift.io/host.generated: &#39;true&#39;<br>  name: sonarqube<br>  namespace: sonarqube<br>  labels:<br>    app: sonarqube<br>    app.kubernetes.io/managed-by: Helm<br>    chart: sonarqube-1.0.15<br>    heritage: Helm<br>    release: sonarqube<br>spec:<br>  to:<br>    kind: Service<br>    name: sonarqube-sonarqube<br>  port:<br>    targetPort: http<br>  tls:<br>    termination: edge</pre><h4>Access and configure SonarQube</h4><p>Access your SonarQube instance via created route. You should see the following login screen:</p><figure><img alt="SonarQube login screen" src="https://cdn-images-1.medium.com/max/412/1*v8T361VK5i_zH_f_binU3A.png" /><figcaption>Login screen</figcaption></figure><p>Login with default admin/admin credentials. On the first login you will be asked to set new admin password.</p><p>It is not recommended to use admin account for general purposes. Create new, dedicated user that will be used by your pipeline. Select <strong>Administration &gt; Security &gt; Users</strong> and create new user:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J7D0ayrwQdq5HuA7Wy4Dqw.png" /><figcaption>Create user</figcaption></figure><p>SonarQube allows to use tokens for integration with tools, which is more secured that using username and password pair. Relogin to your newly created user and generate token that will be used by your build pipeline. Select your <strong>user icon &gt; My Account &gt; Security, </strong>provide token name and click <strong>Generate:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*isaLXd9a_B7nkoGocAjTww.png" /><figcaption>Generate access token</figcaption></figure><p>You can additionally configure custom quality profiles and quality gates for your projects, but this is out of scope for this article.</p><h3>Pipeline integration</h3><p>Now, once SonarQube is installed and configured, you can integrate it with your pipeline. For this article it is assumed that you already have<a href="https://docs.openshift.com/container-platform/4.7/cicd/pipelines/understanding-openshift-pipelines.html"> OpenShift Pipelines</a> installed in your cluster.</p><p>OpenShift Pipelines are based on Tekton, to integrate external tool, like SonarQube, into your pipeline it is recommended to create separate Task, as this allows better reuse across different pipelines.</p><p>Depending on your pipeline definition, this task may just have SonarQube integration step or also some additional steps like git cloning your source code or application compilation. In this case task has multiple steps (git-clone, build, sonar-scan) as it makes it more independent.</p><p>Here, I’m only showing code related to the sonar-scan step (you can find full task definition in this repo <a href="https://github.com/stocktrader-ops/stocktrader-argocd-gitops/blob/master/pipeline/ibm-sonar-scan.yaml">ibm-sonar-scan.yaml</a>)</p><pre>- name: sonar-scan<br>  image: $(params.sonarqube-cli) <br>  env:<br>  - name: SONAR_USER_HOME<br>    value: $(params.source-dir)<br>  - name: SONARQUBE_URL<br>    valueFrom:<br>      secretKeyRef:<br>        key: SONARQUBE_URL<br>        name: sonarqube-access<br>        optional: true<br>  - name: SONARQUBE_TOKEN<br>    valueFrom:<br>      secretKeyRef:<br>        key: SONARQUBE_TOKEN<br>        name: sonarqube-access<br>        optional: true<br>  workingDir: $(params.source-dir)</pre><pre>  script: |<br>    APP_NAME=$(params.app-name)<br>    SONARQUBE_JAVA_BINARIES_PATH=&quot;$(params.sonarqube-java-bin-path)&quot;</pre><pre>sonar-scanner \<br>     -Dsonar.login=${SONARQUBE_TOKEN} \<br>     -Dsonar.host.url=${SONARQUBE_URL} \<br>     -Dsonar.projectKey=${APP_NAME} \<br>     -Dsonar.qualitygate.wait=$(params.gate-wait) \<br>     -Dsonar.qualitygate.timeout=$(params.gate-wait-timeout) \<br>     -Dsonar.java.binaries=${SONARQUBE_JAVA_BINARIES_PATH}</pre><p>Key parameters for this task are:</p><ul><li>image — its a docker image with SonnarScanner cli (sonarsource/sonar-scanner-cli)</li><li>SONAR_USER_HOME —location of your application source files</li><li>SONARQUBE_URL — URL to your SonarQube instance</li><li>SONARQUBE_TOKEN — your SonarQube user token</li><li>SONARQUBE_JAVA_BINARIES_PATH — location of your compiled classes (required by SonarQube in case of Java application analysis)</li><li>gate-wait — defines if successful quality gate evalutation is required for the task completion.</li></ul><p>As you can see some of the SonarQube access variables are defined via K8s secret, which should be defined in the project where your pipeline is located. Here is sample secret:</p><pre>kind: Secret<br>apiVersion: v1<br>metadata:<br>  name: sonarqube-access<br>data:<br>  SONARQUBE_TOKEN: base64encodedToken==<br>  SONARQUBE_URL: base64encodedURL==<br>type: Opaque</pre><p>Once you have task, you can add it to the pipeline. For this article, I use very simple pipeline, that just runs the sonar-scan task:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/364/1*JbTguG36SJHPJlWZDQOwLw.png" /><figcaption>Running the pipeline</figcaption></figure><p>You can find source of the pipeline here —<a href="https://github.com/stocktrader-ops/stocktrader-argocd-gitops/blob/master/pipeline/sonar-trader-pipeline.yaml"> sonar-trader-pipeline.yaml</a>. This part of the pipeline integrates with the task:</p><pre>- name: sonar-scan<br>  params:                               <br>    - name: git-url                            <br>      value: $(tasks.setup.results.git-url)              <br>    - name: git-revision   <br>      value: $(tasks.setup.results.git-revision)                               <br>    - name: source-dir    <br>      value: $(tasks.setup.results.source-dir)                               <br>    - name: app-name              <br>      value: $(tasks.setup.results.app-name)                             <br>  runAfter:<br>    - setup             <br>  taskRef:                            <br>    kind: Task                              <br>    name: ibm-sonar-scan</pre><p>If you want install this sample pipeline in your project execute the following:</p><pre>git clone <a href="https://github.com/stocktrader-ops/stocktrader-argocd-gitops.git">https://github.com/stocktrader-ops/stocktrader-argocd-gitops.git</a><br>cd stocktrader-argocd-gitops/pipeline<br>oc apply -f ibm-sonar-scan.yaml<br>oc apply -f ibm-setup-v2-1-26.yaml<br>oc apply -f sonar-trader-pipeline.yaml</pre><p>You can invoke the pipeline from the OpenShift console using <strong>Start </strong>action:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*xVtUdw_xrpClFh0Etn8i7g.png" /></figure><p>Once the pipeline is executed, you can open SonarQube interface to see application scan results:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7LZEjRhtsqJGx5MUo-xomA.png" /><figcaption>Analysis results</figcaption></figure><p>Analysis shows various information about your code, like bugs, vulnerabilities, code smells and rough time estimate to fix these issues. You can easily drill down to see specific detected problems:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lNjiapBF-7K1cTcRcsuOwQ.png" /><figcaption>“Code smells” found in the application</figcaption></figure><p>Such information allows you to make better decisions about application development and deployment.</p><h4>GitHub integration</h4><p>Right now, you were invoking pipeline manually via OpenShift interface. You can integrate the pipeline with your GitHub repository via webhook.</p><p>First, run the following yamls, which define listener on the OpenShift for your pipeline:</p><pre>oc apply -f sonar-trader-pipeline-binding.yaml<br>oc apply -f sonar-trader-pipeline-listener-route.yaml<br>oc apply -f sonar-trader-pipeline-listener.yaml<br>oc apply -f sonar-trader-pipeline-template.yaml</pre><p>To get the listener route url issue command:</p><pre>oc get routes<br>NAME                        HOST/PORT                                                                                                                              PATH   SERVICES                    PORT            TERMINATION   WILDCARD<br>el-sonar-demo-pipeline     el-sonar-demo-pipeline-project-namespace.cluster.com            el-sonar-demo-pipeline     http-listener   edge          None</pre><p>In this case it is el-sonar-demo-pipeline-project-namespace.cluster.com</p><p>In your GitHub application repository create web hook with the noted URL:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*2OaRBZyw5nG0-F_f-cEMlQ.png" /><figcaption>Webhook settings</figcaption></figure><p>Now, your application repo is integrated with the pipeline. Anytime you will check-in new code, the pipeline will be triggered and code will be automatically reviewed by the SonarQube for bugs and vulnerabilities.</p><p>While doing such reviews you may find out issues in the code that you didn’t even thought about. At latest that was in my case when I reviewed some older, legacy code ;-)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a5371ca49369" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hybrid-cloud-engineering/integrating-code-inspection-in-your-openshift-pipelines-using-sonarqube-a5371ca49369">Integrating code inspection in your OpenShift Pipelines using SonarQube</a> was originally published in <a href="https://medium.com/hybrid-cloud-engineering">AI Enterprise Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Are Your CI/CD Processes Compliant?]]></title>
            <link>https://medium.com/hybrid-cloud-engineering/are-your-ci-cd-processes-compliant-cee6db1cf82a?source=rss-b33905b3c77f------2</link>
            <guid isPermaLink="false">https://medium.com/p/cee6db1cf82a</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[compliance]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[cloud-technology]]></category>
            <category><![CDATA[ibm]]></category>
            <dc:creator><![CDATA[Grzegorz Smolko]]></dc:creator>
            <pubDate>Mon, 17 May 2021 14:02:14 GMT</pubDate>
            <atom:updated>2021-05-17T14:02:14.097Z</atom:updated>
            <content:encoded><![CDATA[<p><em>How you can build your CI/CD process to address compliance requirements</em></p><p>CI/CD pipelines are critical in the modern software lifecycle. They help to deliver applications faster, in more consistent way. But speed is not enough, you also want to ensure that release went through necessary tests (unit, functional, performance), does not have security vulnerabilities or was not deployed by unauthorized person.</p><p>Today many industries have regulatory obligations. Companies need to be compliant to organizational and regulatory guidelines. Usually it is not easy to have such data at hand and up to date, as it is not gathered continuously.</p><p>It is very important to ensure that your pipelines are compliant with these guideline as non-adherence may lead to fines, profit loss, security breach, or damage to your brand / reputation.</p><p>In this story, you will learn how to get continuous insights in CI/CD processes and verify if they adhere to organization guidelines.</p><h3>What is compliance in the CI/CD context?</h3><p>When you plan and implement pipelines to build and deploy your services you already are following company standard and best practices. But compliance is more that just having a standard, you need to have evidence (tracking data) that this standard is continuously followed and easy way to verify not just initially but also ongoing.</p><p>Typically this is done without any automation - policy or the compliance officers are checking policies at the end of the deployment process, or only ‘by request’, when you are facing an audit process.</p><p>When you are constantly deploying hundreds of services, manually handling compliance data is not sufficient and scalable. It is also very time consuming, boring and annoying.</p><p>Your DevOps team need to collaborate with your security and compliance teams to ensure you are tracking necessary checks, approvals and gates are built in the pipelines from the start. Moreover the tracking data must be available at hand for auditors without any additional involvement of the DevOps team.</p><p><a href="https://www.ibm.com/cloud/security-and-compliance-center">Security and Compliance Center</a> (SCC) service in IBM Cloud allows you to manage and view your compliance controls. There are a predefined set of control checks related to DevOps compliance that you can use:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*LRCH236QrstcAPfEXF_zbw.png" /></figure><p>You can create a ‘compliance profile’, which will contain set of controls that are relevant to your requirements.</p><p>Lets see how you could create evidence for some of these controls in your pipelines.</p><h3>Shift left DevOps— early insight in application security</h3><p>Typical, simple process to deploy containerized application is focused on building the code, creating container image and deploying that to container runtime. Any security vulnerabilities are checked late in the cycle, after the image is built, or not integrated in the pipeline at all (done via separate tooling and process). Such checks are also usually limited to operating system and most common services (database, web server) weaknesses, leaving the application code and its dependencies untouched.</p><p>You can put these checks early in the cycle by utilizing <a href="https://www.ibm.com/cloud/blog/announcements/find-source-code-vulnerabilities-with-code-risk-analyzer">Code Risk Analyzer</a> (CRA) feature, which is a part of <a href="https://www.ibm.com/cloud/continuous-delivery">IBM Cloud Continuous Delivery</a> service and can be used in <a href="https://www.ibm.com/cloud/architecture/toolchains/">DevOps Toolchains</a>. Toolchains are utilizing Tekton pipelines and CRA functionalities are available as Tekton tasks. These tasks are available in the <a href="https://github.com/open-toolchain/tekton-catalog">Open toolchain tekton catalog</a> along with many others.</p><p>CRA feature allows you to discover vulnerabilities in your application (Python, Node.js, Java) and OS stack (base image) based on threat intelligence from Snyk and Clair, and provides fix recommendations.</p><p>It can also discover misconfigurations in your Kubernetes deployment files based on industry standards and community best practices.</p><p>It finally produces a bill of materials that reflects the composition of a deployment and allows you to provide evidence what was checked.</p><p>You would typically put these checks in the pipeline that executes during processing of the pull request to detect any issues early in the development cycle and prevent them from going to the production. CRA tasks will put comments with analysis results into the PR:</p><figure><img alt="Configuration analysis results" src="https://cdn-images-1.medium.com/max/676/1*BY_O-xE3_qRAN3FhpoLkpg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*F1cIyslaC5-_usFi7eyqGg.png" /></figure><p>It also gives you quick summary where you can see which checks were not successful:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/926/1*ousYTsCFLNgPOuyvlqlmnw.png" /></figure><p>If any issues or risks are found, you can see and resolve them early. Once the issues are fixed and all checks are successful, you can merge the PR or even configure to automatically merge if all checks are successful.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/918/1*9XNBtRqMWYfiSdW7SwgKcQ.png" /></figure><p>Merging of the PR would automatically trigger the delivery pipeline, which usually additionally to scans, performs the following: builds the service, runs tests, creates the container image using your Dockerfile, pushes the built image to container registry, scans the image and deploys to container runtime in staging and/or production environment.</p><p>If you are building your application in IBM Cloud, you can utilize IBM Cloud Container Registry service, <a href="https://cloud.ibm.com/docs/Registry?topic=va-va_index">Vulnerability Advisor</a> scanner in the container registry, and deploy your applications to Red Hat OpenShift on IBM Cloud service.</p><p>When your pipeline is executed, from the compliance perspective, it is important to also gather evidence for your tests and scans. IBM Toolchains service has Tekton tasks that create such evidence for DevOps Insight service and Security and Compliance service.</p><p>These tasks will help you fulfill following controls:</p><ul><li>Ensure Continuous Delivery toolchain continuously scans source code to identify critical and high vulnerabilities</li><li>Ensure Continuous Delivery toolchain source code meets Center for Internet Security benchmarks</li><li>Ensure Continuous Delivery has Code Risk Analyzer configured that collects a bill of materials for pipeline run</li><li>Ensure Vulnerability Advisor scans images for OS vulnerability detection</li><li>Ensure Continuous Delivery toolchain has unit tests that are continuously run to validate source code changes</li></ul><h3>Policy based promotions</h3><p>When your pipeline is executed, various facts are gathered that can be used to make decisions about pushing your application to the given environment. In the pipeline I have added step called evaluate-gate-task, which makes that decision.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/342/1*dATG1WHtz_Q5t8S2wnhkAQ.png" /></figure><p>How does it work underneath?</p><p>The facts about each build are gathered and published to the DevOps Insight service:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NkRDGXiDrk3p4EShKPdwHw.png" /></figure><p>Then based on these facts, you can build a policy that will be evaluated during pipeline run. In this example I’m only looking at results from unit tests and code scan results to build the policy. You can add more rules if needed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*4u1PUP2GonVy0FmGSL62Wg.png" /></figure><p>Creating centralized polices allows you to enforce checks across different pipelines and not to implement these policies again and again, manually in each pipeline.</p><h3>Continuous visibility and compliance</h3><p>Now, that you have implemented security and compliance checks in your pipeline, you can have policy driven deployments. But how can your security or compliance officer check that it is really being followed in day by day operations?</p><p>Facts and evidence of checks are gathered during toolchain executions. This data is available to Security and Compliance Center. Your security officer can schedule environment scans, or perform ad-hoc on-demand scan to check current state of the environment.</p><p>When the scan is finished, you, acting as the compliance officer, have quick access to how your toolchains are meeting your compliance control goals and which goals are failing or missing:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0-FZpO3dbRFx2ceyYGiR5g.png" /></figure><p>In this case, you can see that many controls are passed successfully (green color), there are no failures (red) of the ones that were implemented, but there are still some checks not implemented yet (yellow). So depending on your requirements, this toolchain may be already compliant or may still need some additional work to be done, but you can see that clearly and make corrective actions.</p><h3>Benefits of adding compliance to your CI/CD processes</h3><ol><li>Continuous assurance that your process is compliant.</li><li>Significant effort reduction to gather data for auditing and regulatory purposes.</li><li>Instant visibility of the CI/CD pipelines for auditors.</li><li>Faster and safer software delivery thanks to automated checks and validations which builds confidence in delivering securely.</li></ol><p>In this story you have learnt about the basics of the CI/CD compliance and how such solution could be designed in IBM Cloud.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cee6db1cf82a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hybrid-cloud-engineering/are-your-ci-cd-processes-compliant-cee6db1cf82a">Are Your CI/CD Processes Compliant?</a> was originally published in <a href="https://medium.com/hybrid-cloud-engineering">AI Enterprise Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Java serverless services — Quarkus microservice on OpenShift Container Platform]]></title>
            <link>https://medium.com/hybrid-cloud-engineering/java-serverless-services-quarkus-microservice-on-openshift-container-platform-8ce64ca593cc?source=rss-b33905b3c77f------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ce64ca593cc</guid>
            <category><![CDATA[openshift]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[cloud-native]]></category>
            <category><![CDATA[quarkus]]></category>
            <dc:creator><![CDATA[Grzegorz Smolko]]></dc:creator>
            <pubDate>Thu, 03 Sep 2020 14:54:40 GMT</pubDate>
            <atom:updated>2020-09-03T14:54:40.879Z</atom:updated>
            <content:encoded><![CDATA[<h3>Java Serverless Services — Quarkus Microservice on OpenShift Container Platform</h3><h3>Learn how to deploy Quarkus microservice as serverless on the OpenShift Container Platform</h3><p>The serverless computing architecture has the following attributes: the ability to run just the business logic code with very small disk and memory footprint and not needing any “server” configuration plus the ability to scale down to zero after use, so the service only runs when is called (it starts automatically, it scales on demand and it can scale down to zero again). To support that you need a platform that will be able to respond to such calls and also an efficient serverless application runtime that will be able to react extremely fast so no delays are experienced.</p><p>In the Red Hat OpenShift Container Platform, serverless capabilities are provided via the <a href="https://www.openshift.com/learn/topics/serverless">Red Hat OpenShift Serverless</a> service. It is based on the open source <a href="https://knative.dev/">Knative</a> project and allows applications to be packaged as Open Container Initiative containers. The OpenShift Serverless offers two components: <a href="https://docs.openshift.com/container-platform/4.5/serverless/architecture/serverless-serving-architecture.html">Knative Serving</a> and <a href="https://docs.openshift.com/container-platform/4.5/serverless/architecture/serverless-event-architecture.html">Knative Eventing</a>. In this article we will focus on the Knative Serving component.</p><p>As we mentioned before, you will also need fast responding runtime in your container. Quarkus running in native mode is providing the Java platform with the serverless attributes described above.</p><p>In the <a href="https://medium.com/cloud-engagement-hub/using-quarkus-the-kubernetes-native-java-stack-to-run-your-jax-rs-microservice-79142bed3846">previous article</a> we discussed how to build a JAX-RS compatible microservice to run in Quarkus runtime. We will use that service and deploy it as serverless.</p><h3>Enabling OpenShift Serverless</h3><p>Before you can run your first serverless service on the OpenShift Container Platform, you need to perform a few installation steps that will be discussed in short in this section. You can read in more details about OpenShift Serverless and its requirements <a href="https://docs.openshift.com/container-platform/4.5/serverless/installing_serverless/installing-openshift-serverless.html">here</a>.</p><p>First step is to install the OpenShift Serverless Operator. We will install it via the OpenShift Container Platform console, using Operator Hub.</p><p>Go to the <strong>Operators &gt; OperatorHub</strong> and select the <strong>OpenShift Serverless Operator</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*g9tpwzCfDXauSb5rt6vBYg.png" /></figure><p>Install the operator accepting the default subscription configuration to install it in all namespaces on the cluster.</p><p>Wait a few moments till the operator is successfully installed. You can verify it in the Installed Operators page:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZXPOde0GNRyRyp6ErVgIZw.png" /></figure><p>Once the operator is successfully installed we can configure the Knative Serving environment.</p><p>Start with creating the knative-serving namespace via console or command line issuing:</p><pre>$ oc create namespace knative-serving</pre><p>Next, go to the <strong>Installed Operators </strong>page in the console, select the <strong>OpenShift Serverless Operator</strong>. Make sure that the knative-serving project is selected. Then switch to the <strong>Knative Serving</strong> tab and click the <strong>Create Knative Serving</strong> button as show below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vXK9CNo0W-NcV7pABt95aQ.png" /></figure><p>For simple configurations accept all defaults and click <strong>Create</strong>. After that you will be redirected to the <strong>Knative Serving</strong> page again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5dm-jmyaPXmI3WXqhqkyUA.png" /></figure><p>Click the newly created resource and scroll down to <strong>Conditions </strong>section to check if it has deployed successfully:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*7vwSFfqddv202m8HxjCy0w.png" /></figure><p>If your installation is successful, after reloading the console page, you should see the new Serverless menu in the tree:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*ReW--hGsBhdWHUy2FJnXpA.png" /></figure><h3>Deploying your first serverless application</h3><p>Once the platform is fully configured, you can deploy your application. Your application needs to be packaged as container and available via registry (public, private, OpenShift internal). We are using the StockQuote application that we built in the previous article, which image is already deployed to the OpenShift internal registry and available as an ImageStream. If you need details how build and deploy application image to the OpenShift registry you can check the <a href="https://medium.com/cloud-engagement-hub/using-quarkus-the-kubernetes-native-java-stack-to-run-your-jax-rs-microservice-79142bed3846">previous article</a>.</p><p>Create the yaml file that will define your service - svrless-stock-quote.yaml:</p><pre>apiVersion: serving.knative.dev/v1<br>kind: Service<br>metadata:<br>  name: svrless-stock-quote<br>spec:<br>  template:<br>    spec:<br>      containers:<br>        - image: &gt;-<br>            image-registry.openshift-image-registry.svc:5000/stock-quote-quarkus/minimal-stock-quote-quarkus:latest<br>          ports:<br>            - containerPort: 8080<br>          env:<br>            - name: REDIS_URL<br>              valueFrom:<br>                secretKeyRef:<br>                  name: redis<br>                  key: redis.url<br>            - name: MP_JWT_VERIFY_PUBLICKEY<br>              valueFrom:<br>                configMapKeyRef:<br>                  name: jwt-config<br>                  key: jwt-ca.crt<br>            - name: MP_JWT_VERIFY_ISSUER<br>              valueFrom:<br>                configMapKeyRef:<br>                  name: jwt-config<br>                  key: mp.jwt.verify.issuer<br>            - name: SMALLRYE_JWT_VERIFY_AUD<br>              valueFrom:<br>                configMapKeyRef:<br>                  name: jwt-config<br>                  key: smallrye.jwt.verify.aud</pre><p>You need to define <strong><em>name </em></strong>and <strong><em>image location</em></strong><em>. </em>In addition, we customized it providing specific <strong><em>container port</em></strong> and <strong><em>environment </em></strong>variables.</p><p>You can deploy it via OCP web console, oc or kn command line tools.</p><p>We will deploy using the console. Navigate to<strong> Serverless &gt; Services</strong>, and select your project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*oatjNQbzi4KT45oXPK9OiA.png" /></figure><p>Click <strong>Create Service</strong> button and paste contents of the yaml file there:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1015/1*vhuZNgYYEiGGYzL5GH5OoA.png" /></figure><p>Click <strong>Create </strong>button. Scroll down to the <strong>Conditions </strong>section to check if service was successfully deployed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*1yq0eUEPkQFAz-hfuR1y9g.png" /></figure><p>You can also see that <strong>Revision </strong>was created. Revision is an immutable object that reflects point-in-time snapshot of the code and configuration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RsaQ-svm_sWBAHSLtkKNrA.png" /></figure><p>And <strong>Route </strong>was also created that defines your serverless application endpoint:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1IvWFCXTye1bn4ToSfzpAA.png" /></figure><p>The platform automatically created a deployment object for the application, and as application currently did not received any traffic <strong>it is scaled to 0</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*LUyHgDHwB_mo3dtPhWxArA.png" /></figure><p>Lets generate some load — use the given route to call the application several times. You will not see any output, since the service is protected by the JWT token, but you will notice that deployment was automatically scaled to 1 and service was called.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/914/1*jameQq193J5N5cWe7an1Sw.png" /></figure><p>After a short time of inactivity, it will automatically scaled down to zero.</p><p>Congratulations. You successfully deployed and tested serverless application on the OpenShift Container Platform.</p><h4>How about versioning of the application?</h4><p>Very often you will deploy new versions of your application. OpenShift Serverless gives you an easy way to do it. Whenever you will change the definition of the service object, a new revision is created. We emulated it by adding additional environment entry, but typically it will be a new image version.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u81RMgRrqG9dRnsZKpJ-xQ.png" /></figure><p>Now, for example for<em> canary testing</em> of the new version, we will split traffic coming to the application in a 90/10% ratio.</p><p>Switch to the <strong>Developer </strong>view of the console, select <strong>Topology</strong>. In the topology view click your service and switch to the <strong>Resources </strong>tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Up63P90bfX3nEjn4O0MWUQ.png" /></figure><p>Click <strong>Set Traffic Distribution</strong> do define the splitting percentage, tags for your version and select specific revisions:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*VJto5zTOn45bZupVrQqU1g.png" /></figure><p>After you save the changes, the topology view will be updated to show defined traffic rules.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DaO9iTiVJbx6TZFP61kKLw.png" /></figure><p>You can now continue to use the old route endpoint, in which case traffic will be split according to the definition or use endpoints for the specific revision e.g.</p><pre><a href="http://v1-svrless-stock-quote-stock-quote-quarkus.gas-cluster1-a01ee4194ed985a1e32b1d96fd4ae346-0000.eu-de.containers.appdomain.cloud/">http://v1-svrless-stock-quote-stock-quote-quarkus.gas-cluster1-a01ee4194ed985a1e32b1d96fd4ae346-0000.eu-de.containers.appdomain.cloud</a></pre><pre><a href="http://v1-svrless-stock-quote-stock-quote-quarkus.gas-cluster1-a01ee4194ed985a1e32b1d96fd4ae346-0000.eu-de.containers.appdomain.cloud/">http://v2-svrless-stock-quote-stock-quote-quarkus.gas-cluster1-a01ee4194ed985a1e32b1d96fd4ae346-0000.eu-de.containers.appdomain.cloud</a></pre><p>After you finish the testing, you may remove the old revision from the traffic definition.</p><h3>Summary</h3><p>In this blog, we showed how to configure OpenShift Container Platform to run serverless workload, deploy containerized application as serverless service and define traffic among several application revisions.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ce64ca593cc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hybrid-cloud-engineering/java-serverless-services-quarkus-microservice-on-openshift-container-platform-8ce64ca593cc">Java serverless services — Quarkus microservice on OpenShift Container Platform</a> was originally published in <a href="https://medium.com/hybrid-cloud-engineering">AI Enterprise Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Quarkus — the Kubernetes Native Java stack —  to run your JAX-RS microservice]]></title>
            <link>https://medium.com/hybrid-cloud-engineering/using-quarkus-the-kubernetes-native-java-stack-to-run-your-jax-rs-microservice-79142bed3846?source=rss-b33905b3c77f------2</link>
            <guid isPermaLink="false">https://medium.com/p/79142bed3846</guid>
            <category><![CDATA[cloud-native]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[openshift]]></category>
            <category><![CDATA[quarkus]]></category>
            <dc:creator><![CDATA[Grzegorz Smolko]]></dc:creator>
            <pubDate>Sun, 28 Jun 2020 15:20:15 GMT</pubDate>
            <atom:updated>2020-08-07T08:35:52.895Z</atom:updated>
            <content:encoded><![CDATA[<h3>Using Quarkus — the Kubernetes Native Java stack</h3><h3>Learn how to run your standard JAX-RS microservice on Quarkus</h3><p>In this article we will show steps needed in order to run your Java JAX-RS based microservice in the <a href="http://http;//quarkus.io">Quarkus runtime</a> and show differences to other popular microservices runtime — IBM Open Liberty.</p><p>Quarkus is a new Java stack optimized to run Java microservice applications in Kubernetes. It is Eclipse MicroProfile compatible, but it doesn’t implement full Java EE/Jakarta EE stack unlike Open Liberty. If your application is currently utilizing many Jakarta EE features, Open Liberty will be a much better fit.</p><p>Quarkus runs on OpenJDK or GraalVM. The main benefit is that GraalVM provides platform native compilation so that the resulting microservice will not require a JVM to run, as the application will be provided as a small executable instead. Native compilation reduces size of the container image and startup times. This opens up new possibilities for Java platform, as you can now run your Java code as serverless.</p><p>This native compilation however is quite lengthy process that requires significant amount of resources and does introduce some limitations, which we will also be presenting as we demonstrate how to run the “<a href="https://github.com/gasgithub/stock-quote">IBM StockQuote</a>” microservice in Quarkus.</p><h3>How to start?</h3><p>The StockQuote microservice is part of the Stock Trader application <a href="https://medium.com/cloud-engagement-hub/introducing-the-ibm-stock-trader-sample-b9b1ad6749e6">mentioned before</a>. It is currently built using Maven, if your application is not currently built using Maven, first step would be to change the build process to utilize that (this is beyond scope of this article).</p><p>There are several articles discussing how to run StockQuote service in Open Liberty, so here we will mostly focus on running it in Quarkus runtime.</p><p>Both runtimes are composable and allow you to select features you would like to use.</p><p><a href="https://code.quarkus.io/">The Quarkus application generator</a> allows you to start quickly and generate stub for your application, based on selected extensions:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L_31SsvMRfDXYC37LbzoPw.png" /></figure><p>… but what extensions you should select?</p><p>You will need to know what kind of the MicroProfile APIs your application is currently using. One hint could be the application pom.xml file — look for entries with groupId stating with org.eclipse.microprofile.* in the dependenciessection, similar to these :</p><pre>&lt;groupId&gt;org.eclipse.microprofile.health&lt;/groupId&gt;<br>...<br>&lt;groupId&gt;org.eclipse.microprofile.metrics&lt;/groupId&gt;<br>...</pre><p>you may also have dependency defining the entire MicroProfile stack like this:</p><pre>&lt;dependency&gt;<br>    &lt;groupId&gt;org.eclipse.microprofile&lt;/groupId&gt;<br>    &lt;artifactId&gt;microprofile&lt;/artifactId&gt;<br>    &lt;version&gt;3.2&lt;/version&gt;<br>    &lt;type&gt;pom&lt;/type&gt;<br>    &lt;scope&gt;provided&lt;/scope&gt;<br>&lt;/dependency&gt;</pre><p>In case of Open Liberty it is much simpler, as it provides <em>umbrella </em>feature called microProfile-3.2, which enables all MicroProfile related APIs, but also gives you flexibility to enable each API separately.</p><p>Here is our mapping table that shows Open Liberty features and Quarkus extensions required by StockQuote microservice:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*fFYyIFi5qoC0CEk7HP4qDw.png" /></figure><p>and our final list of selected extensions is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/377/1*2CPq73WAd0jymfY8YBzK6A.png" /></figure><p>Finally, generate the application and save the downloaded archive to your disk.</p><p>Extract the archive and copy pom.xml, src\main\docker folder, and src\main\resources folder to your application directory structure. In our case we used the generated pom.xml file as a new base and added missing dependencies (jedis, junit) to it, but if your pom file is more complex, you may do it the other way around and copy the dependencies from the generated file.</p><p>The docker folder contains basic docker files that allow you to build a container with Quarkus and your application in two versions — traditional JVM or native.</p><p>The resources folder contains an application.properties file, which configures your Quarkus application.</p><p><strong>To start testing your application in the development mode type</strong>:</p><pre>mvnw compile quarkus:dev</pre><p>If your application starts successfully you should see output similar to this (some lines removed to make it shorter):</p><pre>[INFO] Scanning for projects...<br>[INFO]<br>[INFO] --------------------&lt; com.stocktrader:stock-quote &gt;---------------------<br>[INFO] Building stock-quote 1.0.0-SNAPSHOT<br>[INFO] --------------------------------[ jar ]---------------------------------<br>[INFO]<br>[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ stock-quote ---<br>[INFO] Using &#39;UTF-8&#39; encoding to copy filtered resources.<br>[INFO] Copying 4 resources<br>[INFO]<br>[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ stock-quote ---<br>[INFO] Nothing to compile - all classes are up to date<br>[INFO]<br>[INFO] --- quarkus-maven-plugin:1.3.2.Final:dev (default-cli) @ stock-quote ---<br>Listening for transport dt_socket at address: 5005<br>__  ____  __  _____   ___  __ ____  ______<br> --/ __ \/ / / / _ | / _ \/ //_/ / / / __/<br> -/ /_/ / /_/ / __ |/ , _/ ,&lt; / /_/ /\ \<br>--\___\_\____/_/ |_/_/|_/_/|_|\____/___/<br>2020-04-30 14:18:22,933 DEBUG [io.qua.ely.sec.pro.dep.ElytronPropertiesProcessor] (build-42) Configuring from PropertiesRealmConfig, users=users.properties, roles=roles.properties<br>2020-04-30 14:18:24,885 INFO  [io.qua.arc.pro.BeanProcessor] (build-26) Found unrecommended usage of private members (use package-private instead) in application beans:<br>        - @Inject field com.ibm.hybrid.cloud.sample.stocktrader.stockquote.StockQuote#apiConnectClient,<br>        - @Inject field com.ibm.hybrid.cloud.sample.stocktrader.stockquote.StockQuote#iexClient<br>2020-04-30 14:18:25,258 INFO  [com.ibm.hyb.clo.sam.sto.sto.StockQuote] (main) API Connect URL not found from env var from config map, so defaulting to value in jvm.options: null<br>...<br>2020-04-30 14:18:26,204 INFO  [io.quarkus] (main) stock-quote 1.0.0-SNAPSHOT (powered by Quarkus 1.3.2.Final) started in 4.421s. Listening on: <a href="http://0.0.0.0:8080/">http://0.0.0.0:8080</a><br>2020-04-30 14:18:26,204 INFO  [io.quarkus] (main) Profile dev activated. Live Coding activated.<br>2020-04-30 14:18:26,205 INFO  [io.quarkus] (main) Installed features: [cdi, jaeger, kubernetes, mutiny, rest-client, resteasy, resteasy-jsonb, security, security-properties-file, smallrye-context-propagation, smallrye-fault-tolerance, smallrye-health, smallrye-jwt, smallrye-metrics, smallrye-openapi, smallrye-opentracing, swagger-ui, vertx, vertx-web]</pre><p><strong>To run your application in the native mode type:</strong></p><pre>mvnw package -Pnative</pre><p>which produces native application that you can execute by invoking: ./target/stock-quote-1.0.0-SNAPSHOT-runner</p><p>However building native application locally requires complex setup as described <a href="https://quarkus.io/guides/building-native-image">here</a>.</p><p>Instead, we decided to utilize a multi-stage Docker build to build and run the service in the docker container. For that we created specialized dockerfile — <a href="https://github.com/gasgithub/stock-quote/blob/quarkus/src/main/docker/Dockerfile.multistage">src/main/docker/Dockerfile.multistage</a> and built application with the following command:</p><pre>docker build -f src/main/docker/Dockerfile.multistage -t quarkus-stock-quote-native .</pre><p>And then run:</p><pre>docker run --rm -p 8080:8080 --name stock-quote -e REDIS_URL=redis://172.17.0.2:6379 quarkus-stock-quote-native</pre><p>This approach also allowed us to build the service on Windows and then execute it in the Linux based container. For details on how to configure the Docker Desktop for Windows check <a href="https://github.com/fritsjen/stock-quote/blob/quarkus/quarkus-build.md">this</a>.</p><h3>StockQuote issues when run in Quarkus</h3><p>The application compiled fine, without any code changes, but we hit several issues during testing. Quarkus is not Jakarta EE compliant like Open Liberty and have some limitations, especially when run in native mode.</p><h4>Application context root and metrics incompatibilities</h4><p>By default context-root of the Quarkus application is set to / and in the Liberty it was /stock-quote. It is possible to change that for the Quarkus application via a property quarkus.servlet.context-path=/stock-quote specified in the application.properties, but that breaks the metrics URI, which now becomes /stock-quote/metrics instead of /metrics, which may break your container orchestrator expectations.</p><p>Our solution was to change contex-root to / and change StockQuote service path to /stock-quote using a class level annotation like this:</p><pre>@Path(&quot;/stock-quote&quot;)</pre><h4>Constructors, static blocks, @PostConstruct methods and @ConfigProperty variables evaluated and compiled at build time</h4><p>If you plan to run Quarkus application in native mode, you have to be aware that static blocks, constructors, methods with @PostConstruct and variables with @PropertyConfig are evaluated and compiled to native code at build time. This unfortunately prevents you from using these methods to initialize your application during runtime.</p><p>The StockQuote service was using a static block and also constructor to read environment variables to initialize itself. Our solution was to use lazy initialization, move code from static block and constructor to new initializeApp() method and remove the constructor and the static block completely, like this:</p><pre>private void initializeApp() {<br>  if(initialized) {<br>    logger.info(&quot;Application already intitialized&quot;);<br>    return ;<br>  }<br>  initialized = true;<br>  logger.info(&quot;The application is initializing...&quot;);  <br>  // code from static block and constructor<br>  ...<br>}</pre><p>and then simply call this method from all our service methods.</p><p>More elegant, but proprietary to the Quarkus runtime, solution would be to use Observable and StartupEvent as described in <a href="https://quarkus.io/guides/lifecycle">Quarkus application initialization</a> and change our method to:</p><pre>private void initializeApp(@Observes StartupEvent ev) {<br>  logger.info(&quot;The application is initializing...&quot;);  <br>  // code from static block and constructor<br>  ...<br>}</pre><h4>JMX API is not available</h4><p>JMX API is not available in native Quarkus mode. In the StockQuote, Redis client library (Jedis) was using JMX. We needed to change JedisPool configuration not to use JMX in the following way:</p><pre>//### Quarkus - disable jmx in jedis<br>JedisPoolConfig jedisConfiguration = new JedisPoolConfig();<br>jedisConfiguration.setJmxEnabled(false);<br>logger.info(&quot;Initializing JedisPool&quot;);<br>jedisPool = new JedisPool(jedisConfiguration, jedisURI);</pre><h4>Reflection API limitations</h4><p>In the native mode Quarkus has several limitations with the Reflection API, which are described in <a href="https://github.com/oracle/graal/blob/master/substratevm/REFLECTION.md">Reflection on Substrate VM</a> and <a href="https://quarkus.io/guides/writing-native-applications-tips">Quarkus — Tips for writing native applications</a> articles, this might prevent your application from running successfully.</p><p>In the StockQuote, the Reflection API is used ‘behind the scenes’ by the Jedis library and results in the following exception during runtime:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*ZgoEJl2Ytx_m5r8Ik8wTpw.png" /></figure><p>Quarkus is not aware of additional classes loaded by that library by Class.forName() method. To solve that we need to create a reflection-config.json file in the /src/main/resources folder that specifies additional classes that should be considered during build. The file has following content:</p><pre>[<br>  {<br>    &quot;name&quot; : &quot;org.apache.commons.pool2.impl.DefaultEvictionPolicy&quot;,<br>    &quot;allDeclaredConstructors&quot; : true,<br>    &quot;allPublicConstructors&quot; : true,<br>    &quot;allDeclaredMethods&quot; : true,<br>    &quot;allPublicMethods&quot; : true,<br>    &quot;allDeclaredFields&quot; : true,<br>    &quot;allPublicFields&quot; : true<br>  }<br>]</pre><p>and add a reference to it in application.properties file:</p><pre># Reflection Configuration<br>quarkus.native.additional-build-args =-H:ReflectionConfigurationFiles=reflection-config.json</pre><p>After all these changes the application builds and runs successfully in both JVM and native mode.</p><h4>Alternative caching configuration</h4><p>In the StockQuote Redis is used as a caching service to store quotes received from the Internet. It also shows how to integrate with remote services.</p><p>If you would only be interested in an internal data caching, Quarkus offers its own <a href="https://quarkus.io/guides/cache">cache extension</a>, which you can very easy integrate in your service.</p><p>You need to add the following to the pom.xml:</p><pre>&lt;dependency&gt;<br>  &lt;groupId&gt;io.quarkus&lt;/groupId&gt;<br>  &lt;artifactId&gt;quarkus-cache&lt;/artifactId&gt;                           &lt;/dependency&gt;</pre><p>or use <a href="https://quarkus.io/guides/maven-tooling">Quarkus Maven extension plugin</a> and issue:</p><pre>mvnw quarkus:add-extention -Dextensions=&quot;quarkus-cache&quot;</pre><p>and annotate the service method like this:</p><pre>@CacheResult(cacheName = &quot;quote&quot;)<br>public Quote getStockQuote(@PathParam(&quot;symbol&quot;) String symbol) throws IOException {</pre><p>and get rid of all the code that calls Redis. Sample implementation is done in the <a href="https://github.com/fritsjen/stock-quote/blob/quarkus-cache/src/main/java/com/ibm/hybrid/cloud/sample/stocktrader/stockquote/StockQuote.java">quarkus-cache</a> branch</p><h3>Quarkus Security configuration</h3><p>The StockQuote service can work with a basic security using embedded user registry or utilizing JWT authentication. For smoke testing, we used basic configuration, for final deployment to OpenShift and integration of other IBM Stock Trader components we used JWT authentication. Here we will only talk about JWT configuration, you can look in the Github repo for details about file based basic security configuration.</p><h4>Enabling security in Quarkus</h4><p>In the Open Liberty, security constraints are configured in the web.xml and/or via annotations in the Java code. Annotations are still valid in Quarkus, but it lacks web.xml and this part must be done via the application.properties file. For more details look into <a href="https://quarkus.io/guides/security">Quarkus — Security Guide</a>.</p><p>First, you need to ensure that smallrye-jwt extension is enabled in your pom.xml:</p><pre>&lt;dependency&gt;<br>      &lt;groupId&gt;io.quarkus&lt;/groupId&gt;<br>      &lt;artifactId&gt;quarkus-smallrye-jwt&lt;/artifactId&gt;<br>    &lt;/dependency&gt;</pre><p>or use <a href="https://quarkus.io/guides/maven-tooling">Quarkus Maven extension plugin</a> and issue:</p><pre>mvnw quarkus:add-extention -Dextensions=&quot;quarkus-smallrye-jwt&quot;</pre><p>Then configure jwt properties. In our configuration the application.properties file looks like this:</p><pre># Security configuration - jwt<br>quarkus.smallrye-jwt.enabled=true<br>mp.jwt.verify.publickey.location=default-cert.pem<br>mp.jwt.verify.issuer=http://stock-trader.ibm.com<br></pre><pre># Security constraints<br>quarkus.http.auth.basic=true<br>quarkus.http.auth.permission.authenticated.paths=/*<br>quarkus.http.auth.permission.authenticated.policy=authenticated</pre><p>where:</p><ul><li>quarkus.smallrye-jwt.enabled=true — enables jwt extension</li><li>mp.jwt.verify.publickey.location=default-cert.pem — specifies the file with certificate used to validate token</li><li>mp.jwt.verify.issuer=http://stock-trader.ibm.com — specifies the token issuer</li></ul><p>Optionally, if you want to validate audiences, you need to add the following line:</p><pre>smallrye.jwt.verify.aud=stock-trader</pre><p>For security constraints, we used simple configuration to just protect whole application for any authenticated user.</p><h3>Deployment to OpenShift</h3><p>Quarkus applications can be deployed to an OpenShift cluster in a few ways:</p><ul><li>using manifests (yaml files)</li><li>using s2i tooling (via oc new-app)</li><li>using Quarkus OpenShift extension (via mvn deploy)</li></ul><p>In this article we are discussing the first option, that uses manifests, as it provides the most flexibility, and can be easily integrated in your current DevOps pipelines.</p><h4>Deploying to OpenShift using manifests — BuildConfig, ImageStreams and Deployment</h4><p>In this article we assume, that application sources are available to OpenShift cluster via code repository. In our case sources are located in this <a href="https://github.com/gasgithub/stock-quote/tree/quarkus">Github repo</a> in quarkus branch.</p><p>Quarkus provides images that can be used to build an application directly on the OpenShift. We will utilize this method to compile and build an application directly on the target cluster. In a real case scenario, it should be your development cluster, not the production one, as the build process is using lots of resources.</p><p>Create ImageStreams that will hold build tools and application images:</p><ul><li><a href="https://github.com/gasgithub/stock-quote/tree/quarkus/manifests/quarkus/is-quarkus-maven.yaml">is-quarkus-maven.yaml</a> — an image stream holding building tools</li><li><a href="https://github.com/gasgithub/stock-quote/tree/quarkus/manifests/quarkus/is-stock-quote-quarkus.yaml">is-stock-quote-quarkus.yaml</a> — an image stream for the built application</li></ul><p>Create a BuildConfig definition that will tell OpenShift how to process the application. The <a href="https://github.com/gasgithub/stock-quote/tree/quarkus/manifests/quarkus/bc-stock-quote-quarkus.yaml">bc-stock-quote-quarkus.yaml</a> is build config that is using Git and Docker strategy. The config pulls the application sources from the specified git repository and branch:</p><pre>source:<br>    type: Git<br>    git:<br>      uri: &#39;https://github.com/gasgithub/stock-quote.git&#39;<br>      ref: quarkus</pre><p>It is using a Dockerfile located in the root of the project, and the source image stream that we specified in previous step:</p><pre>strategy:<br>    type: Docker<br>    dockerStrategy:<br>      from:<br>        kind: ImageStreamTag<br>        name: &#39;centos-quarkus-maven:19.3.1-java11&#39;</pre><p>As output, it produces a new image stream with the application:</p><pre>output:<br>    to:<br>      kind: ImageStreamTag<br>      name: &#39;stock-quote-quarkus:latest&#39;</pre><p>We could already deploy and run this image using <a href="https://github.com/gasgithub/stock-quote/tree/quarkus/manifests/quarkus/depl-stock-quote-quarkus.yaml">depl-stock-quote-quarkus.yaml</a>, however this image is quite big (920MB) as it contains lots of tools used during build. It is recommended to create a minimal image that will only contain the application.</p><p>To achieve this we created two additional image streams:</p><ul><li><a href="https://github.com/gasgithub/stock-quote/tree/quarkus/manifests/quarkus/is-ubi-minimal.yaml">is-ubi-minimal.yaml</a> — a stream that holds minimal ubi base image</li><li><a href="https://github.com/gasgithub/stock-quote/tree/quarkus/manifests/quarkus/is-stock-quote-quarkus.yaml">is-minimal-stock-quote-quarkus.yaml</a> — the final minimal application image stream</li></ul><p>We also need to create another build config that will build the small target image (70MB) — <a href="https://github.com/gasgithub/stock-quote/tree/quarkus/manifests/quarkus/bc-minimal-stock-quote-quarkus.yaml">bc-minimal-stock-quote-quarkus.yaml</a>. This build config is using the previously built image and an inline dockerfile to copy built application and run it:</p><pre>source:<br>    type: Dockerfile<br>    dockerfile: |-<br>      FROM registry.access.redhat.com/ubi8/ubi-minimal:latest<br>      COPY application /application<br>      CMD /application<br>      EXPOSE 8080<br>    images:<br>      - from:<br>          kind: ImageStreamTag<br>          name: &#39;stock-quote-quarkus:latest&#39;<br>        as: null<br>        paths:<br>          - sourcePath: /usr/src/app/target/application<br>            destinationDir: .</pre><p>The application is deployed using a yaml file, that defines a deployment, a service and a route — <a href="https://github.com/gasgithub/stock-quote/tree/quarkus/manifests/quarkus/depl-minimal-stock-quote-quarkus.yaml">depl-minimal-stock-quote-quarkus.yaml</a>.</p><p>To deploy all these resources to OpenShift issue the following commands:</p><pre>oc new-project stock-quote-quarkus<br>oc apply -f is-quarkus-maven.yaml<br>oc apply -f is-stock-quote-quarkus.yaml<br>oc apply -f bc-stock-quote-quarkus.yaml<br>oc apply -f is-ubi-minimal.yaml<br>oc apply -f is-minimal-stock-quote-quarkus.yaml<br>oc apply -f bc-minimal-stock-quote-quarkus.yaml<br>oc apply -f depl-minimal-stock-quote-quarkus.yaml</pre><p>We could easily integrate our build config with the Github via a web hook, that would automatically build and deploy the new application whenever its code is changed, however for now, you have to trigger the build manually via console or command line:</p><p>oc start-build stock-quote-quarkus</p><p>The build is also automatically triggered whenever one of the source images used in image streams is changed, for example due to security updates.</p><p>Now, check if your build is successful:</p><pre>$ oc get builds<br>NAME                            TYPE     FROM          STATUS                       STARTED          DURATION<br>stock-quote-quarkus-4           Docker   Git@ab4b543   Complete                     12 minutes ago   10m14s<br>minimal-stock-quote-quarkus-4   Docker   Dockerfile    Complete                     2 minutes ago    1m15s</pre><p>As you can see ‘minimal’ build was also automatically ran as the source image for that has changed.</p><p>Our service is accessible via url similar to: http://minimal-stock-quote-quarkus-NAMESPACE.CLUSTER-URL/stock-quote/IBM however we will not be able to test it directly as it is protected via JWT authorization. For manual testing, you can use file based security configuration and disable JWT.</p><h4>Overriding application configuration settings in OpenShift</h4><p>By default, Quarkus application configuration is stored in the application.properties file and is processed during build time. Very often you would like to override these values during deployment. It can be done via environment variables, but you have to consult documentation for the extensions that you are using, as not all properties are changeable in the runtime.</p><p>In our service we overrode settings for Redis and JWT configuration, specifying the following in deployment file:</p><pre>          env:<br>            - name: REDIS_URL<br>              valueFrom:<br>                secretKeyRef:<br>                  name: redis<br>                  key: redis.url<br>            - name: MP_JWT_VERIFY_PUBLICKEY<br>              valueFrom:<br>                configMapKeyRef:<br>                  name: jwt-config<br>                  key: jwt-ca.crt<br>            - name: MP_JWT_VERIFY_ISSUER<br>              valueFrom:<br>                configMapKeyRef:<br>                  name: jwt-config<br>                  key: mp.jwt.verify.issuer<br>            - name: SMALLRYE_JWT_VERIFY_AUD<br>              valueFrom:<br>                configMapKeyRef:<br>                  name: jwt-config<br>                  key: smallrye.jwt.verify.aud</pre><h3>What next?</h3><p>Next step would be to make your service true serverless, by allowing it to scale to zero, utilizing KNative features of OpenShift, but it is a theme for another story….</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=79142bed3846" width="1" height="1" alt=""><hr><p><a href="https://medium.com/hybrid-cloud-engineering/using-quarkus-the-kubernetes-native-java-stack-to-run-your-jax-rs-microservice-79142bed3846">Using Quarkus — the Kubernetes Native Java stack —  to run your JAX-RS microservice</a> was originally published in <a href="https://medium.com/hybrid-cloud-engineering">AI Enterprise Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>