Provisioning instances from a cloud-ready image with REST APIs
After a cloud-ready image is created, you can provision a z/OS® instance that is running on an emulated IBM Z® hardware from the cloud-ready image.
Procedure
- Call the REST API to provision an instance from a cloud-ready image to a Red Hat®
OpenShift® environment. Note:
- General variables
If the resume is set to false, the parameters application-uuid, and target-uuid are the required. The parameter provision-uuid is mandatory only if resume is set to true. Otherwise, the parameter is optional.
- pvc-name variable
The pvc-name variable indicates that the name of the Persistent Volume Claim that represents the cloud-ready image.
- To create a new provisioning to a Red Hat
OpenShift environment, run the following
command.
curl -X POST 'https://your_tools_server_host_name:9443/ZDTREST/zdtrs/provision-services/v1/openshift/cr-image' -H 'accept: application/json;charset=utf-8' -H 'Content-Type: application/json;charset=utf-8' -d '{"emulator":{"cp":3,"ram":4000,"ziip":0},"ipl":{"device-address":"a80","iodf-address":"0a82","load-suffix":"au"},"general":{"label":"string","description":"string","target-uuid":"11111111-aaaa-bbbb-cccc-222222222222","resume":false},"zos-creds":{"username":"zosUsername","password":"zosPassword","private-key":"string"},"pvc-name":"name_of_cloud_ready_image_pvc"}'
- To resume a failed provisioning to a Red Hat
OpenShift environment, run the following
command.
curl -X POST 'https://your_tools_server_host_name:9443/ZDTREST/zdtrs/provision-services/v1/openshift/cr-image' -H 'accept: application/json;charset=utf-8' -H 'Content-Type: application/json;charset=utf-8' -d '{"emulator":{"cp":3,"ram":4000,"ziip":0},"ipl":{"device-address":"a80","iodf-address":"0a82","load-suffix":"au"},"general":{"provision-uuid":"11111111-aaaa-bbbb-cccc-222222222222","resume":true},"zos-creds":{"username":"zosUsername","password":"zosPassword","private-key":"string"},"pvc-name":"name_of_cloud_ready_image_pvc"}'
- General variables
- After you provision an instance to a Red Hat
OpenShift environment, run the following command to
monitor the provisioning progress.
curl -k -u zdtadmin:password -X GET --header 'Content-Type: application/json' --header 'Accept: application/json' 'https://your_tools_server_host_name:9443/ZDTREST/zdtrs/monitor-services/v1/provision-status/{provision-uuid}'