$ oc new-app my-stream:v1 

## 2.3.3. Creating an application from a template 

You can create an application from a previously stored template or from a template file, by specifying the name of the template as an argument. For example, you can store a sample application template and use it to create an application. 

Upload an application template to your current project’s template library. The following example uploads an application template from a file called examples/sample-app/application-template-stibuild.json : 

$ oc create -f examples/sample-app/application-template-stibuild.json 

Then create a new application by referencing the application template. In this example, the template name is ruby-helloworld-sample : 

$ oc new-app ruby-helloworld-sample 

To create a new application by referencing a template file in your local file system, without first storing it in OpenShift Container Platform, use the -f|--file  argument. For example: 

$ oc new-app -f examples/sample-app/application-template-stibuild.json 

## 2.3.3.1. Template parameters 

When creating an application based on a template, use the -p|--param  argument to set parameter values that are defined by the template: 

$ oc new-app ruby-helloworld-sample \ -p ADMIN_USERNAME=admin -p ADMIN_PASSWORD=mypassword 

You can store your parameters in a file, then use that file with --param-file  when instantiating a template. If you want to read the parameters from standard input, use --param-file=- . The following is an example file called helloworld.params : 

ADMIN_USERNAME=admin ADMIN_PASSWORD=mypassword 

Reference the parameters in the file when instantiating a template: 

$ oc new-app ruby-helloworld-sample --param-file=helloworld.params 

## 2.3.4. Modifying application creation 

The new-app  command generates OpenShift Container Platform objects that build, deploy, and run the application that is created. Normally, these objects are created in the current project and assigned names that are derived from the input source repositories or the input images. However, with new-app you can modify this behavior. 

Table 2.2. new-app  output objects 

