Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions modules/dedicated-logging-in-and-verifying-permissions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,9 @@ verbs and resources associated with the `dedicated-admins-cluster` and
[source,terminal]
----
$ oc describe clusterrole.rbac dedicated-admins-cluster
----

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
+

looks like these are part of the same step

[source,terminal]
----
$ oc describe clusterrole.rbac dedicated-admins-project
----
9 changes: 9 additions & 0 deletions modules/developer-cli-odo-installing-odo-on-linux.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,33 @@ The `{odo-title}` CLI is available to download as a binary and as a tarball for
.Procedure

. 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.
+
** If you download the binary, rename it to `odo`:
+
[source,terminal]
----
$ curl -L https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/odo/latest/odo-linux-amd64 -o odo
----
+
** If you download the tarball, extract the binary:
+
[source,terminal]
----
$ 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
----
+
[source,terminal]
----
$ tar xvzf odo.tar.gz
----

. Change the permissions on the binary:
+
[source,terminal]
----
$ chmod +x <filename>
----

. Place the `{odo-title}` binary in a directory that is on your `PATH`.
+
To check your `PATH`, execute the following command:
Expand All @@ -48,6 +56,7 @@ To check your `PATH`, execute the following command:
----
$ echo $PATH
----

. Verify that `{odo-title}` is now available on your system:
+
[source,terminal]
Expand Down
9 changes: 9 additions & 0 deletions modules/developer-cli-odo-installing-odo-on-macos.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,33 @@ The `{odo-title}` CLI for macOS is available to download as a binary and as a ta
.Procedure

. 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:
+
** If you download the binary, rename it to `odo`:
+
[source,terminal]
----
$ curl -L https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/odo/latest/odo-darwin-amd64 -o odo
----
+
** If you download the tarball, extract the binary:
+
[source,terminal]
----
$ 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
----
+
[source,terminal]
----
$ tar xvzf odo.tar.gz
----

. Change the permissions on the binary:
+
[source,terminal]
----
# chmod +x odo
----

. Place the `{odo-title}` binary in a directory that is on your `PATH`.
+
To check your `PATH`, execute the following command:
Expand All @@ -45,6 +53,7 @@ To check your `PATH`, execute the following command:
----
$ echo $PATH
----

. Verify that `{odo-title}` is now available on your system:
+
[source,terminal]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,17 @@ $ sudo cp ca.crt /etc/pki/ca-trust/source/anchors/externalroute.crt && sudo upd
[source,terminal]
----
$ oc get route -n openshift-image-registry
----
+
.Example output
[source,terminal]
----
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD
default-route <registry_path> image-registry <all> reencrypt None
----
+
[source,terminal]
----
$ docker login <registry_path> -u kubeadmin -p $(oc whoami -t)
----

Expand All @@ -71,9 +79,15 @@ $ docker login <registry_path> -u kubeadmin -p $(oc whoami -t)
[source,terminal]
----
$ docker pull registry.access.redhat.com/openshiftdo/odo-init-image-rhel7:<tag>
----
+
[source,terminal]
----
$ docker tag registry.access.redhat.com/openshiftdo/odo-init-image-rhel7:<tag> <registry_path>/openshiftdo/odo-init-image-rhel7:<tag>
----
+
[source,terminal]
----
$ docker push <registry_path>/openshiftdo/odo-init-image-rhel7:<tag>
----

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


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

== Pushing the init image directly on MacOS
Expand All @@ -106,7 +119,7 @@ $ oc get secret router-certs-default -n openshift-ingress -o yaml
----
+
.Example output
[source,terminal]
[source,terminal,subs="attributes+"]
----
apiVersion: v1
data:
Expand Down Expand Up @@ -137,9 +150,17 @@ $ sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.ke
[source,terminal]
----
$ oc get route -n openshift-image-registry
-----
+
.Example output
[source,terminal]
----
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD
default-route <registry_path> image-registry <all> reencrypt None
----
+
[source,terminal]
----
$ docker login <registry_path> -u kubeadmin -p $(oc whoami -t)
----

Expand All @@ -148,9 +169,15 @@ $ docker login <registry_path> -u kubeadmin -p $(oc whoami -t)
[source,terminal]
----
$ docker pull registry.access.redhat.com/openshiftdo/odo-init-image-rhel7:<tag>
----
+
[source,terminal]
----
$ docker tag registry.access.redhat.com/openshiftdo/odo-init-image-rhel7:<tag> <registry_path>/openshiftdo/odo-init-image-rhel7:<tag>
----
+
[source,terminal]
----
$ docker push <registry_path>/openshiftdo/odo-init-image-rhel7:<tag>
----

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

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

