Using customized devfile to create a workspace

In addition to the default devfiles, Wazi Developer for Workspaces allows users to use a customized devfile to create a workspace. You can leverage the Import Devfile feature in Wazi Developer for Workspaces to create a workspace using a customized devfile.

Note: You do not have to modify the devfile if you are just cloning a repository to add a project to your workspace, because the repository automatically gets added to the devfile during the clone.

To create a workspace using a customized devfile, complete the following procedure.

  1. Click Getting Started on the top left.

  2. Select the Custom Workspace tab.

  3. Enter a URL for the customized devfile, then click Load devfile. You can also copy and paste the YAML content directly in the editor.

  4. After you load the devfile, click Create & Open to create and start your workspace.

The following example uses the IBM Z® Open Editor devfile as a reference:

# Licensed Materials - Property of IBM
# (C) Copyright IBM Corporation 2019, 2020. All Rights Reserved.
#
# Note to U.S. Government Users Restricted Rights:
# Use, duplication or disclosure restricted by GSA ADP Schedule
# Contract with IBM Corp.
---
  apiVersion: 1.0.0
  metadata:
    generateName: Custom-Wazi-Client-
  # Modify which repositories get loaded by default
  projects:
    -
      name: ibm-zopeneditor-sample
      source:
        type: git
        location: "https://github.com/IBM/zopeneditor-sample.git"
  components:
    # Add new Che plug-ins by using the ID or link to the .vsix file
    - 
      type: chePlugin
      id: redhat/java/latest
      alias: my-custom-plugin
    -
      type: chePlugin
      reference: https://raw.githubusercontent.com/IBM/zopeneditor-about/master/che/plugins/z-open-editor.yaml
      alias: ibm-z-open-editor
    -
      type: dockerimage
      alias: wazi
      image: docker.io/ibmcom/wazi-code-codeready:latest
      memoryLimit: 512Mi
      volumes:
        - name: wazi
          containerPath: /home/wazi/.zowe
        - name: m2
          containerPath: /home/wazi/.m2
      mountSources: true

To learn more about configuring a workspace using a devfile, see Red Hat® CodeReady Workspaces documentation and ((https://www.eclipse.org/che/docs/che-7/end-user-guide/configuring-a-workspace-using-a-devfile/).