Closed2
Mozilla HubsをGCPのセットアップ
![Quantum](https://res.cloudinary.com/zenn/image/fetch/s--zaQfLu35--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_70/https://storage.googleapis.com/zenn-user-upload/avatar/5460adbbc1.jpeg)
Helmがない場合は、先にインストール
$ curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
$ chmod 700 get_helm.sh
$ ./get_helm.sh
GCPでPersistent Disk SSDの割り当て上限を900GB以上にする。
ファイアウォールを開く
# For TCP port 4443:
gcloud compute firewall-rules create allow-https-port --direction=INGRESS --priority=1000 --network=default --action=ALLOW --rules=tcp:4443 --source-ranges=0.0.0.0/0
# For TCP port 5349:
gcloud compute firewall-rules create allow-rule-mozilla-hubs-using-1 --direction=INGRESS --priority=1000 --network=default --action=ALLOW --rules=tcp:5349 --source-ranges=0.0.0.0/0
# For UDP ports 35000 to 60000:
gcloud compute firewall-rules create allow-rule-mozilla-hubs-using-2 --direction=INGRESS --priority=1000 --network=default --action=ALLOW --rules=udp:35000-60000 --source-ranges=0.0.0.0/0
![Quantum](https://res.cloudinary.com/zenn/image/fetch/s--zaQfLu35--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_70/https://storage.googleapis.com/zenn-user-upload/avatar/5460adbbc1.jpeg)
ソースのダウンロード
git clone https://github.com/mozilla/hubs-cloud.git
クラスターを作る
us-central1-bリージョンに、n1-standard-2を3ノード作る。
us-central1としてすれば、"各Zone毎"に3ノード作られる。
gcloud container clusters create hubs-ce-cluster --machine-type n1-standard-2 --num-nodes 3 --zone=us-central1-b
クラスタ一覧を確認
gcloud container clusters list
ノードがオンラインになったことを確認
kubectl get nodes -o wide
kubectl config view
kubectl config current-context
Cloud SQLでPostgresql インスタンスを立てる
このスクラップは3ヶ月前にクローズされました