. Get a wildcard route CA:
+
[source,terminal]
[source,terminal,subs="attributes+"]
----
PS C:\> oc get secret router-certs-default -n openshift-ingress -o yaml
----
+
.Example output
[source,terminal]
[source,terminal,subs="attributes+"]
----
apiVersion: v1
data:
Expand All @@ -197,43 +224,57 @@ type: kubernetes.io/tls

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

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

. Log in to the {product-registry}:
+
[source,terminal]
[source,terminal,subs="attributes+"]
----
PS C:\> oc get route -n openshift-image-registry
----
+
.Example output
[source,terminal,subs="attributes+"]
----
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD
default-route <registry_path> image-registry <all> reencrypt None
----
+
[source,terminal,subs="attributes+"]
----
PS C:\> docker login <registry_path> -u kubeadmin -p $(oc whoami -t)
----

. Push the `odo` init image:
+
[source,terminal]
[source,terminal,subs="attributes+"]
----
PS C:\> docker pull registry.access.redhat.com/openshiftdo/odo-init-image-rhel7:<tag>
----
+
[source,terminal,subs="attributes+"]
----
PS C:\> docker tag registry.access.redhat.com/openshiftdo/odo-init-image-rhel7:<tag> <registry_path>/openshiftdo/odo-init-image-rhel7:<tag>
----
+
[source,terminal,subs="attributes+"]
----
PS C:\> docker push <registry_path>/openshiftdo/odo-init-image-rhel7:<tag>
----

. Override the default `odo` init image path by setting the `ODO_BOOTSTRAPPER_IMAGE` environment variable:
+
[source,terminal]
[source,terminal,subs="attributes+"]
----
PS C:\> $env:ODO_BOOTSTRAPPER_IMAGE="<registry_path>/openshiftdo/odo-init-image-rhel7:<tag>"
----
32 changes: 20 additions & 12 deletions modules/developer-cli-odo-ref-link.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ The correct path for the URL would be \http://8080-tcp.192.168.39.112.nip.io/api
+
[source,terminal]
----
$ odo describe
$ odo describe
----
+
.Example output
Expand Down Expand Up @@ -183,12 +183,11 @@ Linked Services:
+
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.

. Lastly, `odo` has created a directory called `kubernetes/` in your backend component's directory that contains the following files:
. 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:
+
[source,terminal]
----
$ ls kubernetes
odo-service-backend-postgrescluster-hippo.yaml odo-service-hippo.yaml
----
+
These files contain the information (YAML manifests) for two resources:
Expand All @@ -215,12 +214,11 @@ $ odo unlink PostgresCluster/hippo
To apply the changes, please use `odo push`
----

To unlink them on the cluster, run `odo push`. Now if you inspect the `kubernetes/` directory, you see only one file:
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`:

[source,terminal]
----
$ ls kubernetes
odo-service-hippo.yaml
----

Next, use the `--inlined` flag to create a link:
Expand Down Expand Up @@ -338,6 +336,10 @@ Unlink the service from the component using:
[source,terminal]
----
$ odo unlink PostgresCluster/hippo
----

[source,terminal]
----
$ odo push
----

Expand All @@ -350,14 +352,22 @@ By default, `odo` creates the manifest file under the `kubernetes/` directory, f
[source,terminal]
----
$ odo link PostgresCluster/hippo --bind-as-files
----

[source,terminal]
----
$ odo push
----

.Example `odo describe` output
[source,terminal]
----
$ odo describe
----

.Example output
[source,terminal]
----
Component Name: backend
Type: spring
Environment Variables:
Expand Down Expand Up @@ -461,21 +471,19 @@ When you pass custom bindings while linking the backend component with the Postg
[source,terminal]
----
$ odo link PostgresCluster/hippo --map pgVersion='{{ .hippo.spec.postgresVersion }}' --map pgImage='{{ .hippo.spec.image }}' --bind-as-files
$ odo push
----

These custom bindings get mounted as files instead of being injected as environment variables. To validate that this worked, run the following command:

.Example command
[source,terminal]
----
$ odo exec -- cat /bindings/backend-postgrescluster-hippo/pgVersion
$ odo push
----

.Example output
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`.

.Example command
[source,terminal]
----
13
$ odo exec -- cat /bindings/backend-postgrescluster-hippo/pgVersion
----

.Example command
Expand Down
Loading