Penyebaran Google Cloud

Panduan penyebaran GCP Compute Engine

Penyebaran GCP OpenClaw, cloud Google

Google Cloud Platform di kawasan Asia Pasifik node banyak (Tokyo, Singapura, Taiwan), latensi rendah. Compute Engine adalah server cloud Google, konsep sama dengan AWS EC2.

Pengguna baru GCP dapat $300 kredit gratis, berlaku 90 hari, pakai untuk menjalankan OpenClaw sudah cukup. Meski kredit habis, instance e2-micro juga gratis selamanya (meski konfigurasi agak rendah).

$300 kredit gratis

💡 Pengguna baru GCP daftar langsung dapat $300 kredit gratis, berlaku 90 hari. Uang ini cukup menjalankan satu server e2-standard-2 (2 core 8G) selama tiga bulan. Setelah habis jika tidak manual upgrade ke akun berbayar, tidak akan auto charge, tenang daftar.

Forever free tier (Always Free) also include:

  • 1 instance e2-micro (0,25 core 1G), terbatas pada us-west1, us-central1, us-east1
  • 30GB standard permanent disk
  • 1GB North America outbound per month

lima step selesai deploy

1

buat project dan instance

Login GCP Console → buat project → Compute Engine → buat instans. Rekomen e2-standard-2 (2 cores 8GB), sistem pilih Ubuntu 22.04 LTS. Region pilih yang deket (Tokyo asia-northeast1 atau Singapore asia-southeast1).

2

Config firewall

VPC Network → Firewall → Buat firewall rule, allow TCP 22, 80, 443, 8080. Atau pakai command line gcloud operasi.

3

Koneksi SSH

GCP Console memiliki SSH in-browser, klik langsung bisa terhubung, tidak perlu unduh kunci. Atau gunakan terminal lokal gcloud compute ssh Koneksiin. Public IP di halaman VM overview bisa liat.

4

Install Container Station

Satu perintah pasang Docker di Ubuntu, kemudian deploy OpenClaw.

5

Deploy OpenClaw

Pakai docker-compose jalan, config file siap tinggal satu klik langsung.

operasi gcloud CLI

Kalo lo prefer command line, bisa pake gcloud CLI buat semua:

membuat instance dengan gcloud CLI
# Pasang gcloud CLI (jika belum)

Install Container Station

Setelah SSH terhubung pasang Docker
# Perbarui sistem

konfigurasi docker-compose

docker-compose.yml (versi GCP)
version: "3.8"

services:
  openclaw:
    image: openclaw/openclaw:latest
    container_name: openclaw
    restart: unless-stopped
    ports:
      - "8080:3000"
    volumes:
      - ./data:/app/data
      - ./config:/app/config
      - ./logs:/app/logs
    environment:
      - NODE_ENV=production
      - TZ=Asia/Tokyo
    deploy:
      resources:
        limits:
          memory: 4G
        reservations:
          memory: 512M
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
      interval: 30s
      timeout: 10s
      retries: 3
    logging:
      driver: json-file
      options:
        max-size: "10m"
        max-file: "3"

Deploy dan verify

buat directory, deploy, verify
# Buat direktori proyek
GCP bayar per jam takut lupa matikan? Paket nol DevOps MOLILI tidak perlu urus server, bayar sesuai pakai, tidak perlu tengok tagihan setengah malam. pelajari MOLILI →
Artikel tutorial ini berguna buat kamu?