Skip to content

Commit 1f01920

Browse files
authored
Merge pull request #47760 from smunje1/RHDEVDOCS-3902
RHDEVDOCS 3910 and RHDEVDOCS-3902- Service binding discoverability and Topology usability improvements
2 parents b4ad670 + 6b7170a commit 1f01920

5 files changed

+154
-80
lines changed

applications/connecting_applications_to_services/odc-connecting-an-application-to-a-service-using-the-developer-perspective.adoc

Lines changed: 9 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -5,93 +5,22 @@ include::_attributes/common-attributes.adoc[]
55
include::_attributes/servicebinding-document-attributes.adoc[]
66
:context: odc-connecting-an-application-to-a-service-using-the-developer-perspective
77

8+
toc::[]
9+
810
[role="_abstract"]
911
In addition to grouping multiple components within an application, you can also use the *Topology* view to connect components with each other. You can either use a binding connector or a visual one to connect components.
1012

11-
A binding connection between the components can be established only if the target node is an Operator-backed service. This is indicated by the *Create a binding connector* tool-tip which appears when you drag an arrow to such a target node. When an application is connected to a service using a binding connector a `ServiceBinding` resource is created. Then, the Service Binding Operator controller projects the necessary binding data into the application deployment. After the request is successful, the application is redeployed establishing an interaction between the connected components.
13+
A binding connection between the components can be established only if the target node is an Operator-backed service. This is indicated by the *Create a binding connector* tool-tip which appears when you drag an arrow to such a target node. When an application is connected to a service by using a binding connector a `ServiceBinding` resource is created. Then, the Service Binding Operator controller projects the necessary binding data into the application deployment. After the request is successful, the application is redeployed establishing an interaction between the connected components.
1214

1315
A visual connector establishes only a visual connection between the components, depicting an intent to connect. No interaction between the components is established. If the target node is not an Operator-backed service the *Create a visual connector* tool-tip is displayed when you drag an arrow to a target node.
1416

15-
== Creating a visual connection between components
16-
You can depict an intent to connect application components using the visual connector.
17-
18-
This procedure walks you through an example of creating a visual connection between a PostgreSQL Database service and a Spring PetClinic sample application.
19-
20-
.Prerequisites
21-
22-
* You have created and deployed a Spring PetClinic sample application using the *Developer* perspective.
23-
* You have created and deployed a Crunchy PostgreSQL database instance using the *Developer* perspective. This instance has the following four components: `hippo-backup`, `hippo-instance`, `hippo-repo-host`, and `hippo-pgbouncer`.
24-
25-
.Procedure
26-
27-
. Hover over the Spring PetClinic sample application to see a dangling arrow on the node.
28-
+
29-
.Visual connector
30-
image::odc_connector.png[]
31-
. Click and drag the arrow towards the `hippo-pgbouncer` deployment to connect the Spring PetClinic sample application with it.
32-
. Click the `spring-petclinic` deployment to see the *Overview* panel. Under the *Details* tab, click the edit icon in the *Annotations* section to see the *Key = `app.openshift.io/connects-to`* and *Value = `[{"apiVersion":"apps/v1","kind":"Deployment","name":"hippo-pgbouncer"}]`* annotation added to the deployment.
33-
34-
Similarly you can create other applications and components and establish visual connections between them.
35-
36-
.Connecting multiple applications
37-
image::odc_connecting_multiple_applications.png[]
38-
39-
== Creating a binding connection between components
40-
You can establish a binding connection with Operator-backed components.
41-
42-
This procedure walks through an example of creating a binding connection between a PostgreSQL Database service and a Spring PetClinic sample application. To create a binding connection with a service that is backed by the PostgreSQL Database Operator, you must first add the Red Hat-provided PostgreSQL Database Operator to the *OperatorHub*, and then install the Operator.
43-
The PostreSQL Database Operator then creates and manages the `Database` resource, which exposes the binding information in secrets, config maps, status, and spec attributes.
44-
45-
.Prerequisites
46-
* You have created and deployed a Spring PetClinic sample application using the *Developer* perspective.
47-
* You have installed the {servicebinding-title} from the OperatorHub.
48-
* You have installed the *Crunchy Postgres for Kubernetes* Operator from the OperatorHub using `v5` *Update* channel.
49-
* You have created and deployed a Crunchy PostgreSQL database instance using the *Developer* perspective. This instance has the following four components: `hippo-backup`, `hippo-instance`, `hippo-repo-host`, and `hippo-pgbouncer`.
50-
51-
.Procedure
52-
. Switch to the *Developer* perspective and ensure that you are in the appropriate project, for example, `my-petclinic`. In the *Topology* view, hover over the Spring PetClinic sample application to see a dangling arrow on the node.
53-
. Click and drag the arrow towards the *hippo* database in the Postgres Cluster to make a binding connection with the Spring PetClinic sample application. A *Create Service Binding* dialog box appears.
54-
.. Enter the name and click *Create*.
55-
+
56-
.Service Binding modal
57-
image::odc-sbc-modal.png[]
58-
59-
60-
Alternatively, in the *+Add* view, click the *YAML* option to see the *Import YAML* screen. Use the YAML editor and add the `ServiceBinding` resource:
61-
62-
[source,YAML]
63-
----
64-
apiVersion: binding.operators.coreos.com/v1alpha1
65-
kind: ServiceBinding
66-
metadata:
67-
name: spring-petclinic-pgcluster
68-
namespace: my-petclinic
69-
spec:
70-
services:
71-
- group: postgres-operator.crunchydata.com
72-
version: v1beta1
73-
kind: PostgresCluster
74-
name: hippo
75-
application:
76-
name: spring-petclinic
77-
group: apps
78-
version: v1
79-
resource: deployments
80-
----
81-
82-
A service binding request is created and the {servicebinding-title} controller projects the database service connection information into the application deployment as files using a volume mount. After the request is successful, the application is redeployed and the connection is established.
83-
84-
.Binding connector
85-
image::odc-binding-connector.png[]
86-
87-
[NOTE]
88-
====
89-
You can also use the context menu by dragging the dangling arrow to add and create a binding connection to an operator-backed service.
90-
91-
.Context menu to create binding connection
92-
image::odc_context_operator.png[]
93-
====
17+
include::modules/odc-discovering-and-identifying-operator-backed-bindable-services.adoc[leveloffset=+1]
18+
include::modules/odc-creating-a-visual-connection-between-components.adoc[leveloffset=+1]
19+
include::modules/odc-creating-a-binding-connection-between-components.adoc[leveloffset=+1]
20+
include::modules/odc-verifying-the-status-of-your-service-binding-from-the-topology-view.adoc[leveloffset=+1]
9421

