Ansible playbooks 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.

206 lines
7.9KB

  1. ---
  2. # Copyright 2015, Rackspace US, Inc.
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. ## AIO user-space configuration options
  16. # Scenario used to bootstrap the host
  17. bootstrap_host_scenario: "{{ lookup('env','SCENARIO') | default('aio_lxc', true) }}"
  18. #
  19. # Boolean option to implement OpenStack-Ansible configuration for an AIO
  20. # Switch to no for a multi-node configuration
  21. bootstrap_host_aio_config: yes
  22. #
  23. # Path to the location of the bootstrapping configuration files
  24. bootstrap_host_aio_config_path: "{{ playbook_dir }}/../etc/openstack_deploy"
  25. #
  26. # Path to the location of the scripts the bootstrap scripts use
  27. bootstrap_host_aio_script_path: "{{ playbook_dir }}/../scripts"
  28. #
  29. # The user space configuration file names to use
  30. bootstrap_host_user_variables_filename: "user_variables.yml"
  31. bootstrap_host_user_secrets_filename: "user_secrets.yml"
  32. #
  33. # Paths to configuration file targets that should be created by the bootstrap
  34. bootstrap_host_target_config_paths:
  35. - /etc/openstack_deploy
  36. - /etc/openstack_deploy/conf.d
  37. - /etc/openstack_deploy/env.d
  38. # The user variables template to use
  39. bootstrap_user_variables_template: user_variables.aio.yml.j2
  40. ## Loopback volumes
  41. # Sparse loopback disks are used for the containers if there is no secondary
  42. # disk available to partition for btrfs. They are also used for Ceph, Cinder,
  43. # Swift and Nova (instance storage).
  44. # The size of the loopback volumes can be customized here (in gigabytes).
  45. #
  46. # Boolean option to deploy the loopback disk for Swap
  47. bootstrap_host_loopback_swap: no
  48. # Size of the Swap loopback disk in gigabytes (GB).
  49. bootstrap_host_loopback_swap_size: 4096
  50. #
  51. # Boolean option to deploy the loopback disk for Cinder
  52. bootstrap_host_loopback_cinder: yes
  53. # Size of the Cinder loopback disk in gigabytes (GB).
  54. bootstrap_host_loopback_cinder_size: 1024
  55. #
  56. # Boolean option to deploy the loopback disk for Swift
  57. bootstrap_host_loopback_swift: yes
  58. # Size of the Swift loopback disk in gigabytes (GB).
  59. bootstrap_host_loopback_swift_size: 1024
  60. #
  61. # Boolean option to deploy the loopback disk for Nova
  62. bootstrap_host_loopback_nova: yes
  63. # Size of the Nova loopback disk in gigabytes (GB).
  64. bootstrap_host_loopback_nova_size: 1024
  65. #
  66. # Boolean option to deploy the loopback disk for Manila
  67. bootstrap_host_loopback_manila: yes
  68. # Size of the Manila loopback disk in gigabytes (GB).
  69. bootstrap_host_loopback_manila_size: 1024
  70. #
  71. # Boolean option to deploy the loopback disk for machines
  72. bootstrap_host_loopback_machines: yes
  73. # Size of the machines loopback disk in gigabytes (GB).
  74. bootstrap_host_loopback_machines_size: 128
  75. #
  76. # Boolean option to deploy the loopback disk for btrfs
  77. bootstrap_host_loopback_btrfs: yes
  78. # Size of the btrfs loopback disk in gigabytes (GB).
  79. bootstrap_host_loopback_btrfs_size: 1024
  80. #
  81. # Boolean option to deploy the loopback disk for zfs
  82. bootstrap_host_loopback_zfs: yes
  83. # Size of the zfs loopback disk in gigabytes (GB).
  84. bootstrap_host_loopback_zfs_size: 1024
  85. #
  86. # Boolean option to deploy the OSD loopback disks and cluster UUID for Ceph
  87. bootstrap_host_ceph: "{{ 'ceph' in bootstrap_host_scenarios_expanded }}"
  88. # Size of the Ceph OSD loopbacks
  89. bootstrap_host_loopback_ceph_size: 1024
  90. # Ceph OSDs to create on the AIO host
  91. ceph_osd_images:
  92. - 'ceph1'
  93. - 'ceph2'
  94. - 'ceph3'
  95. ## Network configuration
  96. # Default network IP ranges
  97. mgmt_range: "172.29.236"
  98. vxlan_range: "172.29.240"
  99. storage_range: "172.29.244"
  100. vlan_range: "172.29.248"
  101. netmask: "255.255.252.0"
  102. #
  103. # NICs
  104. bootstrap_host_public_interface: "{{ ansible_default_ipv4.interface }}"
  105. #
  106. # Utility paths
  107. bootstrap_host_network_utils:
  108. apt:
  109. iptables: /sbin/iptables
  110. ethtool: /sbin/ethtool
  111. ip: /sbin/ip
  112. yum:
  113. iptables: /usr/sbin/iptables
  114. ethtool: /usr/sbin/ethtool
  115. ip: /usr/sbin/ip
  116. zypper:
  117. iptables: /usr/sbin/iptables
  118. ethtool: /sbin/ethtool
  119. ip: /sbin/ip
  120. #
  121. bootstrap_host_iptables_path: "{{ bootstrap_host_network_utils[ansible_pkg_mgr]['iptables'] }}"
  122. bootstrap_host_ethtool_path: "{{ bootstrap_host_network_utils[ansible_pkg_mgr]['ethtool'] }}"
  123. bootstrap_host_ip_path: "{{ bootstrap_host_network_utils[ansible_pkg_mgr]['ip'] }}"
  124. ## Extra storage
  125. # An AIO may optionally be built using a second storage device. If a
  126. # secondary disk device to use is not specified, then the AIO will be
  127. # built on any existing disk partitions.
  128. #
  129. # WARNING: The data on a secondary storage device specified here will
  130. # be destroyed and repartitioned.
  131. #
  132. # Enable detection for the secondary data disk
  133. # This does not run by default, but gate-check-commit and the OSA gate jobs
  134. # enable this because it is needed for RAX nodepool instances
  135. bootstrap_host_data_disk_device_detect: "{{ lookup('env', 'BOOTSTRAP_HOST_DETECT_DATA_DISK') |
  136. default(False, True) }}"
  137. # Specify the secondary disk device to use. When the data disk is in use, no NOT
  138. # set the full path to the device. IE: "/dev/xvde" should be "xvde".
  139. bootstrap_host_data_disk_device: null
  140. # Specify the default filesystem type
  141. bootstrap_host_data_disk_fs_type: ext4
  142. #
  143. # Boolean value to force the repartitioning of the secondary device.
  144. bootstrap_host_data_disk_device_force: no
  145. #
  146. # If the storage capacity on this device is greater than or equal to this
  147. # size (in GB), the bootstrap process will use it.
  148. # If metal, we don't need that much storage space.
  149. bootstrap_host_data_disk_min_size: "{{ (bootstrap_host_scenario is search('metal')) | ternary(10,50) }}"
  150. #
  151. # Set the data disk formats table. If the backing store is set to lvm the option
  152. # the partition will not actually be formatted however for parted, ext2 is used.
  153. bootstrap_host_data_disk2_formats:
  154. machinectl: btrfs
  155. zfs: zfs
  156. btrfs: btrfs
  157. xfs: xfs
  158. dir: ext4
  159. lvm: ext2
  160. bootstrap_host_format_options:
  161. machinectl: '--metadata single --data single --mixed'
  162. btrfs: '--metadata single --data single --mixed'
  163. xfs: '-K -d agcount=64 -l size=128m'
  164. ext4: '-O dir_index'
  165. #
  166. # Set the data disk mount options.
  167. bootstrap_host_data_mount_options:
  168. machinectl: "noatime,nodiratime,compress=lzo,commit=120,{{ (ansible_kernel is version('4.5', '>=')) | ternary('space_cache=v2', 'space_cache') }}"
  169. zfs: "defaults"
  170. btrfs: "noatime,nodiratime,compress=lzo,commit=120,{{ (ansible_kernel is version('4.5', '>=')) | ternary('space_cache=v2', 'space_cache') }}"
  171. xfs: "noatime,nodiratime,logbufs=8,logbsize=256k"
  172. ext4: "noatime,nobh,barrier=0,data=writeback"
  173. dir: "defaults"
  174. lvm: "defaults"
  175. swap: "%%"
  176. bootstrap_host_data_disk2_fs: "{{ bootstrap_host_data_disk2_formats[((bootstrap_host_container_tech == 'nspawn') | ternary('btrfs', lxc_container_backing_store))] }}"
  177. bootstrap_host_data_disk2_fs_mount_options: "{{ bootstrap_host_data_mount_options[((bootstrap_host_container_tech == 'nspawn') | ternary('btrfs', lxc_container_backing_store))] }}"
  178. bootstrap_host_data_disk2_path: "{{ (lxc_container_backing_store == 'machinectl' or bootstrap_host_container_tech == 'nspawn') | ternary('/var/lib/machines', '/var/lib/lxc') }}"
  179. ### Optional Settings ###
  180. # Specify the public IP address for the host.
  181. # By default the address will be set to the ipv4 address of the
  182. # host's network interface that has the default route on it.
  183. #bootstrap_host_public_address: 0.0.0.0
  184. # Set the install method for the deployment. Options are ['source', 'distro']
  185. bootstrap_host_install_method: "{{ lookup('env', 'INSTALL_METHOD') | default('source', true) }}"
  186. # Set the container technology in service. Options are nspawn and lxc.
  187. bootstrap_host_container_tech: "{{ (bootstrap_host_scenario is search('nspawn')) | ternary('nspawn', 'lxc') }}"
  188. # Set the lxc backing store for the job
  189. lxc_container_backing_store: dir