

# OPS05-BP03 設定管理システムを使用する
<a name="ops_dev_integ_conf_mgmt_sys"></a>

 設定を変更し、変更を追跡記録するには、構成管理システムを使用します。これらのシステムは、手動プロセスによって発生するエラーと、変更を導入する労力を減らします。 

 静的な構成管理では、ライフタイムを通じて一貫性を維持することが期待されるリソースの初期化時に値を設定します。このケースの例として、インスタンス上のアプリケーションサーバーまたはウェブサーバー用の構成を設定する場合や、 [AWS マネジメントコンソール](https://docs.aws.amazon.com/awsconsolehelpdocs/index.html) 内または [AWS CLI](https://aws.amazon.com/cli/) を介して AWS サービスの構成を定義する場合が挙げられます。 

 動的な構成管理では、ライフタイムを通じて変化する、または変化することが予測されるリソースの初期化時に値を設定します。例えば、構成変更を介してコードの機能を有効にするように機能トグルを設定したり、インシデント発生時にログの詳細レベルを変更してより多くのデータを取得し、インシデント終了時に詳細レベルを元に戻して不要なログや負荷を減らしたりすることができます。 

 インスタンス、コンテナ、サーバーレス機能、またはデバイスで実行されているアプリケーションで動的な構成を使用している場合、 [AWS AppConfig を使用して](https://docs.aws.amazon.com/appconfig/latest/userguide/what-is-appconfig.html) 環境全体での管理と実装を行うことができます。 

 AWS では、 [AWS Config を使用して](https://docs.aws.amazon.com/config/latest/developerguide/WhatIsConfig.html) アカウントおよびリージョン全体の AWS リソース構成を [継続的にモニタリングできます](https://docs.aws.amazon.com/config/latest/developerguide/aggregate-data.html)。そうすることで、構成履歴の追跡、構成変化の他のリソースへの影響、 [AWS Config ルール](https://docs.aws.amazon.com/config/latest/developerguide/evaluate-config.html) および [AWS Config コンフォーマンスパックを使用した期待される、または望まれる設定との比較監査を行えます](https://docs.aws.amazon.com/config/latest/developerguide/conformance-packs.html)。 

 AWS では、以下のサービスを使用して、継続的インテグレーションと継続的デプロイ (CI/CD) パイプラインを構築できます。 [AWS デベロッパーツール](https://aws.amazon.com/products/developer-tools/) (例: AWS CodeCommit、 [AWS CodeBuild](https://aws.amazon.com/codebuild/)、 [AWS CodePipeline](https://aws.amazon.com/codepipeline/)、 [AWS CodeDeploy](https://aws.amazon.com/codedeploy/)、および [AWS CodeStar](https://aws.amazon.com/codestar/))。 

 変更カレンダーを用意して、変更の実施によって影響を受ける可能性のある重要なビジネスや運用上の活動やイベントが計画されている時期を追跡します。アクティビティを調整して、これらの計画に関するリスクを管理します。 [AWS Systems Manager 変更カレンダー](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-change-calendar.html) は、変更に対して時間ブロックがオープンであるかクローズであるか、およびその理由を文書化し、 [その情報を他の ](https://docs.aws.amazon.com/systems-manager/latest/userguide/change-calendar-share.html) AWS アカウント と共有します。AWS Systems Manager Automation スクリプトは、カレンダーの変化に沿って実行されるように設定できます。 

 [AWS Systems Manager メンテナンスウィンドウは、](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-maintenance.html) AWS SSM Run Command または Automation スクリプト、AWS Lambda 呼び出し、または AWS Step Functions アクティビティの実行を指定した時間にスケジュールできます。これらのアクティビティを評価に含めることができるように、変更カレンダー上で印を付けます。 

 **一般的なアンチパターン:** 
+  あなたがフリート全体でウェブサーバー設定を手動で更新したところ、更新エラーのために多数のサーバーが応答しなくなりました。 
+  あなたは、何時間もかけて、アプリケーションサーバーフリートを手動で更新します。変更中の設定の不整合が、予期しない動作を引き起こします。 
+  誰かがセキュリティグループを更新したため、ウェブサーバーにアクセスできなくなりました。変更内容を把握しなければ、問題の調査にかなりの時間を費やすことになり、復旧までより長くの時間を要することになります。 

 **このベストプラクティスを活用するメリット:** 設定管理システムを採用することで、変更やその追跡の労力のレベルと、手動の手順に起因するエラーの頻度を軽減できます。 

 **このベストプラクティスを活用しない場合のリスクレベル:** ミディアム 

## 実装のガイダンス
<a name="implementation-guidance"></a>
+  設定管理システムを使用する: 設定管理システムを使用して、変更を追跡、実装し、手動プロセスによって発生するエラーと労力を減らすことができます。 
  +  [インフラストラクチャ設定管理](https://aws.amazon.com/answers/configuration-management/aws-infrastructure-configuration-management/) 
  +  [AWS Config](https://aws.amazon.com/config/) 
  +  [AWS Config とは](https://docs.aws.amazon.com/config/latest/developerguide/WhatIsConfig.html) 
  +  [AWS CloudFormation の紹介](https://youtu.be/Omppm_YUG2g) 
  +  [AWS CloudFormation とは](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html) 
  +  [AWS OpsWorks](https://aws.amazon.com/opsworks/) 
  +  [AWS OpsWorks とは](https://docs.aws.amazon.com/opsworks/latest/userguide/welcome.html) 
  +  [AWS Elastic Beanstalk の紹介](https://youtu.be/SrwxAScdyT0) 
  +  [AWS Elastic Beanstalk とは](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/Welcome.html) 

## リソース
<a name="resources"></a>

 **関連するドキュメント:** 
+  [AWS AppConfig](https://docs.aws.amazon.com/appconfig/latest/userguide/what-is-appconfig.html) 
+  [AWS デベロッパーツール](https://aws.amazon.com/products/developer-tools/) 
+  [AWS OpsWorks](https://aws.amazon.com/opsworks/) 
+  [AWS Systems Manager 変更カレンダー](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-change-calendar.html) 
+  [AWS Systems Manager メンテナンスウィンドウ](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-maintenance.html) 
+  [インフラストラクチャ設定管理](https://aws.amazon.com/answers/configuration-management/aws-infrastructure-configuration-management/) 
+  [AWS CloudFormation とは](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html) 
+  [AWS Config とは](https://docs.aws.amazon.com/config/latest/developerguide/WhatIsConfig.html) 
+  [AWS Elastic Beanstalk とは](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/Welcome.html) 
+  [AWS OpsWorks とは](https://docs.aws.amazon.com/opsworks/latest/userguide/welcome.html) 

 **関連動画:** 
+  [AWS CloudFormation の紹介](https://youtu.be/Omppm_YUG2g) 
+  [AWS Elastic Beanstalk の紹介](https://youtu.be/SrwxAScdyT0) 