Note: Where the documentation refers to Red Hat OpenShift Dev Spaces, the instructions can also be
applied to Red Hat OpenShift Wazi Dev Spaces.
The task has 2 parts:
Creating the API project template for the API project development team, and check it into Source
Code Management (SCM).Figure 1. Making the API project available in Source Code Management (SCM)
Importing the API project into Red Hat OpenShift Dev Spaces, where the z/OS Connect Designer can be started.Figure 2. Using the API project template in Red Hat OpenShift Dev Spaces
Procedure
Create the API project template.
At the command line on your workstation,
change to the directory where you want to create your z/OS Connect API project.
Enter the following command to create a project workspace directory called
apiProjectWorkspace.
mkdir apiProjectWorkspace
Enter the following command to change to that directory:
cd apiProjectWorkspace
In the apiProjectWorkspace directory, create the subdirectories
for the API project. These subdirectories are used for Liberty server configuration
files.
For Windows, enter the following
command:
mkdir apiProject\src\main\liberty\config
For
MacOS, enter the following
command:
mkdir -p apiProject/src/main/liberty/config
The
following image shows the directory structure:
Create a devfile.yaml and place it into the
apiProject/ directory.
This file contains the configuration that is
needed to create a workspace in Red Hat OpenShift Dev Spaces
for the z/OS Connect API Project, and allows the IBM z/OS Connect Designer to be started.
Where, <API_PROJECT_NAME> is
the name of your API Project, and <SOURCE_CODE_REPOSITORY> is
the name of the Git repository where your API Project is hosted. Note, the
name must contain only lowercase characters and hyphens.
From 3.0.95, the zosconnect_remote_download_allowlist property is available.
This devfile.yaml example shows the property configured to
BLOCK_ALL. For more information about allowlist property and how to configure it,
see Configuring an
allowlist for IBM
z/OS Connect Designer.
Validate that the API project has the following structure.
Push the API project to the Git repository <SOURCE_CODE_REPOSITORY> hosted
by a Source Code Management (SCM) solution.
Import an API project to create a Red Hat OpenShift Dev Spaces
workspace from the API project template.
Mount the server configuration environment variables (from step 1.d) into the workspace by using a
Secret and a ConfigMap.
Access your development environment where the Red Hat OpenShift Dev Space Operator is installed. Click in the navigation bar to add the
Secrets and ConfigMaps objects.
Continuing with the basic authentication connection to Db2. Create the following ConfigMap
and Secret objects on the Red Hat OpenShift cluster with your own data:
Where, <USER_DEVSPACES_NAMESPACE> is the namespace in which the Red Hat OpenShift Dev Spaces is
hosted for the active user. You can go to
https://<openshift_dev_spaces_fqdn>/api/kubernetes/namespace to get your
Red Hat OpenShift Dev Spaces
user namespace as name. For more information, see Integrating with OpenShift in the Red Hat OpenShift Dev
Spaces documentation.