Skip to content

Commit 91ede8d

Browse files
committed
OSDOCS-17072-batch2
1 parent e0a9066 commit 91ede8d

15 files changed

+330
-100
lines changed

modules/dedicated-logging-in-and-verifying-permissions.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,9 @@ verbs and resources associated with the `dedicated-admins-cluster` and
8080
[source,terminal]
8181
----
8282
$ oc describe clusterrole.rbac dedicated-admins-cluster
83+
----
84+
85+
[source,terminal]
86+
----
8387
$ oc describe clusterrole.rbac dedicated-admins-project
8488
----

modules/developer-cli-odo-installing-odo-on-linux.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,33 @@ The `{odo-title}` CLI is available to download as a binary and as a tarball for
2121
.Procedure
2222

2323
. Navigate to the link:https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/odo/latest/[content gateway] and download the appropriate file for your operating system and architecture.
24+
+
2425
** If you download the binary, rename it to `odo`:
2526
+
2627
[source,terminal]
2728
----
2829
$ curl -L https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/odo/latest/odo-linux-amd64 -o odo
2930
----
31+
+
3032
** If you download the tarball, extract the binary:
3133
+
3234
[source,terminal]
3335
----
3436
$ curl -L https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/odo/latest/odo-linux-amd64.tar.gz -o odo.tar.gz
37+
----
38+
+
39+
[source,terminal]
40+
----
3541
$ tar xvzf odo.tar.gz
3642
----
43+
3744
. Change the permissions on the binary:
3845
+
3946
[source,terminal]
4047
----
4148
$ chmod +x <filename>
4249
----
50+
4351
. Place the `{odo-title}` binary in a directory that is on your `PATH`.
4452
+
4553
To check your `PATH`, execute the following command:
@@ -48,6 +56,7 @@ To check your `PATH`, execute the following command:
4856
----
4957
$ echo $PATH
5058
----
59+
5160
. Verify that `{odo-title}` is now available on your system:
5261
+
5362
[source,terminal]

modules/developer-cli-odo-installing-odo-on-macos.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,33 @@ The `{odo-title}` CLI for macOS is available to download as a binary and as a ta
1818
.Procedure
1919

2020
. Navigate to the link:https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/odo/latest/[content gateway] and download the appropriate file:
21+
+
2122
** If you download the binary, rename it to `odo`:
2223
+
2324
[source,terminal]
2425
----
2526
$ curl -L https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/odo/latest/odo-darwin-amd64 -o odo
2627
----
28+
+
2729
** If you download the tarball, extract the binary:
2830
+
2931
[source,terminal]
3032
----
3133
$ curl -L https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/odo/latest/odo-darwin-amd64.tar.gz -o odo.tar.gz
34+
----
35+
+
36+
[source,terminal]
37+
----
3238
$ tar xvzf odo.tar.gz
3339
----
40+
3441
. Change the permissions on the binary:
3542
+
3643
[source,terminal]
3744
----
3845
# chmod +x odo
3946
----
47+
4048
. Place the `{odo-title}` binary in a directory that is on your `PATH`.
4149
+
4250
To check your `PATH`, execute the following command:
@@ -45,6 +53,7 @@ To check your `PATH`, execute the following command:
4553
----
4654
$ echo $PATH
4755
----
56+
4857
. Verify that `{odo-title}` is now available on your system:
4958
+
5059
[source,terminal]

modules/developer-cli-odo-pushing-the-odo-init-image-to-an-internal-registry-directly.adoc

Lines changed: 60 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,17 @@ $ sudo cp ca.crt /etc/pki/ca-trust/source/anchors/externalroute.crt && sudo upd
6060
[source,terminal]
6161
----
6262
$ oc get route -n openshift-image-registry
63+
----
64+
+
65+
.Example output
66+
[source,terminal]
67+
----
6368
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD
6469
default-route <registry_path> image-registry <all> reencrypt None
65-
70+
----
71+
+
72+
[source,terminal]
73+
----
6674
$ docker login <registry_path> -u kubeadmin -p $(oc whoami -t)
6775
----
6876

@@ -71,9 +79,15 @@ $ docker login <registry_path> -u kubeadmin -p $(oc whoami -t)
7179
[source,terminal]
7280
----
7381
$ docker pull registry.access.redhat.com/openshiftdo/odo-init-image-rhel7:<tag>
74-
82+
----
83+
+
84+
[source,terminal]
85+
----
7586
$ docker tag registry.access.redhat.com/openshiftdo/odo-init-image-rhel7:<tag> <registry_path>/openshiftdo/odo-init-image-rhel7:<tag>
76-
87+
----
88+
+
89+
[source,terminal]
90+
----
7791
$ docker push <registry_path>/openshiftdo/odo-init-image-rhel7:<tag>
7892
----
7993

