€cdocutils.nodes
document
q)�q}q(U	nametypesq}q(X   getting startedqNX"   1. instantiate a rackspace client.qNXO   2. retrieve the server instances you want to add as nodes of the load balancer.qNX/   5. create the load balancer with the two nodes.q	NX   load balancersq
NX
   next stepsqNX/   4. define a load balancer node for each server.qNX9   3. obtain a load balancer service object from the client.qNuUsubstitution_defsq}qUparse_messagesq]qUcurrent_sourceqNU
decorationqNUautofootnote_startqKUnameidsq}q(hUgetting-startedqhUinstantiate-a-rackspace-clientqhUKretrieve-the-server-instances-you-want-to-add-as-nodes-of-the-load-balancerqh	U+create-the-load-balancer-with-the-two-nodesqh
Uload-balancersqhU
next-stepsqhU+define-a-load-balancer-node-for-each-serverqhU5obtain-a-load-balancer-service-object-from-the-clientquUchildrenq]q cdocutils.nodes
section
q!)�q"}q#(U	rawsourceq$U Uparentq%hUsourceq&XP   /Users/jamie/projects/php/php-opencloud/doc/services/load-balancer/README.md.rstq'Utagnameq(Usectionq)U
attributesq*}q+(Udupnamesq,]Uclassesq-]Ubackrefsq.]Uidsq/]q0haUnamesq1]q2h
auUlineq3KUdocumentq4hh]q5(cdocutils.nodes
title
q6)�q7}q8(h$X   Load Balancersq9h%h"h&h'h(Utitleq:h*}q;(h,]h-]h.]h/]h1]uh3Kh4hh]q<cdocutils.nodes
Text
q=X   Load Balancersq>…�q?}q@(h$h9h%h7ubaubcdocutils.nodes
paragraph
qA)�qB}qC(h$X²   A **load balancer** is a device that distributes incoming network
traffic amongst multiple back-end systems. These back-end systems are
called the **nodes** of the load balancer.h%h"h&h'h(U	paragraphqDh*}qE(h,]h-]h.]h/]h1]uh3Kh4hh]qF(h=X   A qG…�qH}qI(h$X   A h%hBubcdocutils.nodes
strong
qJ)�qK}qL(h$X   **load balancer**h*}qM(h,]h-]h.]h/]h1]uh%hBh]qNh=X   load balancerqO…�qP}qQ(h$U h%hKubah(UstrongqRubh=X€    is a device that distributes incoming network
traffic amongst multiple back-end systems. These back-end systems are
called the qS…�qT}qU(h$X€    is a device that distributes incoming network
traffic amongst multiple back-end systems. These back-end systems are
called the h%hBubhJ)�qV}qW(h$X	   **nodes**h*}qX(h,]h-]h.]h/]h1]uh%hBh]qYh=X   nodesqZ…�q[}q\(h$U h%hVubah(hRubh=X    of the load balancer.q]…�q^}q_(h$X    of the load balancer.h%hBubeubh!)�q`}qa(h$U h%h"h&h'h(h)h*}qb(h,]h-]h.]h/]qchah1]qdhauh3K	h4hh]qe(h6)�qf}qg(h$X   Getting startedqhh%h`h&h'h(h:h*}qi(h,]h-]h.]h/]h1]uh3K	h4hh]qjh=X   Getting startedqk…�ql}qm(h$hhh%hfubaubh!)�qn}qo(h$U h%h`h&h'h(h)h*}qp(h,]h-]h.]h/]qqhah1]qrhauh3Kh4hh]qs(h6)�qt}qu(h$X"   1. Instantiate a Rackspace client.qvh%hnh&h'h(h:h*}qw(h,]h-]h.]h/]h1]uh3Kh4hh]qxh=X"   1. Instantiate a Rackspace client.qy…�qz}q{(h$hvh%htubaubcdocutils.nodes
literal_block
q|)�q}}q~(h$XÕ   use OpenCloud\Rackspace;

$client = new Rackspace(Rackspace::US_IDENTITY_ENDPOINT, array(
    'username' => '<YOUR RACKSPACE CLOUD ACCOUNT USERNAME>',
    'apiKey'   => '<YOUR RACKSPACE CLOUD ACCOUNT API KEY>'
));h%hnh&h'h(Uliteral_blockqh*}q€(U	xml:spaceq�Upreserveq‚h/]h.]h,]h-]qƒ(Ucodeq„X   phpq…eh1]uh3Kh4hh]q†cdocutils.nodes
inline
q‡)�qˆ}q‰(h$XÕ   use OpenCloud\Rackspace;

$client = new Rackspace(Rackspace::US_IDENTITY_ENDPOINT, array(
    'username' => '<YOUR RACKSPACE CLOUD ACCOUNT USERNAME>',
    'apiKey'   => '<YOUR RACKSPACE CLOUD ACCOUNT API KEY>'
));h*}qŠ(h,]h-]q‹UotherqŒah.]h/]h1]uh%h}h]q�h=XÕ   use OpenCloud\Rackspace;

$client = new Rackspace(Rackspace::US_IDENTITY_ENDPOINT, array(
    'username' => '<YOUR RACKSPACE CLOUD ACCOUNT USERNAME>',
    'apiKey'   => '<YOUR RACKSPACE CLOUD ACCOUNT API KEY>'
));qŽ…�q�}q�(h$U h%hˆubah(Uinlineq‘ubaubeubh!)�q’}q“(h$U h%h`h&h'h(h)h*}q”(h,]h-]h.]h/]q•hah1]q–hauh3Kh4hh]q—(h6)�q˜}q™(h$XO   2. Retrieve the server instances you want to add as nodes of the load balancer.qšh%h’h&h'h(h:h*}q›(h,]h-]h.]h/]h1]uh3Kh4hh]qœh=XO   2. Retrieve the server instances you want to add as nodes of the load balancer.q�…�qž}qŸ(h$hšh%h˜ubaubh|)�q }q¡(h$Xç   $computeService = $client->computeService('cloudServersOpenStack', 'DFW');

$serverOne = $computeService->server('e836fc4e-056d-4447-a80e-fefcaa640216');
$serverTwo = $computeService->server('5399cd36-a23f-41a6-bdf7-20902aec0e74');h%h’h&h'h(hh*}q¢(h�h‚h/]h.]h,]h-]q£(h„X   phpq¤eh1]uh3K!h4hh]q¥h‡)�q¦}q§(h$Xç   $computeService = $client->computeService('cloudServersOpenStack', 'DFW');

$serverOne = $computeService->server('e836fc4e-056d-4447-a80e-fefcaa640216');
$serverTwo = $computeService->server('5399cd36-a23f-41a6-bdf7-20902aec0e74');h*}q¨(h,]h-]q©Uotherqªah.]h/]h1]uh%h h]q«h=Xç   $computeService = $client->computeService('cloudServersOpenStack', 'DFW');

$serverOne = $computeService->server('e836fc4e-056d-4447-a80e-fefcaa640216');
$serverTwo = $computeService->server('5399cd36-a23f-41a6-bdf7-20902aec0e74');q¬…�q­}q®(h$U h%h¦ubah(h‘ubaubhA)�q¯}q°(h$Xª   The example above uses two server instances that have already been
created. It retrieves the server instances using their IDs. See also:
`creating server instances <>`__.h%h’h&h'h(hDh*}q±(h,]h-]h.]h/]h1]uh3K"h4hh]q²(h=X‰   The example above uses two server instances that have already been
created. It retrieves the server instances using their IDs. See also:
q³…�q´}qµ(h$X‰   The example above uses two server instances that have already been
created. It retrieves the server instances using their IDs. See also:
h%h¯ubcdocutils.nodes
problematic
q¶)�q·}q¸(h$X    `creating server instances <>`__q¹h%h¯h&Nh(Uproblematicqºh*}q»(h/]q¼Uid2q½ah.]h,]h-]h1]UrefidUid1q¾uh3Nh4hh]q¿h=X    `creating server instances <>`__qÀ…�qÁ}qÂ(h$U h%h·ubaubh=X   .…�qÃ}qÄ(h$X   .h%h¯ubeubeubh!)�qÅ}qÆ(h$U h%h`h&h'h(h)h*}qÇ(h,]h-]h.]h/]qÈhah1]qÉhauh3K'h4hh]qÊ(h6)�qË}qÌ(h$X9   3. Obtain a Load Balancer service object from the client.qÍh%hÅh&h'h(h:h*}qÎ(h,]h-]h.]h/]h1]uh3K'h4hh]qÏh=X9   3. Obtain a Load Balancer service object from the client.qÐ…�qÑ}qÒ(h$hÍh%hËubaubhA)�qÓ}qÔ(h$Xk   This object will be used to first define the load balancer nodes and
later create the load balancer itself.qÕh%hÅh&h'h(hDh*}qÖ(h,]h-]h.]h/]h1]uh3K)h4hh]q×h=Xk   This object will be used to first define the load balancer nodes and
later create the load balancer itself.qØ…�qÙ}qÚ(h$hÕh%hÓubaubh|)�qÛ}qÜ(h$XQ   $loadBalancerService = $client->loadBalancerService('cloudLoadBalancers', 'DFW');h%hÅh&h'h(hh*}qÝ(h�h‚h/]h.]h,]h-]qÞ(h„X   phpqßeh1]uh3K/h4hh]qàh‡)�qá}qâ(h$XQ   $loadBalancerService = $client->loadBalancerService('cloudLoadBalancers', 'DFW');h*}qã(h,]h-]qäUotherqåah.]h/]h1]uh%hÛh]qæh=XQ   $loadBalancerService = $client->loadBalancerService('cloudLoadBalancers', 'DFW');qç…�qè}qé(h$U h%háubah(h‘ubaubeubh!)�qê}që(h$U h%h`h&h'h(h)h*}qì(h,]h-]h.]h/]qíhah1]qîhauh3K1h4hh]qï(h6)�qð}qñ(h$X/   4. Define a load balancer node for each server.qòh%hêh&h'h(h:h*}qó(h,]h-]h.]h/]h1]uh3K1h4hh]qôh=X/   4. Define a load balancer node for each server.qõ…�qö}q÷(h$hòh%hðubaubh|)�qø}qù(h$X•  $loadBalancer = $loadBalancerService->loadBalancer();

$serverOneNode = $loadBalancer->node();
$serverOneNode->address = $serverOne->addresses->private[0]->addr;
$serverOneNode->port = 8080;
$serverOneNode->condition = 'ENABLED';

$serverTwoNode = $loadBalancer->node();
$serverTwoNode->address = $serverTwo->addresses->private[0]->addr;
$serverTwoNode->port = 8080;
$serverTwoNode->condition = 'ENABLED';h%hêh&h'h(hh*}qú(h�h‚h/]h.]h,]h-]qû(h„X   phpqüeh1]uh3K@h4hh]qýh‡)�qþ}qÿ(h$X•  $loadBalancer = $loadBalancerService->loadBalancer();

$serverOneNode = $loadBalancer->node();
$serverOneNode->address = $serverOne->addresses->private[0]->addr;
$serverOneNode->port = 8080;
$serverOneNode->condition = 'ENABLED';

$serverTwoNode = $loadBalancer->node();
$serverTwoNode->address = $serverTwo->addresses->private[0]->addr;
$serverTwoNode->port = 8080;
$serverTwoNode->condition = 'ENABLED';h*}r   (h,]h-]r  Uotherr  ah.]h/]h1]uh%høh]r  h=X•  $loadBalancer = $loadBalancerService->loadBalancer();

