aboutsummaryrefslogtreecommitdiffstats
path: root/puppet/extraconfig/pre_deploy/compute/neutron-opencontrail.yaml
blob: f5b1f0e643077262189654a1ee8506c3087d358c (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
heat_template_version: 2015-04-30

description: Compute node hieradata for Neutron OpenContrail configuration

parameters:
  server:
    description: ID of the compute 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

resources:
  ComputeContrailConfig:
    type: OS::Heat::StructuredConfig
    properties:
      group: os-apply-config
      config:
        hiera:
          datafiles:
            neutron_opencontrail_data:
              mapped_data:
                nova::network::neutron::network_api_class: nova.network.neutronv2.api.API

                contrail::vrouter::provision_vrouter::api_address: {get_input: contrail_api_server_ip}
                contrail::vrouter::provision_vrouter::api_port: {get_input: contrail_api_server_port}
                contrail::vrouter::provision_vrouter::keystone_admin_user: admin
                contrail::vrouter::provision_vrouter::keystone_admin_tenant_name: admin
                contrail::vrouter::provision_vrouter::keystone_admin_password: '"%{::admin_password}"'

                contrail::vnc_api::vnc_api_config:
                  'auth/AUTHN_TYPE':
                    value: keystone
                  'auth/AUTHN_PROTOCOL':
                    value: http
                  'auth/AUTHN_SERVER':
                    value: "%{hiera('keystone_admin_api_vip')}"
                  'auth/AUTHN_PORT':
                    value: 35357
                  'auth/AUTHN_URL':
                    value: '/v2.0/tokens'

  ComputeContrailDeployment:
    type: OS::Heat::StructuredDeployment
    properties:
      config: {get_resource: ComputeContrailConfig}
      server: {get_param: server}
      input_values:
        contrail_api_server_ip: {get_param: ContrailApiServerIp}
        contrail_api_server_port: {get_param: ContrailApiServerPort}

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