@@ -84,7 +98,6 @@ $ docker push <registry_path>/openshiftdo/odo-init-image-rhel7:<tag>
8498
$ export ODO_BOOTSTRAPPER_IMAGE=<registry_path>/openshiftdo/odo-init-image-rhel7:1.0.1
8599
----
86100

87-
88101
[id="pushing-the-init-image-directly-on-macos_{context}"]
89102

90103
== Pushing the init image directly on MacOS
@@ -106,7 +119,7 @@ $ oc get secret router-certs-default -n openshift-ingress -o yaml
106119
----
107120
+
108121
.Example output
109-
[source,terminal]
122+
[source,terminal,subs="attributes+"]
110123
----
111124
apiVersion: v1
112125
data:
@@ -137,9 +150,17 @@ $ sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.ke
137150
[source,terminal]
138151
----
139152
$ oc get route -n openshift-image-registry
153+
-----
154+
+
155+
.Example output
156+
[source,terminal]
157+
----
140158
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD
141159
default-route <registry_path> image-registry <all> reencrypt None
142-
160+
----
161+
+
162+
[source,terminal]
163+
----
143164
$ docker login <registry_path> -u kubeadmin -p $(oc whoami -t)
144165
----
145166

@@ -148,9 +169,15 @@ $ docker login <registry_path> -u kubeadmin -p $(oc whoami -t)
148169
[source,terminal]
149170
----
150171
$ docker pull registry.access.redhat.com/openshiftdo/odo-init-image-rhel7:<tag>
151-
172+
----
173+
+
174+
[source,terminal]
175+
----
152176
$ docker tag registry.access.redhat.com/openshiftdo/odo-init-image-rhel7:<tag> <registry_path>/openshiftdo/odo-init-image-rhel7:<tag>
153-
177+
----
178+
+
179+
[source,terminal]
180+
----
154181
$ docker push <registry_path>/openshiftdo/odo-init-image-rhel7:<tag>
155182
----
156183

@@ -170,20 +197,20 @@ $ export ODO_BOOTSTRAPPER_IMAGE=<registry_path>/openshiftdo/odo-init-image-rhel7
170197

171198
. Enable the default route:
172199
+
173-
[source,terminal]
200+
[source,terminal,subs="attributes+"]
174201
----
175202
PS C:\> oc patch configs.imageregistry.operator.openshift.io cluster -p '{"spec":{"defaultRoute":true}}' --type='merge' -n openshift-image-registry
176203
----
177204

178205
. Get a wildcard route CA:
179206
+
180-
[source,terminal]
207+
[source,terminal,subs="attributes+"]
181208
----
182209
PS C:\> oc get secret router-certs-default -n openshift-ingress -o yaml
183210
----
184211
+
185212
.Example output
186-
[source,terminal]
213+
[source,terminal,subs="attributes+"]
187214
----
188215
apiVersion: v1
189216
data:
@@ -197,43 +224,57 @@ type: kubernetes.io/tls
197224

198225
. Use `base64` to encode the root certification authority (CA) content of your mirror registry:
199226
+
200-
[source,terminal]
227+
[source,terminal,subs="attributes+"]
201228
----
202229
PS C:\> echo <tls.crt> | base64 --decode > ca.crt
203230
----
204231

205232
. As an administrator, trust a CA in your client platform by executing the following command:
206233
+
207-
[source,terminal]
234+
[source,terminal,subs="attributes+"]
208235
----
209236
PS C:\WINDOWS\system32> certutil -addstore -f "ROOT" ca.crt
210237
----
211238

212239
. Log in to the {product-registry}:
213240
+
214-
[source,terminal]
241+
[source,terminal,subs="attributes+"]
215242
----
216243
PS C:\> oc get route -n openshift-image-registry
244+
----
245+
+
246+
.Example output
247+
[source,terminal,subs="attributes+"]
248+
----
217249
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD
218250
default-route <registry_path> image-registry <all> reencrypt None
219-
251+
----
252+
+
253+
[source,terminal,subs="attributes+"]
254+
----
220255
PS C:\> docker login <registry_path> -u kubeadmin -p $(oc whoami -t)
221256
----
222257

