Skip to content

🧰 How to Deploy DBConvert Streams on Google Cloud

Prerequisites

  1. Install and set up Google Cloud CLI:

    bash
    # Install gcloud CLI (example for Debian/Ubuntu)
    curl https://sdk.cloud.google.com | bash
    
    # Restart your shell
    exec -l $SHELL
    
    # Initialize gcloud and authenticate
    gcloud init
  2. Make sure you have:

    • An active Google Cloud account
    • A project created in Google Cloud
    • Billing enabled for your project
    • Compute Engine API enabled
  3. Set your project ID:

    bash
    gcloud config set project YOUR_PROJECT_ID
  4. Choose machine type:

    • Minimum: e2-small (2 vCPU, 2GB memory)
    • Recommended for production:
      • e2-medium (2 vCPU, 4GB memory)
      • e2-standard-2 (2 vCPU, 8GB memory)

    To see available machine types:

    bash
    gcloud compute machine-types list --filter="zone:europe-west4-a"

There are two ways to set up DBConvert Streams in GCP:

📦 Option 1: Use Prebuilt GCP Image (One-Command Setup)

Fastest way — deploy from a ready-made image with everything preinstalled.

✅ Steps:

  1. Find the latest image:

    bash
    # List available DBConvert Streams images
    gcloud compute images list --project dbconvert-streams --filter="name~'^dbconvert-streams-'" --sort-by=~creationTimestamp --limit=1

    This will show the most recent image name.

  2. Create the VM using the latest image:

    bash
    # Using the latest image directly
    LATEST_IMAGE=$(gcloud compute images list --project dbconvert-streams --filter="name~'^dbconvert-streams-'" --sort-by=~creationTimestamp --limit=1 --format="get(name)")
    
    gcloud compute instances create dbconvert-vm \
      --zone=europe-west4-a \
      --machine-type=e2-small \
      --image=$LATEST_IMAGE \
      --image-project=dbconvert-streams \
      --tags=http-server,https-server

    Or specify an image manually:

    bash
    # Using a specific image version
    gcloud compute instances create dbconvert-vm \
      --zone=europe-west4-a \
      --machine-type=e2-small \
      --image=dbconvert-streams-1744047008 \
      --image-project=dbconvert-streams \
      --tags=http-server,https-server
  3. SSH into the VM:

    Method A: Using gcloud command

    bash
    # Using instance name (recommended)
    gcloud compute ssh dbconvert-vm --zone=europe-west4-a
    
    # Or using IP address directly (if you know the external IP)
    gcloud compute ssh USERNAME@EXTERNAL_IP

    Method B: Using Google Cloud Console

    • Click the SSH button in the VM instances list
  4. Access the web UI via:

    http://<your-external-ip>

🛠 Option 2: Use Install Script on a Clean VM

If you prefer more control or want to install on your own image.

✅ Steps:

  1. Create a VM with your preferred Linux distribution:

    Method A: Using Command Line

    bash
    # Example for Ubuntu 22.04 with minimum specs
    gcloud compute instances create dbconvert-vm \
      --zone=europe-west4-a \
      --machine-type=e2-small \
      --image-family=ubuntu-2204-lts \
      --image-project=ubuntu-os-cloud \
      --tags=http-server,https-server
    
    # For production workloads
    gcloud compute instances create dbconvert-vm \
      --zone=europe-west4-a \
      --machine-type=e2-medium \  # or e2-standard-2 for more memory
      --image-family=ubuntu-2204-lts \
      --image-project=ubuntu-os-cloud \
      --tags=http-server,https-server

    Method B: Using Google Cloud Console

    1. Go to Google Cloud Console
    2. Navigate to Compute Engine > VM instances > Create Instance
    3. Configure the basic settings:
      • Select machine type:
        • Minimum: e2-small (2 vCPU, 2GB memory)
        • Production: e2-medium or larger
      • Choose your preferred Linux distribution
    4. Under "Networking" tab:
      • ✅ Check "Allow HTTP traffic"
      • ✅ Check "Allow HTTPS traffic"

    Supported Linux distributions:

    • Ubuntu (recommended)
    • Debian
    • CentOS
    • RHEL
    • Fedora

    OS Selection Note

    While Google Cloud offers Container-Optimized OS (COS), we recommend using standard Linux distributions instead. COS is a minimal OS designed primarily for running containers but has limitations that may affect DBConvert Streams installation:

    • Limited system utilities
    • Read-only file system in many directories
    • No package manager for additional tools
  2. SSH into the VM:

    Method A: Using gcloud command

    bash
    # Using instance name (recommended)
    gcloud compute ssh dbconvert-vm --zone=europe-west4-a
    
    # Or using IP address directly (if you know the external IP)
    gcloud compute ssh USERNAME@EXTERNAL_IP

    Method B: Using Google Cloud Console

    • Click the SSH button in the VM instances list
  3. Run the install script:

    bash
    # Basic installation
    curl -fsSL https://dbconvert.nyc3.digitaloceanspaces.com/downloads/streams/latest/docker-install.sh | sh
    
    # Or download and run with options
    curl -fsSL https://dbconvert.nyc3.digitaloceanspaces.com/downloads/streams/latest/docker-install.sh -o install.sh
    chmod +x install.sh
    ./install.sh --help  # Show available options
  4. Start the service:

    bash
    cd ~/dbconvert-streams-docker
    
    # Start with HTTPS enabled (recommended for production)
    ./start.sh -s    # or --secure
    
    # Start with HTTP only (for testing)
    ./start.sh

    HTTPS vs HTTP

    • Use -s or --secure for production environments (enables HTTPS)
    • Use without flags for testing or development (HTTP only)
    • Both modes will work with the firewall rules we created

Network Access

The required ports (22, 80, 443) are automatically configured when creating the VM with --tags=http-server,https-server. No additional firewall rules are needed.

These tags tell GCP to:

  • Allow SSH access (port 22)
  • Allow HTTP traffic (port 80)
  • Allow HTTPS traffic (port 443)

IP Configuration

DBConvert Streams automatically detects and configures your server's public IP address. If you experience any connection issues, you can manually specify the IP:

bash
./start.sh --ip YOUR_PUBLIC_IP

✅ Check Your VM Status

After creating the instance, run this to verify it's running:

bash
gcloud compute instances list

Look for the EXTERNAL_IP column — that's where you can access the web UI.


📦 Which One Should I Use?

Use CaseRecommended OptionExplanation
Fastest deploy📦 Prebuilt GCP ImageOne command setup with no additional installation steps needed
Custom Linux distribution🛠 Install ScriptCan be installed on any supported Linux distribution
Custom installation directory🛠 Install ScriptCan be installed to any directory using -d option
Testing different versions🛠 Install ScriptCan specify version with -v option

Common Features

Both installation methods provide:

  • Automatic IP detection and configuration
  • Pre-configured HTTP/HTTPS access
  • Management commands (start.sh, stop.sh, update.sh)
  • Docker-based deployment

Main Difference

The main difference is in the initial setup:

  • Prebuilt Image: Everything is pre-installed and ready to run
  • Install Script: You control the installation process and configuration

DBConvert Streams - event driven replication for databases