Does Openshift Origin 1.1 REST API allow to create new applications based on templates?

We are developing a custom console to manage development environments. We have several application templates preloaded in openshift, and whenever a developer wants to create a new environment, we would need to tell openshift (via REST API) to create a new application based on one of those templates (oc new-app template).

I can't find anything in the REST API specification. Is there any alternative way to do this?

Thanks

Upvotes: 2

Views: 457

Answers (1)

Clayton
Clayton

Reputation: 3326

There is no single API that today creates all of that in one go. The reason is that the create flow is intended to span multiple disjoint API servers (today, Kube and OpenShift resources can be created at once, and in the future, individual Kube extensions). We wanted to preserve the possibility that a client was authenticated to each individual API group. However, it makes it harder to write easy clients like this, so it is something we plan on adding.

Today the flow from the CLI and WebUI is:

  • Fetch the template
  • Invoke the POST /processedtemplates endpoint
  • For each "object" returned invoke the right create call.

Upvotes: 1

Related Questions