이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 6. Setting up applications for HawtIO Online


This section shows how to deploy a Camel Quarkus app on OpenShift and make it HawtIO-enabled with Camel Quarkus. Once deployed on OpenShift, it will be discovered by HawtIO Online.

  1. This project uses Quarkus Container Images and Kubernetes extensions to build a container image and deploy it to a Kubernetes/OpenShift cluster (pom.xml).
  2. The most important part in terms of the HawtIO-enabled configuration is defined in the <properties> section. To make it HawtIO-enabled, the Jolokia agent must be attached to the application with HTTPS and SSL client-authentication configured. The client principal should match those that the HawtIO Online instance provides (the default is hawtio-online.hawtio.svc).

    <properties>
        <jolokia.protocol>https</jolokia.protocol>
        <jolokia.host>*</jolokia.host>
        <jolokia.port>8778</jolokia.port>
        <jolokia.useSslClientAuthentication>true</jolokia.useSslClientAuthentication>
        <jolokia.caCert>/var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt</jolokia.caCert>
        <jolokia.clientPrincipal.1>cn=hawtio-online.hawtio.svc</jolokia.clientPrincipal.1>
        <jolokia.extendedClientCheck>true</jolokia.extendedClientCheck>
        <jolokia.discoveryEnabled>false</jolokia.discoveryEnabled>
    </properties>
    Copy to Clipboard Toggle word wrap
  3. Running the application locally:

    1. Run in development mode with:

      mvn compile quarkus:dev
      Copy to Clipboard Toggle word wrap
    2. Or build the project and execute the runnable JAR:

      mvn package && java -jar target/quarkus-app/quarkus-run.jar
      Copy to Clipboard Toggle word wrap
  4. Running with the Jolokia agent locally:

    1. You can run this example with Jolokia JVM agent locally as follows:

      java -javaagent:target/quarkus-app/lib/main/org.jolokia.jolokia-agent-jvm-2.0.1-javaagent.jar -jar target/quarkus-app/quarkus-run.jar
      Copy to Clipboard Toggle word wrap
  5. Deploy it to OpenShift:

    1. To deploy it to a cluster, firstly change the container image parameters in pom.xml to fit the development environment. (The default image name is quay.io/hawtio/hawtio-online-example-camel-quarkus:latest, which should be pushed to the hawtio organisation on Quay.io.)

      <!--
        Container registry and group should be changed to those which your application uses.
      -->
      <quarkus.container-image.registry>quay.io</quarkus.container-image.registry>
      <quarkus.container-image.group>hawtio</quarkus.container-image.group>
      <quarkus.container-image.tag>latest</quarkus.container-image.tag>
      Copy to Clipboard Toggle word wrap
    2. Then build the project with option -Dquarkus.container-image.push=true to push the build image to the preferred container registry:

      mvn install -Dquarkus.container-image.push=true
      Copy to Clipboard Toggle word wrap
    3. The resources file for deployment is also generated at target/kubernetes/kubernetes.yml. Use kubectl or oc command to deploy the application with the resources file:

      kubectl apply -f target/kubernetes/kubernetes.yml
      Copy to Clipboard Toggle word wrap
    4. After deployment is successful and the pod has started, the application log can be seen on the cluster
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat