profitbricks.rst 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  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 >= 3.0.0
  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_id is the UUID of a pre-existing virtual data center.
  29. datacenter_id: 9e6709a0-6bf9-4bd6-8692-60349c70ce0e
  30. # Connect to public LAN ID 1.
  31. public_lan: 1
  32. ssh_public_key: /path/to/id_rsa.pub
  33. ssh_private_key: /path/to/id_rsa
  34. .. note::
  35. .. versionchanged:: 2015.8.0
  36. The ``provider`` parameter in cloud provider definitions was renamed to ``driver``. This
  37. change was made to avoid confusion with the ``provider`` parameter that is used in cloud profile
  38. definitions. Cloud provider definitions now use ``driver`` to refer to the Salt cloud module that
  39. provides the underlying functionality to connect to a cloud host, while cloud profiles continue
  40. to use ``provider`` to refer to provider configurations that you define.
  41. Virtual Data Center
  42. ===================
  43. ProfitBricks uses the concept of Virtual Data Centers. These are logically
  44. separated from one another and allow you to have a self-contained environment
  45. for all servers, volumes, networking, snapshots, and so forth.
  46. A list of existing virtual data centers can be retrieved with the following command:
  47. .. code-block:: bash
  48. salt-cloud -f list_datacenters my-profitbricks-config
  49. Authentication
  50. ==============
  51. The ``username`` and ``password`` are the same as those used to log into the
  52. ProfitBricks "Data Center Designer".
  53. Profiles
  54. ========
  55. Here is an example of a profile:
  56. .. code-block:: yaml
  57. profitbricks_staging
  58. provider: my-profitbricks-config
  59. size: Micro Instance
  60. image: 2f98b678-6e7e-11e5-b680-52540066fee9
  61. cores: 2
  62. ram: 4096
  63. public_lan: 1
  64. private_lan: 2
  65. ssh_public_key: /path/to/id_rsa.pub
  66. ssh_private_key: /path/to/id_rsa
  67. ssh_interface: private_lan
  68. profitbricks_production:
  69. provider: my-profitbricks-config
  70. image: Ubuntu-15.10-server-2016-05-01
  71. disk_type: SSD
  72. disk_size: 40
  73. cores: 8
  74. cpu_family: INTEL_XEON
  75. ram: 32768
  76. public_lan: 1
  77. private_lan: 2
  78. public_firewall_rules:
  79. Allow SSH:
  80. protocol: TCP
  81. source_ip: 1.2.3.4
  82. port_range_start: 22
  83. port_range_end: 22
  84. Allow Ping:
  85. protocol: ICMP
  86. icmp_type: 8
  87. ssh_public_key: /path/to/id_rsa.pub
  88. ssh_private_key: /path/to/id_rsa
  89. ssh_interface: private_lan
  90. volumes:
  91. db_data:
  92. disk_size: 500
  93. db_log:
  94. disk_size: 50
  95. disk_type: HDD
  96. disk_availability_zone: ZONE_3
  97. The following list explains some of the important properties.
  98. size
  99. Can be one of the options listed in the output of the following command:
  100. .. code-block:: bash
  101. salt-cloud --list-sizes my-profitbricks
  102. image
  103. Can be one of the options listed in the output of the following command:
  104. .. code-block:: bash
  105. salt-cloud --list-images my-profitbricks
  106. disk_size
  107. This option allows you to override the size of the disk as defined by the
  108. size. The disk size is set in gigabytes (GB).
  109. disk_type
  110. This option allow the disk type to be set to HDD or SSD. The default is
  111. HDD.
  112. disk_availability_zone
  113. This option will provision the volume in the specified availability_zone.
  114. cores
  115. This option allows you to override the number of CPU cores as defined by
  116. the size.
  117. ram
  118. This option allows you to override the amount of RAM defined by the size.
  119. The value must be a multiple of 256, e.g. 256, 512, 768, 1024, and so
  120. forth.
  121. availability_zone
  122. This options specifies in which availability zone the server should be
  123. built. Zones include ZONE_1 and ZONE_2. The default is AUTO.
  124. public_lan
  125. This option will connect the server to the specified public LAN. If no
  126. LAN exists, then a new public LAN will be created. The value accepts a LAN
  127. ID (integer).
  128. public_firewall_rules
  129. This option allows for a list of firewall rules assigned to the public
  130. network interface.
  131. Firewall Rule Name:
  132. protocol: <protocol> (TCP, UDP, ICMP)
  133. source_mac: <source-mac>
  134. source_ip: <source-ip>
  135. target_ip: <target-ip>
  136. port_range_start: <port-range-start>
  137. port_range_end: <port-range-end>
  138. icmp_type: <icmp-type>
  139. icmp_code: <icmp-code>
  140. nat
  141. This option will enable NAT on the private NIC.
  142. private_lan
  143. This option will connect the server to the specified private LAN. If no
  144. LAN exists, then a new private LAN will be created. The value accepts a LAN
  145. ID (integer).
  146. private_firewall_rules
  147. This option allows for a list of firewall rules assigned to the private
  148. network interface.
  149. Firewall Rule Name:
  150. protocol: <protocol> (TCP, UDP, ICMP)
  151. source_mac: <source-mac>
  152. source_ip: <source-ip>
  153. target_ip: <target-ip>
  154. port_range_start: <port-range-start>
  155. port_range_end: <port-range-end>
  156. icmp_type: <icmp-type>
  157. icmp_code: <icmp-code>
  158. ssh_private_key
  159. Full path to the SSH private key file.
  160. ssh_public_key
  161. Full path to the SSH public key file.
  162. ssh_interface
  163. This option will use the private LAN IP for node connections (such as
  164. bootstrapping the node) instead of the public LAN IP. The value accepts
  165. 'private_lan'.
  166. cpu_family
  167. This option allow the CPU family to be set to AMD_OPTERON or INTEL_XEON.
  168. The default is AMD_OPTERON.
  169. volumes:
  170. This option allows a list of additional volumes by name that will be
  171. created and attached to the server. Each volume requires 'disk_size'
  172. and, optionally, 'disk_type'. The default is HDD.
  173. deploy
  174. Set to False if Salt should not be installed on the node.
  175. wait_for_timeout
  176. The timeout to wait in seconds for provisioning resources such as servers.
  177. The default wait_for_timeout is 15 minutes.
  178. For more information concerning cloud profiles, see :ref:`here
  179. <salt-cloud-profiles>`.