user_data.j2 724 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #cloud-config
  2. {% if type =='etcd' %}
  3. cloud_config_modules:
  4. - disk_setup
  5. - mounts
  6. mounts:
  7. - [ xvdb, /var/lib/etcd, xfs, "defaults" ]
  8. disk_setup:
  9. xvdb:
  10. table_type: mbr
  11. layout: True
  12. fs_setup:
  13. - label: etcd_storage
  14. filesystem: xfs
  15. device: /dev/xvdb
  16. partition: auto
  17. {% endif %}
  18. {% if type == 'node' %}
  19. mounts:
  20. - [ xvdb ]
  21. - [ ephemeral0 ]
  22. write_files:
  23. - content: |
  24. DEVS=/dev/xvdb
  25. VG=docker_vg
  26. path: /etc/sysconfig/docker-storage-setup
  27. owner: root:root
  28. permissions: '0644'
  29. {% endif %}
  30. {% if deployment_type == 'online' %}
  31. devices: ['/var'] # Workaround for https://bugs.launchpad.net/bugs/1455436
  32. disable_root: 0
  33. growpart:
  34. mode: auto
  35. devices: ['/var']
  36. runcmd:
  37. - xfs_growfs /var
  38. {% endif %}