Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

DevNation Live Blog: Developing with OpenShift without the build waits

June 28, 2016
Rob Terzi
Related topics:
KubernetesContainersDeveloper Tools
Related products:
Red Hat OpenShift Container Platform

Share:

    Red Hat's Peter Larsen, the OpenShift Domain Architect, gave a talk at DevNation, "Developing on OpenShift without the build waits". Developing with the OpenShift Platform-as-a-Service can be very compelling: developing and deploying software without having to worry about the infrastructure. When you first try OpenShift, it's quite impressive to see how easy it is to develop and deploy software using the built-in templates that include preconfigured components such as databases and application servers. This allows developers to start coding right away.

    The one thing that mars the great first impression of OpenShift is how long the first build takes. Fortunately, subsequent builds are faster than the initial build but can still take longer than you'd like for edit, build, and test cycles during active development. Peter presented three ways that developers can dramatically shorten those cycles.

    First, Peter walked through "the why", covering how OpenShift works in order to understand what the contributing factors are. It's important to remember that OpenShift 3 is container based, it uses docker and kubernetes under the hood.  When you build on OpenShift, the base docker images for your template that contain the software components, for example the app server, need to be pulled to the node that your build is running on.  Your build could be scheduled on any available node. Every image can't be present on every node.  The build creates new container images. Those container images need to be pushed back to OpenShift container registry. This needs to be done so that your application's containers are available to run on any of the available OpenShift nodes.

    It's also worth remembering that containers, by design, are immutable. Any changes need to be written to a new layer, which in order to be persistent, generates a new container image that needs to be pushed back to the container image registry. If you need to change one line of code, the container image holding your code needs to be rebuilt. The immutability of containers can be a challenge when developing, but it is the foundation of what makes containers so attractive for deployment: namely isolation and making things reliably reproducible.

    The three strategies Peter presented:

    $ oc rsync

    This OpenShift command lets you copy (rsync) files into a running container. This can be extremely handy for debugging and other quick testing.  The drawback of this approach is that any changes you make are NOT persistent. When that container restarts it will be back in its original pristine state from the build. This also means you can't use ocrsync if your changes require restarting a component such as the application server.

    Incremental builds

    There is a new feature in OpenShift 3.2, incremental builds, which can dramatically speed up your cycles by not rebuilding everything all of the time. The feature is new enough that it isn't an option in the web console yet. You need to edit a config file to enable it. It will be in the web console in the next release. Peter did a live demo, the first build took 2 minutes and 14 seconds.  Then he changed a line of code after enabling incremental builds. The new build was ready in just 13 seconds. An audience member asked Peter to turn incremental builds off again so we could see the difference between the first build and subsequent builds.  The result without incremental was 43 seconds.  So, the speed up from incremental builds in this case was 3.3X faster.

    Peter pointed out that you'd only want to use incremental builds on your development system. Incremental builds will not be the default, because it's possible a dependency could be changed without being detected. For the sake of keeping things 100% reproducible, your build system should build from scratch every time.

    Direct build instructions from the command line or API

    The final strategy Peter presented is using OpenShift command line arguments or the API to take more control over how your builds are done.  The options are:

    • --from-build
    • --from-dir
    • --from-file

    These will let you short circuit some of the build steps when you know how your application is being built, know what you are changing, and can specify the starting point to save steps.

    Eclipse tooling for OpenShift: JBoss Developer Suite

    The final point of Peter's talk and a key take away was that for the best experience, developers should be using the latest Eclipse-based tooling: Red Hat JBoss Developer Suite. The Developer Suite allows you to develop in Eclipse, and deploy on OpenShift Enterprise 3, all running on your desktop.  The developer suite installs Red Hat Container Development Kit, which gives you a complete OSE 3 environment in a VM that you can control directly from Eclipse.

    You can download Red Hat JBoss Developer Suite from developers.redhat.com today.

    Recent Posts

    • Meet the Red Hat Node.js team at PowerUP 2025

    • How to use pipelines for AI/ML automation at the edge

    • What's new in network observability 1.8

    • LLM Compressor: Optimize LLMs for low-latency deployments

    • How to set up NVIDIA NIM on Red Hat OpenShift AI

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue