Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
舟﨑健治
ソリューションアーキテクト, Amazon Web Services Japan
3-P1-3-12
AWS Systems Manager による
システム運用管理の実践
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
お手元のサミットガイドブックの表紙に記載している 『QRコード』 からご回答ください。もれなく素敵なAWSオリジナルグッズをプレゼントします。
本セッションのFeedbackをお願いします
プレゼントの引き換えは、パミール3F展示会場内アンケート確認エリア・受付エリアのいずれかにお越しください。
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
本セッションのGoal
• システム管理者のタスクをAWS Systems
Managerで実践するイメージを持って頂くこと
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Systems Managerとは
AWSでご利用のインフラストラクチャを可視化し制御するためのサービス
• 複数のサービスの運用データを一元化、可視化
• AWSリソース全体のタスクを自動化
• EC2インスタンスとオンプレミスサーバを管理可能
• LinuxやWindowsインスタンスで利用可能
• サーバにログインすることなくリモートから管理可能
• 追加料金不要
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Systems Manager(SSM)の前提条件インターネットへのアクセスが出来る事
• SSM Agentが各種APIへアクセスするため
• VPCにNAT-Gatewayを設置するのも方法の1つ
• VPC Endpoint も利用可
Amazon EC2
AWS Systems Manager
Internet
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Systems Managerのコンポーネント
Run
Command
State
ManagerInventory
Maintenance
Window
Patch
Manager
Automation
Parameter
Store
Documents
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
システム管理者の主なタスク
• 定型処理の推進
• 資産管理
• セキュリティ管理
• システム監視
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
システム管理者の主なタスク
• 定型処理の推進
• 資産管理
• セキュリティ管理
• システム監視
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
定型処理の推進
• 課題• 運用人員コストの増大
• サーバーリソースの増大
• 夜間などの人員を割り当てにくい時間帯に実施する必要がある作業
• 手作業による操作ミス
• 運用管理に必要な各種コマンドの実行
• 複雑な業務アプリケーションの管理
自動化の必要性
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Systems Manager Automation
Automation
Document
Automation
Action
Automation
Queue
ワークフローを構築してタスクを自動化
ワークフローの処理内容を
定義
ステップの入力・動作・出力を決定
Automation
の同時実行の管理
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Automation Document の例{ (冒頭省略)"parameters": {
"WebServerInstanceId": {
"type": "StringList",
},
"BatchServerInstanceId": {
"type": "StringList",
}
},
"mainSteps": [
{
"name": "stopHttpd",
“action”: “aws:runCommand”,
(途中省略)"inputs": {
"DocumentName": "AWS-RunShellScript",
"InstanceIds": [
"{{ WebServerInstanceId }}"
],
“Parameters”: {
“commands”: [
“service httpd stop"
]
}
}
}, (右に続く)
{
"name": “batch",
"action": "aws:runCommand",
"maxAttempts":1,
"onFailure":"Abort",
(途中省略)"inputs": {
"DocumentName": "AWS-RunShellScript",
"InstanceIds": [
"{{ BatchServerInstanceId }}"
],
"Parameters": {
"commands": [
"mysql -u xx -pxxx -h xxx < batch.sql"
]
}
},
{
"name": “startHttpd",
"action": "aws:runCommand",
“maxAttempts”:1,
(以下省略)
Step 1
Step 2入力パラメータ
Step 3
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Automationのデモ構成イメージ図
Web
サーバ
バッチサーバ
Amazon
RDS
AWS Systems Manager
Automation
①Webサーバ停止
②バッチ実行
③Webサーバ開始
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Automationのデモ
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Automationの更なる有効活用
• メンテナンスウィンドウにより指定した時刻に自動実行
• Amazon Simple Notification Serviceによるタスク実行ステータスの通知
• Failed時の動作• Continue または Abort
• Parameter Storeによるパラメータ管理
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ご参考:AWS Step Functionsを使ったワークフローの実行
• ワークフローを視覚的に定義可能
• 複雑なワークフローを定義可能• 失敗のリトライ
• パラレル処理
• 待機
• Choice、など
• タスクは以下で実行可能• AWS Lambda関数
• EC2インスタンス
• コンテナ
• オンプレミスのサーバ
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
システム管理者の主なタスク
• 定型処理の推進
• 資産管理
• セキュリティ管理
• システム監視
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
資産管理
• 課題• 増え続けるサーバやソフトウェアリソース
• 部署ごとにバラバラに管理される
• Excel等で管理表を作っても、更新が間に合わず、実際の環境と差異が出来てしまう
• 不正なアプリケーションの利用
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Systems Manager インベントリマネージャー
• EC2インスタンスとオンプレミスサーバのオペレーティングシステムやアプリケーション、インスタンスのメタデータを収集可能
• カスタムのメタデータをインスタンスに割り当て可能
• メタデータ照会により、更新が必要なインスタンスを素早く把握可能
AWS-GatherSoftwareInventory
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Inventoryのデモ
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
デモ:ブラックリストにあるアプリケーションがインスタンスにインストールされたことを検知
AWS Systems Manager
Inventory
AWS Configインベントリ情報を
記録
インベントリを実行
Blacklist用の
AWS Config Rule
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ブラックリストにあるアプリケーションがインスタンスにインストールされたことを検知するデモ
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
システム管理者の主なタスク
• 定型処理の推進
• 資産管理
• セキュリティ管理
• システム監視
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
セキュリティ管理
• システム運用管理における脅威の例• 個人情報や機密情報の漏洩
• システムへの不正侵入や改ざん
• 対策• 機密性(Confidentiality) / 完全性(Integrity) / 可用性(Availability)の維持
対策の一つとしてパッチ管理の必要性
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Systems Manager Patch Manager
セキュリティ関連の更新パッチをマネージドインスタンスに適用するプロセスを自動化
パッチベースライン
パッチグループAutomation
AWS-RunPatchBaseline実行
Patch Manager
例:OS: Windows
製品:Windows Server 2016
分類:Security Update
重要度:Critical
自動承認の遅延:7日承認済みパッチ:KB111111
拒否済みパッチ:KB222222
Microsoftから定期的にwsusscn2.cab(セキュリ
ティ関連の更新情報)をダウンロード
例:Windowsインスタンスへのパッチ適用の例
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
パッチ適用のデモイメージ
AWS-
RunPatchBaseline
Scan実行
AWS SystemsManager
user
AWS-
RunPatchBaseline
Install実行
Patch
Baseline
リポジトリ
コンプライアンス
非準拠: 1
準拠: 2
非準拠: 0
準拠: 3
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
パッチ適用のデモ
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
システム管理者の主なタスク
• 定型処理の推進
• 資産管理
• セキュリティ管理
• システム監視
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
システム監視
課題
• 多数のサーバ監視
• 多岐にわたる監視項目
• 障害発生時のシステム管理者への迅速な通知、早期障害の切り分け・復旧の必要性
監視ツールの必要性
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
インスタンスの監視
AWS Systems Managerの画面からAmazon CloudWatchによるダッシュボードを確認可能
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
インスタンスの監視のデモ
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
まとめ
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
まとめ
• AWS Systems Managerとその関連するAWSのサー
ビス・機能を使って、ハイブリッド環境でのシステム管理が可能
• システム管理者が実施するさまざまなタスクをAWS Systems Managerで自動化・効率化が可能
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
お手元のサミットガイドブックの表紙に記載している 『QRコード』 からご回答ください。もれなく素敵なAWSオリジナルグッズをプレゼントします。
本セッションのFeedbackをお願いします
プレゼントの引き換えは、パミール3F展示会場内アンケート確認エリア・受付エリアのいずれかにお越しください。
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ご清聴頂きありがとうございました。