Links and exposed services address communication across container services and load balancing across hosts. You can configure link settings for your containers in Containers.
You can use links to enable communication between multiple services in your application. Links in Containers are similar to Docker links, but connect containers across hosts. A link consists of two parts: a service name and an alias. The service name is the name of the service or template being called. The alias is the host name that you use to communicate with that service.
For example, if you have an application that contains a Web and database service and you define a link in the Web service to the database service by using an alias of my-db, the Web service application opens a TCP connection to
PORT_OF_DB is the port that the database listens to, regardless of the public port that is assigned to the host by the container settings. If MySQL is checking for updates on its default port of 3306, and the published port for the container host is 32799, the Web application accesses the database at
It is recommended that you use networks instead of links. Links are now a legacy Docker feature with significant limitations when linking container clusters, including:
Docker does not support multiple links with the same alias. It is recommended that you allow Containers for vRealize Automation to generate link aliases for you.
You cannot update the links of a container runtime. When scaling up or down a linked cluster, the dependent container’s links will not be updated.
Verify that Containers for vRealize Automation is enabled in your supported vRealize Automation deployment.
Verify that you have container administrator or container architect role privileges.
Verify that a bridge network is available for linking services.
Verify that the internal port of the target service is published. For cross communication, the service can be mapped to any other port but must be accessible from outside the host.
Verify that the service hosts are able to access each other.
- Log in to vRealize Automation.
- Click the Containers tab.
- Click Templates in the left pane.
- Edit the template or image.
To edit a template
Click Edit in the upper-right section of the template that you want to open.
If the template contains multiple templates, point to the template that you want to edit, and click Edit in the upper-right section of the template that you want to open.
To edit an image.
Click the arrow next to the image's Provision button, and click Enter additional info.
- To edit a template
- Click Edit in the upper-right section of the template that you want to open.
- If the template contains multiple templates, point to the template that you want to edit, and click Edit in the upper-right section of the template that you want to open.
- To edit an image.
- Click the arrow next to the image's Provision button, and click Enter additional info.
The Provision a Container or Edit Container Definition page appears, providing access to categorized sets of editable properties and settings.
- Click the Basic tab.
- In the Services text box, enter a comma-separated list of services that the container is dependant on.
- In the Alias text box, enter a descriptive name for the service or comma-separated list of services.
- Click Save.