第2章 自動スケーリングのためのオーバークラウドの設定とデプロイ

自動スケーリングを有効にするオーバークラウド上のサービスのテンプレートを設定する必要があります。

手順

  1. 自動スケーリング用にオーバークラウドをデプロイする前に、自動スケーリングサービス用の環境テンプレートとリソースレジストリーを作成します。詳細については、「自動スケーリングのためのオーバークラウドの設定」 を参照してください。
  2. オーバークラウドをデプロイします。詳細については、「自動スケーリングのためのオーバークラウドのデプロイ」 を参照してください。

2.1. 自動スケーリングのためのオーバークラウドの設定

自動スケーリングを提供するサービスをデプロイするために必要な環境テンプレートとリソースレジストリーを作成します。

手順

  1. アンダークラウドホストに stack ユーザーとしてログインします。
  2. 自動スケーリング設定ファイル用のディレクトリーを作成します。

    $ mkdir -p $HOME/templates/autoscaling/
  3. サービスが自動スケーリングに必要とする定義のリソースレジストリーファイルを作成します。

    $ cat <<EOF > $HOME/templates/autoscaling/resources-autoscaling.yaml
    resource_registry:
      OS::TripleO::Services::AodhApi: /usr/share/openstack-tripleo-heat-templates/deployment/aodh/aodh-api-container-puppet.yaml
      OS::TripleO::Services::AodhEvaluator: /usr/share/openstack-tripleo-heat-templates/deployment/aodh/aodh-evaluator-container-puppet.yaml
      OS::TripleO::Services::AodhListener: /usr/share/openstack-tripleo-heat-templates/deployment/aodh/aodh-listener-container-puppet.yaml
      OS::TripleO::Services::AodhNotifier: /usr/share/openstack-tripleo-heat-templates/deployment/aodh/aodh-notifier-container-puppet.yaml
      OS::TripleO::Services::CeilometerAgentCentral: /usr/share/openstack-tripleo-heat-templates/deployment/ceilometer/ceilometer-agent-central-container-puppet.yaml
      OS::TripleO::Services::CeilometerAgentNotification: /usr/share/openstack-tripleo-heat-templates/deployment/ceilometer/ceilometer-agent-notification-container-puppet.yaml
      OS::TripleO::Services::ComputeCeilometerAgent: /usr/share/openstack-tripleo-heat-templates/deployment/ceilometer/ceilometer-agent-compute-container-puppet.yaml
      OS::TripleO::Services::GnocchiApi: /usr/share/openstack-tripleo-heat-templates/deployment/gnocchi/gnocchi-api-container-puppet.yaml
      OS::TripleO::Services::GnocchiMetricd: /usr/share/openstack-tripleo-heat-templates/deployment/gnocchi/gnocchi-metricd-container-puppet.yaml
      OS::TripleO::Services::GnocchiStatsd: /usr/share/openstack-tripleo-heat-templates/deployment/gnocchi/gnocchi-statsd-container-puppet.yaml
      OS::TripleO::Services::HeatApi: /usr/share/openstack-tripleo-heat-templates/deployment/heat/heat-api-container-puppet.yaml
      OS::TripleO::Services::HeatApiCfn: /usr/share/openstack-tripleo-heat-templates/deployment/heat/heat-api-cfn-container-puppet.yaml
      OS::TripleO::Services::HeatApiCloudwatch: /usr/share/openstack-tripleo-heat-templates/deployment/heat/heat-api-cloudwatch-disabled-puppet.yaml
      OS::TripleO::Services::HeatEngine: /usr/share/openstack-tripleo-heat-templates/deployment/heat/heat-engine-container-puppet.yaml
      OS::TripleO::Services::Redis: /usr/share/openstack-tripleo-heat-templates/deployment/database/redis-container-puppet.yaml
    EOF
  4. 自動スケーリングに必要なサービスを設定する環境テンプレートを作成します。

    cat <<EOF > $HOME/templates/autoscaling/parameters-autoscaling.yaml
    parameter_defaults:
      NotificationDriver: 'messagingv2'
      GnocchiDebug: false
      CeilometerEnableGnocchi: true
      ManagePipeline: true
      ManageEventPipeline: true
    
      EventPipelinePublishers:
        - gnocchi://?archive_policy=generic
      PipelinePublishers:
        - gnocchi://?archive_policy=generic
    
      ManagePolling: true
      ExtraConfig:
        ceilometer::agent::polling::polling_interval: 60
    EOF

    Red Hat Ceph Storage を時系列データベースサービスのデータストレージバックエンドとして使用する場合は、以下のパラメーターを parameters-autoscaling.yaml ファイルに追加します。

    parameter_defaults:
      GnocchiRbdPoolName: 'metrics'
      GnocchiBackend: 'rbd'

    メトリックを保存する前に、定義済みのアーカイブポリシー generic を作成する必要があります。このアーカイブポリシーは、デプロイ後に定義します。詳細は、「自動スケーリング用の汎用アーカイブポリシーの作成」 を参照してください。

  5. polling_interval パラメーターを 60 秒などに設定します。polling_interval パラメーターの値は、アーカイブポリシーの作成時に定義した gnocchi 粒度の値に一致する必要があります。詳細は、「自動スケーリング用の汎用アーカイブポリシーの作成」 を参照してください。
  6. オーバークラウドをデプロイします。詳細については、「自動スケーリングのためのオーバークラウドのデプロイ」 を参照してください。