Slide 1

Slide 1 text

kubernetesのchatops Orangesys Inc.

Slide 2

Slide 2 text

$Who am I Orangesys Inc. Tachibana Shuji Twitter @yepn https://github.com/orangesys Running

Slide 3

Slide 3 text

Orangesys Inc. SaaS監視システム @orangesysio https://orangesys.io

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Orangesys ● All in docker ● Kubernetes on GKE ● OpsDev -> NoOps Architecture

Slide 7

Slide 7 text

Architecture: Orangesys > Kubernetes Apigateway Namespace Cloud Load Balancing Standard Devices HTTPS Browser Client Production Namespace Kube-system Namespace Tiller Replication Controller Grafana Container Engine Replication Controller Influxdb Container Engine Replication Controller Corporate Site App Engine Autoscaling Orangesys Firebase Autoscaling Monitoring Namespace Prometheus RC Influxdb RC Grafana RC Opsbot Namespace Kubebot RC K8s-event RC Stripe Server Api Container Engine Replication Controller PostgresSQL Container Engine Replication Controller MariaDb Container Engine Replication Controller Nginx Container Engine Replication Controller Traefik Container Engine Replication Controller Server Telegraf Ingress Container Engine Replication Controller Kong ApiGateway Container Engine Replication Controller Kubenetes API Replication Controller SSL Cert Bot Replication Controller Orange Api Container Engine Replication Controller

Slide 8

Slide 8 text

Technology Stack

Slide 9

Slide 9 text

Agenda ● なぜchatops ● hubotを使ってない ● kubernetes botの事例 ● Topic

Slide 10

Slide 10 text

なぜchatops GKEのkubernetesの上、運用のため、ルーチンワークが全自動化ため、あまりops が少ない 情報共有のため、chatopsを入れた

Slide 11

Slide 11 text

hubotを使ってない ● コンテナ運用のため、上記3種類のbotのimagesが大きすぎ、起 動が重い。(200MBを超え) ● stackをシンプルしたい、coffeesciptsを避けたい ● botが重い、機能が多すぎ、メンテコストが高い ● kubernetesとの相性があまり

Slide 12

Slide 12 text

その他bot ● cog & errobt ● cog pluginの開発言語が自由ですが、本体はelixir ● 既存のbotが重い、機能が多すぎ、メンテコストが高い ● kubernetesとの相性があまり

Slide 13

Slide 13 text

go-chat-bot シンプルな機能がほしいから、go-chat-botで数十行ぐらい、作りました。 Kubernetes apiを活用し、slackへのevent転送が簡単 主流のIMツールはwebhook提供のため、より一層chatopsが簡単になります

Slide 14

Slide 14 text

Kubernetes event bot Kubernetes event apiを監視し、全部PODの イベントを通知します。

Slide 15

Slide 15 text

Circleci release event Distributed Teamsのため、リリースタイミングを担当者にお任せします。 リリース情報を共有したい

Slide 16

Slide 16 text

Letsencrypt証明書自動更新bot 証明証の有効期間を監視し、1ヶ月前、更新、 Let's Encrypt DNS Challenge Please deploy a DNS TXT record under the name _acme-challenge.orangesys.io with the following value: 667drNmQL3vX6bu8YZlgy0wKNBlCny8yrjF1lSaUndc Once this is deployed, Press ENTER to continue

Slide 17

Slide 17 text

kubernetes ops bot podの状態共有、自動構築のお客環境の状態確認など

Slide 18

Slide 18 text

Topic コンテナ時代になり、更に自動化を進化し、chatopsも変化 Kubernetesの運用なら、chatopsは情報共有の役割 エンジニアのアシスタントになり(事務処理、on-call standby、勤怠管理など)