Chapter 4. New Features and Enhancements


4.1. OpenShift 3

4.1.1. Enhanced Command to Delete Resource(s)

Earlier, you could delete OpenShift resources in one of the following two ways:

  • Individually delete each resource. However, this would create a problem because some resources are hidden by the OpenShift Explorer.
  • Delete the containing OpenShift project. But, in this case you may delete more resources than required.

A new enhanced command to delete resources is available at the OpenShift project level. It lists all the available OpenShift resources for the selected OpenShift project. You can then select the resources that you want to delete. You can also filter the list using a filter that is applied to the labels for each retrieved OpenShift resource.

For example, if you have two different deployments in a single OpenShift project (if you arev using OpenShift Online Starter) or if you have different kind of resources in a single deployment, you can now distinct them.

The following images show the workflow of the preceding example.

In this example, we have deployed an EAP6.4 based application and an EAP7.0 based application. The following image shows the OpenShift Explorer view.

Figure 4.1. Application as Shown in the OpenShift Explorer

To invoke the new delete command on the EAP OpenShift project, right-click the OpenShift project and click Delete Resources.

Figure 4.2. Deleting a Resource in an OpenShift Project

For this example, we will consider deleting the EAP6.4 deployement. In the Label filter field, type eap=6.4.

Figure 4.3. Selecting a Deployment for Deletion

Click Select All.

Figure 4.4. Clicking the Select All Button

Click OK to close the Delete Resources in Project {project name} window. The resources are deleted and the OpenShift Explorer view is updated accordingly.

Figure 4.5. OpenShift Explorer View Updated after Resource Deletion

Related JIRA: JBIDE-25111

While debugging your OpenShift deployment, you may face two different issues:

  • If you launch your test through a Web browser, then it’s likely that you will access your OpenShift deployment through an OpenShift route. The problem is that, by default, OpenShift routes have a 30 seconds timeout for each request. So if you are stepping through one of your breakpoints, you will get a timeout error message in the browser window even if you can still debug your OpenShift deployment. And you will be unable to navigate through your OpenShift application.
  • If your OpenShift deployment has a liveness probe configured, depending on your virtual machine capabilities or how your debugger is configured, if you are stepping into one of your breakpoints, the liveness probe may fail; so, OpenShift will restart your container and your debugging session will be destroyed.

So, now, when the OpenShift server adapter is started in debug mode, the following action will be performed:

  • If an OpenShift route is found that is linked to the OpenShift deployment you want to debug, the route timeout will be set or increased to one hour. The original or default value will be restored when the OpenShift server adapter will be restarted in run mode.
  • If your OpenShift deployment has a liveness probe configured, the initialDelay field will be increased to one hour if the defined value for this field is lower than one hour. If the value of this field is defined to a value value that is greater than an hour, it is left intact. The original value will be restored when the OpenShift server adapter will be restarted in run mode

Related JIRA: JBIDE-24868

The OpenShift server adapter allowed hotdeploy and debugging for JEE and NodeJS based applications. It now supports Spring Boot applications with the following limitations: the Spring Boot devtools module must be added to your application as it monitors code changes and as the application must be launched in exploded mode, you must use the upstream image (docker.io/fabric8/s2i-java) rather than the downstream image builder fis-java-openshift.

As an example, we have provided the following OpenShift template that will create an OpenShift application based on the upstream application and a Git repository that added the Spring Boot devtools to the Fabric8 Spring Boot quickstart.

