Configurez votre réseau privé (EN)

Connect a Public Cloud Database to vRack

Last updated August 29th, 2022

Objective

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.

This guide explains how to connect a Public Cloud Instance, hosted in a datacenter, to a Public Cloud Database, hosted in another datacenter, like this:

vrack schema

Requirements

Instructions

Step 1 - Creating a virtual network

The first step is to create the virtual network that will be used in your vRack.

To proceed, from the Public cloud tab, click on the Private Network menu, then click on the Add Private Network button.

Add virtual network

You can define yourself a VLAN ID for your virtual network. Value must be between 2 and 4,000.

Define your own range or let dynamic address distribution if you want to use DHCP.

By default, the 10.0.0.0/16 CIDR address is defined. Different subnets can be added later.

Configure virtual network

Choose the regions where you want your virtual network to operate.

The subnets addresses are automatically ajusted, depending on the number of regions you choose.

Choose regions

Give a name to your virtual network.

Name virtual network

Your vRack is ready!

Learn more about vRack here

Step 2 - Creating a Public Cloud Database connected to the private network

Follow this guide to create a new Public Cloud Database.

The use of private networks with databases is allowed for Business and Enterprise plans.

Choose plan

  • Select Private from the Network Type list, then select XXXX - my-private-nw. The XXX value is the ID of the vRack.

  • From the Subnetwork list, select the 10.0.0.0/16 - YYY. The YYY value is the name of the datacenter you chose.

Configure options

Step 3 - Configure your Public 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.

Authorize the whole private network, as defined on previous steps.

Add virtual network subnet

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

At the fourth step, select the desired virtual network XXXX - my-private-network.

Configure the instance

If you want to test the access from an existing instance, read this tutorial to connect it to the vRack: Configuring vRack for Public Cloud.

Step 5 - Example of verification with a Public Cloud Databases for Redis

We assume that you have an already set SSH key on your project. For more details, read the Creating and connecting to your first Public Cloud instance page.

Connect to the instance via SSH:

ssh debian@141.95.107.2

Now install the Redis client by installing the Redis server package:

sudo apt-get update && sudo apt-get install redis-server -y

Now connect to the Redis database using the URL retrieved from the OVHcloud Control Panel, with a command such as:

redis-cli --tls -u "rediss://my-redis-user@redis-2612345abc-abcd1234defg.database.cloud.ovh.net:20185"

Authenticate yourself with the AUTH command:

AUTH my-redis-user myRedisUserPassword

Test the overall operation with these sample commands:

redis-2612345abc-abcd1234defg.database.cloud.ovh.net:20185> ping
PONG
redis-2612345abc-abcd1234defg.database.cloud.ovh.net:20185> SET mykey.test test
OK
redis-2612345abc-abcd1234defg.database.cloud.ovh.net:20185> GET mykey.test
"test"

We want your feedback!

We would love to help answer questions and appreciate any feedback you may have.

Are you on Discord? Connect to our channel at https://discord.gg/PwPqWUpN8G and interact directly with the team that builds our databases service!


Cette documentation vous a-t-elle été utile ?

N’hésitez pas à nous proposer des suggestions d’amélioration afin de faire évoluer cette documentation.

Images, contenu, structure… N’hésitez pas à nous dire pourquoi afin de la faire évoluer ensemble !

Vos demandes d’assistance ne seront pas traitées par ce formulaire. Pour cela, utilisez le formulaire "Créer un ticket" .

Merci beaucoup pour votre aide ! Vos retours seront étudiés au plus vite par nos équipes..


Ces guides pourraient également vous intéresser...

OVHcloud Community

Accedez à votre espace communautaire. Posez des questions, recherchez des informations, publiez du contenu et interagissez avec d’autres membres d'OVHcloud Community.

Echanger sur OVHcloud Community

Conformément à la Directive 2006/112/CE modifiée, à partir du 01/01/2015, les prix TTC sont susceptibles de varier selon le pays de résidence du client
(par défaut les prix TTC affichés incluent la TVA française en vigueur).