Merge lp:~mark-mims/juju-core/docs-service-groups into lp:juju-core/docs
- docs-service-groups
- Merge into docs
Proposed by
Mark Mims
Status: | Merged |
---|---|
Approved by: | Nick Veitch |
Approved revision: | no longer in the source branch. |
Merged at revision: | 87 |
Proposed branch: | lp:~mark-mims/juju-core/docs-service-groups |
Merge into: | lp:juju-core/docs |
Diff against target: |
303 lines (+276/-1) 3 files modified
htmldocs/charms-service-groups.html (+273/-0) htmldocs/navigation.html (+1/-0) htmldocs/navigation.json (+2/-1) |
To merge this branch: | bzr merge lp:~mark-mims/juju-core/docs-service-groups |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jorge Castro (community) | Approve | ||
Review via email:
|
Commit message
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === added file 'htmldocs/charms-service-groups.html' |
2 | --- htmldocs/charms-service-groups.html 1970-01-01 00:00:00 +0000 |
3 | +++ htmldocs/charms-service-groups.html 2013-08-30 19:55:54 +0000 |
4 | @@ -0,0 +1,273 @@ |
5 | +<!DOCTYPE html> |
6 | +<html> |
7 | + <head> |
8 | + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
9 | + <title>Juju Documentation - Groups of Services</title> |
10 | + <link href='https://fonts.googleapis.com/css?family=Ubuntu:400,300,300italic,400italic,700,700italic|Ubuntu+Mono' rel='stylesheet' type='text/css' /> |
11 | + <link rel="stylesheet" type="text/css" media="screen" href="//juju.ubuntu.com/wp-content/themes/juju-website/css/reset.css" /> |
12 | + <link rel="stylesheet" type="text/css" media="screen" href="//juju.ubuntu.com/wp-content/themes/juju-website/css/960.css" /> |
13 | + <link rel="stylesheet" type="text/css" media="screen" href="//juju.ubuntu.com/wp-content/themes/juju-website/css/base.css" /> |
14 | + <link rel="stylesheet" type="text/css" media="screen" href="//juju.ubuntu.com/wp-content/themes/juju-website/css/home-new.css" /> |
15 | + <link rel='stylesheet' id='stacktack-css' href='//juju.ubuntu.com/wp-content/plugins/stacktack/css/stacktack.min.css?ver=3.4.2' type='text/css' media='all' /> |
16 | + <link href="css/main.css?1375975745" rel="stylesheet" type="text/css"/> |
17 | + |
18 | + <!--[if lt IE 9]> |
19 | + <script type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script> |
20 | + <![endif]--> |
21 | +</head> |
22 | + <body class="resources"> |
23 | + <header class="global clearfix" role="banner"> |
24 | + <div class="header-navigation"> |
25 | + <div> |
26 | + <nav role="navigation"> |
27 | + <ul> |
28 | + <li class="page_item page-item-6"><a href="https://juju.ubuntu.com/">Home</a></li> |
29 | + <li class="page_item page-item-7"><a href="https://juju.ubuntu.com/get-started/">Get started</a></li> |
30 | + <li class="page_item page-item-9 current_page_item"><a href="https://juju.ubuntu.com/resources/">Resources</a></li> |
31 | + <li class="page_item page-item-13"><a href="https://juju.ubuntu.com/community/">Community</a></li> |
32 | + <li class="page_item page-item-3688"><a href="https://juju.ubuntu.com/charm-store/">Charm Store</a></li> |
33 | + <li class="page_item page-item-3691"><a href="https://juju.ubuntu.com/events/">Events</a></li> |
34 | + <li class="page_item page-item-4474"><a href="https://juju.ubuntu.com/charm-championship/">Charm Championship</a></li> |
35 | + <li class="page_item page-item-4249"><a href="https://juju.ubuntu.com/survey/">Survey</a></li> |
36 | + <li> |
37 | + <form id="form-search" method="get" action="https://juju.ubuntu.com/"> |
38 | + <fieldset> |
39 | + <input id="input-search" type="text" name="s" value="Search" /> |
40 | + </fieldset> |
41 | + </form> |
42 | + </li> |
43 | + </ul> |
44 | + </nav> |
45 | + </div> |
46 | + </div> |
47 | + <div class="header-content"> |
48 | + <div class="clearfix"> |
49 | + <img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/arrow-nav.png" width="9" height="5" style="left:455px; display: block;" class="arrow-nav"> |
50 | + <div class="header-navigation-secondary"></div> |
51 | + <div class="header-image"></div> |
52 | + <h1>Resources</h1> |
53 | + <h2>A collection of some of the most important online references for Juju users and developers.</h2> |
54 | + </div> |
55 | + </div> |
56 | +</header> |
57 | + |
58 | + <section id="content" class="container-12"> |
59 | + <div class="grid-12 doc-container"> |
60 | + <div id="navlinks" class="grid-3 doc-navigation">LINKS</div> |
61 | + <div class="grid-9 doc-content"> |
62 | + <article> |
63 | + |
64 | + |
65 | +<!--Actual docs start here--> |
66 | + |
67 | + <section id="service-groups"> |
68 | + <h1>Groups of Services</h1> |
69 | + <p></p> |
70 | + |
71 | + <p> |
72 | + Juju deploys units of a service from a charm. |
73 | + The simplest way to do this is |
74 | + </p> |
75 | + |
76 | +<pre class="prettyprint"> |
77 | +juju deploy mysql |
78 | +</pre> |
79 | + |
80 | + <p> |
81 | + which will take the latest version of the mysql charm straight from the store and create a single service unit. |
82 | + </p> |
83 | + |
84 | + <p> |
85 | + By default, juju creates a unit of a service named after the charm... "mysql" in the above example. |
86 | + </p> |
87 | + |
88 | + <p> |
89 | + You can specify the name for the service when deploying |
90 | + </p> |
91 | + |
92 | +<pre class="prettyprint"> |
93 | +juju deploy mysql wikidb |
94 | +</pre> |
95 | + |
96 | + <p> |
97 | + which will create a unit of the "wikidb" service. |
98 | + </p> |
99 | + |
100 | + <p> |
101 | + Why specify names for services? The simplest reason is organizational... it let's you stay organized as your infrastructure gets more complex: |
102 | + </p> |
103 | + |
104 | +<pre class="prettyprint"> |
105 | +juju deploy mysql website-db |
106 | +juju deploy mysql app-master-db |
107 | +juju deploy mysql app-slave-db -n2 |
108 | +</pre> |
109 | + |
110 | + <p> |
111 | + But there're other reasons to do this... namely service groups. Really service groups are nothing other than named services. |
112 | + They're called out as a separate feature because they're quite useful in a few different ways. |
113 | + </p> |
114 | + |
115 | + <h2>Roles</h2> |
116 | + |
117 | + <p> |
118 | + Some services acquire a role at runtime based on the relations that are joined. |
119 | + </p> |
120 | + |
121 | + <p> |
122 | + A great example of this is the hadoop charm. It can instantiate services |
123 | + </p> |
124 | + |
125 | +<pre class="prettyprint"> |
126 | +juju deploy hadoop namenode |
127 | +juju deploy hadoop datacluster -n40 |
128 | +</pre> |
129 | + |
130 | + <p> |
131 | + which are identical at this point except for the service name that juju's using for the various units. |
132 | + </p> |
133 | + |
134 | + <p> |
135 | + The services these acquire roles at relation-time via |
136 | + </p> |
137 | + |
138 | +<pre class="prettyprint"> |
139 | +juju add-relation namenode:namenode datacluster:datanode |
140 | +juju add-relation namenode:jobtracker datacluster:tasktracker |
141 | +</pre> |
142 | + |
143 | + <p> |
144 | + The relations determine the service role. |
145 | + </p> |
146 | + |
147 | + <p> |
148 | + Another example of this is mysql replication. |
149 | + </p> |
150 | + |
151 | +<pre class="prettyprint"> |
152 | +juju deploy mysql masterdb |
153 | +juju deploy mysql slavedb -n2 |
154 | +</pre> |
155 | + |
156 | + <p> |
157 | + where the different services are related to each other |
158 | + </p> |
159 | + |
160 | +<pre class="prettyprint"> |
161 | +juju add-relation masterdb:master slavedb:slave |
162 | +</pre> |
163 | + |
164 | + <p> |
165 | + and to other services via |
166 | + </p> |
167 | + |
168 | +<pre class="prettyprint"> |
169 | +juju deploy mediawiki mywiki |
170 | +juju add-relation mywiki:db masterdb:db |
171 | +juju add-relation mywiki:slave slavedb:db |
172 | +</pre> |
173 | + |
174 | + <h2>Upgrade Groups and/or Config Groups</h2> |
175 | + |
176 | + <p> |
177 | + There are also interesting use-cases for breaking large services down into separate groups of units. |
178 | + Instead of a single 5000-node hadoop service named <em>hadoop-slave</em>, you might build that cluster |
179 | + from multiple smaller service groups. |
180 | + </p> |
181 | + |
182 | +<pre class="prettyprint"> |
183 | +juju deploy hadoop hadoop-master |
184 | +juju deploy hadoop hadoop-slave-A -n2500 |
185 | +juju deploy hadoop hadoop-slave-B -n2500 |
186 | +juju add-relation hadoop-master:namenode hadoop-slave-A:datanode |
187 | +juju add-relation hadoop-master:namenode hadoop-slave-B:datanode |
188 | +... |
189 | +</pre> |
190 | + |
191 | + <p> |
192 | + These service groups can be managed independently by juju for upgrades and configuration |
193 | + </p> |
194 | + |
195 | +<pre class="prettyprint"> |
196 | +juju set hadoop-slave-B some_param=new_value |
197 | +</pre> |
198 | + |
199 | + <p> |
200 | + This technique can potentially be a way juju can manage rolling upgrades for a service. |
201 | + Of course, this depends heavily on the services in question and how well they support |
202 | + version management, schema changes, etc. |
203 | + </p> |
204 | + |
205 | + |
206 | + </section> |
207 | + |
208 | + <!--Actual docs end here--> |
209 | + |
210 | + |
211 | + |
212 | + </article> |
213 | + </div> |
214 | + </div> |
215 | + </section> |
216 | + <div class="shadow"></div> |
217 | + <footer class="global clearfix" role="contentinfo"> |
218 | + <div class="row"> |
219 | + <div class="inner-wrapper"> |
220 | + <nav role="navigation" class="clearfix"> |
221 | + <ul class="footer-a"> |
222 | + <li class="grid-3 first-col"> |
223 | + <h4><a href="/get-started">Get started</a></h4> |
224 | + <ul> |
225 | + <li class="page_item page-item-20"><a href="https://juju.ubuntu.com/get-started/local/">Local</a></li> |
226 | + <li class="page_item page-item-22"><a href="https://juju.ubuntu.com/get-started/amazon/">Amazon Web Services</a></li> |
227 | + <li class="page_item page-item-18"><a href="https://juju.ubuntu.com/get-started/hp-cloud/">HP Cloud</a></li> |
228 | + <li class="page_item page-item-16"><a href="https://juju.ubuntu.com/get-started/rackspace/">Rackspace</a></li> |
229 | + <li class="page_item page-item-3596"><a href="https://juju.ubuntu.com/get-started/openstack/">Openstack</a></li> |
230 | + <li class="page_item page-item-3600"><a href="https://juju.ubuntu.com/get-started/maas/">MAAS</a></li> |
231 | + </ul> |
232 | + </li> |
233 | + <li class="grid-3"> |
234 | + <h4><a href="/resources">Resources</a></h4> |
235 | + <ul> |
236 | + <li><a href="http://juju.ubuntu.com/docs">Documentation</a></li> |
237 | + <li><a href="/resources/videos/">Videos</a></li> |
238 | + <li><a href="http://uistage.jujucharms.com:8080/">Juju GUI demo site</a></li> |
239 | + </ul> |
240 | + </li> |
241 | + <li class="grid-3"> |
242 | + <h4><a href="/community">Community</a></h4> |
243 | + <ul> |
244 | + <li class="page_item page-item-28"><a href="https://juju.ubuntu.com/community/juju-blog/">Juju Blog</a></li> |
245 | + <li class="page_item page-item-4262"><a href="https://juju.ubuntu.com/community/weekly-charm-meeting/">Weekly Charm Meeting</a></li> |
246 | + <li class="page_item page-item-4036"><a href="https://juju.ubuntu.com/community/charmers/">Charmers</a></li> |
247 | + <li><a href="https://lists.ubuntu.com/mailman/listinfo/juju">Mailing List</a></li> |
248 | + <li><a href="http://webchat.freenode.net/?channels=juju">Chat</a></li> |
249 | + <li><a href="http://askubuntu.com/questions/tagged/juju?sort=faq&pagesize=50">FAQ</a></li> |
250 | + </ul> |
251 | + </li> |
252 | + <li class="grid-3 last-col"> |
253 | + <h4><a href="https://launchpad.net/juju">Code</a></h4> |
254 | + <ul> |
255 | + <li><a href="https://launchpad.net/juju-core">Juju Core</a></li> |
256 | + <li><a href="https://launchpad.net/charms">Charms</a></li> |
257 | + </ul> |
258 | + </li> |
259 | + </ul> |
260 | + </nav> |
261 | + </div> |
262 | + </div> |
263 | + <div class="row no-border"> |
264 | + <div class="legal inner-wrapper"> |
265 | + <p>© 2013 Canonical Ltd. Ubuntu and Canonical are registered trademarks of Canonical Ltd.</p> |
266 | + <p><a href="https://bugs.launchpad.net/juju-website/+filebug">Report a bug on this site</a></p> |
267 | + </div> |
268 | + </div> |
269 | +</footer> |
270 | + |
271 | + <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> |
272 | + <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js"></script> |
273 | + <script src="//d38yea5fb4e2oh.cloudfront.net/jquery.stacktack.min.js"></script> |
274 | + <script type="text/javascript" src="js/main.js"></script> |
275 | + <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script> |
276 | + </body> |
277 | +</html> |
278 | |
279 | === modified file 'htmldocs/navigation.html' |
280 | --- htmldocs/navigation.html 2013-08-22 13:48:21 +0000 |
281 | +++ htmldocs/navigation.html 2013-08-30 19:55:54 +0000 |
282 | @@ -17,6 +17,7 @@ |
283 | <li class=" sub"><a href="charms-exposing.html">Exposing Services</a></li> |
284 | <li class=" sub"><a href="charms-scaling.html">Scaling Services</a></li> |
285 | <li class=" sub"><a href="charms-destroy.html">Destroying Services</a></li> |
286 | + <li class=" sub"><a href="charms-service-groups.html">Groups of Services</a></li> |
287 | </ul> |
288 | <h1>Charm Authors</h1> |
289 | <ul> |
290 | |
291 | === modified file 'htmldocs/navigation.json' |
292 | --- htmldocs/navigation.json 2013-08-16 13:29:42 +0000 |
293 | +++ htmldocs/navigation.json 2013-08-30 19:55:54 +0000 |
294 | @@ -22,7 +22,8 @@ |
295 | "Service Relationships": "charms-relationships.html", |
296 | "Exposing Services": "charms-exposing.html", |
297 | "Scaling Services": "charms-scaling.html", |
298 | - "Destroying Services": "charms-destroy.html" |
299 | + "Destroying Services": "charms-destroy.html", |
300 | + "Groups of Services": "charms-service-groups.html" |
301 | } |
302 | } |
303 | }, |
LGTM, +1