1
0

cloudstack.rst 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. ===============================
  2. Getting Started with CloudStack
  3. ===============================
  4. CloudStack is one the most popular cloud projects. It's an open source project
  5. to build public and/or private clouds. You can use Salt Cloud to launch
  6. CloudStack instances.
  7. Dependencies
  8. ============
  9. * Libcloud >= 0.13.2
  10. Configuration
  11. =============
  12. Using Salt for CloudStack, requires an ``API key`` and a ``secret key`` along with the API address endpoint information.
  13. .. code-block:: yaml
  14. # Note: This example is for /etc/salt/cloud.providers or any file in the
  15. # /etc/salt/cloud.providers.d/ directory.
  16. exoscale:
  17. driver: cloudstack
  18. host: api.exoscale.com
  19. path: /compute
  20. apikey: EXOAPIKEY
  21. secretkey: EXOSECRETKEYINYOURACCOUNT
  22. .. note::
  23. .. versionchanged:: 2015.8.0
  24. The ``provider`` parameter in cloud provider definitions was renamed to ``driver``. This
  25. change was made to avoid confusion with the ``provider`` parameter that is used in cloud profile
  26. definitions. Cloud provider definitions now use ``driver`` to refer to the Salt cloud module that
  27. provides the underlying functionality to connect to a cloud host, while cloud profiles continue
  28. to use ``provider`` to refer to provider configurations that you define.
  29. Profiles
  30. ========
  31. Cloud Profiles
  32. ~~~~~~~~~~~~~~
  33. Set up an initial profile at ``/etc/salt/cloud.profiles`` or in the
  34. ``/etc/salt/cloud.profiles.d/`` directory:
  35. .. code-block:: yaml
  36. exoscale-ubuntu:
  37. provider: exoscale-config
  38. image: Linux Ubuntu 18.04
  39. size: Small
  40. location: ch-gva-2
  41. ssh_username: ubuntu
  42. Locations can be obtained using the ``--list-locations`` option for the ``salt-cloud``
  43. command:
  44. .. code-block:: bash
  45. # salt-cloud --list-locations exoscale-config
  46. exoscale:
  47. ----------
  48. cloudstack:
  49. ----------
  50. ch-dk-2:
  51. ----------
  52. country:
  53. Unknown
  54. driver:
  55. id:
  56. 91e5e9e4-c9ed-4b76-bee4-427004b3baf9
  57. name:
  58. ch-dk-2
  59. ch-gva-2:
  60. ----------
  61. country:
  62. Unknown
  63. driver:
  64. id:
  65. 1128bd56-b4d9-4ac6-a7b9-c715b187ce11
  66. name:
  67. ch-gva-2
  68. Sizes can be obtained using the ``--list-sizes`` option for the ``salt-cloud``
  69. command:
  70. .. code-block:: bash
  71. # salt-cloud --list-sizes exoscale
  72. exoscale:
  73. ----------
  74. cloudstack:
  75. ----------
  76. Extra-large:
  77. ----------
  78. bandwidth:
  79. 0
  80. disk:
  81. 0
  82. driver:
  83. extra:
  84. ----------
  85. cpu:
  86. 4
  87. get_uuid:
  88. id:
  89. 350dc5ea-fe6d-42ba-b6c0-efb8b75617ad
  90. name:
  91. Extra-large
  92. price:
  93. 0
  94. ram:
  95. 16384
  96. uuid:
  97. edb4cd4ae14bbf152d451b30c4b417ab095a5bfe
  98. ...SNIP...
  99. Images can be obtained using the ``--list-images`` option for the ``salt-cloud``
  100. command:
  101. .. code-block:: console
  102. # salt-cloud --list-images exoscale
  103. exoscale:
  104. ----------
  105. cloudstack:
  106. ----------
  107. Linux CentOS 6.6 64-bit:
  108. ----------
  109. driver:
  110. extra:
  111. ----------
  112. displaytext:
  113. Linux CentOS 6.6 64-bit 10G Disk (2014-12-01-bac8e0)
  114. format:
  115. QCOW2
  116. hypervisor:
  117. KVM
  118. os:
  119. Other PV (64-bit)
  120. size:
  121. 10737418240
  122. get_uuid:
  123. id:
  124. aa69ae64-1ea9-40af-8824-c2c3344e8d7c
  125. name:
  126. Linux CentOS 6.6 64-bit
  127. uuid:
  128. f26b4f54ec8591abdb6b5feb3b58f720aa438fee
  129. ...SNIP...
  130. CloudStack specific settings
  131. ============================
  132. securitygroup
  133. ~~~~~~~~~~~~~~
  134. .. versionadded:: 2017.7.0
  135. You can specify a list of security groups (by name or id) that should be
  136. assigned to the VM:
  137. .. code-block:: yaml
  138. exoscale:
  139. provider: cloudstack
  140. securitygroup:
  141. - default
  142. - salt-master