Oc new-app: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 6: Line 6:
=Overview=
=Overview=


A tool that generates an appropriate JSON configuration so OpenShift can build an image based on it. The configuration represents resources of an application, maintained inside a [[OpenShift Concepts#Projects|project]].
new-app is a command that generates a JSON/YAML configuration. For more details see {{Internal|OpenShift Application Operations#Overview|Application Operations}}.
 
For more details on projects and applications, see [[OpenShift_Concepts#Projects_and_Applications|Projects and Applications]].
 
The command is a shortcut to configure a project with common resources for a standard development workflow. Source code, images and templates are specified at this stage. The command looks for images on the new local Docker installation, if available, in the Docker registry and the OpenShift image stream.
 
If new-app finds a [[Docker Concepts#Dockerfile|Dockerfile]] in the repository, it uses the "docker" build strategy. Otherwise it uses the "source" strategy. The strategy can be explicitly set with --strategy option.
 
It can also be used to instantiate a stored template:
 
<pre>
oc new-app --template=example-template --param=USERNAME=somevalue
</pre>
 
When new-app is executed, OpenShift tries to do the following:
 
1. Create a [[OpenShift Concepts#Build_Configuration|build configuration]] and build the source into a new version of the application.
 
2. As result of [[OpenShift Concepts#Build_Configuration|build configuration]] configuration execution, a new container image based on the [[OpenShift Concepts#Image_Stream|image stream]] compatible with the source code is created.
 
3. Create a [[OpenShift Concepts#Deployment_Configuration|deployment configuration]] that deploys the new image.
 
4. Deploy a [[OpenShift Concepts#Pod|pod]].
 
5. Configure a [[OpenShift Concepts#Service|service]].
 
6. Optionally, a [[OpenShift Concepts#Route|route]] is create to expose the service externally.

Revision as of 16:59, 21 November 2017

Internal

Overview

new-app is a command that generates a JSON/YAML configuration. For more details see

Application Operations

.