Google Cloud Platform (GCP)
Deploy and manage Compute Engine VMs, Cloud Storage buckets, and Cloud SQL databases on GCP.
Supported Services
Compute Engine, Cloud Storage, Cloud SQL, VPC Networking
Prerequisites
- GCP account with billing enabled
- GCP project with required APIs enabled
- Service account with appropriate permissions
1. Create Service Account
- Go to GCP Service Accounts
- Click Create Service Account
- Grant roles: compute.admin, storage.admin, cloudsql.admin
- Go to Keys → Add Key → Create new key (JSON)
- Download and save the JSON key file
2. Enable APIs
gcloud services enable compute.googleapis.com
gcloud services enable storage.googleapis.com
gcloud services enable sqladmin.googleapis.com
3. Connect to Docka
- Navigate to Providers in Docka
- Click Connect Provider → Google Cloud Platform
- Paste the entire service account JSON file contents
- Click Connect
Compute Engine Instance Types
| Type | vCPUs | Memory | Use Case |
|---|---|---|---|
| e2-micro | 2 shared | 1 GB | Development |
| e2-small | 2 shared | 2 GB | Light workloads |
| e2-medium | 2 shared | 4 GB | General purpose |
| n2-standard-2 | 2 | 8 GB | Production |
| n2-standard-4 | 4 | 16 GB | High performance |
Cloud Storage Classes
| Class | Use Case | Price/GB |
|---|---|---|
| Standard | Frequently accessed | $0.026 |
| Nearline | Monthly access | $0.010 |
| Coldline | Quarterly access | $0.004 |
| Archive | Yearly access | $0.0012 |
Cloud SQL Databases
- Engines: PostgreSQL, MySQL, SQL Server
- High Availability: Regional instances with automatic failover
- Backups: Automated and on-demand backups
API Example
curl -X POST https://api.docka.dev/v1/servers \
-H "Authorization: Bearer $TOKEN" \
-d '{
"name": "web-server",
"provider_id": "gcp-provider-id",
"region": "us-central1",
"zone": "us-central1-a",
"instance_type": "e2-medium"
}'