Before you consider performing the tasks in this topic, confirm if these image streams and templates are already registered in your {product-title} cluster by doing one of the following:
-
Log into the web console and click Add to Project.
-
List them for the openshift project using the CLI:
$ oc get is -n openshift $ oc get templates -n openshift
If the default image streams and templates are ever removed or changed, you can follow this topic to create the default objects yourself. Otherwise, the following instructions are not necessary.
Before you can create the default image streams and templates:
-
The integrated Docker registry service must be deployed in your {product-title} installation.
-
You must be able to run the
oc create
command with cluster-admin privileges, because they operate on the default openshift project. -
Define shell variables for the directories containing image streams and templates. This significantly shortens the commands in the following sections. To do this:
== Creating Image Streams for {product-title} Images
The Instant App and Quickstart templates define a full set of objects for a running application. These include:
-
Build configurations to build the application from source located in a GitHub public repository
-
Deployment configurations to deploy the application image after it is built.
-
Services to provide load balancing for the application pods.
-
Routes to provide external access to the application.
Some of the templates also define a database deployment and service so the application can perform database operations.
Note
|
The templates which define a database use ephemeral storage for the database content. These templates should be used for demonstration purposes only as all database data will be lost if the database pod restarts for any reason. |
Using these templates, users are able to easily instantiate full applications using the various language images provided with {product-title}. They can also customize the template parameters during instantiation so that it builds source from their own repository rather than the sample repository, so this provides a simple starting point for building new applications.
With these artifacts created, developers can now log into the web console and follow the flow for creating from a template. Any of the database or application templates can be selected to create a running database service or application in the current project. Note that some of the application templates define their own database services as well.
The example applications are all built out of GitHub
repositories which are referenced in the templates by default, as seen in the
SOURCE_REPOSITORY_URL
parameter value. Those repositories can be forked, and
the fork can be provided as the SOURCE_REPOSITORY_URL
parameter value when
creating from the templates. This allows developers to experiment with creating
their own applications.
You can direct your developers to the Using the Instant App and Quickstart Templates section in the Developer Guide for these instructions.