Saving drafts of instances

While you are creating a new instance, you might need to preserve your configuration without having to deploy the instance to your OpenShift cluster. To preserve your configuration, you can save the instance as a draft. The following list shows some reasons why you might want to save a draft:

  • A dependency or prerequisite is not met. For example, your API Product requires an Integration runtime that doesn't exist yet.

  • The environment doesn't yet have the capacity to support the deployment of the instance.

  • You must obtain approval before you can deploy the instance.

  • Your instance might not currently be valid on the OpenShift cluster. For example, the namespace that you specified doesn't exist.

  • You configured most of the instance but need help to complete the rest, perhaps because of some complex configuration. You could add temporary comments in the YAML view for someone else to review then provide assistance.

  • You want to save the instance configuration for CI/CD purposes. You can save a draft instead of copying the YAML code for the instance then saving it in a file.

Procedure

  1. Log in to the Platform UI.

  2. Click Create an instance.

  3. On the Create an instance page, click any of the instance types, then click Next.

  4. Click the template that you want, then click Next.

  5. When you want to save a draft, click the overflow menu (three-dot icon), then click Save as draft.

Results

The configuration for the instance is stored in the Platform UI as a draft.

What to do next

Drafts are shown in the home page of the Platform UI with a status of Draft. You can use the type and status to filter the list of instances to show only drafts. To edit or delete a draft, click the overflow (Options) menu in the row for the draft, then click the option that you want.

You can edit a draft until you are ready to create the instance from it, by clicking Create. After the instance is deployed, you can no longer save that instance as a draft.

You can save a draft as a template, by editing the draft then clicking Share as template.

You can also edit, delete, or list drafts by using the CLI. Because the draft is a store of instance configuration in a Secret object, and not an actual instance, use a command with the following format:

oc <oc-command> secret [--all-namespaces] --field-selector type=integration.ibm.com/draft

The all-namespaces parameter is required only if you installed the operators in All namespaces on the cluster mode.

For example, the following command lists all the drafts in the Platform UI:

oc get secret --field-selector type=integration.ibm.com/draft