Creating an IBM z/OS Connect Server

Use the zosconnect command to create an z/OS Connect Server.

Before you begin

Started task Applies to z/OS Connect Servers run by using a z/OS started task procedure.

To use the zosconnect command, you must be an z/OS Connect administrator with access to the OMVS shell.

Before you create an z/OS Connect Server, make sure that the shared directory is available. For more information, see Creating the IBM z/OS Connect shared directory in the Reference section.

About this task

This task shows you how to use the default template to create an z/OS Connect Server. Templates are a Liberty feature that you can use when you create a server. Templates provide a starting point for configuring a z/OS Connect Server, with many of the required elements pre-configured. Other server templates are available for various z/OS Connect features. For more information, see Supplied server templates.
Note: The file permissions on the server are controlled by setting the _BPX_BATCH_UMASK STDENV variable. For more information, see A launch icon to indicate a link opens a new tab or window. _BPX_BATCH_SPAWN and _BPX_BATCH_UMASK environment variables in the z/OS documentation. z/OS Connect Server does not use the umask settings in /etc/profile and user’s .profile files.

Procedure

  1. Optional: Define z/OS Connect Server environment variables if the default value is not suitable for your configuration.
    WLP_USER_DIR
    The default value is /var/zosconnect.

    Used to specify where the runtime environment looks for shared resources and server definitions. This must be the same value that is specified in the z/OS Connect Server started task procedure. For example, /var/myservers. If you do not set this value, the default /var/zosconnect is used.

    You can specify the WLP_USER_DIR environment variable in the shell environment. This variable must be an absolute path.

    WLP_OUTPUT_DIR
    Used to specify an alternative location for server-generated output such as logs, the workarea directory, and generated files.

    Environment variables can also be used in the server configuration files.

    For example, the following environment variables are automatically set in a Liberty server:
    • server.config.dir -The value is automatically set to the value of the WLP_USER_DIR variable concatenated with the name of the server. For example, /var/zosconnect/servers/serverName.
    • server.output.dir - The value is automatically set to the value of the WLP_OUTPUT_DIR variable concatenated with the name of the server. For example, /var/zosconnect/servers/serverName.
    For more information, see A launch icon to indicate a link opens a new tab or window. Logging environment variables in the WebSphere Application Server Liberty documentation.
  2. Run the zosconnect command with the create option.
    Use the following syntax:
    zosconnect create <server name> --template=<template name>
    Create a z/OS Connect Server for an API provider scenario
    To create a server that is named server1 with the default z/OS Connect template for API provider, use the following examples.

    For zosConnect-2.0 issue the command:

    zosconnect create server1 --template=zosconnect:default

    For zosConnect-3.0 issue the command:

    zosconnect create server1 --template=zosconnect:openApi3
    Create a z/OS Connect Server for an API requester scenario
    To create a server named server2 for the z/OS application to call REST APIs for zosConnect-2.0, you can use the specific template for API requester as in the following command:
    zosconnect create server2 --template=zosconnect:apiRequester

    For zosConnect-3.0 use the following command:

    zosconnect create server2 --template=zosconnect:openApi3Requester
    zosConnect-3.0 If you create a zosConnect-3.0 server without using one of the supplied zosConnect-3.0 server templates, add the following required elements to the server.xml file:
    <featureManager>
        <feature>zosconnect:zosConnect-3.0</feature>
    </featureManager>
    
    <!-- config requires updateTrigger="mbean" for REFRESH command support -->
    <config updateTrigger="mbean"/>
    
    <!-- applicationMonitor requires updateTrigger="mbean" for REFRESH command support -->
    <applicationMonitor updateTrigger="mbean" dropinsEnabled="false"/>
    
    <!-- Automatic expansion of WAR files is required for z/OS Connect native servers  -->
    <applicationManager autoExpand="true"/>

Results

A z/OS Connect Server is created in the <WLP_USER_DIR>/servers directory. Each server instance has:

  • A subdirectory for that specific server. Each subdirectory is created by using the create option of the zosconnect command.
  • A server.xml configuration file that:
    • Defines the default location for z/OS Connect API artifacts.
    • Defines the configuration for the z/OS Connect feature.

What to do next

To create the IBM z/OS Connect Server started task procedure and start or stop the IBM z/OS Connect Server, see Starting and stopping the IBM z/OS Connect Servers.

Consider preparing your new server to provide good diagnostic information if a problem occurs. For more information, see Prepare z/OS Connect for FFDC.