{
 +  "apiVersion": "v1",
 +  "kind": "Template",
 +  "metadata": {
 +    "annotations": {
 +      "description": "Spring-Boot and CXF JAXRS QuickStart. This example demonstrates how you can use Apache CXF JAXRS with Spring Boot on Openshift. The quickstart uses Spring Boot to configure a little application that includes a CXF JAXRS endpoint with Swagger enabled.",
 +      "tags": "quickstart,java,springboot,fis",
 +      "iconClass": "icon-jboss",
 +      "version": "2.0"
 +    },
 +    "name": "s2i-spring-boot-cxf-jaxrs"
 +  },
 +  "labels": {
 +    "template": "s2i-spring-boot-cxf-jaxrs"
 +  },
 +  "parameters": [
 +    {
 +      "name": "APP_NAME",
 +      "displayName": "Application Name",
 +      "required": true,
 +      "value": "s2i-spring-boot-cxf-jaxrs",
 +      "description": "The name assigned to the application."
 +    },
 +    {
 +      "name": "GIT_REPO",
 +      "displayName": "Git Repository URL",
 +      "required": true,
 +      "value": "https://github.com/jeffmaury/spring-boot-cxf-jaxrs.git",
 +      "description": "The URL of the repository with your application source code."
 +    },
 +    {
 +      "name": "GIT_REF",
 +      "displayName": "Git Reference",
 +      "value": "hotdeploy",
 +      "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch."
 +    },
 +    {
 +      "name": "SERVICE_NAME",
 +      "displayName": "Service Name",
 +      "value": "cxf-jaxrs",
 +      "description": "Exposed service name."
 +    },
 +    {
 +      "name": "BUILDER_VERSION",
 +      "displayName": "Builder version",
 +      "value": "2.0",
 +      "description": "The version of the FIS S2I builder image to use."
 +    },
 +    {
 +      "name": "APP_VERSION",
 +      "displayName": "Application Version",
 +      "value": "1.0.0.redhat-000014",
 +      "description": "The application version."
 +    },
 +    {
 +      "name": "MAVEN_ARGS",
 +      "displayName": "Maven Arguments",
 +      "value": "package -DskipTests -Dfabric8.skip -e -B",
 +      "description": "Arguments passed to mvn in the build."
 +    },
 +    {
 +      "name": "MAVEN_ARGS_APPEND",
 +      "displayName": "Extra Maven Arguments",
 +      "description": "Extra arguments passed to mvn, e.g. for multi-module builds."
 +    },
 +    {
 +      "name": "ARTIFACT_DIR",
 +      "displayName": "Maven build directory",
 +      "description": "Directory of the artifact to be built, e.g. for multi-module builds."
 +    },
 +    {
 +      "name": "IMAGE_STREAM_NAMESPACE",
 +      "displayName": "Image Stream Namespace",
 +      "value": "openshift",
 +      "required": true,
 +      "description": "Namespace in which the Fuse ImageStreams are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project."
 +    },
 +    {
 +      "name": "BUILD_SECRET",
 +      "displayName": "Git Build Secret",
 +      "generate": "expression",
 +      "description": "The secret needed to trigger a build.",
 +      "from": "[a-zA-Z0-9]{40}"
 +    },
 +    {
 +      "name": "CPU_REQUEST",
 +      "displayName": "CPU request",
 +      "value": "0.2",
 +      "required": true,
 +      "description": "The amount of CPU to requests."
 +    },
 +    {
 +      "name": "CPU_LIMIT",
 +      "displayName": "CPU limit",
 +      "value": "1.0",
 +      "required": true,
 +      "description": "The amount of CPU the container is limited to use."
 +    }
 +  ],
 +  "objects": [
 +    {
 +      "apiVersion": "v1",
 +      "kind": "Route",
 +      "metadata": {
 +        "labels": {
 +          "component": "${APP_NAME}",
 +          "provider": "s2i",
 +          "project": "${APP_NAME}",
 +          "version": "${APP_VERSION}",
 +          "group": "quickstarts"
 +        },
 +        "name": "${SERVICE_NAME}-route"
 +      },
 +      "spec": {
 +        "to": {
 +          "kind": "Service",
 +          "name": "${SERVICE_NAME}"
 +        }
 +      }
 +    },
 +    {
 +      "apiVersion": "v1",
 +      "kind": "Service",
 +      "metadata": {
 +        "annotations": {
 +        },
 +        "labels": {
 +          "component": "${APP_NAME}",
 +          "provider": "s2i",
 +          "project": "${APP_NAME}",
 +          "version": "${APP_VERSION}",
 +          "group": "quickstarts"
 +        },
 +        "name": "${SERVICE_NAME}"
 +      },
 +      "spec": {
 +        "clusterIP": "None",
 +        "deprecatedPublicIPs": [],
 +        "ports": [
 +          {
 +            "port": 9413,
 +            "protocol": "TCP",
 +            "targetPort": 8080
 +          }
 +        ],
 +        "selector": {
 +          "project": "${APP_NAME}",
 +          "component": "${APP_NAME}",
 +          "provider": "s2i",
 +          "group": "quickstarts"
 +        }
 +      }
 +    },
 +    {
 +      "kind": "ImageStream",
 +      "apiVersion": "v1",
 +      "metadata": {
 +        "name": "${APP_NAME}",
 +        "creationTimestamp": null,
 +        "labels": {
 +          "component": "${APP_NAME}",
 +          "group": "quickstarts",
 +          "project": "${APP_NAME}",
 +          "provider": "s2i",
 +          "version": "${APP_VERSION}"
 +        }
 +      },
 +      "spec": {},
 +      "status": {
 +        "dockerImageRepository": ""
 +      }
 +    },
 +    {
 +      "kind": "BuildConfig",
 +      "apiVersion": "v1",
 +      "metadata": {
 +        "name": "${APP_NAME}",
 +        "creationTimestamp": null,
 +        "labels": {
 +          "component": "${APP_NAME}",
 +          "group": "quickstarts",
 +          "project": "${APP_NAME}",
 +          "provider": "s2i",
 +          "version": "${APP_VERSION}"
 +        }
 +      },
 +      "spec": {
 +        "triggers": [
 +          {
 +            "type": "GitHub",
 +            "github": {
 +              "secret": "${BUILD_SECRET}"
 +            }
 +          },
 +          {
 +            "type": "Generic",
 +            "generic": {
 +              "secret": "${BUILD_SECRET}"
 +            }
 +          },
 +          {
 +            "type": "ConfigChange"
 +          },
 +          {
 +            "type": "ImageChange",
 +            "imageChange": {}
 +          }
 +        ],
 +        "source": {
 +          "type": "Git",
 +          "git": {
 +            "uri": "${GIT_REPO}",
 +            "ref": "${GIT_REF}"
 +          }
 +        },
 +        "strategy": {
 +          "type": "Source",
 +          "sourceStrategy": {
 +            "from": {
 +              "kind": "DockerImage",
 +              "name": "fabric8/s2i-java:${BUILDER_VERSION}"
 +            },
 +            "forcePull": true,
 +            "incremental": true,
 +            "env": [
 +              {
 +                "name": "BUILD_LOGLEVEL",
 +                "value": "5"
 +              },
 +              {
 +                "name": "ARTIFACT_DIR",
 +                "value": "${ARTIFACT_DIR}"
 +              },
 +              {
 +                "name": "MAVEN_ARGS",
 +                "value": "${MAVEN_ARGS}"
 +              },
 +              {
 +                "name": "MAVEN_ARGS_APPEND",
 +                "value": "${MAVEN_ARGS_APPEND}"
 +              }
 +            ]
 +          }
 +        },
 +        "output": {
 +          "to": {
 +            "kind": "ImageStreamTag",
 +            "name": "${APP_NAME}:latest"
 +          }
 +        },
 +        "resources": {}
 +      },
 +      "status": {
 +        "lastVersion": 0
 +      }
 +    },
 +    {
 +      "kind": "DeploymentConfig",
 +      "apiVersion": "v1",
 +      "metadata": {
 +        "name": "${APP_NAME}",
 +        "creationTimestamp": null,
 +        "labels": {
 +          "component": "${APP_NAME}",
 +          "group": "quickstarts",
 +          "project": "${APP_NAME}",
 +          "provider": "s2i",
 +          "version": "${APP_VERSION}"
 +        }
 +      },
 +      "spec": {
 +        "strategy": {
 +          "resources": {}
 +        },
 +        "triggers": [
 +          {
 +            "type": "ConfigChange"
 +          },
 +          {
 +            "type": "ImageChange",
 +            "imageChangeParams": {
 +              "automatic": true,
 +              "containerNames": [
 +                "${APP_NAME}"
 +              ],
 +              "from": {
 +                "kind": "ImageStreamTag",
 +                "name": "${APP_NAME}:latest"
 +              }
 +            }
 +          }
 +        ],
 +        "replicas": 1,
 +        "selector": {
 +          "component": "${APP_NAME}",
 +          "deploymentconfig": "${APP_NAME}",
 +          "group": "quickstarts",
 +          "project": "${APP_NAME}",
 +          "provider": "s2i",
 +          "version": "${APP_VERSION}"
 +        },
 +        "template": {
 +          "metadata": {
 +            "creationTimestamp": null,
 +            "labels": {
 +              "component": "${APP_NAME}",
 +              "deploymentconfig": "${APP_NAME}",
 +              "group": "quickstarts",
 +              "project": "${APP_NAME}",
 +              "provider": "s2i",
 +              "version": "${APP_VERSION}"
 +            }
 +          },
 +          "spec": {
 +            "containers": [
 +              {
 +                "name": "${APP_NAME}",
 +                "image": "library/${APP_NAME}:latest",
 +                "readinessProbe" : {
 +                  "httpGet" : {
 +                    "path" : "/health",
 +                    "port" : 8081
 +                  },
 +                  "initialDelaySeconds" : 10
 +                },
 +                "livenessProbe" : {
 +                  "httpGet" : {
 +                    "path" : "/health",
 +                    "port" : 8081
 +                  },
 +                  "initialDelaySeconds" : 180
 +                },
 +                "ports": [
 +                  {
 +                    "containerPort": 8778,
 +                    "name": "jolokia"
 +                  }
 +                ],
 +                "env" : [ {
 +                  "name" : "KUBERNETES_NAMESPACE",
 +                  "valueFrom" : {
 +                    "fieldRef" : {
 +                      "fieldPath" : "metadata.namespace"
 +                    }
 +                  }
 +                } ],
 +                "resources": {
 +                  "requests": {
 +                    "cpu": "${CPU_REQUEST}"
 +                  },
 +                  "limits": {
 +                    "cpu": "${CPU_LIMIT}"
 +                  }
 +                }
 +              }
 +            ]
 +          }
 +        }
 +      },
 +      "status": {}
 +    }
 +  ]
 +}
