Populate vnc_api_lib.ini on compute nodes with OpenContrail
[apex-tripleo-heat-templates.git] / puppet / extraconfig / pre_deploy / compute / neutron-opencontrail.yaml
1 heat_template_version: 2015-04-30
2
3 description: Compute node hieradata for Neutron OpenContrail configuration
4
5 parameters:
6   server:
7     description: ID of the compute node to apply this config to
8     type: string
9   ContrailApiServerIp:
10     description: IP address of the OpenContrail API server
11     type: string
12   ContrailApiServerPort:
13     description: Port of the OpenContrail API
14     type: string
15     default: 8082
16
17 resources:
18   ComputeContrailConfig:
19     type: OS::Heat::StructuredConfig
20     properties:
21       group: os-apply-config
22       config:
23         hiera:
24           datafiles:
25             neutron_opencontrail_data:
26               mapped_data:
27                 nova::network::neutron::network_api_class: nova.network.neutronv2.api.API
28
29                 contrail::vrouter::provision_vrouter::api_address: {get_input: contrail_api_server_ip}
30                 contrail::vrouter::provision_vrouter::api_port: {get_input: contrail_api_server_port}
31                 contrail::vrouter::provision_vrouter::keystone_admin_user: admin
32                 contrail::vrouter::provision_vrouter::keystone_admin_tenant_name: admin
33                 contrail::vrouter::provision_vrouter::keystone_admin_password: '"%{::admin_password}"'
34
35                 contrail::vnc_api::vnc_api_config:
36                   'auth/AUTHN_TYPE':
37                     value: keystone
38                   'auth/AUTHN_PROTOCOL':
39                     value: http
40                   'auth/AUTHN_SERVER':
41                     value: "%{hiera('keystone_admin_api_vip')}"
42                   'auth/AUTHN_PORT':
43                     value: 35357
44                   'auth/AUTHN_URL':
45                     value: '/v2.0/tokens'
46
47   ComputeContrailDeployment:
48     type: OS::Heat::StructuredDeployment
49     properties:
50       config: {get_resource: ComputeContrailConfig}
51       server: {get_param: server}
52       input_values:
53         contrail_api_server_ip: {get_param: ContrailApiServerIp}
54         contrail_api_server_port: {get_param: ContrailApiServerPort}
55
56 outputs:
57   deploy_stdout:
58     description: Output of the extra hiera data deployment
59     value: {get_attr: [ComputeContrailDeployment, deploy_stdout]}