You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: add-registry.md
+9-9
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
copyright:
4
4
years: 2020, 2022
5
-
lastupdated: "2022-01-31"
5
+
lastupdated: "2022-02-02"
6
6
7
7
keywords: registries, container registry, image registry, apikey, API key, access token, images, registry access, service id
8
8
@@ -111,7 +111,7 @@ Now that you created your API key, [save it as registry access](#add-registry-ac
111
111
112
112
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:
113
113
114
-
```sh
114
+
```txt
115
115
ibmcloud iam api-key-create cliapikey -d "My CLI APIkey" --file key_file
116
116
```
117
117
{: pre}
@@ -177,14 +177,14 @@ To add {{site.data.keyword.registryfull_notm}} or Docker Hub access with the CLI
177
177
178
178
For example, the following **`registry create`** command creates registry access to an {{site.data.keyword.registryfull_notm}} instance called `myregistry` that is on the `us.icr.io` registry server:
@@ -264,7 +264,7 @@ To pull images from {{site.data.keyword.registryfull_notm}} in a different accou
264
264
265
265
For example, the following command creates a service ID called `codeengine-myproject-id` with the description `Service ID for IBM Cloud Container Registry in {{site.data.keyword.codeengineshort}} project myproject`:
266
266
267
-
```sh
267
+
```txt
268
268
ibmcloud iam service-id-create codeengine-myproject-id --description "Service ID for IBM Cloud Container Registry in {{site.data.keyword.codeengineshort}} project my proj"
269
269
```
270
270
{: pre}
@@ -273,7 +273,7 @@ To pull images from {{site.data.keyword.registryfull_notm}} in a different accou
273
273
274
274
For example, the following command creates a policy for `codeengine-myproject-id` service ID with the role of `Reader`:
275
275
276
-
```sh
276
+
```txt
277
277
ibmcloud iam service-policy-create codeengine-myproject-id --roles Reader --service-name container-registry
278
278
```
279
279
{: pre}
@@ -292,7 +292,7 @@ To pull images from {{site.data.keyword.registryfull_notm}} in a different accou
292
292
293
293
For example, create a policy for `codeengine-myproject-id` service ID with the role of `Operator`:
294
294
295
-
```sh
295
+
```txt
296
296
ibmcloud iam service-policy-create codeengine-myproject-id --roles Operator --service-name iam-identity
297
297
```
298
298
{: pre}
@@ -311,14 +311,14 @@ To pull images from {{site.data.keyword.registryfull_notm}} in a different accou
311
311
312
312
For example, the following command creates a key called `codeengine-myproject-key` for the `codeengine-myproject-id` service ID with a description of `API key for service ID codeengine-myproject-id for {{site.data.keyword.codeengineshort}} myproject`:
313
313
314
-
```sh
314
+
```txt
315
315
ibmcloud iam service-api-key-create codeengine-myproject-key codeengine-myproject-id --description "API key for service ID codeengine-myproject-id for {{site.data.keyword.codeengineshort}} myproject"
316
316
```
317
317
{: pre}
318
318
319
319
**Example output**
320
320
321
-
```sh
321
+
```txt
322
322
Please preserve the API key! It cannot be retrieved after it's created.
1. Log in into {{site.data.keyword.cloud_notm}} and target a region, account, and resource group.
116
116
117
-
```sh
117
+
```txt
118
118
ibmcloud login target -r REGION -c ACCOUNT_ID -g RESOURCE_GROUP
119
119
```
120
120
{: pre}
121
121
122
122
2. Create your {{site.data.keyword.codeengineshort}} project:
123
123
124
-
```sh
124
+
```txt
125
125
ibmcloud ce project create --name PROJECT
126
126
```
127
127
{: pre}
128
128
129
129
3. Select your {{site.data.keyword.codeengineshort}} project as the current context and append the project to the default Kubernetes configuration file.
130
130
131
-
```sh
131
+
```txt
132
132
ibmcloud ce project select --name PROJECT --kubecfg
Copy file name to clipboardExpand all lines: app-tutorial.md
+22-22
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
copyright:
4
4
years: 2020, 2022
5
-
lastupdated: "2022-01-28"
5
+
lastupdated: "2022-02-02"
6
6
7
7
keywords: app tutorial for code engine, application, apps, images, tutorial for code engine, deploying
8
8
@@ -47,14 +47,14 @@ If you have a container image that you want to use, you can replace the image re
47
47
48
48
1. Create your application by using the [**`ibmcloud ce application create`**](/docs/codeengine?topic=codeengine-cli#cli-application-create) command. In the following example, use `myapp` as the name of the application and specify `icr.io/codeengine/hello` as the image to reference.
49
49
50
-
```sh
50
+
```txt
51
51
ibmcloud ce application create --name myapp --image icr.io/codeengine/hello
52
52
```
53
53
{: pre}
54
54
55
55
**Example output**
56
56
57
-
```sh
57
+
```txt
58
58
Creating application 'myapp'...
59
59
[...]
60
60
Run 'C:\Program Files\IBM\Cloud\bin\ibmcloud.exe ce application get -n myapp' to check the application status.
@@ -65,14 +65,14 @@ If you have a container image that you want to use, you can replace the image re
65
65
66
66
2. Run the [**`ibmcloud ce application get`**](/docs/codeengine?topic=codeengine-cli#cli-application-get) command to display details about the application, including the URL for the `myapp` application.
67
67
68
-
```sh
68
+
```txt
69
69
ibmcloud ce application get -n myapp
70
70
```
71
71
{: pre}
72
72
73
73
**Example output**
74
74
75
-
```sh
75
+
```txt
76
76
Run 'ibmcloud ce application events -n myapp' to get the system events of the application instances.
77
77
Run 'ibmcloud ce application logs -f -n myapp' to follow the logs of the application instances.
78
78
OK
@@ -126,29 +126,29 @@ If you have a container image that you want to use, you can replace the image re
126
126
127
127
3. Obtain the URL of the application from running the **`application get`** command as described in the previous step. To retrieve the URL of the application directly, you can use the `--output` option and specify the URL format on the **`application get`** command. Additionally, you can run the [**`ibmcloud ce application list`**](/docs/codeengine?topic=codeengine-cli#cli-application-list) command to get the application URL.
@@ -161,14 +161,14 @@ You successfully deployed and started a {{site.data.keyword.codeengineshort}} ap
161
161
162
162
1. Update your newly created application by adding an environment variable to return `Hello Stranger` with the [**`ibmcloud ce application update`**](/docs/codeengine?topic=codeengine-cli#cli-application-update) command.
163
163
164
-
```sh
164
+
```txt
165
165
ibmcloud ce application update --name myapp --env TARGET=Stranger
166
166
```
167
167
{: pre}
168
168
169
169
**Example output**
170
170
171
-
```sh
171
+
```txt
172
172
Updating application 'myapp' to latest revision.
173
173
[...]
174
174
Run 'ibmcloud ce application get -n myapp' to check the application status.
@@ -180,14 +180,14 @@ You successfully deployed and started a {{site.data.keyword.codeengineshort}} ap
180
180
181
181
2. Use the **`application get`** command to display details about your app, including the latest revision information.
182
182
183
-
```sh
183
+
```txt
184
184
ibmcloud ce application get --name myapp
185
185
```
186
186
{: pre}
187
187
188
188
**Example output**
189
189
190
-
```sh
190
+
```txt
191
191
Run 'ibmcloud ce application events -n myapp' to get the system events of the application instances.
192
192
Run 'ibmcloud ce application logs -f -n myapp' to follow the logs of the application instances.
193
193
OK
@@ -254,14 +254,14 @@ You successfully deployed and started a {{site.data.keyword.codeengineshort}} ap
2. Run the **`application get`** command to display the status of your application. Notice the value for `Running instances`. In this example, the app has `1` running instance.
287
287
288
-
```sh
288
+
```txt
289
289
ibmcloud ce application get -name myapp
290
290
```
291
291
{: pre}
292
292
293
293
**Example output**
294
294
295
-
```sh
295
+
```txt
296
296
[...]
297
297
298
298
Name: myapp
@@ -344,14 +344,14 @@ The following example illustrates how to scale your application with the CLI. Yo
344
344
345
345
3. Run the **`application get`** command again and notice that the value for `Running instances` scaled to zero. When the application is finished running, the number of running instances automatically scales to zero, if the `--min-scale` option is set to `0`, which is the default value.
Cluster Local URL: http://myapp.4svg40kna19.svc.cluster.local
@@ -404,14 +404,14 @@ The following example illustrates how to scale your application with the CLI. Yo
404
404
405
405
5. Run the **`application get`** command again and notice that the value for `Running instances` scaled from zero and information about the instance is displayed.
0 commit comments