Hybrid Cloud with DBeaver: how to get started

Distributing infrastructure between several cloud providers became a tendency that more and more companies have to deal with. For example, the databases you need could be accessible via AWS, GCP, and Microsoft Azure. The obvious question arises: how can you work with all these databases simultaneously and easily switch between configurations?

This issue can be solved with DBeaver Ultimate or DBeaver Team Edition and the feature called Cloud Explorer. This article will show you how to work with hybrid cloud infrastructure through our app.

Let’s imagine that we have some DocumentDB database in AWS, the SQL Server database in Azure, and the BigQuery database in the Google Cloud Platform. If we want to work with them simultaneously, we first need to set up three configurations.

Start by clicking on the Cloud icon on the left in the Toolbar of the DBeaver application window.

In the window that opens, you will see separate tabs for three cloud providers. We will start with the first one, which allows us to create an AWS configuration.

How to connect to DocumentDB in AWS

On the Amazon Web Services tab, ​​you can select the authentication method from the dropdown list. By default, it is the Access key and the Secret key, which are used to sign programmatic requests that you make to AWS.

If you don’t have access to the Access and Secret key, you can use the second authentication method – an AWS profile that is hardwired into AWS SDK. It is considered more secure in terms of Amazon, and you only need to know the Profile name to use it.

After filling in all the fields, click on the Apply and close button. Then you will see a list of all available databases, and you can select the ones you need. In our case, this is a DocumentDB database. To add it to the Navigation tree, use the checkboxes or simply drag and drop your database into it.

AWS databases can be located in different regions, of which there is a huge variety. Pay attention to the Regions tab. By default, only one region corresponding to the user is selected so as to avoid spending a lot of time connecting to databases. If you know the exact location of the databases, use the checkboxes to select the needed options.

Otherwise, you can check all possible regions, and after the first connection, change the selection. If a new region comes up later, you can add it too.

In the lower part of the window, you can choose a project to which the databases will be added. If some of your databases are stored locally and some are stored in the cloud service, you can separate them into different projects for your convenience.

These are all the settings you need to create an AWS connection via Cloud Explorer. Let’s jump to Microsoft Azure and add a connection to the SQL Server database.

How to connect to SQL Server in Microsoft Azure

To authenticate through Azure, you need to enter your Client id provided by Microsoft and click the Apply and close button.

Now you can expand your Azure configuration and choose the SQL Server database. In the browser window that opens, you will be prompted to enter your login and password from your Microsoft account. If everything is entered correctly, a message will appear in the browser stating, “Authentication complete. You can close the browser and return to the application”.

After that, you can add the SQL Server database to your Database Navigator the same way as you did with the DocumentDB.

And finally, let’s create a BigQuery connection via the Google Cloud Platform.

How to connect to BigQuery in GCP

You need to open the last tab on Cloud Explorer and choose the authentication method from the dropdown list.

In our case, we will use the key file, which is a JSON containing all the necessary credentials. All we need to do is specify a path to this file on our disk and then click the “Apply and close” button.

Now let’s select the BigQuery database we need from the list and add it to the navigation tree.

The connections we have added with the help of Cloud Explorer are marked with a small cloud icon.

Now we can connect to any of them and start working with several databases from different cloud providers simultaneously.

Author: