1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/developer-cli-odo-linking-both-components.adoc
2020-08-10 20:18:09 +00:00

46 lines
1.2 KiB
Plaintext

// Module included in the following assemblies:
//
// * cli_reference/developer_cli_odo/creating-a-multicomponent-application-with-odo.adoc
[id="linking-both-components_{context}"]
= Linking both components
Components running on the cluster need to be connected in order to interact. {product-title} provides linking mechanisms to publish communication bindings from a program to its clients.
.Procedure
. List all the components that are running on the cluster:
+
[source,terminal]
----
$ odo list
----
+
.Example output
[source,terminal]
----
APP NAME TYPE SOURCE STATE
app backend openjdk18 file://target/wildwest-1.0.jar Pushed
app frontend nodejs file://./ Pushed
----
. Link the current front-end component to the backend:
+
[source,terminal]
----
$ odo link backend --port 8080
----
+
.Example output
[source,terminal]
----
✓ Component backend has been successfully linked from the component frontend
Following environment variables were added to frontend component:
- COMPONENT_BACKEND_HOST
- COMPONENT_BACKEND_PORT
----
+
The configuration information of the back-end component is added to the front-end component and the front-end component restarts.