summaryrefslogtreecommitdiffstats
path: root/docs/conf.py
blob: 3c4453e7132399e9b83829a4ad40bb1bcba70f2b (plain)
1
from docs_conf.conf import *
lor: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
heat_template_version: ocata

description: >
  OpenStack Nova Placement API service configured with Puppet

parameters:
  ServiceNetMap:
    default: {}
    description: Mapping of service_name -> network name. Typically set
                 via parameter_defaults in the resource registry.  This
                 mapping overrides those in ServiceNetMapDefaults.
    type: json
  DefaultPasswords:
    default: {}
    type: json
  EndpointMap:
    default: {}
    description: Mapping of service endpoint -> protocol. Typically set
                 via parameter_defaults in the resource registry.
    type: json
  NovaWorkers:
    default: 0
    description: Number of workers for Nova Placement API service.
    type: number
  NovaPassword:
    description: The password for the nova service and db account, used by nova-placement.
    type: string
    hidden: true
  KeystoneRegion:
    type: string
    default: 'regionOne'
    description: Keystone region for endpoint
  MonitoringSubscriptionNovaPlacement:
    default: 'overcloud-nova-placement'
    type: string
  NovaPlacementLoggingSource:
    type: json
    default:
      tag: openstack.nova.placement
      path: /var/log/httpd/nova_placement_wsgi_error_ssl.log
  EnableInternalTLS:
    type: boolean
    default: false

conditions:
  nova_workers_zero: {equals : [{get_param: NovaWorkers}, 0]}

resources:
  ApacheServiceBase:
    type: ./apache.yaml
    properties:
      ServiceNetMap: {get_param: ServiceNetMap}
      DefaultPasswords: {get_param: DefaultPasswords}
      EndpointMap: {get_param: EndpointMap}
      EnableInternalTLS: {get_param: EnableInternalTLS}

  NovaBase:
    type: ./nova-base.yaml
    properties:
      ServiceNetMap: {get_param: ServiceNetMap}
      DefaultPasswords: {get_param: DefaultPasswords}
      EndpointMap: {get_param: EndpointMap}

outputs:
  role_data:
    description: Role data for the Nova Placement API service.
    value:
      service_name: nova_placement
      monitoring_subscription: {get_param: MonitoringSubscriptionNovaPlacement}
      logging_source: {get_param: NovaPlacementLoggingSource}
      logging_groups:
        - nova
      config_settings:
        map_merge:
        - get_attr: [NovaBase, role_data, config_settings]
        - get_attr: [ApacheServiceBase, role_data, config_settings]
        - tripleo.nova_placement.firewall_rules:
            '138 nova_placement':
              dport:
                - 8778
                - 13778
          nova::wsgi::apache_placement::api_port: '8778'
          nova::wsgi::apache_placement::ssl: {get_param: EnableInternalTLS}
          # NOTE: bind IP is found in Heat replacing the network name with the local node IP
          # for the given network; replacement examples (eg. for internal_api):
          # internal_api -> IP
          # internal_api_uri -> [IP]
          # internal_api_subnet - > IP/CIDR
          nova::wsgi::apache_placement::bind_host: {get_param: [ServiceNetMap, NovaPlacementNetwork]}
          nova::wsgi::apache_placement::servername:
            str_replace:
              template:
                "%{hiera('fqdn_$NETWORK')}"
              params:
                $NETWORK: {get_param: [ServiceNetMap, NovaPlacementNetwork]}
        -
          if:
          - nova_workers_zero
          - {}
          - nova::wsgi::apache_placement::workers: {get_param: NovaWorkers}
      step_config: |
        include tripleo::profile::base::nova::placement
      service_config_settings:
        keystone:
          nova::keystone::auth_placement::tenant: 'service'
          nova::keystone::auth_placement::public_url: {get_param: [EndpointMap, NovaPlacementPublic, uri]}
          nova::keystone::auth_placement::internal_url: {get_param: [EndpointMap, NovaPlacementInternal, uri]}
          nova::keystone::auth_placement::admin_url: {get_param: [EndpointMap, NovaPlacementAdmin, uri]}
          nova::keystone::auth_placement::password: {get_param: NovaPassword}
          nova::keystone::auth_placement::region: {get_param: KeystoneRegion}
        mysql:
          map_merge:
          - {get_attr: [NovaBase, role_data, service_config_settings, mysql]}
          - nova::db::mysql_placement::password: {get_param: NovaPassword}
            nova::db::mysql_placement::user: nova_placement
            nova::db::mysql_placement::host: {get_param: [EndpointMap, MysqlInternal, host_nobrackets]}
            nova::db::mysql_placement::dbname: nova_placement
            nova::db::mysql_placement::allowed_hosts:
              - '%'
              - "%{hiera('mysql_bind_host')}"
      upgrade_tasks:
        - name: Stop nova_placement service (running under httpd)
          tags: step2
          service: name=httpd state=stopped
        # The nova placement API isn't installed in newton images, so install
        # it on upgrade
        - name: Install nova-placement packages on upgrade
          tags: step3
          yum: name=openstack-nova-placement-api state=latest