223258
. Push the `odo` init image:
224259
+
225-
[source,terminal]
260+
[source,terminal,subs="attributes+"]
226261
----
227262
PS C:\> docker pull registry.access.redhat.com/openshiftdo/odo-init-image-rhel7:<tag>
228-
263+
----
264+
+
265+
[source,terminal,subs="attributes+"]
266+
----
229267
PS C:\> docker tag registry.access.redhat.com/openshiftdo/odo-init-image-rhel7:<tag> <registry_path>/openshiftdo/odo-init-image-rhel7:<tag>
230-
268+
----
269+
+
270+
[source,terminal,subs="attributes+"]
271+
----
231272
PS C:\> docker push <registry_path>/openshiftdo/odo-init-image-rhel7:<tag>
232273
----
233274

234275
. Override the default `odo` init image path by setting the `ODO_BOOTSTRAPPER_IMAGE` environment variable:
235276
+
236-
[source,terminal]
277+
[source,terminal,subs="attributes+"]
237278
----
238279
PS C:\> $env:ODO_BOOTSTRAPPER_IMAGE="<registry_path>/openshiftdo/odo-init-image-rhel7:<tag>"
239280
----

modules/developer-cli-odo-ref-link.adoc

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ The correct path for the URL would be \http://8080-tcp.192.168.39.112.nip.io/api
121121
+
122122
[source,terminal]
123123
----
124-
$ odo describe
124+
$ odo describe
125125
----
126126
+
127127
.Example output
@@ -183,12 +183,11 @@ Linked Services:
183183
+
184184
Some of these variables are used in the backend component's `src/main/resources/application.properties` file so that the Java Spring Boot application can connect to the PostgreSQL database service.
185185

186-
. Lastly, `odo` has created a directory called `kubernetes/` in your backend component's directory that contains the following files:
186+
. Lastly, `odo` has created a directory called `kubernetes/` in your backend component's directory that contains the `odo-service-backend-postgrescluster-hippo.yaml` and `odo-service-hippo.yaml` files:
187187
+
188188
[source,terminal]
189189
----
190190
$ ls kubernetes
191-
odo-service-backend-postgrescluster-hippo.yaml odo-service-hippo.yaml
192191
----
193192
+
194193
These files contain the information (YAML manifests) for two resources:
@@ -215,12 +214,11 @@ $ odo unlink PostgresCluster/hippo
215214
To apply the changes, please use `odo push`
216215
----
217216

218-
To unlink them on the cluster, run `odo push`. Now if you inspect the `kubernetes/` directory, you see only one file:
217+
To unlink them on the cluster, run `odo push`. Now if you inspect the `kubernetes/` directory, you see only one file, such as `odo-service-hippo.yaml`:
219218

220219
[source,terminal]
221220
----
222221
$ ls kubernetes
223-
odo-service-hippo.yaml
224222
----
225223

226224
Next, use the `--inlined` flag to create a link:
@@ -338,6 +336,10 @@ Unlink the service from the component using:
338336
[source,terminal]
339337
----
340338
$ odo unlink PostgresCluster/hippo
339+
----
340+
341+
[source,terminal]
342+
----
341343
$ odo push
342344
----
343345

@@ -350,14 +352,22 @@ By default, `odo` creates the manifest file under the `kubernetes/` directory, f
350352
[source,terminal]
351353
----
352354
$ odo link PostgresCluster/hippo --bind-as-files
355+
----
356+
357+
[source,terminal]
358+
----
353359
$ odo push
354360
----
355361

356362
.Example `odo describe` output
357363
[source,terminal]
358364
----
359365
$ odo describe
366+
----
360367

368+
.Example output
369+
[source,terminal]
370+
----
361371
Component Name: backend
362372
Type: spring
363373
Environment Variables:
@@ -461,21 +471,19 @@ When you pass custom bindings while linking the backend component with the Postg
461471
[source,terminal]
462472
----
463473
$ odo link PostgresCluster/hippo --map pgVersion='{{ .hippo.spec.postgresVersion }}' --map pgImage='{{ .hippo.spec.image }}' --bind-as-files
464-
$ odo push
465474
----
466475

467-
These custom bindings get mounted as files instead of being injected as environment variables. To validate that this worked, run the following command:
468-
469-
.Example command
470476
[source,terminal]
471477
----
472-
$ odo exec -- cat /bindings/backend-postgrescluster-hippo/pgVersion
478+
$ odo push
473479
----
474480

475-
.Example output
481+
These custom bindings get mounted as files instead of being injected as environment variables. To validate that this worked, run the following command. Example output would be `13`.
482+
483+
.Example command
476484
[source,terminal]
477485
----
478-
13
486+
$ odo exec -- cat /bindings/backend-postgrescluster-hippo/pgVersion
479487
----
480488

481489
.Example command

0 commit comments

Comments
 (0)