$serverOneNode = $loadBalancer->node();
$serverOneNode->address = $serverOne->addresses->private[0]->addr;
$serverOneNode->port = 8080;
$serverOneNode->condition = 'ENABLED';

$serverTwoNode = $loadBalancer->node();
$serverTwoNode->address = $serverTwo->addresses->private[0]->addr;
$serverTwoNode->port = 8080;
$serverTwoNode->condition = 'ENABLED';r  …�r  }r  (h$U h%hþubah(h‘ubaubhA)�r  }r  (h$Xä   In the example above, each node runs a service that listens on port
8080. Further, each node will start out as ``ENABLED``, which means it
will be ready to receive network traffic from the load balancer as soon
as it is created.h%hêh&h'h(hDh*}r	  (h,]h-]h.]h/]h1]uh3KAh4hh]r
  (h=Xo   In the example above, each node runs a service that listens on port
8080. Further, each node will start out as r  …�r  }r  (h$Xo   In the example above, each node runs a service that listens on port
8080. Further, each node will start out as h%j  ubcdocutils.nodes
literal
r  )�r  }r  (h$X   ``ENABLED``h*}r  (h,]h-]h.]h/]h1]uh%j  h]r  h=X   ENABLEDr  …�r  }r  (h$U h%j  ubah(Uliteralr  ubh=Xj   , which means it
will be ready to receive network traffic from the load balancer as soon
as it is created.r  …�r  }r  (h$Xj   , which means it
will be ready to receive network traffic from the load balancer as soon
as it is created.h%j  ubeubeubh!)�r  }r  (h$U h%h`h&h'h(h)h*}r  (h,]h-]h.]h/]r  hah1]r  h	auh3KGh4hh]r  (h6)�r   }r!  (h$X/   5. Create the load balancer with the two nodes.r"  h%j  h&h'h(h:h*}r#  (h,]h-]h.]h/]h1]uh3KGh4hh]r$  h=X/   5. Create the load balancer with the two nodes.r%  …�r&  }r'  (h$j"  h%j   ubaubh|)�r(  }r)  (h$XÐ   $loadBalancer->addVirtualIp('PUBLIC');
$loadBalancer->create(array(
    'name' => 'My smart load balancer',
    'port' => 80,
    'protocol' => 'HTTP',
    'nodes' => array($serverOneNode, $serverTwoNode)
));h%j  h&h'h(hh*}r*  (h�h‚h/]h.]h,]h-]r+  (h„X   phpr,  eh1]uh3KRh4hh]r-  h‡)�r.  }r/  (h$XÐ   $loadBalancer->addVirtualIp('PUBLIC');
$loadBalancer->create(array(
    'name' => 'My smart load balancer',
    'port' => 80,
    'protocol' => 'HTTP',
    'nodes' => array($serverOneNode, $serverTwoNode)
));h*}r0  (h,]h-]r1  Uotherr2  ah.]h/]h1]uh%j(  h]r3  h=XÐ   $loadBalancer->addVirtualIp('PUBLIC');
$loadBalancer->create(array(
    'name' => 'My smart load balancer',
    'port' => 80,
    'protocol' => 'HTTP',
    'nodes' => array($serverOneNode, $serverTwoNode)
));r4  …�r5  }r6  (h$U h%j.  ubah(h‘ubaubhA)�r7  }r8  (h$XÝ   In the example above, the load balancer will have a virtual IP address
accessible from the public Internet. Also notice that the port the load
balancer listens on (80) does not need to match the ports of its nodes
(8080).r9  h%j  h&h'h(hDh*}r:  (h,]h-]h.]h/]h1]uh3KSh4hh]r;  h=XÝ   In the example above, the load balancer will have a virtual IP address
accessible from the public Internet. Also notice that the port the load
balancer listens on (80) does not need to match the ports of its nodes
(8080).r<  …�r=  }r>  (h$j9  h%j7  ubaubeubeubh!)�r?  }r@  (h$U h%h"h&h'h(h)h*}rA  (h,]h-]h.]h/]rB  hah1]rC  hauh3KYh4hh]rD  (h6)�rE  }rF  (h$X
   Next stepsrG  h%j?  h&h'h(h:h*}rH  (h,]h-]h.]h/]h1]uh3KYh4hh]rI  h=X
   Next stepsrJ  …�rK  }rL  (h$jG  h%jE  ubaubhA)�rM  }rN  (h$XŒ   Once you have created a load balancer, there is a lot you can do with
it. See the `complete user guide for load balancers <USERGUIDE.md>`__.h%j?  h&h'h(hDh*}rO  (h,]h-]h.]h/]h1]uh3K[h4hh]rP  (h=XR   Once you have created a load balancer, there is a lot you can do with
it. See the rQ  …�rR  }rS  (h$XR   Once you have created a load balancer, there is a lot you can do with
it. See the h%jM  ubcdocutils.nodes
reference
rT  )�rU  }rV  (h$X9   `complete user guide for load balancers <USERGUIDE.md>`__h*}rW  (UnameX&   complete user guide for load balancersUrefurirX  X   USERGUIDE.mdh/]h.]h,]h-]h1]uh%jM  h]rY  h=X&   complete user guide for load balancersrZ  …�r[  }r\  (h$U h%jU  ubah(U	referencer]  ubh=X   .…�r^  }r_  (h$X   .h%jM  ubeubeubeubah$U Utransformerr`  NUfootnote_refsra  }rb  Urefnamesrc  }rd  Usymbol_footnotesre  ]rf  Uautofootnote_refsrg  ]rh  Usymbol_footnote_refsri  ]rj  U	citationsrk  ]rl  h4hUcurrent_linerm  NUtransform_messagesrn  ]ro  cdocutils.nodes
system_message
rp  )�rq  }rr  (h$U h*}rs  (h,]UlevelKh/]rt  h¾ah.]ru  h½aUsourceh'h-]h1]UtypeUERRORrv  uh]rw  hA)�rx  }ry  (h$U h*}rz  (h,]h-]h.]h/]h1]uh%jq  h]r{  h=X[   Anonymous hyperlink mismatch: 1 references but 0 targets.
See "backrefs" attribute for IDs.r|  …�r}  }r~  (h$U h%jx  ubah(hDubah(Usystem_messager  ubaUreporterr€  NUid_startr�  KUautofootnotesr‚  ]rƒ  Ucitation_refsr„  }r…  Uindirect_targetsr†  ]r‡  Usettingsrˆ  (cdocutils.frontend
Values
r‰  orŠ  }r‹  (Ufootnote_backlinksrŒ  KUrecord_dependenciesr�  NUrfc_base_urlrŽ  Uhttp://tools.ietf.org/html/r�  U	tracebackr�  ˆUpep_referencesr‘  NUstrip_commentsr’  NUtoc_backlinksr“  Uentryr”  Ulanguage_coder•  Uenr–  U	datestampr—  NUreport_levelr˜  KU_destinationr™  NU
halt_levelrš  KUstrip_classesr›  Nh:NUerror_encoding_error_handlerrœ  Ubackslashreplacer�  Udebugrž  NUembed_stylesheetrŸ  ‰Uoutput_encoding_error_handlerr   Ustrictr¡  Usectnum_xformr¢  KUdump_transformsr£  NUdocinfo_xformr¤  KUwarning_streamr¥  NUpep_file_url_templater¦  Upep-%04dr§  Uexit_status_levelr¨  KUconfigr©  NUstrict_visitorrª  NUcloak_email_addressesr«  ˆUtrim_footnote_reference_spacer¬  ‰Uenvr­  NUdump_pseudo_xmlr®  NUexpose_internalsr¯  NUsectsubtitle_xformr°  ‰Usource_linkr±  NUrfc_referencesr²  NUoutput_encodingr³  Uutf-8r´  U
source_urlrµ  NUinput_encodingr¶  U	utf-8-sigr·  U_disable_configr¸  NU	id_prefixr¹  U U	tab_widthrº  KUerror_encodingr»  UUTF-8r¼  U_sourcer½  h'Ugettext_compactr¾  ˆU	generatorr¿  NUdump_internalsrÀ  NUsmart_quotesrÁ  ‰Upep_base_urlrÂ  Uhttp://www.python.org/dev/peps/rÃ  Usyntax_highlightrÄ  UlongrÅ  Uinput_encoding_error_handlerrÆ  j¡  Uauto_id_prefixrÇ  UidrÈ  Udoctitle_xformrÉ  ‰Ustrip_elements_with_classesrÊ  NU_config_filesrË  ]rÌ  Ufile_insertion_enabledrÍ  ˆUraw_enabledrÎ  KUdump_settingsrÏ  NubUsymbol_footnote_startrÐ  K UidsrÑ  }rÒ  (hhêhh"hhÅh½h·hj?  hh’hh`hhnh¾jq  hj  uUsubstitution_namesrÓ  }rÔ  h(h4h*}rÕ  (h,]h/]h.]Usourceh'h-]h1]uU	footnotesrÖ  ]r×  UrefidsrØ  }rÙ  ub.