Provisioning instances from a created image with REST APIs

After you create an image, you can provision a z/OS® instance that is running on an emulated IBM Z® hardware from the created image.

Procedure

  1. Call the REST API to provision an instance from a created 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.

    • Cloud-ready-image variable

      The cloud-ready-image variable is used to indicate that if you want to create a cloud-ready image during the process of provisioning.

    • 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/zdt-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,"application-uuid":"11111111-aaaa-bbbb-cccc-222222222222"},"zos-creds":{"username":"zosUsername","password":"zosPassword","private-key":"string"},"cloud-ready-image":true}'
    • 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/zdt-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"},"cloud-ready-image":true}'
      
  2. 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}'