Learn how to connect a Public Cloud Instance, hosted in a datacenter, to a Managed Database (also called Cloud Database), hosted in another datacenter, like this:
The OVHcloud vRack is a private network solution that enables our customers to route traffic between OVHcloud dedicated servers as well as other OVHcloud services, such as databases. The vRack also allows you to add Public Cloud instances to your private network to create an infrastructure of physical and virtual resources.
Here are some considerations to take into account when using a private network:
- Network ports are created in the private network of your choice. Thus, further operations on that network might be restricted - e.g. you won’t be able to delete the network if you didn’t stop the Cloud Databases services first.
- When connecting from an outside subnet, the OpenStack IP gateway must be enabled in the subnet used for the Database service. The customer is responsible for any other custom network setup.
- Subnet sizing should include considerations for service nodes, other co-located services within the same subnet, and an allocation of additional available IP addresses for maintenance purposes. Failure to adequately size subnets could result in operational challenges and the malfunctioning of services.
Step 1 - Creating a virtual network
The first step is to create the virtual network that will be used in your vRack. To proceed, consult this guide.
Step 2 - Creating a Cloud Database connected to the private network
Follow this guide to create a new Cloud Database, while taking note of the information in the boxes below.
Select Private from the Network Type list, then choose your private network.
From the Subnetwork list, select the 10.0.0.0/16 - YYY. The YYY value is the name of the datacenter you chose.
- Then click
Step 3 - Configure your Cloud database instance to accept incoming connections
Follow the Configure your [___] instance to accept incoming connections guide of your selected database type (available here) to configure your service after installation, while taking note of the information in the boxes below.
The database is now connected to the virtual network, we can use it from any component that is connected to the same vRack.
Step 4 - Adding a Public Cloud Instance to the vRack
Follow this guide to create a new Public Cloud Instance, while taking note of the information in the boxes below.
Step 5 - Example of verification with a Cloud Databases for PostgreSQL
Connect to the instance and verify that you can reach your database by pinging the hostname:
# Expected Response
PING postgresql-123abc45-123abc456.database.cloud.ovh.us (10.6.0.11) 56(84) bytes of data.
64 bytes from 10.6.0.11 (10.6.0.11): icmp_seq=1 ttl=64 time=69.5 ms
64 bytes from 10.6.0.11 (10.6.0.11): icmp_seq=2 ttl=64 time=63.4 ms
64 bytes from 10.6.0.11 (10.6.0.11): icmp_seq=3 ttl=64 time=63.1 ms
64 bytes from 10.6.0.11 (10.6.0.11): icmp_seq=4 ttl=64 time=63.1 ms
--- postgresql-123abc45-123abc456.database.cloud.ovh.us ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 63.080/64.801/69.537/2.737 ms