Post on 14-Apr-2017
Copyright © GREE, Inc. All Rights Reserved.
AWS Direct Connectの構築を自動化 (しようと )している話NetOpsCoding#4
Kaoru Kitauchi
Copyright © GREE, Inc. All Rights Reserved.
名前 北内 薫 (Kaoru Kitauchi)
所属 グリー株式会社
(自称 )ネットワークエンジニア
・ネットワークの設計とか運用とか
・事業者との窓口とか
・ Janog38では司会をさせて頂いたり
だれ?
Copyright © GREE, Inc. All Rights Reserved.
・なぜ自動化するのか
・どんなふうに自動化 (しようと )しているのか
・そして伝説へ・・・
・まとめ
お品書き
Copyright © GREE, Inc. All Rights Reserved.Copyright © GREE, Inc. All Rights Reserved.
なぜ自動化するのか
Copyright © GREE, Inc. All Rights Reserved.
さいきんは環境を作っては壊し、作っては壊し
・クラウドなんでしょうがないんですけど
・ Direct Connectも作っては壊し、作っては壊し
なぜ自動化するのか
Copyright © GREE, Inc. All Rights Reserved.
Direct Connectは VPCごとに BGP neighborを設定
・コアな部分を触らなければいけない
・まぁまぁ数が多い
・面倒くさい、事故こわい
・自動化したい!!!
なぜ自動化するのか
引用: http://docs.aws.amazon.com/ja_jp/directconnect/latest/UserGuide/getstarted.html
Copyright © GREE, Inc. All Rights Reserved.Copyright © GREE, Inc. All Rights Reserved.
どんなふうに自動化 (しようと )しているのか
Copyright © GREE, Inc. All Rights Reserved.
サンプルコンフィグは出力してくれるけど使いません
どんなふうに自動化 (しようと )しているのか
引用: http://docs.aws.amazon.com/ja_jp/directconnect/latest/UserGuide/getstarted.html#routerconfig
Copyright © GREE, Inc. All Rights Reserved.
aws api vs aws cli
・お手軽な cliベースで作ってます
・ bashでゴリゴリ
・リファレンスもしっかりしてます
・が、完全なWebUI互換ではなかったり
・ちょっと癖あったり
どんなふうに自動化 (しようと )しているのか
Copyright © GREE, Inc. All Rights Reserved.
どんなふうに自動化 (しようと )しているのか
引用: http://dev.classmethod.jp/cloud/illustrate-direct-connect-shared-virtual-interfaces/
例: Shared Virtual Interfacesを作るとき
Copyright © GREE, Inc. All Rights Reserved.
WebUIから作る場合
どんなふうに自動化 (しようと )しているのか
Copyright © GREE, Inc. All Rights Reserved.
aws cliから作る場合
どんなふうに自動化 (しようと )しているのか
引用: http://docs.aws.amazon.com/cli/latest/reference/directconnect/
Copyright © GREE, Inc. All Rights Reserved.
例: BGP neighbor UP
どんなふうに自動化 (しようと )しているのか
Oct 19 16:30:38 router 73892: Oct 19 16:30:38: %BGP-5-ADJCHANGE: neighbor 10.xxx.xxx.xxx Up
Oct 19 16:30:38 router 73893: Oct 19 16:30:38: %BGP-3-NOTIFICATION: received from neighbor 10.xxx.xxx.xxx 6/1 (cease) 7 bytes 00010100 000064
Oct 19 16:30:39 router 73894: Oct 19 16:30:38: %BGP-5-ADJCHANGE: neighbor 10.xxx.xxx.xxx Down BGP protocol initialization
Oct 19 16:30:43 router 73895: Oct 19 16:30:42: %BGP-3-NOTIFICATION: received from neighbor 10.xxx.xxx.xxx 6/1 (cease) 0 bytes
(中略 )
Oct 19 16:35:38 router 73982: Oct 19 16:35:38: %BGP-3-NOTIFICATION: received from neighbor 10.xxx.xxx.xxx 6/1 (cease) 0 bytes
Oct 19 16:35:39 router 73983: Oct 19 16:35:38: %BGP-5-ADJCHANGE: neighbor 10.xxx.xxx.xxx Up
Copyright © GREE, Inc. All Rights Reserved.
IP管理が鬼門
・ VPCごとの BGPセッション用に都度つど /30払い出し
・冗長構成なら /30 * 2
・ IP管理はあたたかみのあるスプレッドシート
・自動化しずらい (出来なくはない )
・自動化しやすい IP管理手法があればだれか教えて下さい
どんなふうに自動化 (しようと )しているのか
Copyright © GREE, Inc. All Rights Reserved.
Direct Connectのメンテ多い(私感)
・事前に分かってる場合はトラフィック迂回したいけど
・連絡が直前だったりして何かとしんどい
どんなふうに自動化 (しようと )しているのか
Copyright © GREE, Inc. All Rights Reserved.Copyright © GREE, Inc. All Rights Reserved.
そして伝説へ・・・
Copyright © GREE, Inc. All Rights Reserved.
構築だけでなくライフサイクル全体で自動化を進めたい
・ virtual interface構築
もちろん IP管理台帳も自動更新
構築終わったら BOTが教えてくれる
・運用 (監視、トラフィック迂回 )
勝手に監視ツールに登録してくれたり
・ virtual interface撤去
そして伝説へ・・・
Copyright © GREE, Inc. All Rights Reserved.
自動化はまだまだ改善の余地あり
・サービスの癖を把握していく必要がありそう
・機能追加も多いので、キャッチアップ怠ると置いてかれそ
う
パブリッククラウドの越えられない壁
・ハンドリング出来ない事象も多い
・折り合いをつけて使っていくしかない
興味のあるかたは是非情報交換させてください!
まとめ
Copyright © GREE, Inc. All Rights Reserved.Copyright © GREE, Inc. All Rights Reserved.
ご静聴ありがとうございました