Create and edit an IBM z/OS Connect API project
with Docker Desktop
Set up an z/OS Connect API project with
Docker Desktop.
Before you begin
zosConnect-3.0 Applies to zosConnect-3.0.
Containers Applies to z/OS Connect container deployments.
Ensure that you have:
The IBM® z/OS Connect Designer image available on your
development environment.
You have permission to create directories and files in your development environment.
About this task
The task has 2 parts:
Creating the z/OS Connect API project template
for the API project development team to use.
Figure 1. Making the API project available in Source Code Management
(SCM)
Using the API project template in Docker Desktop.
Figure 2. Using the API project template in Docker Desktop
The example commands in the following procedure use docker. If you are using Podman as your container platform, use podman instead of docker in the example commands.
Procedure
Create a project workspace directory structure.
Note: For this example, the workspace name is apiProjectWorkspace and
the API project name is apiProject.
At the command prompt on your workstation, change to the directory where you want to create your
z/OS Connect API project and create the following
directory structure.
These directories are mounted into the z/OS Connect Designer container when you start it.
The /certs directory holds certificates that are needed for connection
security to z/OS systems.
The /logs directory holds logging and messages from your API project that
is used for troubleshooting and debugging.
The /apiProject/src/main/liberty/config directory structure holds any extra
server configuration for your 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:
The environment variables in your docker-compose.yaml depend on which subsystems that
you want to connect to from your z/OS Connect API project. You can have environmental
variables for more than one subsystem.
When running with SELinux in enforcing mode on Linux, a bind mount might be required to ensure
the correct permissions are set for the mounted file systems. For more information, see Use a bind mount with Docker Compose.
Save the docker-compose.yaml
file.
Start the z/OS Connect Designer.
Enter the following command from your z/OS Connect API project
workspace:
docker compose up -d
To stop the z/OS Connect Designer, enter
the following command from your z/OS Connect API project workspace:.
docker compose down
Results
You have successfully created a z/OS Connect API project workspace in Docker Desktop.
Editing an API project
About this task
To edit an existing z/OS Connect API project,
update the environment variables, then restart z/OS Connect Designer.
Procedure
Update the docker-compose.yaml
environmental variables.
When editing an existing API project from another team or
developer, update the docker-compose.yaml file
environmental variables with your own credentials.
For example, in figure Figure 3 you might need to update the
DB2_USERNAME and DB2_PASSWORD environmental variables.Figure 3. A sample Db2 API
project