Red Hat Logo

Building Declarative Pipelines with OpenShift DSL Plugin

Jenkinsfiles have only become a part of Jenkins since version 2 but they have quickly become the de-facto standard for building continuous delivery pipelines with Jenkins. Jenkinsfile allows defining pipelines as code using a groovy DSL syntax and checking it into source version control which allows you to track, review, audit and manage the lifecycle of changes to the continuous delivery pipelines the same way that you manage the source code of your application.

Although the groovy DSL syntax which is called the “scripted syntax” is the more well-known and established syntax for building Jenkins pipelines and was the default when Jenkins 2 was released. Support for a newer declarative syntax is also added since Jenkins 2.5 in order to offer a simplified way for controlling all aspects of the pipeline. Although the scripted and declarative syntax provides two ways to define your pipeline, they both translate to the same execution blocks in Jenkins and achieve the same result.

Continue reading “Building Declarative Pipelines with OpenShift DSL Plugin”


Wiping the Slate Clean with the OpenShift Container Platform

With traditional virtualized infrastructure or Infrastructure-as-a-Service, it is common practice to regularly refresh instances back to a known good state. This provides confidence that the application workloads have the correct runtime configuration, no deltas are being introduced, and they can be relied upon to provide value for the business. In these cases, you might use tools such as Ansible or Jenkins, but when we move our application workloads to containers running on OpenShift Container Platform, we can use native tools provided by that platform to achieve the same result.

Continue reading “Wiping the Slate Clean with the OpenShift Container Platform”

Dynamic Storage

How to configure persistent storage with OpenShift or Kubernetes for development environment

  • We know that containers in Openshift or Kubernetes don’t persist data. Every time we start an application, it is started in a new container with an immutable Docker image.
    Hence, any persisted data in the file systems is lost when the container stops. Hence if an application or container is rebuilt or restarted than we can’t view previous logs or if we are using containers with mysql or any other database then schema, tables, and all data will be lost, if using any messaging broker than if there is journal file than it will also not persist.
    Hence, these ephemeral containers cannot be used in production environment. In a production environment, we must configure a shared storage.
  • But what about the development environment, because we might not always have enough labs and VM’s available. To rescue we have volume type hostPath, which can be easily set up with Minishift and Minikube.
  • This article will provide details how to setup hostPath volume type.

Continue reading “How to configure persistent storage with OpenShift or Kubernetes for development environment”


Remote debug your ASP.NET Core container on OpenShift with Visual Studio Code

Visual Studio provides a graphical remote debugging ASP.NET Core app with Docker Tools for Windows. Since Visual Studio supports SSH protocol, you can remote debug ASP.NET Core process running on the Linux host. It used to be if you install and setup SSH server on docker container, you can remote debug with Visual Studio. However, it’s strongly not recommended due to security reasons. Now I’ll explain to you how to remote debug your ASP.NET Core on OpenShift with Visual Studio Code by using oc exec command instead of installing SSH server on docker container. You can use Microsoft proprietary debugger engine vsdbg with Visual Studio Code (or other Visual Studio products). Visual Studio Code can integrate other commands than SSH for debugger transport protocol.

Continue reading “Remote debug your ASP.NET Core container on OpenShift with Visual Studio Code”