Skip to content
This repository was archived by the owner on Jun 26, 2024. It is now read-only.

Commit 40dc554

Browse files
committed
re-work doc for odo link corrections
1 parent 9242a8d commit 40dc554

File tree

1 file changed

+30
-47
lines changed

1 file changed

+30
-47
lines changed

examples/java_ol_postgresql_odo/README.md

Lines changed: 30 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,18 @@ After the instalation completes via the Operator Hub, please follow the instruct
9494
#### Create a namespace called `service-binding-demo` from the pgo CLI
9595
> What is the pgo CLI? The pgo cli is a terminal command line interface for the Crunchy PostgreSQL Operator - it allows you to create namespaces and database instances that will be managed by the Crunchy PostgreSQL Operator. Then pgo CLI was installed as part of the Crunchy PostgreSQL installation process that you followed earlier.
9696
97-
The application and the DB needs a namespace to live in so let's create one for them using the pgo CLI:
97+
[comment]: <> (The application and the DB needs a namespace to live in so let's create one for them using the pgo CLI:)
98+
99+
[comment]: <> (```shell)
100+
[comment]: <> (pgo create namespace service-binding-demo)
101+
[comment]: <> (```)
98102

99-
```shell
100-
pgo create namespace service-binding-demo
101-
```
102103
#### Create a database cluster instance called `my-demo-db` from the pgo CLI
103104

104-
Use the pgo CLI to create a db cluster instance in the namespace you created in the previous command. This instance will be a postgreSQL db managed by the Crunchy PostgreSQL Operator.
105+
Use the pgo CLI to create a db cluster instance in the pgo namespace you created in the previous command. This instance will be a postgreSQL db managed by the Crunchy PostgreSQL Operator.
105106

106107
```shell
107-
pgo create cluster my-demo-db -n service-binding-demo
108+
pgo create cluster my-demo-db -n pgo
108109
```
109110

110111
#### Import the demo Java MicroService JPA application
@@ -175,8 +176,8 @@ You will see a fully formed URL that can be used in a web browser
175176
```shell
176177
$ odo url list
177178
Found the following URLs for component myjfstesingapp
178-
NAME STATE URL PORT SECURE KIND
179-
myjfstesingapp-9080 Pushed http://myjfstesingapp-9080-myjfstesingapp-jfstesting.apps.slobbed.os.fyre.ibm.com 9080 false route
179+
NAME STATE URL PORT SECURE KIND
180+
ep1 Pushed http://ep1-jpa-pgo.apps.slobbed.os.fyre.ibm.com 9080 false route
180181
```
181182

182183
Use URL to navigate to the CreatePerson.xhtml data entry page and enter requested data, clicking on the "Save" button when complete
@@ -188,39 +189,21 @@ Note that the entry of any data does not result in the data being displayed when
188189

189190
Now, the only thing that remains is to connect the DB and the application. We will use odo to create a link to the Service Binding Operator and will manually configure the resulting Service Binding Request to 'magically' do the connection for us.
190191

191-
Display the services available to odo:
192-
```shell
193-
> odo catalog list services
194-
```
195-
196-
You will see an entry for the Service Binding Operator displayed:
197-
198-
```shell
199-
> odo catalog list services
200-
Operators available in the cluster
201-
NAME CRDs
202-
service-binding-operator.v0.1.1-352 ServiceBindingRequest
203-
>
204-
```
205-
use odo to create an odo service for the Service Binding Operator by entering the previous result in the following format: `<NAME>/<CRDs>`
206-
```shell
207-
> odo service create service-binding-operator.v0.1.1-352/ServiceBindingRequest
208-
```
209-
push this service instance to the cluster
210-
```shell
211-
> odo push
212-
```
213-
List this service
192+
List the services available
214193
```shell
215194
> odo service list
216-
NAME AGE
217-
ServiceBindingRequest/example-servicebindingrequest 168h18m3s
195+
NAME AGE
196+
Pgcluster/example 1154h25m9s
197+
Pgcluster/my-demo-db 2h30m33s
198+
Pgtask/backrest-backup-my-demo-db 2h28m8s
199+
Pgtask/my-demo-db-createcluster 2h30m33s
200+
Pgtask/my-demo-db-stanza-create 2h28m47s
218201
>
219202
```
220-
Create a Service Binding Request between the application and the database using the Service Binding Operator service created in the previous step
203+
Create a Service Binding Request between the application and the database using the Pgcluster service for the DB
221204

222205
```shell
223-
> odo link ServiceBindingRequest/example-servicebindingrequest
206+
> odo link Pgcluster/my-demo-db
224207
```
225208

226209
push this link to the cluster
@@ -232,12 +215,12 @@ You have now created a Service Binding Request object in the namespace on behalf
232215

233216
You can see this Service Binding Request via kubectl
234217
```shell
235-
> kubectl get servicebindingrequest jpa-servicebindingrequest-example-servicebindingrequest
236-
NAME AGE
237-
jpa-servicebindingrequest-example-servicebindingrequest 3m12s
218+
> kubectl get servicebindingrequest
219+
NAME AGE
220+
jpa-pgcluster-my-demo-db 36m
238221
>
239222
```
240-
Or, alternatively, you can inspect the SBR via the OpenShift console in Administrator view by navigating to Operators > Installed Operators > Service Binding Operator and clicking on the Service Binding Request tab. Select the Service Binding Request Instance named `mysboproj-servicebindingrequest-example-servicebindingrequest`
223+
Or, alternatively, you can inspect the SBR via the OpenShift console in Administrator view by navigating to Operators > Installed Operators > Service Binding Operator and clicking on the Service Binding Request tab. Select the Service Binding Request Instance named `jpa-pgcluster-my-demo-db`
241224

242225
#### Manually configure YAML files
243226

@@ -410,11 +393,11 @@ Replace the `backingServiceSelector` block with the following YAML snippet:
410393
```
411394
Complete YAML file once updated:
412395
```yaml
413-
apiVersion: apps.OpenShift.io/v1alpha1
396+
apiVersion: apps.openshift.io/v1alpha1
414397
kind: ServiceBindingRequest
415398
metadata:
416399
selfLink: >-
417-
/apis/apps.OpenShift.io/v1alpha1/namespaces/readmeapp/servicebindingrequests/mysboproj-servicebindingrequest-example-servicebindingrequest
400+
/apis/apps.openshift.io/v1alpha1/namespaces/readmeapp/servicebindingrequests/mysboproj-servicebindingrequest-example-servicebindingrequest
418401
resourceVersion: '114116646'
419402
name: mysboproj-servicebindingrequest-example-servicebindingrequest
420403
uid: 20983d16-59f2-4b9b-ae56-e3371480821f
@@ -427,7 +410,7 @@ metadata:
427410
name: mysboproj
428411
uid: e3ca87f2-0208-4b00-82bb-db4345f834dd
429412
finalizers:
430-
- finalizer.servicebindingrequest.OpenShift.io
413+
- finalizer.servicebindingrequest.openshift.io
431414
spec:
432415
applicationSelector:
433416
group: apps
@@ -456,15 +439,15 @@ status:
456439

457440
Save and re-load this YAML file.
458441

459-
You have now created an intermediate secret object called `mysboproj-servicebindingrequest-example-servicebindingrequest` in the cluster that can be used by your application. You can see this secret via kubectl
442+
You have now created an intermediate secret object called `jpa-pgcluster-my-demo-db` in the cluster that can be used by your application. You can see this secret via kubectl
460443

461444
```shell
462-
kubectl get secret mysboproj-servicebindingrequest-example-servicebindingrequest
463-
NAME TYPE DATA AGE
464-
mysboproj-servicebindingrequest-example-servicebindingrequest Opaque 5 13m
445+
kubectl get secret jpa-pgcluster-my-demo-db
446+
NAME TYPE DATA AGE
447+
jpa-pgcluster-my-demo-db Opaque 5 13m
465448
>
466449
```
467-
Or, alternatively, you can inspect the new intermediate secret via the OpenShift console in Administrator view by navigating to Workloads > Secrets and clicking on the secret named `mysboproj-servicebindingrequest-example-servicebindingrequest` Notice it contains 5 pieces of data all related to the connection information for your PostgreSQL database instance.
450+
Or, alternatively, you can inspect the new intermediate secret via the OpenShift console in Administrator view by navigating to Workloads > Secrets and clicking on the secret named `jpa-pgcluster-my-demo-db` Notice it contains 5 pieces of data all related to the connection information for your PostgreSQL database instance.
468451

469452
Re-deploy the applications using odo
470453
```shell

0 commit comments

Comments
 (0)