0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Spinnaker + Kayentaのデプロイ

Last updated at Posted at 2018-07-18

halコマンドでcanary機能を有効にするとKayentaもデプロイされます。

環境

minikubeはメモリ割り当てを20GBに設定しています(defaultの2GBでは動きません)

$ uname -a
Linux mina 4.13.0-45-generic #50-Ubuntu SMP Wed May 30 08:23:18 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=17.10
DISTRIB_CODENAME=artful
DISTRIB_DESCRIPTION="Ubuntu 17.10"
$ minikube version
minikube version: v0.25.2
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.2", GitCommit:"5fa2db2bd46ac79e5e00a4e6ed24191080aa463b", GitTreeState:"clean", BuildDate:"2018-01-18T10:09:24Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"", Minor:"", GitVersion:"v1.9.4", GitCommit:"bee2d1505c4fe820744d26d41ecd3fdd4a3d6546", GitTreeState:"clean", BuildDate:"2018-03-21T21:48:36Z", GoVersion:"go1.9.1", Compiler:"gc", Platform:"linux/amd64"}
$ hal -v
1.5.0-20180713143726
$

canary機能有効化

Set up canary supportを参考に。

$ hal config canary enable
$ hal config canary edit --default-metrics-store prometheus
$ hal config canary edit --default-metrics-account my-canary-metrics-account
$ hal config canary edit --default-storage-account my-canary-storage-account

AWSは使用していませんがS3互換のminioをKayentaが使用できるように有効化します(これをしないとKayentaが動かない)。
minioは別途helm install stable/minio等でデプロイしておきます。
minioのエンドポイントやaccessKey、secretAccessKeyは直接~/.hal/configを編集して設定を追記しています。
参考) https://community.spinnaker.io/t/canary-and-foolproof-install/290/15

$ hal config canary aws enable
$ # ドキュメント通りのこの引数だとbucket名が--deploymentになってしまうので後でvimで修正します
$ hal config canary aws account add my-canary-aws-account --bucket --deployment --no-validate
$ hal config canary aws edit --s3-enabled true
$ # Halyardのconfigを編集
$ # 1 bucketを適切な名前(例:my-canary-bucket)にします。
$ #   minioにも予めその名前でバケットを作成しておく必要があります。
$ #   ( 作成しておかないとminioが動かない)
$ # 2 以下行を新規追加します(halコマンドでできないの?)
$ #   endpoint : minioのエンドポイント
$ #   accessKeyId : minioのaccessKey
$ #   secretAccessKey : minioのsecret accessKey
$ vim ~/.hal/config
( 略 : )
  canary:
    enabled: true
( 略 : )
    - name: aws
      enabled: true
      accounts:
      - name: my-canary-aws-account
        bucket: my-canary-bucket
        rootFolder: kayenta
        endpoint: http://my-minio.default.svc.cluster.local:9000
        accessKeyId: AKIAIOSFODNN7EXAMPLE
        secretAccessKey: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
        supportedTypes:
        - OBJECT_STORE
        - CONFIGURATION_STORE
      s3Enabled: true
( 略 : )
$ 

prometheusのメトリクスを使用する場合の設定例

$ hal config canary prometheus enable
$ hal config canary prometheus account add my-canary-prometheus-account --base-url http://prometheus.istio-system.svc.cluster.local:

デプロイ

$ hal deploy apply
$ kubectl get po -n spinnaker
NAME                                    READY     STATUS    RESTARTS   AGE
spin-clouddriver-bootstrap-v000-4hnr6   1/1       Running   0          48m
spin-clouddriver-v000-jqs7b             1/1       Running   0          47m
spin-deck-v000-hn25f                    1/1       Running   0          47m
spin-echo-v000-hgsmw                    1/1       Running   0          47m
spin-front50-v000-dclsk                 1/1       Running   1          47m
spin-gate-v000-2d6vx                    1/1       Running   0          47m
spin-igor-v000-dggjd                    1/1       Running   0          47m
spin-kayenta-v000-tjdqw                 1/1       Running   0          47m
spin-orca-bootstrap-v000-8nnkt          1/1       Running   0          48m
spin-orca-v000-rr8cc                    1/1       Running   0          47m
spin-redis-bootstrap-v000-q6kzs         1/1       Running   0          49m
spin-redis-v000-4qrgl                   1/1       Running   0          47m
spin-rosco-v000-xqcvk                   1/1       Running   0          47m
$
0
1
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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?