22+
[role="_additional-resources"]
23+
[id="additional-resources-odc-connecting-an-application-to-a-service-using-the-developer-perspective"]
9524
== Additional resources
9625
* xref:../../applications/connecting_applications_to_services/getting-started-with-service-binding.adoc#getting-started-with-service-binding[Getting started with service binding].
9726
* link:https://github.com/redhat-developer/service-binding-operator#known-bindable-operators[Known bindable Operators].
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * applications/connecting_applications_to_services/odc-connecting-an-application-to-a-service-using-the-developer-perspective.adoc
4+
:_content-type: PROCEDURE
5+
[id="odc-creating-a-binding-connection-between-components_{context}"]
6+
= Creating a binding connection between components
7+
8+
You can establish a binding connection with Operator-backed components.
9+
10+
This procedure walks through an example of creating a binding connection between a PostgreSQL Database service and a Spring PetClinic sample application. To create a binding connection with a service that is backed by the PostgreSQL Database Operator, you must first add the Red Hat-provided PostgreSQL Database Operator to the *OperatorHub*, and then install the Operator.
11+
The PostreSQL Database Operator then creates and manages the `Database` resource, which exposes the binding information in secrets, config maps, status, and spec attributes.
12+
13+
.Prerequisites
14+
15+
* You have created and deployed a Spring PetClinic sample application by using the *Developer* perspective.
16+
* You have installed {servicebinding-title} from the OperatorHub.
17+
* You have installed the *Crunchy Postgres for Kubernetes* Operator from the OperatorHub by using the `v5` *Update* channel.
18+
* You have created and deployed a Crunchy PostgreSQL database instance by using the *Developer* perspective. This instance has the following components: `hippo-backup`, `hippo-instance`, `hippo-repo-host`, and `hippo-pgbouncer`.
19+
20+
.Procedure
21+
22+
. Switch to the *Developer* perspective and ensure that you are in the appropriate project, for example, `my-petclinic`.
23+
. In the *Topology* view, hover over the Spring PetClinic sample application to see a dangling arrow on the node.
24+
. Click and drag the arrow towards the *hippo* database in the Postgres Cluster to make a binding connection with the Spring PetClinic sample application.
25+
26+
.. Enter the name and click *Create*.
27+
+
28+
.Service Binding dialog
29+
image::odc-sbc-modal.png[]
30+
31+
32+
Alternatively, in the *+Add* view, click the *YAML* option to see the *Import YAML* screen. Use the YAML editor and add the `ServiceBinding` resource:
33+
34+
[source,YAML]
35+
----
36+
apiVersion: binding.operators.coreos.com/v1alpha1
37+
kind: ServiceBinding
38+
metadata:
39+
name: spring-petclinic-pgcluster
40+
namespace: my-petclinic
41+
spec:
42+
services:
43+
- group: postgres-operator.crunchydata.com
44+
version: v1beta1
45+
kind: PostgresCluster
46+
name: hippo
47+
application:
48+
name: spring-petclinic
49+
group: apps
50+
version: v1
51+
resource: deployments
52+
----
53+
54+
A service binding request is created and the {servicebinding-title} controller projects the database service connection information into the application deployment as files by using a volume mount. After the request is successful, the application is redeployed and the connection is established.
55+
56+
.Binding connector
57+
image::odc-binding-connector.png[]
58+
59+
[NOTE]
60+
====
61+
You can also use the context menu by dragging the dangling arrow to add and create a binding connection to an operator-backed service.
62+
63+
.Context menu to create binding connection
64+
image::odc_context_operator.png[]
65+
====
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * applications/connecting_applications_to_services/odc-connecting-an-application-to-a-service-using-the-developer-perspective.adoc
4+
:_content-type: PROCEDURE
5+
[id="odc-creating-a-visual-connection-between-components_{context}"]
6+
= Creating a visual connection between components
7+
8+
You can depict an intent to connect application components by using the visual connector.
9+
10+
This procedure walks you through an example of creating a visual connection between a PostgreSQL Database service and a Spring PetClinic sample application.
11+
12+
.Prerequisites
13+
14+
* You have created and deployed a Spring PetClinic sample application by using the *Developer* perspective.
15+
* You have created and deployed a Crunchy PostgreSQL database instance by using the *Developer* perspective. This instance has the following components: `hippo-backup`, `hippo-instance`, `hippo-repo-host`, and `hippo-pgbouncer`.
16+
17+
.Procedure
18+
19+
. Hover over the Spring PetClinic sample application to see a dangling arrow on the node.
20+
+
21+
.Visual connector
22+
image::odc_connector.png[]
23+
. Click and drag the arrow towards the `hippo-pgbouncer` deployment to connect the Spring PetClinic sample application with it.
24+
. Click the `spring-petclinic` deployment to see the *Overview* panel. Under the *Details* tab, click the edit icon in the *Annotations* section to see the *Key = `app.openshift.io/connects-to`* and *Value = `[{"apiVersion":"apps/v1","kind":"Deployment","name":"hippo-pgbouncer"}]`* annotation added to the deployment.
25+
26+
. Optional: You can repeat these steps to establish visual connections between other applications and components you create.
27+
+
28+
.Connecting multiple applications
29+
image::odc_connecting_multiple_applications.png[]
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * applications/connecting_applications_to_services/odc-connecting-an-application-to-a-service-using-the-developer-perspective.adoc
4+
:_content-type: PROCEDURE
5+
[id="odc-discovering-and-identifying-operator-backed-bindable-services_{context}"]
6+
= Discovering and identifying Operator-backed bindable services
7+
8+
As a user, if you want to create a bindable service, you must know which services are bindable. Bindable services are services that the applications can consume easily because they expose their binding data such as credentials, connection details, volume mounts, secrets, and other binding data in a standard way. The *Developer* perspective helps you discover and identify such bindable services.
9+
10+
.Procedure
11+
* To discover and identify Operator-backed bindable services, consider the following alternative approaches:
12+
+
13+
** Click *+Add* -> *Developer Catalog* -> *Operator Backed* to see the Operator-backed tiles. Operator-backed services that support service binding features have a *Bindable* badge on the tiles.
14+
** On the left pane of the *Operator Backed* page, select the *Bindable* checkbox.
15+
+
16+
[TIP]
17+
====
18+
Click the help icon next to *Service binding* to see more information about bindable services.
19+
====
20+
21+
** Click *+Add* -> *Add* and search for Operator-backed services. When you click the bindable service, you can view the *Bindable* badge in the side panel to the right.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * applications/connecting_applications_to_services/odc-connecting-an-application-to-a-service-using-the-developer-perspective.adoc
4+
:_content-type: PROCEDURE
5+
[id="odc-verifying-the-status-of-your-service-binding-from-the-topology-view_{context}"]
6+
= Verifying the status of your service binding from the Topology view
7+
8+
The *Developer* perspective helps you verify the status of your service binding through the *Topology* view.
9+
10+
.Procedure
11+
12+
. If a service binding was successful, click the binding connector. A side panel appears displaying the *Connected* status under the *Details* tab.
13+
+
14+
Optionally, you can view the *Connected* status on the following pages from the *Developer* perspective:
15+
+
16+
** The *ServiceBindings* page.
17+
** The *ServiceBinding details* page. In addition, the page title displays a *Connected* badge.
18+
. If a service binding was unsuccessful, the binding connector shows a red arrowhead and a red cross in the middle of the connection. Click this connector to view the *Error* status in the side panel under the *Details* tab. Optionally, click the *Error* status to view specific information about the underlying problem.
19+
+
20+
You can also view the *Error* status and a tooltip on the following pages from the *Developer* perspective:
21+
+
22+
** The *ServiceBindings* page.
23+
** The *ServiceBinding details* page. In addition, the page title displays an *Error* badge.
24+
25+
26+
[TIP]
27+
====
28+
In the *ServiceBindings* page, use the *Filter* dropdown to list the service bindings based on their status.
29+
====
30+

0 commit comments

Comments
 (0)