Skip to content

Commit ab4170d

Browse files
committed
Frances Overby: Merge pull request #1302 from coligo/fmo-upd-20July21-a
1 parent 169cc10 commit ab4170d

10 files changed

+1386
-26
lines changed

Diff for: appdeploy-access.md

+194
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
---
2+
3+
copyright:
4+
years: 2020, 2021
5+
lastupdated: "2021-07-20"
6+
7+
keywords: applications in code engine, apps in code engine, http requests in code engine, deploy apps in code engine, app workloads in code engine, deploying workloads in code engine, application, app, memory, cpu, environment variables
8+
9+
subcollection: codeengine
10+
11+
---
12+
13+
{:DomainName: data-hd-keyref="APPDomain"}
14+
{:DomainName: data-hd-keyref="DomainName"}
15+
{:android: data-hd-operatingsystem="android"}
16+
{:api: .ph data-hd-interface='api'}
17+
{:apikey: data-credential-placeholder='apikey'}
18+
{:app_key: data-hd-keyref="app_key"}
19+
{:app_name: data-hd-keyref="app_name"}
20+
{:app_secret: data-hd-keyref="app_secret"}
21+
{:app_url: data-hd-keyref="app_url"}
22+
{:authenticated-content: .authenticated-content}
23+
{:beta: .beta}
24+
{:c#: data-hd-programlang="c#"}
25+
{:cli: .ph data-hd-interface='cli'}
26+
{:codeblock: .codeblock}
27+
{:curl: .ph data-hd-programlang='curl'}
28+
{:deprecated: .deprecated}
29+
{:dotnet-standard: .ph data-hd-programlang='dotnet-standard'}
30+
{:download: .download}
31+
{:external: target="_blank" .external}
32+
{:faq: data-hd-content-type='faq'}
33+
{:fuzzybunny: .ph data-hd-programlang='fuzzybunny'}
34+
{:generic: data-hd-operatingsystem="generic"}
35+
{:generic: data-hd-programlang="generic"}
36+
{:gif: data-image-type='gif'}
37+
{:go: .ph data-hd-programlang='go'}
38+
{:help: data-hd-content-type='help'}
39+
{:hide-dashboard: .hide-dashboard}
40+
{:hide-in-docs: .hide-in-docs}
41+
{:important: .important}
42+
{:ios: data-hd-operatingsystem="ios"}
43+
{:java: .ph data-hd-programlang='java'}
44+
{:java: data-hd-programlang="java"}
45+
{:javascript: .ph data-hd-programlang='javascript'}
46+
{:javascript: data-hd-programlang="javascript"}
47+
{:new_window: target="_blank"}
48+
{:note .note}
49+
{:note: .note}
50+
{:objectc data-hd-programlang="objectc"}
51+
{:org_name: data-hd-keyref="org_name"}
52+
{:php: data-hd-programlang="php"}
53+
{:pre: .pre}
54+
{:preview: .preview}
55+
{:python: .ph data-hd-programlang='python'}
56+
{:python: data-hd-programlang="python"}
57+
{:route: data-hd-keyref="route"}
58+
{:row-headers: .row-headers}
59+
{:ruby: .ph data-hd-programlang='ruby'}
60+
{:ruby: data-hd-programlang="ruby"}
61+
{:runtime: architecture="runtime"}
62+
{:runtimeIcon: .runtimeIcon}
63+
{:runtimeIconList: .runtimeIconList}
64+
{:runtimeLink: .runtimeLink}
65+
{:runtimeTitle: .runtimeTitle}
66+
{:screen: .screen}
67+
{:script: data-hd-video='script'}
68+
{:service: architecture="service"}
69+
{:service_instance_name: data-hd-keyref="service_instance_name"}
70+
{:service_name: data-hd-keyref="service_name"}
71+
{:shortdesc: .shortdesc}
72+
{:space_name: data-hd-keyref="space_name"}
73+
{:step: data-tutorial-type='step'}
74+
{:subsection: outputclass="subsection"}
75+
{:support: data-reuse='support'}
76+
{:swift: .ph data-hd-programlang='swift'}
77+
{:swift: data-hd-programlang="swift"}
78+
{:table: .aria-labeledby="caption"}
79+
{:term: .term}
80+
{:terraform: .ph data-hd-interface='terraform'}
81+
{:tip: .tip}
82+
{:tooling-url: data-tooling-url-placeholder='tooling-url'}
83+
{:troubleshoot: data-hd-content-type='troubleshoot'}
84+
{:tsCauses: .tsCauses}
85+
{:tsResolve: .tsResolve}
86+
{:tsSymptoms: .tsSymptoms}
87+
{:tutorial: data-hd-content-type='tutorial'}
88+
{:ui: .ph data-hd-interface='ui'}
89+
{:unity: .ph data-hd-programlang='unity'}
90+
{:url: data-credential-placeholder='url'}
91+
{:user_ID: data-hd-keyref="user_ID"}
92+
{:vbnet: .ph data-hd-programlang='vb.net'}
93+
{:video: .video}
94+
95+
96+
# Access the app
97+
{: #access-service}
98+
99+
After your app deploys, you can access it through a URL.
100+
{: shortdesc}
101+
102+
From the console, your application URL is available from the components page and on the application details page.
103+
104+
From the CLI, run the [**`ibmcloud ce app get`**](/docs/codeengine?topic=codeengine-cli#cli-application-get) command to find the URL of your app. To have the command output only the URL of the app, specify the `--output url` option with the **`app get`** command.
105+
106+
## Access details about your app
107+
{: #access-app-details}
108+
109+
Find details about your app from the console or with the CLI.
110+
{: shortdesc}
111+
112+
{{site.data.keyword.codeengineshort}} has quotas for apps and revisions of the apps within a project and app limits, such as memory and CPU. For more information about {{site.data.keyword.codeengineshort}} limits, see [Limits and quotas for {{site.data.keyword.codeengineshort}}](/docs/codeengine?topic=codeengine-limits).
113+
{: important}
114+
115+
### Accessing app details from the console
116+
{: #access-appdetails-ui}
117+
118+
Details about your app are available in the console from the app page by clicking the name of your app from the list of applications within your project.
119+
120+
### Accessing app details with the CLI
121+
{: #access-appdetails-cli}
122+
123+
To view details of your app with the CLI, use the **`app get`** command. For a complete listing of options, see the [**`ibmcloud ce app get`**](/docs/codeengine?topic=codeengine-cli#cli-application-get) command.
124+
{: shortdesc}
125+
126+
For example, the following **`app get`** command displays details about the `myapp` app.
127+
128+
```
129+
ibmcloud ce app get --name myapp
130+
```
131+
{: pre}
132+
133+
**Example output**
134+
135+
```
136+
Getting job 'myjob'...
137+
OK
138+
139+
Name: myjob
140+
ID: abcdefgh-abcd-abcd-abcd-1a2b3c4d5e6f
141+
Project Name: myproject
142+
Project ID: 01234567-abcd-abcd-abcd-abcdabcd1111
143+
Age: 2m4s
144+
Created: 2021-02-17T15:41:12-05:00
145+
146+
Image: docker.io/ibmcom/hello
147+
Resource Allocation:
148+
CPU: 1
149+
Ephemeral Storage: 500Mi
150+
Memory: 4G
151+
152+
Revisions:
153+
myapp-00001:
154+
Age: 100s
155+
Latest: true
156+
Traffic: 100%
157+
Image: docker.io/ibmcom/hello (pinned to d6fd55)
158+
Running Instances: 1
159+
160+
Runtime:
161+
Concurrency: 100
162+
Maximum Scale: 10
163+
Minimum Scale: 0
164+
Timeout: 300
165+
166+
Conditions:
167+
Type OK Age Reason
168+
ConfigurationsReady true 86s
169+
Ready true 60s
170+
RoutesReady true 60s
171+
172+
Events:
173+
Type Reason Age Source Messages
174+
Normal Created 102s service-controller Created Configuration "myapp"
175+
Normal Created 102s service-controller Created Route "myapp"
176+
177+
Instances:
178+
Name Revision Running Status Restarts Age
179+
myapp-00001-deployment-699c45ddd-c25rm myapp-00001 1/2 Terminating 0 102s
180+
```
181+
{: screen}
182+
183+
## Application status
184+
{: #app-status}
185+
186+
The following table shows the possible status that your application might have.
187+
188+
| Status | Description |
189+
| ------ | ------------|
190+
| Deploying | The application is deploying. Deployment time includes the time before the app is scheduled as well as time to download images over the network, which can take a while. |
191+
| Ready | The application is deployed and ready to use. |
192+
| Ready (with warnings) | The deployment of a new application revision failed, but the original deployment is available. |
193+
| Failed | The application deployment terminated, and at least one instance terminated in failure. The instance either exited with nonzero status or was terminated by the system.
194+
| Unknown | For some reason, the state of the application cannot not be obtained, typically due to an error in communicating with the host. |

Diff for: appdeploy-cr.md

+185
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
---
2+
3+
copyright:
4+
years: 2020, 2021
5+
lastupdated: "2021-07-20"
6+
7+
keywords: applications in code engine, apps in code engine, http requests in code engine, deploy apps in code engine, app workloads in code engine, deploying workloads in code engine, application, app, memory, cpu, environment variables
8+
9+
subcollection: codeengine
10+
11+
---
12+
13+
{:DomainName: data-hd-keyref="APPDomain"}
14+
{:DomainName: data-hd-keyref="DomainName"}
15+
{:android: data-hd-operatingsystem="android"}
16+
{:api: .ph data-hd-interface='api'}
17+
{:apikey: data-credential-placeholder='apikey'}
18+
{:app_key: data-hd-keyref="app_key"}
19+
{:app_name: data-hd-keyref="app_name"}
20+
{:app_secret: data-hd-keyref="app_secret"}
21+
{:app_url: data-hd-keyref="app_url"}
22+
{:authenticated-content: .authenticated-content}
23+
{:beta: .beta}
24+
{:c#: data-hd-programlang="c#"}
25+
{:cli: .ph data-hd-interface='cli'}
26+
{:codeblock: .codeblock}
27+
{:curl: .ph data-hd-programlang='curl'}
28+
{:deprecated: .deprecated}
29+
{:dotnet-standard: .ph data-hd-programlang='dotnet-standard'}
30+
{:download: .download}
31+
{:external: target="_blank" .external}
32+
{:faq: data-hd-content-type='faq'}
33+
{:fuzzybunny: .ph data-hd-programlang='fuzzybunny'}
34+
{:generic: data-hd-operatingsystem="generic"}
35+
{:generic: data-hd-programlang="generic"}
36+
{:gif: data-image-type='gif'}
37+
{:go: .ph data-hd-programlang='go'}
38+
{:help: data-hd-content-type='help'}
39+
{:hide-dashboard: .hide-dashboard}
40+
{:hide-in-docs: .hide-in-docs}
41+
{:important: .important}
42+
{:ios: data-hd-operatingsystem="ios"}
43+
{:java: .ph data-hd-programlang='java'}
44+
{:java: data-hd-programlang="java"}
45+
{:javascript: .ph data-hd-programlang='javascript'}
46+
{:javascript: data-hd-programlang="javascript"}
47+
{:new_window: target="_blank"}
48+
{:note .note}
49+
{:note: .note}
50+
{:objectc data-hd-programlang="objectc"}
51+
{:org_name: data-hd-keyref="org_name"}
52+
{:php: data-hd-programlang="php"}
53+
{:pre: .pre}
54+
{:preview: .preview}
55+
{:python: .ph data-hd-programlang='python'}
56+
{:python: data-hd-programlang="python"}
57+
{:route: data-hd-keyref="route"}
58+
{:row-headers: .row-headers}
59+
{:ruby: .ph data-hd-programlang='ruby'}
60+
{:ruby: data-hd-programlang="ruby"}
61+
{:runtime: architecture="runtime"}
62+
{:runtimeIcon: .runtimeIcon}
63+
{:runtimeIconList: .runtimeIconList}
64+
{:runtimeLink: .runtimeLink}
65+
{:runtimeTitle: .runtimeTitle}
66+
{:screen: .screen}
67+
{:script: data-hd-video='script'}
68+
{:service: architecture="service"}
69+
{:service_instance_name: data-hd-keyref="service_instance_name"}
70+
{:service_name: data-hd-keyref="service_name"}
71+
{:shortdesc: .shortdesc}
72+
{:space_name: data-hd-keyref="space_name"}
73+
{:step: data-tutorial-type='step'}
74+
{:subsection: outputclass="subsection"}
75+
{:support: data-reuse='support'}
76+
{:swift: .ph data-hd-programlang='swift'}
77+
{:swift: data-hd-programlang="swift"}
78+
{:table: .aria-labeledby="caption"}
79+
{:term: .term}
80+
{:terraform: .ph data-hd-interface='terraform'}
81+
{:tip: .tip}
82+
{:tooling-url: data-tooling-url-placeholder='tooling-url'}
83+
{:troubleshoot: data-hd-content-type='troubleshoot'}
84+
{:tsCauses: .tsCauses}
85+
{:tsResolve: .tsResolve}
86+
{:tsSymptoms: .tsSymptoms}
87+
{:tutorial: data-hd-content-type='tutorial'}
88+
{:ui: .ph data-hd-interface='ui'}
89+
{:unity: .ph data-hd-programlang='unity'}
90+
{:url: data-credential-placeholder='url'}
91+
{:user_ID: data-hd-keyref="user_ID"}
92+
{:vbnet: .ph data-hd-programlang='vb.net'}
93+
{:video: .video}
94+
95+
96+
# Deploy application workloads from images in {{site.data.keyword.registryshort}}
97+
{: #deploy-app-crimage}
98+
99+
Deploy your app with {{site.data.keyword.codeengineshort}} that uses an image in {{site.data.keyword.registryshort}}. You can create an app from the console or with the CLI.
100+
{: shortdesc}
101+
102+
**Before you begin**
103+
104+
- You must have an image in {{site.data.keyword.registryshort}}. For more information, see [Getting started with {{site.data.keyword.registryshort}}](/docs/Registry?topic=Registry-getting-started#getting-started). Or, you can [build one from source](#deploy-app-source-code).
105+
106+
## Deploying an app that references an image in {{site.data.keyword.registryshort}} with the console
107+
{: #deploy-app-crimage-console}
108+
109+
Deploy an application that uses an image in a container registry by using the {{site.data.keyword.codeengineshort}} console.
110+
{: shortdesc}
111+
112+
{{site.data.keyword.codeengineshort}} can automatically pull images from a {{site.data.keyword.registryshort}} namespace in your account. To pull images from a different {{site.data.keyword.registryshort}} account or from a private DockerHub account, see [Deploy application workloads from images in a private registry](#deploy-app-private-console).
113+
114+
1. Open the [{{site.data.keyword.codeengineshort}}](https://cloud.ibm.com/codeengine/overview){: external} console.
115+
2. Select **Start creating** from **Run a container image**.
116+
3. Select **Application**.
117+
4. Enter a name for the application; for example, `helloapp`. Use a name for your application that is unique within the project.
118+
5. Select a project from the list of available projects. You can also [create a new one](/docs/codeengine?topic=codeengine-manage-project#create-a-project). You must have a selected project to deploy an app.
119+
6. Select **Container image** and click **Configure image**.
120+
7. Select a container registry location, such as `IBM Registry, Dallas`.
121+
8. Select `Automatic` for **Registry access**.
122+
9. Select the namespace and name of the image in the registry for the {{site.data.keyword.codeengineshort}} app to reference. For example, select `mynamespace` and select the image `hello_repo` in that namespace.
123+
10. Select a value for **Tag**; for example, `latest`.
124+
11. Click **Done**.
125+
12. Modify any runtime settings or environment variables for your app. For more information about these options, see [Options for deploying an app](#deploy-app-options).
126+
13. From the Create application page, click **Create**.
127+
14. After the application status changes to **Ready**, you can test the application by clicking **Send request**. To open the application in a web page, click **Open application URL**.
128+
129+
If you want to add registry access to a {{site.data.keyword.registryshort}} instance that is not in your account, see [Adding access to a {{site.data.keyword.registryshort}}](/docs/codeengine?topic=codeengine-add-registry).
130+
131+
Looking for more code examples? Check out the [Samples for {{site.data.keyword.codeenginefull_notm}} GitHub repo](https://github.com/IBM/CodeEngine){: external}.
132+
{: tip}
133+
134+
## Deploying an app with an image in {{site.data.keyword.registryshort}} with the CLI
135+
{: #deploy-app-crimage-cli}
136+
137+
Deploy an application that uses an image in a container registry with the CLI with the **`ibmcloud ce app create`** command.
138+
{: shortdesc}
139+
140+
Before you can work with a {{site.data.keyword.codeengineshort}} application that references an image in {{site.data.keyword.registryshort}}, you must first add access to the registry, pull the image, and then deploy it.
141+
142+
1. To add access to {{site.data.keyword.registryshort_notm}}, [create an IAM API key](/docs/codeengine?topic=codeengine-add-registry#images-your-account-api-key). To create an {{site.data.keyword.cloud_notm}} IAM API key with the CLI, run the [**`iam api-key-create`**](/docs/account?topic=cli-ibmcloud_commands_iam#ibmcloud_iam_api_key_create) command. For example, to create an API key called `cliapikey` with a description of "My CLI APIkey" and save it to a file called `key_file`, run the following command:
143+
144+
```
145+
ibmcloud iam api-key-create cliapikey -d "My CLI APIkey" --file key_file
146+
```
147+
{: pre}
148+
149+
If you choose to not save your key to a file, you must record the apikey that is displayed when you create it. You cannot retrieve it later.
150+
{: important}
151+
152+
2. After you create your API key, add registry access to {{site.data.keyword.codeengineshort}}. To add access to {{site.data.keyword.registryshort}} with the CLI, use the [**`ibmcloud ce registry create`**](/docs/codeengine?topic=codeengine-cli#cli-registry-create) command to create an image registry access secret. For example, the following **`registry create`** command creates registry access to a {{site.data.keyword.registryshort}} instance called `myregistry`. Note, even though the `--server` and `--username` options are specified in the example command, the default value for the `--server` option is `us.icr.io` and the `--username` option defaults to `iamapikey` when the server is `us.icr.io`.
153+
154+
```
155+
ibmcloud ce registry create --name myregistry --server us.icr.io --username iamapikey --password APIKEY
156+
```
157+
{: pre}
158+
159+
**Example output**
160+
161+
```
162+
Creating image registry access secret 'myregistry'...
163+
OK
164+
```
165+
{: screen}
166+
167+
3. Create your app and reference the `hello_repo` image in {{site.data.keyword.registryshort}}. For example, use the [**`ibmcloud ce app create`**](/docs/codeengine?topic=codeengine-cli#cli-application-create) command to create the `myhelloapp` app to reference the `us.icr.io/mynamespace/hello_repo` by using the `myregistry` access information.
168+
169+
```
170+
ibmcloud ce app create --name myhelloapp --image us.icr.io/mynamespace/hello_repo --registry-secret myregistry
171+
```
172+
{: pre}
173+
174+
The format of the name of the image for this application is `REGISTRY/NAMESPACE/REPOSITORY:TAG` where `REGISTRY` and `TAG` are optional. If `REGISTRY` is not specified, the default is `docker.io`. If `TAG` is not specified, the default is `latest`.
175+
{: important}
176+
177+
4. After your app deploys, you can access the app. To obtain the URL of your app, run `ibmcloud ce app get --name myhelloapp --output url`. When you curl the `myhelloapp` app, `Hello World` is returned.
178+
179+
```
180+
curl https://myhelloapp.abcdabcdhye.us-south.codeengine.appdomain.cloud
181+
```
182+
{: pre}
183+
184+
Looking for more code examples? Check out the [Samples for {{site.data.keyword.codeenginefull_notm}} GitHub repo](https://github.com/IBM/CodeEngine){: external}.
185+
{: tip}

0 commit comments

Comments
 (0)