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

Chapter 5. Camel K quick start developer tutorials


Red Hat Integration - Camel K provides quick start developer tutorials based on integration use cases available from https://github.com/openshift-integration. This chapter provides details on how to set up and deploy the following tutorials:

5.1. Deploying a basic Camel K Java integration

This tutorial demonstrates how to run a simple Java integration in the cloud on OpenShift, apply configuration and routing to an integration, and run an integration as a Kubernetes CronJob.

Prerequisites

Procedure

  1. Clone the tutorial Git repository:

    $ git clone git@github.com:openshift-integration/camel-k-example-basic.git
  2. In VS Code, select File Open Folder camel-k-example-basic.
  3. In the VS Code navigation tree, right-click the readme.didact.md file and select Didact: Start Didact Tutorial from File. For example:

    Starting the Camel K Quickstart tutorial

    This opens a new Didact tab in VS Code to display the tutorial instructions.

  4. Follow the tutorial instructions and click the provided links to run the commands automatically.

    Alternatively, if you do not have VS Code installed with the Didact extension, you can manually enter the commands from https://github.com/openshift-integration/camel-k-example-basic.

5.2. Deploying a Camel K Serverless integration with Knative

This tutorial demonstrates how to deploy Camel K integrations with OpenShift Serverless in an event-driven architecture. This tutorial uses a Knative Eventing broker to communicate using an event publish-subscribe pattern in a Bitcoin trading demonstration.

This tutorial also shows how to use Camel K integrations to connect to a Knative event mesh with multiple external systems. The Camel K integrations also use Knative Serving to automatically scale up and down to zero as needed.

Prerequisites

Procedure

  1. Clone the tutorial Git repository:

    $ git clone git@github.com:openshift-integration/camel-k-example-knative.git
  2. In VS Code, select File Open Folder camel-k-example-knative.
  3. In the VS Code navigation tree, right-click the readme.didact.md file and select Didact: Start Didact Tutorial from File. This opens a new Didact tab in VS Code to display the tutorial instructions.
  4. Follow the tutorial instructions and click the provided links to run the commands automatically.

    Alternatively, if you do not have VS Code installed with the Didact extension, you can manually enter the commands from https://github.com/openshift-integration/camel-k-example-knative.

5.3. Deploying a Camel K transformations integration

This tutorial demonstrates how to run a Camel K Java integration on OpenShift that transforms data such as XML to JSON, and stores it in a database such as PostgreSQL.

The tutorial example uses a CSV file to query an XML API and uses the data collected to build a valid GeoJSON file, which is stored in a PostgreSQL database.

Prerequisites

Procedure

  1. Clone the tutorial Git repository:

    $ git clone git@github.com:openshift-integration/camel-k-example-transformations.git
  2. In VS Code, select File Open Folder camel-k-example-transformations.
  3. In the VS Code navigation tree, right-click the readme.didact.md file and select Didact: Start Didact Tutorial from File. This opens a new Didact tab in VS Code to display the tutorial instructions.
  4. Follow the tutorial instructions and click the provided links to run the commands automatically.

    Alternatively, if you do not have VS Code installed with the Didact extension, you can manually enter the commands from https://github.com/openshift-integration/camel-k-example-transformations.

5.4. Deploying a Camel K Serverless event streaming integration

This tutorial demonstrates using Camel K and OpenShift Serverless with Knative Eventing for an event-driven architecture.

The tutorial shows how to install Camel K and Serverless with Knative in an AMQ Streams cluster with an AMQ Broker cluster, and how to deploy an event streaming project to run a global hazard alert demonstration application.

Prerequisites

Procedure

  1. Clone the tutorial Git repository:

    $ git clone git@github.com:openshift-integration/camel-k-example-event-streaming.git
  2. In VS Code, select File Open Folder camel-k-example-event-streaming.
  3. In the VS Code navigation tree, right-click the readme.didact.md file and select Didact: Start Didact Tutorial from File. This opens a new Didact tab in VS Code to display the tutorial instructions.
  4. Follow the tutorial instructions and click the provided links to run the commands automatically.

    Alternatively, if you do not have VS Code installed with the Didact extension, you can manually enter the commands from https://github.com/openshift-integration/camel-k-example-event-streaming.

5.5. Deploying a Camel K Serverless API-based integration

This tutorial demonstrates using Camel K and OpenShift Serverless with Knative Serving for an API-based integration, and managing an API with 3scale API Management on OpenShift.

The tutorial shows how to configure Amazon S3-based storage, design an OpenAPI definition, and run an integration that calls the demonstration API endpoints.

Prerequisites

Procedure

  1. Clone the tutorial Git repository:

    $ git clone git@github.com:openshift-integration/camel-k-example-api.git
  2. In VS Code, select File Open Folder camel-k-example-api.
  3. In the VS Code navigation tree, right-click the readme.didact.md file and select Didact: Start Didact Tutorial from File. This opens a new Didact tab in VS Code to display the tutorial instructions.
  4. Follow the tutorial instructions and click the provided links to run the commands automatically.

    Alternatively, if you do not have VS Code installed with the Didact extension, you can manually enter the commands from https://github.com/openshift-integration/camel-k-example-api.

5.6. Deploying a Camel K SaaS integration

This tutorial demonstrates how to run a Camel K Java integration on OpenShift that connects two widely-used Software as a Service (SaaS) providers.

The tutorial example shows how to integrate the Salesforce and ServiceNow SaaS providers using REST-based Camel components. In this simple example, each new Salesforce Case is copied to a corresponding ServiceNow Incident that includes the Salesforce Case Number.

Prerequisites

Procedure

  1. Clone the tutorial Git repository:

    $ git clone git@github.com:openshift-integration/camel-k-example-saas.git
  2. In VS Code, select File Open Folder camel-k-example-saas.
  3. In the VS Code navigation tree, right-click the readme.didact.md file and select Didact: Start Didact Tutorial from File. This opens a new Didact tab in VS Code to display the tutorial instructions.
  4. Follow the tutorial instructions and click the provided links to run the commands automatically.

    Alternatively, if you do not have VS Code installed with the Didact extension, you can manually enter the commands from https://github.com/openshift-integration/camel-k-example-saas.

Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

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

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

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

Red Hat 소개

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

© 2024 Red Hat, Inc.