Compute Engineとは?
- Compute Engine - IaaS — Google Cloud Platform
- What is Google Compute Engine? - Compute Engine — Google Cloud Platform
EC2だと思えばいいかな。
ログ
- まずプロジェクトの選択
- VMインスタンスの作成
- ハローワールドなので、お安く
プリエンプティブ
はオンに - 自分のssh pub keyを登録
- 見えるハローワールドなアウトプットほしいので、http許可で
- etc...
- ハローワールドなので、お安く
つくったら
% gcloud compute instances list NAME ZONE MACHINE_TYPE PREEMPTIBLE INTERNAL_IP EXTERNAL_IP STATUS test-instance-1 us-central1-a f1-micro true 10.128.0.2 104.197.35.116 RUNNING
できてる
% ssh 104.197.35.116 otiai10@test-instance-1:~$ which apt-get /usr/bin/apt-get otiai10@test-instance-1:~$ sudo apt-get install nginx otiai10@test-instance-1:~$ sudo vi /var/www/html/index.nginx-debian.html
で、EXTERNAL_IPにアクセスする
動いた
DRYな備忘録として