Copy to Clipboard Toggle word wrap

Related JIRA: JBIDE-25303

4.2. Fuse Tooling

In the Camel 2.18 and earlier versions, the Camel catalog did not have information about Camel Context. Fuse Tooling now provides this missing piece of information. Like any other component, it allows to edit Camel Context parameters in the Properties view. It is activated when there is no element selected on the diagram.

Figure 4.6. Editing the Camel Context Parameters

4.2.2. Fuse 7 Karaf-based Runtime Server Adapter

Fuse 7 is under development and preliminary versions are available on the early-access repository. Fuse Tooling is ready to leverage them so that you can try the upcoming major Fuse version.

Figure 4.7. Using the Upcoming Major Fuse Versions

Classical functionalities with server adapters are available: automatic redeploy, Java debug, Graphical Camel debug through created JMX connection. Note that you can’t retrieve the Fuse 7 Runtime directly from Fuse tooling as yet. It is required to download it on your machine and point to it when creating the Server adapter. The provided templates requires some modifications to have them working with Fuse 7, mainly adapting the bom.

Related JIRA: FUSETOOLS-2578

The routeContext tag is a special tag used in Camel to provide the ability to reuse routes and to split them across different files. This is useful on large projects. For details, see the Camel documentation. Starting with this version, the Design of the routes defined in the routeContext tags are displayed.

Starting with Fuse Tooling 10.1.0, it is possible to change the Camel version. In case the Camel version was not cached locally and for slow internet connections, this operation can take some time. There is now a progress bar to see the progress.

Figure 4.8. Progress Bar Showing Progress of Camel Version being Changed

Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat