LoginSignup
6
6

More than 5 years have passed since last update.

Google Container Engineでaobenchを動かした話

Posted at

クラスタの作成

Google Developers Consoleで,メニューのContainer Engineを選び,Create a clusterを選びます.

436e73a14364f290a57cc340671cec59.png

フォームでクラスタを構成するGCEインスタンスの種類やゾーン,マシンの台数を選ぶことができます.
現状クラスタを構成するマシンの台数などは選ぶことができないようです.(?)

eef0556cb543d9a25d6ecd7ae810ddba.png

podの設定ファイルの作成

以下の内容でpodの設定ファイルを作成します.

aobench.json

{
  "apiVersion": "v1beta1",
  "kind": "Pod",
  "id": "aobench-master-pod",
  "desiredState": {
    "manifest": {
      "version": "v1beta1",
      "id": "aobench-master-pod",
      "containers": [{
        "name": "aobench-master",
        "image": "syoyo/aobench",
        "command": ["sh", "-c", "/bin/ao"]
      }]
    }
  },
  "labels": { "name": "aobench", "role": "master" }
}

gcloudコマンドのアップデート

gcloudコマンドをすでに入れているものとします.

gcloud components update preview

コンテナの作成

gcloud preview container pods --cluster-name=aobench create aobench-master-pod --zone=europe-west1-b --config-file=aobench.json

コンテナ一覧の確認

gcloud preview container pods --cluster-name=aobench list --zone=europe-west1-b

今後の課題

まだAlphaらしいです.Amazon Elastic BeanstalkのDockerサポートみたいに,zipにまとめてeb_deployerで投げつけるだけで簡単にデプロイとか,オートスケールとかそういう事までできるとありがたいです.(もしかしたら頑張れば今でもできるかもしれませんし,多分正式リリースまでにはできるようになっていると思います.)

参考にしたサイト

6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6