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