Heat templates for deploying OpenStack
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

162 lines
6.1KB

  1. heat_template_version: rocky
  2. description: >
  3. OpenStack Neutron OVS DPDK configured with Puppet for Compute Role (Containerized)
  4. parameters:
  5. ContainerNeutronConfigImage:
  6. description: The container image to use for the neutron config_volume
  7. type: string
  8. ServiceData:
  9. default: {}
  10. description: Dictionary packing service data
  11. type: json
  12. ServiceNetMap:
  13. default: {}
  14. description: Mapping of service_name -> network name. Typically set
  15. via parameter_defaults in the resource registry. This
  16. mapping overrides those in ServiceNetMapDefaults.
  17. type: json
  18. DefaultPasswords:
  19. default: {}
  20. type: json
  21. RoleName:
  22. default: ''
  23. description: Role name on which the service is applied
  24. type: string
  25. RoleParameters:
  26. default: {}
  27. description: Parameters specific to the role
  28. type: json
  29. EndpointMap:
  30. default: {}
  31. description: Mapping of service endpoint -> protocol. Typically set
  32. via parameter_defaults in the resource registry.
  33. type: json
  34. # below parameters has to be set in neutron agent only for compute nodes.
  35. # as of now there is no other usecase for these parameters except dpdk.
  36. # should be moved to compute only ovs agent in case of any other usecases.
  37. NeutronDatapathType:
  38. default: ""
  39. description: Datapath type for ovs bridges
  40. type: string
  41. tags:
  42. - role_specific
  43. NeutronVhostuserSocketDir:
  44. default: ""
  45. description: The vhost-user socket directory for OVS
  46. type: string
  47. tags:
  48. - role_specific
  49. VhostuserSocketGroup:
  50. default: "qemu"
  51. description: >
  52. The vhost-user socket directory group name.
  53. Defaults to 'qemu'. When vhostuser mode is 'dpdkvhostuserclient'
  54. (which is the default mode), the vhost socket is created by qemu.
  55. type: string
  56. tags:
  57. - role_specific
  58. VhostuserSocketUser:
  59. default: "qemu"
  60. description: >
  61. The vhost-user socket directory user name.
  62. Defaults to 'qemu'. When vhostuser mode is 'dpdkvhostuserclient'
  63. (which is the default mode), the vhost socket is created by qemu.
  64. type: string
  65. tags:
  66. - role_specific
  67. resources:
  68. NeutronOvsAgent:
  69. type: ./neutron-ovs-agent-container-puppet.yaml
  70. properties:
  71. ServiceData: {get_param: ServiceData}
  72. ServiceNetMap: {get_param: ServiceNetMap}
  73. DefaultPasswords: {get_param: DefaultPasswords}
  74. EndpointMap: {get_param: EndpointMap}
  75. RoleName: {get_param: RoleName}
  76. RoleParameters: {get_param: RoleParameters}
  77. OpenvswitchDpdk:
  78. type: ./../openvswitch/openvswitch-dpdk-baremetal-ansible.yaml
  79. properties:
  80. ServiceData: {get_param: ServiceData}
  81. ServiceNetMap: {get_param: ServiceNetMap}
  82. DefaultPasswords: {get_param: DefaultPasswords}
  83. EndpointMap: {get_param: EndpointMap}
  84. RoleName: {get_param: RoleName}
  85. RoleParameters: {get_param: RoleParameters}
  86. # Merging role-specific parameters (RoleParameters) with the default parameters.
  87. # RoleParameters will have the precedence over the default parameters.
  88. RoleParametersValue:
  89. type: OS::Heat::Value
  90. properties:
  91. type: json
  92. value:
  93. map_replace:
  94. - map_replace:
  95. - neutron::agents::ml2::ovs::datapath_type: NeutronDatapathType
  96. neutron::agents::ml2::ovs::vhostuser_socket_dir: NeutronVhostuserSocketDir
  97. vhostuser_socket_group: VhostuserSocketGroup
  98. vhostuser_socket_user: VhostuserSocketUser
  99. - values: {get_param: [RoleParameters]}
  100. - values:
  101. NeutronDatapathType: {get_param: NeutronDatapathType}
  102. NeutronVhostuserSocketDir: {get_param: NeutronVhostuserSocketDir}
  103. VhostuserSocketGroup: {get_param: VhostuserSocketGroup}
  104. VhostuserSocketUser: {get_param: VhostuserSocketUser}
  105. outputs:
  106. role_data:
  107. description: Role data for Neutron openvswitch DPDK service
  108. value:
  109. service_name: neutron_ovs_dpdk_agent
  110. config_settings:
  111. map_merge:
  112. - map_replace:
  113. - get_attr: [NeutronOvsAgent, role_data, config_settings]
  114. - keys:
  115. tripleo::neutron_ovs_agent::firewall_rules: tripleo::neutron_ovs_dpdk_agent::firewall_rules
  116. - nova::compute::libvirt::qemu::group: {get_attr: [RoleParametersValue, value, vhostuser_socket_group]}
  117. - get_attr: [RoleParametersValue, value]
  118. service_config_settings:
  119. get_attr: [NeutronOvsAgent, role_data, service_config_settings]
  120. puppet_config:
  121. config_volume: neutron
  122. puppet_tags: neutron_config,neutron_agent_ovs,neutron_plugin_ml2
  123. step_config:
  124. get_attr: [NeutronOvsAgent, role_data, puppet_config, step_config]
  125. config_image: {get_param: ContainerNeutronConfigImage}
  126. # We need to mount /run for puppet_config step. This is because
  127. # puppet-vswitch runs the commands "ovs-vsctl list open_vswitch ."
  128. # when running vswitch::ovs::enable_hw_offload: true
  129. # ovs-vsctl talks to the ovsdb-server (hosting conf.db)
  130. # on the unix domain socket - /run/openvswitch/db.sock
  131. volumes:
  132. - /lib/modules:/lib/modules:ro
  133. - /run/openvswitch:/run/openvswitch
  134. - /etc/modules-load.d/:/etc/modules-load.d
  135. kolla_config:
  136. get_attr: [NeutronOvsAgent, role_data, kolla_config]
  137. container_config_scripts:
  138. get_attr: [NeutronOvsAgent, role_data, container_config_scripts]
  139. docker_config:
  140. get_attr: [NeutronOvsAgent, role_data, docker_config]
  141. metadata_settings:
  142. get_attr: [NeutronOvsAgent, role_data, metadata_settings]
  143. host_prep_tasks:
  144. get_attr: [NeutronOvsAgent, role_data, host_prep_tasks]
  145. deploy_steps_tasks:
  146. list_concat:
  147. - get_attr: [NeutronOvsAgent, role_data, deploy_steps_tasks]
  148. - get_attr: [OpenvswitchDpdk, role_data, deploy_steps_tasks]
  149. upgrade_tasks:
  150. get_attr: [NeutronOvsAgent, role_data, upgrade_tasks]
  151. update_tasks:
  152. get_attr: [NeutronOvsAgent, role_data, update_tasks]
  153. fast_forward_upgrade_tasks:
  154. get_attr: [NeutronOvsAgent, role_data, fast_forward_upgrade_tasks]