Installing and uninstalling an IBM z/OS Connect Server image with Podman
How to build and deploy a z/OS Connect API that uses an API project (OpenAPI 3) and the z/OS Connect Server image by using Podman.
Deploying the z/OS Connect Server zosConnect-3.0 image with Podman
About this task
zosConnect-3.0 Applies to zosConnect-3.0.
The following topic describes the steps that are required to build and deploy the IBM z/OS Connect API image with Podman and how to uninstall the z/OS Connect API image.
For information on how-to build and deploy the z/OS Connect API images with Red Hat® OpenShift®, see Installing IBM z/OS Connect Server with Red Hat OpenShift. To uninstall the z/OS Connect API image with Red Hat OpenShift, see Uninstalling IBM z/OS Connect the ZosConnect Custom Resource and the IBM z/OS Connect Operator.
| z/OS Connect installation steps |
|---|
| Download the IBM z/OS Connect Server image. |
| Verify the IBM z/OS Connect Server image (Optional). |
| Build the z/OS Connect API image. |
| Create a secret. |
| Run the container. |
| Invoke z/OS Connect API. |
| Stopping the container. |
| Publish the z/OS Connect API image. |
| Uninstalling your z/OS Connect API image |
Before you begin
About this task
The following tasks must be completed.
- Download and install Podman. For more
information about installing Podman, see
Podman Installation Instructions.
Note: If you are using IBM z/OS Container Platform, Podman will already be installed and your user ID configured to use Podman. For more information, see - Create a z/OS Connect API project. For more information, see Developing API provider with zosConnect-3.0.
- Optional: Verifying a z/OS Connect Server image signature is an optional
step. If you need to verify the z/OS Connect signed
images, install the following command-line tools:
Gnu Privacy Guard
OpenSSL
skopeo
Tip: These command-line tools can usually be installed on Linux by using the package manager.
- Optional: If using z/OS Connect policies to adjust how an API request is processed in IBM z/OS Connect, see Configuring IBM z/OS Connect policies. When building the WAR file in Build a z/OS Connect API image as part of this procedure, you must include the policy configuration and rules file within the image.
Download a z/OS Connect Server image
Before you begin
The following tasks must be completed.
- To get access to the z/OS Connect Server image,
you must have an IBM entitlement registry key to pull the
images from the IBM Cloud Container Registry
icr.io. Refer to your license document for specific instructions
on obtaining the entitlement key.Note: If you don't have the license document with the entitlement key, place a new order for the product in ShopZ where the additional documentation contains the entitlement key. As an existing customer, if you already have a license for IBM z/OS Connect Unlimited, no charge is incurred when the new order is placed.
Procedure
Results
podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
icr.io/zosconnectunlimited/ibm-zcon-server 3.0.100 6d2af17d10bd 1 days ago 979MB
What to do next
-
Optional: z/OS Connect images are signed. You must have a downloaded IBM z/OS Connect Server image to continue the installation procedure. For more information on verifying image signatures, see Verify a z/OS Connect image signature (Optional).
OpenSSL and GPG aren't supported on z/OS. If you're using IBM z/OS Container Platform, you need to verify your IBM z/OS Connect Server image signatures on a different platform.
If you don't need to verify your image signatures, go to Build a z/OS Connect API image.
Verify a z/OS Connect image signature (Optional)
Digital signatures provide a way to ensure that an image is both authentic (it originated from the expected source) and has integrity (it is what is expected). z/OS Connect images are signed and this topic describes how to verify the signatures on those images.
Before you begin
The following tasks must be completed.
-
The z/OS Connect public keys must exist on the same machine as the command-line tools.
Copy the following text block exactly as shown into a text editor, and save it in a file namedPRD0012028key.pub.asc:-----BEGIN PGP PUBLIC KEY BLOCK----- mQINBGQU0cUBEACqSHOnQ2HyQRdr0dkcYpehWGz/OSXLpOiKpmgqcvLEm2ZIGpZu pzN5wc57XOxhz5YNodODFysewjqKntgQg1EbQ85g8BmV14iZJZ/8oVMCQGe6yt2G efpD1+qY/QxK+JBB45Y5E6TEudNPzhhNY/9BsImPvHLSD95ikMYHVs2jCIquTXdT UC1fyaXKU5T1qQZd1XxTX+HEaFGIInRHRWvjw2z92LNM35Ul6vJU5R8f8yVZIRAG Y+J8/4qBRd2w23uUupNWQw6QYdW3Q3K6LVZc3K9ykJ8/zNaYBLT/dUXd3L2UYPO7 glWmO3oJynGc0kQczq/ohtCiUtKkXigYZ1feFC0nrFsVa7+Edzao5LOCYNhd9ASM KZBL11VYvQ9pdjeWa4yd/VuTtG6l3GwN1AHXY+dLYdG3lrB0UmTNfyHZoJtIJ+yd cmTZHhfvQ5djjCDwuNxN6NLuAKkzBzUNK3CMi7swKwym7agidMtf4G/WUAy981+P 502RGEtEDO98egA7yEXjGNB0vh7wuqyUKtugsCpGYQhuto42L8nEUogM69JK8Z9J d2xs9PM/N8DEFdOXc73MMYnZejstoZ71t79MyEKw/3flKMADJE3x1xebnOMIj4CI 32Mnc0YHnmeADuYRtbk8omEOQAlWJrCFRUMr8+uSfvUb8QChuhKZDURRKQARAQAB tEBJQk0gei9PUyBDb25uZWN0IEVudGVycHJpc2UgRWRpdGlvbiBVbmxpbWl0ZWQg PHBzaXJ0QHVzLmlibS5jb20+iQI6BBMBCAAkBQJkFNHFAhsPBQsJCAcCBhUKCQgL AgQWAgMBAh4BBQkAAAAAAAoJELBRtMIty7kNhqwP/1YQPQECXMUqno1z0OfQK+Wn +eVQlS8cwvgarpKMv/a3tjFwggJvTaB6TRzdEcBHMSaXqY0+ljnHn7pHWtIQA3uR FZszNWWzsRG9ahlne2NqjIwzCrvIN0BNKL3LSsJWOOptSTSjCxqeg9UmThdtXBu4 8DBCjHSsvtNa0hnSJG2tC5HQ3bnoduU1D7v9jZIP2SEg/lL6iZkKAz1HLxT9oqLL KMpoUAVwRFN/wTFpQy83loxkU+xqXHgcq0htZWWspeqRrTSGkhtqEDcO8Bt3jSQ0 p9U7Bq9chpmEwngN5WwtvxXcrMMerlbaVJ6jLbNnJwERv+Q5N36Wl1hoNffV6Itw LOYp4rfqO6eV5yFmC2gYLq6xMEHHM4q8nUQ1KhmwoARzwXJuRxocDl62kjq2YBOR 6H8WLZmHuE0ba0dp4JR+Wg99no2Sud4dT6Rs/ZylezyJGaFEEK7NNrl+G1JYVbms Ynq6McZVz+Hcqow5k7PsZ4KviFb+F/DlP/lNCDlabFy+IC0gD4gjoKYbyOed+rKc ZUd4DDxLl2KqEUiItn3aIU3epLAf9MtrGd+tugwMQPaq0v2Gep8zntuWew2TWEoy c7C0udUwdjw1q4SwyJzYwiapwz6LCu+dlu7sf2Kxds5USYBWsrTxVzga3/BtRghK V7Pi5/oMEPjk9O7eoOnL =2ZDV -----END PGP PUBLIC KEY BLOCK----
About this task
z/OS Connect images are signed. If you need to verify the image signatures, complete the following procedure.
Enabling signature verification when container images are pulled to a host system can be
automated. For information on automating image signature verification, see
Verifying image signing for Red
Hat Container Registry.
Some of the steps in this procedure use gpg. GPG2 is the extended version of GPG
and gpg2 can be used instead of gpg.
Procedure
Results
Build a z/OS Connect API image
About this task
To build a z/OS Connect API image from your API
project, use a container platform tool of your choice to build an image FROM the
z/OS Connect Server image. For more information about
downloading the z/OS Connect Server image, see Download a z/OS Connect Server image.
If the deployment target for this API image is the IBM z/OS Container Platform, the z/OS Connect API image must be built and run on a z/OS LPAR with Podman installed.
Procedure
Create a secret (Optional)
About this task
If your z/OS Connect API project requires a password to be provided to the IBM z/OS Connect Server, these passwords are provided to the Podman run command by using a secret.
If your z/OS Connect API project doesn't require a password, go to Run the z/OS Connect API container.
Procedure
Run the z/OS Connect API container
About this task
To run the container, the z/OS Connect API image
that is built in Build a z/OS Connect API image contains a z/OS Connect API project with connection and credential
environment variables. Pass these values (optionally including any secret values) into the container
by using the podman run command.
Procedure
Results
podman logs -f <container-id>- Replace the variable <container-id> with the container ID of the running container. For example, 0734b19230649ffa1f2edec0c6198aa61bad0756f9316b405a81605bd9be1fb8.
- By specifying the -f option, it allows the logs to continue to track further log messages as they appear. If you use this option, you need to enter Ctrl+C to cancel further output and exit the command.
[AUDIT ] CWWKZ0001I: Application api started in <time> seconds.in the logs, you can connect to the API endpoint and the following output confirms that the server is up and running.
[AUDIT ] CWWKF0011I: The defaultServer server is ready to run a smarter planet. The defaultServer server started in <time> seconds. [INFO ] Setting the server's publish address to be / [INFO ] SRVE0242I: [api] [/] [CatalogManagerApi]: Initialization successful.
Invoke z/OS Connect APIs
Procedure
Results
{"employeeNumber":"000010","firstName":"CHRISTINE","middleInitial":"I","lastName":"HAAS","department":"A00","phoneNumber":"3978",
"hireDate":"1965-01-01","job":"PRES ","educationLevel":18,"sex":"F","dateOfBirth":"1933-08-14","salary":52750.0,"bonus":1000.0,"commission":4220.0}
You
successfully invoked a z/OS Connect API deployed to
the z/OS Container Platform. Stopping the container
Procedure
podman stop <container-id>
--rm option. This means that the container is removed when the
container is stopped. If you did not include the --rm option, run the
podman stop <container-id> command, followed by the podman rm
<container-id> command to remove the container.