aboutsummaryrefslogtreecommitdiffstats
path: root/puppet/extraconfig/pre_deploy/controller/neutron-opencontrail.yaml
blob: 5c686fe7f8072c126dc3cbf2476ea739ffb0a201 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
heat_template_version: 2015-04-30

description: Controller hieradata for Neutron OpenContrail configuration

parameters:
  server:
    description: ID of the controller node to apply this config to
    type: string
  ContrailApiServerIp:
    description: IP address of the OpenContrail API server
    type: string
  ContrailApiServerPort:
    description: Port of the OpenContrail API
    type: string
    default: 8082
  ContrailMultiTenancy:
    description: Whether to enable multi tenancy
    type: boolean
    default: false
  ContrailExtensions:
    description: List of OpenContrail extensions to be enabled
    type: comma_delimited_list
    default: ''

resources:
  ControllerContrailConfig:
    type: OS::Heat::StructuredConfig
    properties:
      group: os-apply-config
      config:
        hiera:
          datafiles:
            neutron_opencontrail_data:
              mapped_data:
                neutron::api_extensions_path: /usr/lib/python2.7/site-packages/neutron_plugin_contrail/extensions

                neutron::plugins::opencontrail::api_server_ip: {get_input: contrail_api_server_ip}
                neutron::plugins::opencontrail::api_server_port: {get_input: contrail_api_server_port}
                neutron::plugins::opencontrail::multi_tenancy: {get_input: contrail_multi_tenancy}
                neutron::plugins::opencontrail::contrail_extensions: {get_input: contrail_extensions}
                neutron::plugins::opencontrail::keystone_auth_url: '"%{hiera(''keystone_auth_uri'')}"'
                neutron::plugins::opencontrail::keystone_admin_user: admin
                neutron::plugins::opencontrail::keystone_admin_tenant_name: admin
                neutron::plugins::opencontrail::keystone_admin_password: '"%{hiera(''admin_password'')}"'
                neutron::plugins::opencontrail::keystone_admin_token: '"%{hiera(''keystone::admin_token'')}"'

  ControllerContrailDeployment:
    type: OS::Heat::StructuredDeployment
    properties:
      config: {get_resource: ControllerContrailConfig}
      server: {get_param: server}
      input_values:
        contrail_api_server_ip: {get_param: ContrailApiServerIp}
        contrail_api_server_port: {get_param: ContrailApiServerPort}
        contrail_multi_tenancy: {get_param: ContrailMultiTenancy}
        contrail_extensions: {get_param: ContrailExtensions}


outputs:
  deploy_stdout:
    description: Output of the extra hiera data deployment
    value: {get_attr: [ControllerContrailDeployment, deploy_stdout]}