Add an external GCP network in DoubleCloud (BYOC)

Bring your own cloud (BYOC) allows you to connect your DoubleCloud organization with your existing Google Cloud resources by creating a new VPC. This way, you can deploy ClickHouse and Kafka clusters, as well as use DoubleCloud Transfer in your GCP account. All computations, data, backups, and encryption keys will remain in your GCP project.

This page explains how to create a new VPC in your GCP cloud and connect it with your DoubleCloud organization.

Before you start

  • If you have an existing GCP project you want to use, make sure it's associated with an active Billing account and you're an admin of that project.

    If you don't yet have a project, create one and add it to an active Billing account. This may require additional permissions in Google Cloud.

  • Make sure that your role in DoubleCloud is either Clusters editor, Transfer editor, or higher. These roles permit you to create a VPC.

Configure the project

  1. In the DoubleCloud Console, go to the VPC page.

  2. Click Add External Network.

  3. In the dialog window, select Google Cloud.

  4. Under Configure the Project, enter the ID of the GCP project you want to use. You can find the project ID on your project's Settings page.

  5. In the Google Cloud Console, enable the APIs for accessing the project resources.

  6. Switch back to the DoubleCloud Console. Under Configure the Network, select the region where you want to create your resources and specify the name and CIDR of the new VPC network.

  7. Copy the command from the field under Run setup. This command has the following structure:

    ./byoc_setup.py -p PROJECT_ID -n NAME -r REGION -c CIDR
    

    where:

    • PROJECT_ID: ID of the GCP project where resources will be created.

    • NAME: Value of the Name field from the Configure network section of the dialog window.

    • REGION: Name of the region from the drop-down menu of the dialog window.

    • CIDR: Private IPv4 CIDR of your GCP network in either 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16 subnet.

  8. Open Cloud Shell.

  9. In the dialog window that warns about cloning the doublecloud/BYOC repository, select Trust repository and click Confirm.

  10. Paste the command you copied from the dialog window and execute it.

  11. Copy the console output.

  12. Switch back to the DoubleCloud console and paste the output under Copy and paste the GCP output.

  13. Click Add network.

Tip

After the network is created, it will be displayed on the VPC overview page under the Networks tab.

You can select this network in the Networking settings section when you create a cluster:

select an external network when creating a cluster

If you want to connect your resources located in this network to external resources, use peering connections.

What's next