1 heat_template_version: 2014-10-16
4 Extra config to add swap space to nodes.
6 # Parameters passed from the parent template - note if you maintain
7 # out-of-tree templates they may require additional parameters if the
8 # in-tree templates add a new role.
16 objectstorage_servers:
22 description: Amount of swap space to allocate in megabytes
26 description: Full path to location of swap file
33 type: OS::Heat::SoftwareConfig
39 if [ ! -f $swap_path ]; then
40 dd if=/dev/zero of=$swap_path count=$swap_size_megabytes bs=1M
45 echo "$swap_path already exists"
47 echo "$swap_path swap swap defaults 0 0" >> /etc/fstab
49 - name: swap_size_megabytes
50 description: Amount of swap space to allocate in megabytes
53 description: Full path to location of swap file
56 ControllerSwapDeployment:
57 type: OS::Heat::SoftwareDeploymentGroup
59 config: {get_resource: SwapConfig}
60 servers: {get_param: controller_servers}
62 swap_size_megabytes: {get_param: swap_size_megabytes}
63 swap_path: {get_param: swap_path}
66 ComputeSwapDeployment:
67 type: OS::Heat::SoftwareDeploymentGroup
69 config: {get_resource: SwapConfig}
70 servers: {get_param: compute_servers}
72 swap_size_megabytes: {get_param: swap_size_megabytes}
73 swap_path: {get_param: swap_path}
76 BlockStorageSwapDeployment:
77 type: OS::Heat::SoftwareDeploymentGroup
79 config: {get_resource: SwapConfig}
80 servers: {get_param: blockstorage_servers}
82 swap_size_megabytes: {get_param: swap_size_megabytes}
83 swap_path: {get_param: swap_path}
86 ObjectStorageSwapDeployment:
87 type: OS::Heat::SoftwareDeploymentGroup
89 config: {get_resource: SwapConfig}
90 servers: {get_param: objectstorage_servers}
92 swap_size_megabytes: {get_param: swap_size_megabytes}
93 swap_path: {get_param: swap_path}
96 CephStorageSwapDeployment:
97 type: OS::Heat::SoftwareDeploymentGroup
99 config: {get_resource: SwapConfig}
100 servers: {get_param: cephstorage_servers}
102 swap_size_megabytes: {get_param: swap_size_megabytes}
103 swap_path: {get_param: swap_path}