Download - Sophos UTM 9のAutoscalingを試してみた
![Page 1: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/1.jpg)
Sophos UTM 9のAutoscalingを試してみた
AWS環境 セキュリティ実践セミナー ~ UTM Auto Scalingをやってみた ~
2015/12/18 クラスメソッド株式会社AWSコンサルティング部
森永大志
![Page 2: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/2.jpg)
クラスメソッド株式会社AWS(Amazon Web Service)と モバイルアプリ開発がメイン
2
![Page 3: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/3.jpg)
Developers.IO弊社の技術ブログ 社員が書いてます
3
![Page 4: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/4.jpg)
Developers.IO弊社の技術ブログ 社員が書いてます
4
5100本の技術記事2200本のAWS記事月間100万PV
![Page 5: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/5.jpg)
自己紹介森永 大志
5
クラスメソッド株式会社AWSコンサルティング部ソリューションアーキテクト興味:DevOps、Security趣味:ゲーム(インディーズメイン)
![Page 6: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/6.jpg)
Sophos UTMの AutoScaling試してみた
6
![Page 7: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/7.jpg)
AutoScaling?• AWSの機能のひとつ • 条件に応じてサーバ台数を増減させられる
7
負荷が上がる スケールアウト!
![Page 8: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/8.jpg)
AutoScaling時の懸念点• 増えたサーバにどう設定を反映する? • アクセスするサーバが毎回違う可能性が
8
どこに向かう?
設定を反映は?
![Page 9: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/9.jpg)
自分で作ろうとするとすごく大変
9
![Page 10: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/10.jpg)
10
![Page 11: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/11.jpg)
11
Sophos UTMAutoScaling対応!!!!
![Page 12: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/12.jpg)
どんな構成か
12
![Page 13: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/13.jpg)
![Page 14: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/14.jpg)
ちなみにこの構成図は「Cloudcraft」 というツールで作ってます
ブロクを書いてますので興味ある方は御覧ください http://dev.classmethod.jp/cloud/aws/cloudcraft-draw-diagrams/
14
![Page 15: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/15.jpg)
Security TierがSophos UTM部分
Application Tierは お好きなサーバをどうぞ
![Page 16: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/16.jpg)
Admin(管理者)はControllerサーバに設定する ⇒Controllerはひとつ!
ControllerはAutoScalingで 障害時自動復旧
![Page 17: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/17.jpg)
Controllerに変更があったらすぐに S3(ストレージ)に設定ファイルを保存!
SNS(プッシュ通知)で Workerに通知
![Page 18: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/18.jpg)
SNSの通知が来たら S3から設定ファイルをDL!
スケールアウト時にも S3からDLすれば設定反映
![Page 19: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/19.jpg)
ユーザはWorkerにだけアクセス
処理したら再度ELBへ行き 本丸サーバへ
![Page 20: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/20.jpg)
負荷が高まってきたら 自動でWorkerの数が増える
負荷が下がれば 勿論Workerの数が減る
![Page 21: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/21.jpg)
この構成を簡単に構築出来るんです
21
![Page 22: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/22.jpg)
CloudFormation• AWSのサービスのひとつ • AWSのリソースをjson形式で記述できる ⇒Infrastructures as Code!
22
![Page 23: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/23.jpg)
CloudFormation記述例"Ec2Instance" : { "Type" : "AWS::EC2::Instance", "Properties" : { "ImageId" : { "Fn::FindInMap" : [ "AWSRegionArch2AMI", { "Ref" : "AWS::Region" }, "PV64" ]}, "KeyName" : { "Ref" : "KeyName" }, "InstanceType" : { "Ref" : "InstanceType" }, "SecurityGroups" : [{ "Ref" : "Ec2SecurityGroup" }], "BlockDeviceMappings" : [ { "DeviceName" : "/dev/sda1", "Ebs" : { "VolumeSize" : "50" } } ] } }
23
インスタンスタイプ
AMI
セキュリティグループ
ブロックデバイス
https://aws.amazon.com/jp/cloudformation/aws-cloudformation-templates/
![Page 24: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/24.jpg)
デモ
24
![Page 25: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/25.jpg)
MarketPlaceのAMIを使用する為には承認が必要 (Hourly)https://aws.amazon.com/marketplace/pp/B0166NB8RI (BYOL)https://aws.amazon.com/marketplace/pp/B0166P65JW
![Page 26: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/26.jpg)
「Accept Terms」を押せば完了
![Page 27: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/27.jpg)
CloudFormationの管理画面で 「Create a Stack」
![Page 28: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/28.jpg)
テンプレートはSophosのS3にあるのでそのURLを指定 https://s3.amazonaws.com/sophos-nsg-cf/utm/utm-latest-
autoscaling.template
![Page 29: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/29.jpg)
必要事項を埋める
![Page 30: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/30.jpg)
必要事項を埋める 最後の3つはオプション
![Page 31: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/31.jpg)
「Create」の前にチェックを入れるのを忘れずに
![Page 32: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/32.jpg)
「Status」が「CREATE_COPLETE」になったら完了 「Outputs」タブにControllerのIPが記載されている
![Page 33: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/33.jpg)
Controller1台とWorker2台が起動
AutoScalingの設定 Workerは最大100まで増加する設定
![Page 34: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/34.jpg)
スケールの条件 CPU使用率70%を超えたら増えて、40%を下回ると減る
![Page 35: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/35.jpg)
「Deployment Type」が「Autoscaling」に! 「Instance Type」は「Controller」
![Page 36: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/36.jpg)
普段アクセスしないがWorkerにもアクセス 「Instance Type」は「Worker」
![Page 37: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/37.jpg)
Controllerを日本語に変更すると
![Page 38: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/38.jpg)
Workerも日本語に!
![Page 39: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/39.jpg)
宣伝
39
![Page 40: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/40.jpg)
Developers.IO 2016
Date : 2016/2/20 Location : SAP Japan
http://devio2016.classmethod.jp/
40
![Page 41: Sophos UTM 9のAutoscalingを試してみた](https://reader035.vdocuments.pub/reader035/viewer/2022062316/58e5b15b1a28ab85798b4ea3/html5/thumbnails/41.jpg)