forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoc-new-app.1
258 lines (185 loc) · 7.78 KB
/
oc-new-app.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
.TH "OC" "1" " Openshift CLI User Manuals" "Openshift" "June 2016" ""
.SH NAME
.PP
oc new\-app \- Create a new application
.SH SYNOPSIS
.PP
\fBoc new\-app\fP [OPTIONS]
.SH DESCRIPTION
.PP
Create a new application by specifying source code, templates, and/or images
.PP
This command will try to build up the components of an application using images, templates, or code that has a public repository. It will lookup the images on the local Docker installation (if available), a Docker registry, an integrated image stream, or stored templates.
.PP
If you specify a source code URL, it will set up a build that takes your source code and converts it into an image that can run inside of a pod. Local source must be in a git repository that has a remote repository that the server can see. The images will be deployed via a deployment configuration, and a service will be connected to the first public port of the app. You may either specify components using the various existing flags or let new\-app autodetect what kind of components you have provided.
.PP
If you provide source code, a new build will be automatically triggered. You can use 'oc status' to check the progress.
.SH OPTIONS
.PP
\fB\-\-allow\-missing\-images\fP=false
If true, indicates that referenced Docker images that cannot be found locally or in a registry should still be used.
.PP
\fB\-\-allow\-missing\-imagestream\-tags\fP=false
If true, indicates that image stream tags that don't exist should still be used.
.PP
\fB\-\-as\-test\fP=false
If true create this application as a test deployment, which validates that the deployment succeeds and then scales down.
.PP
\fB\-\-code\fP=[]
Source code to use to build this application.
.PP
\fB\-\-context\-dir\fP=""
Context directory to be used for the build.
.PP
\fB\-\-docker\-image\fP=[]
Name of a Docker image to include in the app.
.PP
\fB\-\-dry\-run\fP=false
If true, show the result of the operation without performing it.
.PP
\fB\-e\fP, \fB\-\-env\fP=[]
Specify a key\-value pair for an environment variable to set into each container.
.PP
\fB\-\-env\-file\fP=[]
File containing key\-value pairs of environment variables to set into each container.
.PP
\fB\-f\fP, \fB\-\-file\fP=[]
Path to a template file to use for the app.
.PP
\fB\-\-grant\-install\-rights\fP=false
If true, a component that requires access to your account may use your token to install software into your project. Only grant images you trust the right to run with your token.
.PP
\fB\-\-group\fP=[]
Indicate components that should be grouped together as <comp1>+<comp2>.
.PP
\fB\-\-image\fP=[]
Name of an image stream to use in the app. (deprecated)
.PP
\fB\-i\fP, \fB\-\-image\-stream\fP=[]
Name of an image stream to use in the app.
.PP
\fB\-\-insecure\-registry\fP=false
If true, indicates that the referenced Docker images are on insecure registries and should bypass certificate checking
.PP
\fB\-l\fP, \fB\-\-labels\fP=""
Label to set in all resources for this application.
.PP
\fB\-L\fP, \fB\-\-list\fP=false
List all local templates and image streams that can be used to create.
.PP
\fB\-\-name\fP=""
Set name to use for generated application artifacts
.PP
\fB\-\-no\-install\fP=false
Do not attempt to run images that describe themselves as being installable
.PP
\fB\-o\fP, \fB\-\-output\fP=""
Output results as yaml or json instead of executing, or use name for succint output (resource/name).
.PP
\fB\-\-output\-version\fP=""
The preferred API versions of the output objects
.PP
\fB\-p\fP, \fB\-\-param\fP=[]
Specify a key\-value pair (e.g., \-p FOO=BAR) to set/override a parameter value in the template.
.PP
\fB\-\-param\-file\fP=[]
File containing parameter values to set/override in the template.
.PP
\fB\-S\fP, \fB\-\-search\fP=false
Search all templates, image streams, and Docker images that match the arguments provided.
.PP
\fB\-\-strategy\fP=
Specify the build strategy to use if you don't want to detect (docker|pipeline|source).
.PP
\fB\-\-template\fP=[]
Name of a stored template to use in the app.
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP
\fB\-\-api\-version\fP=""
DEPRECATED: The API version to use when talking to the server
.PP
\fB\-\-as\fP=""
Username to impersonate for the operation
.PP
\fB\-\-certificate\-authority\fP=""
Path to a cert. file for the certificate authority
.PP
\fB\-\-client\-certificate\fP=""
Path to a client certificate file for TLS
.PP
\fB\-\-client\-key\fP=""
Path to a client key file for TLS
.PP
\fB\-\-cluster\fP=""
The name of the kubeconfig cluster to use
.PP
\fB\-\-config\fP=""
Path to the config file to use for CLI requests.
.PP
\fB\-\-context\fP=""
The name of the kubeconfig context to use
.PP
\fB\-\-google\-json\-key\fP=""
The Google Cloud Platform Service Account JSON Key to use for authentication.
.PP
\fB\-\-insecure\-skip\-tls\-verify\fP=false
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
.PP
\fB\-\-log\-flush\-frequency\fP=0
Maximum number of seconds between log flushes
.PP
\fB\-\-match\-server\-version\fP=false
Require server version to match client version
.PP
\fB\-n\fP, \fB\-\-namespace\fP=""
If present, the namespace scope for this CLI request
.PP
\fB\-\-request\-timeout\fP="0"
The length of time to wait before giving up on a single server request. Non\-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests.
.PP
\fB\-\-server\fP=""
The address and port of the Kubernetes API server
.PP
\fB\-\-token\fP=""
Bearer token for authentication to the API server
.PP
\fB\-\-user\fP=""
The name of the kubeconfig user to use
.SH EXAMPLE
.PP
.RS
.nf
# List all local templates and image streams that can be used to create an app
oc new\-app \-\-list
# Create an application based on the source code in the current git repository (with a public remote)
# and a Docker image
oc new\-app . \-\-docker\-image=repo/langimage
# Create a Ruby application based on the provided [image]\~[source code] combination
oc new\-app centos/ruby\-22\-centos7\~https://github.com/openshift/ruby\-ex.git
# Use the public Docker Hub MySQL image to create an app. Generated artifacts will be labeled with db=mysql
oc new\-app mysql MYSQL\_USER=user MYSQL\_PASSWORD=pass MYSQL\_DATABASE=testdb \-l db=mysql
# Use a MySQL image in a private registry to create an app and override application artifacts' names
oc new\-app \-\-docker\-image=myregistry.com/mycompany/mysql \-\-name=private
# Create an application from a remote repository using its beta4 branch
oc new\-app https://github.com/openshift/ruby\-hello\-world#beta4
# Create an application based on a stored template, explicitly setting a parameter value
oc new\-app \-\-template=ruby\-helloworld\-sample \-\-param=MYSQL\_USER=admin
# Create an application from a remote repository and specify a context directory
oc new\-app https://github.com/youruser/yourgitrepo \-\-context\-dir=src/build
# Create an application based on a template file, explicitly setting a parameter value
oc new\-app \-\-file=./example/myapp/template.json \-\-param=MYSQL\_USER=admin
# Search all templates, image streams, and Docker images for the ones that match "ruby"
oc new\-app \-\-search ruby
# Search for "ruby", but only in stored templates (\-\-template, \-\-image\-stream and \-\-docker\-image
# can be used to filter search results)
oc new\-app \-\-search \-\-template=ruby
# Search for "ruby" in stored templates and print the output as an YAML
oc new\-app \-\-search \-\-template=ruby \-\-output=yaml
.fi
.RE
.SH SEE ALSO
.PP
\fBoc(1)\fP,
.SH HISTORY
.PP
June 2016, Ported from the Kubernetes man\-doc generator