Merge lp:~jorge/juju-core/fix-merge-proposal-instructions into lp:juju-core/docs

Proposed by Jorge Castro
Status: Merged
Merged at revision: 127
Proposed branch: lp:~jorge/juju-core/fix-merge-proposal-instructions
Merge into: lp:juju-core/docs
Diff against target: 74 lines (+36/-9)
2 files modified
htmldocs/authors-charm-store.html (+2/-2)
htmldocs/charms-scaling.html (+34/-7)
To merge this branch: bzr merge lp:~jorge/juju-core/fix-merge-proposal-instructions
Reviewer Review Type Date Requested Status
Nick Veitch (community) Approve
Review via email: mp+187853@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Nick Veitch (evilnick) wrote :

just fixed spelling :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'htmldocs/authors-charm-store.html'
--- htmldocs/authors-charm-store.html 2013-09-18 15:10:22 +0000
+++ htmldocs/authors-charm-store.html 2013-09-26 17:08:35 +0000
@@ -99,8 +99,8 @@
99 <li>Modify it to meet your needs.</li>99 <li>Modify it to meet your needs.</li>
100 <li>Commit your fixes <tt>bzr commit -m'Your changelog entry goes here'</tt></li>100 <li>Commit your fixes <tt>bzr commit -m'Your changelog entry goes here'</tt></li>
101 <li><tt>bzr push lp:~your-launchpad-username/charms/precise/nagios/fixed-charms-name</tt></li>101 <li><tt>bzr push lp:~your-launchpad-username/charms/precise/nagios/fixed-charms-name</tt></li>
102 <li>Submit a <a class="reference external" href="https://help.launchpad.net/BranchMergeProposals">merge proposal</a> by going to the charms code page: <a class="reference external" href="https://code.launchpad.net/~charmers/charms/precise/nagios/trunk">https://code.launchpad.net/~charmers/charms/precise/nagios/trunk</a> and clicking &quot;Propose for merging&quot;</li>102 <li>Submit a <a class="reference external" href="https://help.launchpad.net/BranchMergeProposals">merge proposal</a> by going to your branche's code page: <tt>https://code.launchpad.net/~charmers/charms/precise/nagios/trunk</tt> and clicking &quot;Propose for merging&quot;</li>
103 <li>In the merge proposal form paste in the <tt>fixed-charms-name</span></tt> that you pushed to earlier.</li>103 <li>In the merge proposal form select the charm's lp name: <tt>~lp:charms/nagios</tt></li>
104 <li>For the reviewer field put the <tt>charmers</tt> team, this will get your code into the review queue!</li>104 <li>For the reviewer field put the <tt>charmers</tt> team, this will get your code into the review queue!</li>
105 </ol>105 </ol>
106 106
107107
=== modified file 'htmldocs/charms-scaling.html'
--- htmldocs/charms-scaling.html 2013-09-18 15:10:22 +0000
+++ htmldocs/charms-scaling.html 2013-09-26 17:08:35 +0000
@@ -68,6 +68,7 @@
68 <section id="charms-scaling">68 <section id="charms-scaling">
69 <h1>Scaling Charms</h1>69 <h1>Scaling Charms</h1>
70 <p>One of the killer features of computing in the cloud is that it (should) seamlessly allow you to scale up or down your services to meet your needs and whims. Juju not only makes it simple to deploy services, but crucially makes it easy to manage them too. It won't anticipate you getting slashdotted or on the front page of hacker news (yet), but it does mean that when you do you can reliably scale your services to meet the demand.</p>70 <p>One of the killer features of computing in the cloud is that it (should) seamlessly allow you to scale up or down your services to meet your needs and whims. Juju not only makes it simple to deploy services, but crucially makes it easy to manage them too. It won't anticipate you getting slashdotted or on the front page of hacker news (yet), but it does mean that when you do you can reliably scale your services to meet the demand.</p>
71
71 <h1> Adding Units </h1>72 <h1> Adding Units </h1>
72 <p> The general usage to scale a service up is via the <code>add-unit</code> command:</p>73 <p> The general usage to scale a service up is via the <code>add-unit</code> command:</p>
73<pre class="prettyprint">juju add-unit [options] &lt;service-name&gt;</pre>74<pre class="prettyprint">juju add-unit [options] &lt;service-name&gt;</pre>
@@ -81,14 +82,40 @@
81#the machine or container to deploy the unit in, bypasses constraints82#the machine or container to deploy the unit in, bypasses constraints
82--to &lt;machine&gt;83--to &lt;machine&gt;
83</pre>84</pre>
84 <p>Scaling up services is really as simple as asking for more instances. Consider the following setup for a mediawiki:</p>85
85<pre class="prettyprint">juju bootstrap86<h1>Scaling behind a Load Balancer</h1>
87
88Usually you just can't add more units to a service and have that magically scale, you need to put web heads behind a load balancer. In this case you can just deploy a proxy in front of your units; let's deploy a load balanced mediawiki:
89
90<pre class="prettyprint">
91juju deploy haproxy
92juju deploy mediawiki
86juju deploy mysql93juju deploy mysql
87juju deploy mediawiki94juju add-relation mediawiki mysql
88juju add-relation mysql mediawiki:db95juju add-relation mediawiki haproxy
89juju expose mediawiki</pre>96juju expose haproxy
90 <p>When you notice the mediawiki instance is struggling under the load of people making edits, you can simply scale up the service using the command:</p>97</pre>
91<pre class="prettyprint">juju add-unit mediawiki</pre>98
99<p>Then you can <code>juju status haproxy</code> to get the public IP for the load balancer. This is the IP you want to point your DNS to.</p>
100
101Now that you are behind a load balancer and the traffic is hitting it, you can grow the mediawiki instances behind the proxy as you see fit, let's add 5 more:
102
103<pre class="prettyprint">
104 juju add-unit -n5 mediawiki
105</pre>
106
107<p>You don't need to worry about manually adding your units to the load balancer, you've made the relationship at the <em>service level</em>, so the new units know exactly how to relate. Juju is also smart enough to ensure that the new units are installed and configured <em>before</em> adding them to the load balancer, ensuring minimal user disruption of the service.</p>
108
109<h1>Scaling Charms with built in Horizontal scaling</h1>
110
111 <p>Some charms just have native scaling built in, for example the WordPress charm has built in load balancing.
112 In this case Scaling up services is really as simple as asking for more instances. Note that this feature is charm specific, not all charms can scale this way. Consider the following setup for a WordPress:</p>
113<pre class="prettyprint">juju deploy mysql
114juju deploy wordpress
115juju add-relation mysql wordpress
116juju expose wordpress</pre>
117 <p>When you notice the WordPress instance is struggling under the load, you can simply scale up the service using the command:</p>
118<pre class="prettyprint">juju add-unit wordpress</pre>
92 <p>This will cause a new instance to be run and configured to work alongside the currently running one. Behind the scenes Juju is adding an instance to the Juju environment called a machine and provisioning the specified service onto that instance/machine.</p>119 <p>This will cause a new instance to be run and configured to work alongside the currently running one. Behind the scenes Juju is adding an instance to the Juju environment called a machine and provisioning the specified service onto that instance/machine.</p>
93 <p>Suppose your mysql service needs hyper-scale, you can use the <code>-n</code> or <code>--num-units</code> options to <code>add-unit</code> to specify the desired number of units you want to be added to the service. For example, to scale up your service by 100 units simply do:</p>120 <p>Suppose your mysql service needs hyper-scale, you can use the <code>-n</code> or <code>--num-units</code> options to <code>add-unit</code> to specify the desired number of units you want to be added to the service. For example, to scale up your service by 100 units simply do:</p>
94<pre class="prettyprint">juju add-unit -n 100 mysql</pre>121<pre class="prettyprint">juju add-unit -n 100 mysql</pre>

Subscribers

People subscribed via source and target branches