In the context of OpenShift, Components and Services are basic structures that need to be stored in Application, which is a part of the OpenShift project that organizes deployables into virtual folders for better readability.

This chapter describes how to create OpenShift Components in the Che using the OpenShift Connector plug-in and push them to an OpenShift cluster.

Prerequisites
  • A running instance of Che. To install an instance of Che, see Che quick-starts.

  • The user is logged in to an OpenShift cluster using the OpenShift Connector plug-in.

Procedure
  1. In the OpenShift Connector panel, right-click the row with the red OpenShift icon and select New Project.

  2. Enter a name for your project.

  3. Right-click the created project and select New Component.

  4. When prompted, enter the name for a new OpenShift Application in which the component can be stored.

    The following options of source for your component are displayed:

    1. Git Repository

      This prompts you to fill in a Git repository URL and select the intended revision of the runtime.

    2. Binary File

      This prompts you to select a file from the file explorer.

    3. Workspace Directory

      This prompts you to select a folder from the file explorer.

  5. Enter the name for the component.

  6. Select the component type.

  7. Select the component type version.

  8. The component is created. Right-click the component, select New URL, and enter a name of your choice.

  9. The component is ready to be pushed to the OpenShift cluster. To do so, right-click the component and select Push.

    The component is now deployed to the cluster. Right-click for selecting additional actions, such as debugging and opening in a browser (requires port 8080 to be exposed).

Tags: