profitbricks.rst 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. =================================
  2. Getting Started With ProfitBricks
  3. =================================
  4. ProfitBricks provides an enterprise-grade Infrastructure as a Service (IaaS)
  5. solution that can be managed through a browser-based "Data Center Designer"
  6. (DCD) tool or via an easy to use API. A unique feature of the ProfitBricks
  7. platform is that it allows you to define your own settings for cores, memory,
  8. and disk size without being tied to a particular server size.
  9. Dependencies
  10. ============
  11. * profitbricks >= 4.1.1
  12. Configuration
  13. =============
  14. * Using the new format, set up the cloud configuration at
  15. ``/etc/salt/cloud.providers`` or
  16. ``/etc/salt/cloud.providers.d/profitbricks.conf``:
  17. .. code-block:: yaml
  18. my-profitbricks-config:
  19. driver: profitbricks
  20. # Set the location of the salt-master
  21. #
  22. minion:
  23. master: saltmaster.example.com
  24. # Configure ProfitBricks authentication credentials
  25. #
  26. username: user@domain.com
  27. password: 123456
  28. # datacenter is the UUID of a pre-existing virtual data center.
  29. datacenter: 9e6709a0-6bf9-4bd6-8692-60349c70ce0e
  30. # delete_volumes is forcing a deletion of all volumes attached to a server on a deletion of a server
  31. delete_volumes: true
  32. # Connect to public LAN ID 1.
  33. public_lan: 1
  34. ssh_public_key: /path/to/id_rsa.pub
  35. ssh_private_key: /path/to/id_rsa
  36. .. note::
  37. .. versionchanged:: 2015.8.0
  38. The ``provider`` parameter in cloud provider definitions was renamed to ``driver``. This
  39. change was made to avoid confusion with the ``provider`` parameter that is used in cloud profile
  40. definitions. Cloud provider definitions now use ``driver`` to refer to the Salt cloud module that
  41. provides the underlying functionality to connect to a cloud host, while cloud profiles continue
  42. to use ``provider`` to refer to provider configurations that you define.
  43. Virtual Data Center
  44. ===================
  45. ProfitBricks uses the concept of Virtual Data Centers. These are logically
  46. separated from one another and allow you to have a self-contained environment
  47. for all servers, volumes, networking, snapshots, and so forth.
  48. A list of existing virtual data centers can be retrieved with the following command:
  49. .. code-block:: bash
  50. salt-cloud -f list_datacenters my-profitbricks-config
  51. A new data center can be created with the following command:
  52. .. code-block:: bash
  53. salt-cloud -f create_datacenter my-profitbricks-config name=example location=us/las description="my description"
  54. Authentication
  55. ==============
  56. The ``username`` and ``password`` are the same as those used to log into the
  57. ProfitBricks "Data Center Designer".
  58. Profiles
  59. ========
  60. Here is an example of a profile:
  61. .. code-block:: yaml
  62. profitbricks_staging
  63. provider: my-profitbricks-config
  64. size: Micro Instance
  65. image_alias: 'ubuntu:latest'
  66. # image or image_alias must be provided
  67. # image: 2f98b678-6e7e-11e5-b680-52540066fee9
  68. cores: 2
  69. ram: 4096
  70. public_lan: 1
  71. private_lan: 2
  72. ssh_public_key: /path/to/id_rsa.pub
  73. ssh_private_key: /path/to/id_rsa
  74. ssh_interface: private_lan
  75. profitbricks_production:
  76. provider: my-profitbricks-config
  77. image: Ubuntu-15.10-server-2016-05-01
  78. image_password: MyPassword1
  79. disk_type: SSD
  80. disk_size: 40
  81. cores: 8
  82. cpu_family: INTEL_XEON
  83. ram: 32768
  84. public_lan: 1
  85. public_ips:
  86. - 172.217.18.174
  87. private_lan: 2
  88. private_ips:
  89. - 192.168.100.10
  90. public_firewall_rules:
  91. Allow SSH:
  92. protocol: TCP
  93. source_ip: 1.2.3.4
  94. port_range_start: 22
  95. port_range_end: 22
  96. Allow Ping:
  97. protocol: ICMP
  98. icmp_type: 8
  99. ssh_public_key: /path/to/id_rsa.pub
  100. ssh_private_key: /path/to/id_rsa
  101. ssh_interface: private_lan
  102. volumes:
  103. db_data:
  104. disk_size: 500
  105. db_log:
  106. disk_size: 50
  107. disk_type: SSD
  108. Locations can be obtained using the ``--list-locations`` option for the ``salt-cloud``
  109. command:
  110. .. code-block:: bash
  111. # salt-cloud --list-locations my-profitbricks-config
  112. Images can be obtained using the ``--list-sizes`` option for the ``salt-cloud``
  113. command:
  114. .. code-block:: bash
  115. # salt-cloud --list-images my-profitbricks-config
  116. Sizes can be obtained using the ``--list-sizes`` option for the ``salt-cloud``
  117. command:
  118. .. code-block:: bash
  119. # salt-cloud --list-sizes my-profitbricks-config
  120. .. versionchanged:: 2019.2.0
  121. One or more public IP address can be reserved with the following command:
  122. .. code-block:: bash
  123. # salt-cloud -f reserve_ipblock my-profitbricks-config location='us/ewr' size=1
  124. Profile Specifics:
  125. ------------------
  126. The following list explains some of the important properties.
  127. - ``size`` - Can be one of the options listed in the output of the following
  128. command:
  129. .. code-block:: bash
  130. salt-cloud --list-sizes my-profitbricks-config
  131. - ``image`` - Can be one of the options listed in the output of the following
  132. command:
  133. .. code-block:: bash
  134. salt-cloud --list-images my-profitbricks-config
  135. - ``image_alias`` - Can be one of the options listed in the output of the
  136. following command:
  137. .. code-block:: bash
  138. salt-cloud -f list_images my-profitbricks-config
  139. - ``disk_size`` - This option allows you to override the size of the disk as
  140. defined by the size. The disk size is set in gigabytes (GB).
  141. - ``disk_type`` - This option allow the disk type to be set to HDD or SSD. The
  142. default is HDD.
  143. .. versionadded:: 2019.2.0
  144. - ``image_password`` - A password is set on the image for the "root" or
  145. "Administrator" account. This field may only be set during volume creation.
  146. Only valid with ProfitBricks supplied HDD (not ISO) images. The password must
  147. contain at least 8 and no more than 50 characters. Only these characters are
  148. allowed: [a-z][A-Z][0-9]
  149. - ``cores`` - This option allows you to override the number of CPU cores as
  150. defined by the size.
  151. - ``ram`` - This option allows you to override the amount of RAM defined by the
  152. size. The value must be a multiple of 256, e.g. 256, 512, 768, 1024, and so
  153. forth.
  154. - ``public_lan`` - This option will connect the server to the specified public
  155. LAN. If no LAN exists, then a new public LAN will be created. The value
  156. accepts a LAN ID (integer).
  157. .. versionadded:: 2019.2.0
  158. - ``public_ips`` - Public IPs assigned to the NIC in the public LAN.
  159. - ``public_firewall_rules`` - This option allows for a list of firewall rules
  160. assigned to the public network interface.
  161. .. code-block:: yaml
  162. Firewall Rule Name:
  163. protocol: <protocol> (TCP, UDP, ICMP)
  164. source_mac: <source-mac>
  165. source_ip: <source-ip>
  166. target_ip: <target-ip>
  167. port_range_start: <port-range-start>
  168. port_range_end: <port-range-end>
  169. icmp_type: <icmp-type>
  170. icmp_code: <icmp-code>
  171. - ``private_lan`` - This option will connect the server to the specified
  172. private LAN. If no LAN exists, then a new private LAN will be created. The
  173. value accepts a LAN ID (integer).
  174. .. versionadded:: 2019.2.0
  175. - ``private_ips`` - Private IPs assigned in the private LAN. NAT setting is
  176. ignored when this setting is active.
  177. - ``private_firewall_rules`` - This option allows for a list of firewall rules
  178. assigned to the private network interface.
  179. .. code-block:: yaml
  180. Firewall Rule Name:
  181. protocol: <protocol> (TCP, UDP, ICMP)
  182. source_mac: <source-mac>
  183. source_ip: <source-ip>
  184. target_ip: <target-ip>
  185. port_range_start: <port-range-start>
  186. port_range_end: <port-range-end>
  187. icmp_type: <icmp-type>
  188. icmp_code: <icmp-code>
  189. - ``ssh_private_key`` - Full path to the SSH private key file
  190. - ``ssh_public_key`` - Full path to the SSH public key file
  191. - ``ssh_interface`` - This option will use the private LAN IP for node
  192. connections (such as as bootstrapping the node) instead of the public LAN IP.
  193. The value accepts 'private_lan'.
  194. - ``cpu_family`` - This option allow the CPU family to be set to AMD_OPTERON or
  195. INTEL_XEON. The default is AMD_OPTERON.
  196. - ``volumes`` - This option allows a list of additional volumes by name that
  197. will be created and attached to the server. Each volume requires 'disk_size'
  198. and, optionally, 'disk_type'. The default is HDD.
  199. - ``deploy`` - Set to ``False`` if Salt should not be installed on the node.
  200. - ``wait_for_timeout`` - The timeout to wait in seconds for provisioning
  201. resources such as servers. The default wait_for_timeout is 15 minutes.
  202. For more information concerning cloud profiles, see :ref:`here
  203. <salt-cloud-profiles>`.