OpenStack Nova Puppet Module
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.

57 lines
1.8KB

  1. # == Class: nova::cell_v2::simple_setup
  2. #
  3. # Class to execute minimal nova cell_v2 setup. This is a manual implementation
  4. # of the cell_v2 simple_cell_setup in puppet.
  5. #
  6. # === Parameters
  7. #
  8. # [*transport_url*]
  9. # (optional) This is the transport url to use for the cell_v2 commands.
  10. # By default the command should look for the DEFAULT/transport_url from
  11. # the nova configuration. If not available, you need to provide the
  12. # transport url via the parameters. Prior to Ocata, the transport-url
  13. # was a required parameter.
  14. # Defaults to 'default' (nova.conf value).
  15. #
  16. # [*database_connection*]
  17. # (optional) This is the database url to use for the cell_v2 create command
  18. # for the initial cell1 cell.
  19. # By default the command should look for the DEFAULT/database_connection from
  20. # the nova configuration. If not available, you need to provide the database
  21. # url via the parameters.
  22. # Defaults to 'default' (nova.conf value).
  23. #
  24. # [*database_connection_cell0*]
  25. # (optional) This is the database url to use for the cell_v2 cell0.
  26. # By default the command should look for the DEFAULT/database_connection from
  27. # the nova configuration and append '_cell0'. If not available, you need to provide the database
  28. # url via the parameters.
  29. # Defaults to 'default' (nova.conf value).
  30. #
  31. class nova::cell_v2::simple_setup (
  32. $transport_url = 'default',
  33. $database_connection = 'default',
  34. $database_connection_cell0 = 'default',
  35. ) {
  36. include ::nova::deps
  37. include ::nova::cell_v2::map_cell0
  38. nova_cell_v2 { 'cell0':
  39. database_connection => $database_connection_cell0
  40. }
  41. nova_cell_v2 { 'default':
  42. transport_url => $transport_url,
  43. database_connection => $database_connection
  44. }
  45. include ::nova::cell_v2::discover_hosts
  46. Class['nova::cell_v2::map_cell0']
  47. -> Nova_cell_v2 <| |>
  48. ~> Class['nova::cell_v2::discover_hosts']
  49. }