Merge lp:~jorge/pyjuju/add-openstack into lp:pyjuju/docs

Proposed by Jorge Castro
Status: Rejected
Rejected by: Mark Mims
Proposed branch: lp:~jorge/pyjuju/add-openstack
Merge into: lp:pyjuju/docs
Diff against target: 6480 lines (+6292/-0)
29 files modified
README (+11/-0)
htmldocs/authors-charm-best-practice.html (+214/-0)
htmldocs/authors-charm-policy.html (+212/-0)
htmldocs/authors-charm-quality.html (+288/-0)
htmldocs/authors-charm-store.html (+290/-0)
htmldocs/authors-charm-writing.html (+467/-0)
htmldocs/authors-hooks.html (+176/-0)
htmldocs/authors-implicit-relations.html (+179/-0)
htmldocs/authors-subordinate-services.html (+227/-0)
htmldocs/authors-testing.html (+350/-0)
htmldocs/charms-config.html (+217/-0)
htmldocs/charms-constraints.html (+242/-0)
htmldocs/charms-deploying.html (+189/-0)
htmldocs/charms-destroy.html (+189/-0)
htmldocs/charms-exposing.html (+179/-0)
htmldocs/charms-relations.html (+222/-0)
htmldocs/charms-scaling.html (+176/-0)
htmldocs/charms-upgrading.html (+154/-0)
htmldocs/charms.html (+173/-0)
htmldocs/commands.html (+189/-0)
htmldocs/config-aws.html (+179/-0)
htmldocs/config-hpcloud.html (+193/-0)
htmldocs/config-maas.html (+174/-0)
htmldocs/config-openstack.html (+173/-0)
htmldocs/contributing.html (+207/-0)
htmldocs/css/main.css (+228/-0)
htmldocs/getting-started.html (+297/-0)
htmldocs/glossary.html (+200/-0)
htmldocs/index.html (+297/-0)
To merge this branch: bzr merge lp:~jorge/pyjuju/add-openstack
Reviewer Review Type Date Requested Status
Mark Mims (community) Needs Resubmitting
Review via email: mp+171868@code.launchpad.net

Description of the change

Add OpenStack instructions.

To post a comment you must log in.
lp:~jorge/pyjuju/add-openstack updated
9. By Jorge Castro

Add link to other docs for openstack.

Revision history for this message
Mark Mims (mark-mims) wrote :

WTF? Is this based off of the right version of lp:juju/docs? Was there some other branch for html-only docs or is this the first one?

review: Needs Information
Revision history for this message
Mark Mims (mark-mims) wrote :

rebase this off of lp:juju-core/docs instead

review: Needs Resubmitting

Unmerged revisions

9. By Jorge Castro

Add link to other docs for openstack.

8. By Jorge Castro

Add openstack instructions.

7. By Nick Veitch

Added missing text from relations section

6. By Nick Veitch

Additions to contribution/workflow

5. By Nick Veitch

added index

4. By Nick Veitch

First HTML5-only version

3. By Nick Veitch

last jade version - added stacktack js code

2. By Nick Veitch

 added "old" author docs

1. By Antonio Rosales

Initial repo commit. Resetting juju-core docs at user section being done, and charm authors section remaining.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'README'
2--- README 1970-01-01 00:00:00 +0000
3+++ README 2013-06-27 17:35:30 +0000
4@@ -0,0 +1,11 @@
5+***********************************************
6+This is the documentation for Canonical's Juju
7+software.
8+
9+The documentation is written in HTML5
10+
11+The latest version of these docs live at:
12+https://code.launchpad.net/~charmers/juju-core/docs
13+
14+For advice on contributing to the docs (please!), see
15+the contributing.html page in this project.
16
17=== added directory 'htmldocs'
18=== added file 'htmldocs/authors-charm-best-practice.html'
19--- htmldocs/authors-charm-best-practice.html 1970-01-01 00:00:00 +0000
20+++ htmldocs/authors-charm-best-practice.html 2013-06-27 17:35:30 +0000
21@@ -0,0 +1,214 @@
22+<!DOCTYPE html>
23+<html>
24+ <head>
25+ <meta charset="utf-8">
26+ <title>Juju Documentation - Best Practice for Charm Authors</title>
27+ <link href="//fonts.googleapis.com/css?family=Ubuntu:400,400italic" rel="stylesheet" type="text/css"/>
28+ <link href="//fonts.googleapis.com/css?family=Ubuntu+Mono:400" rel="stylesheet" type="text/css"/>
29+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/reset.css" rel="stylesheet" type="text/css"/>
30+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/960.css" rel="stylesheet" type="text/css"/>
31+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/base.css" rel="stylesheet" type="text/css"/>
32+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/resources.css" rel="stylesheet" type="text/css"/>
33+ <link href="css/main.css" rel="stylesheet" type="text/css"/>
34+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
35+ <script src="http://app.stacktack.com/jquery.stacktack.min.js"></script>
36+ <script type="text/javascript">
37+ $(document).ready(function() {
38+ $(document).stacktack();
39+ });
40+ </script><!--[if lt IE 9]>
41+ <script type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
42+ </head>
43+ <body class="resources">
44+ <header>
45+ <div class="header-login">
46+ <ul>
47+ <li>&nbsp;</li>
48+ </ul>
49+ </div>
50+ <div class="header-navigation">
51+ <div>
52+ <nav role="navigation">
53+ <ul>
54+ <li class="page_item"><a href="https://juju.ubuntu.com/">Home</a></li>
55+ <li class="page_item current_page_item"><a href="https://juju.ubuntu.com/">Resources</a></li>
56+ <li class="page_item"><a href="https://juju.ubuntu.com/">Community</a></li>
57+ <li class="page_item"><a href="https://juju.ubuntu.com/">Charm Store</a></li>
58+ <li class="page_item"><a href="https://juju.ubuntu.com/">Events</a></li>
59+ <li class="page_item"><a href="https://juju.ubuntu.com/">Survey</a></li>
60+ <li>
61+ <form id="form-search" method="get" action="/">
62+ <fieldset>
63+ <input id="input-search" type="text" name="s" value="Search">
64+ </fieldset>
65+ </form>
66+ </li>
67+ </ul>
68+ </nav><a href="https://juju.ubuntu.com/" class="logo-ubuntu"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/logo-ubuntu.png"></a>
69+ </div>
70+ </div>
71+ <div class="header-content">
72+ <div class="clearfix"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/arrow-nav.png" width="9" height="5" style="left:894px; display: block;" class="arrow-nav">
73+ <div class="header-navigation-secondary"></div>
74+ <div class="header-image"></div>
75+ <h1>Resources</h1>
76+ <h2>A collection of some of the most important online references for Juju users and developers.</h2>
77+ </div>
78+ </div>
79+ </header>
80+ <section id="content" class="container-12">
81+ <div class="grid-12 doc-container">
82+ <div class="grid-3 doc-navigation">
83+ <nav role="navigation">
84+ <h1>User Guide</h1>
85+ <ul>
86+ <li class=""><a href="getting-started.html">Getting Started</a></li>
87+ <li class=" sub"><a href="getting-started.html#intro">Introduction</a></li>
88+ <li class=" sub"><a href="getting-started.html#install">Installation</a></li>
89+ <li class=" sub"><a href="config-aws.html">AWS Configuration</a></li>
90+ <li class=" sub"><a href="config-hpcloud.html">HP Cloud Configuration</a></li>
91+ <li class=" sub"><a href="">OpenStack Configuration</a></li>
92+ <li class=" sub"><a href="config-maas.html">MAAS Configuration</a></li>
93+ <li class=" sub"><a href="getting-started.html#test">Testing your setup</a></li>
94+ <li class=""><a href="charms.html">Using Charms</a></li>
95+ <li class=" sub"><a href="charms.html#intro">What are Charms?</a></li>
96+ <li class=" sub"><a href="charms-deploying.html">Deploying Services</a></li>
97+ <li class=" sub"><a href="charms-constraints.html">Using constraints</a></li>
98+ <li class=" sub"><a href="charms-config.html">Service Configuration</a></li>
99+ <li class=" sub"><a href="charms-relations.html">Service Relationships</a></li>
100+ <li class=" sub"><a href="charms-exposing.html">Exposing Services</a></li>
101+ <li class=" sub"><a href="charms-scaling.html">Scaling Services</a></li>
102+ <li class=" sub"><a href="charms-destroy.html">Destroying Services</a></li>
103+ </ul>
104+ <h1>Charm Authors</h1>
105+ <ul></ul>
106+ <li class=""><a href="authors-charm-writing.html">Writing a charm</a></li>
107+ <li class=" sub"><a href="authors-subordinate-services.html">Subordinate services</a></li>
108+ <li class=" sub"><a href="authors-implicit-relations.html">Implicit Relations</a></li>
109+ <li class=" sub"><a href="authors-testing.html">Charm Testing</a></li>
110+ <li class=" sub"><a href="authors-hooks.html">Hook debugging</a></li>
111+ <li class=""><a href="authors-charm-store.html">The Juju Charm Store</a></li>
112+ <li class=" sub"><a href="authors-charm-policy.html">Charm store policy</a></li>
113+ <li class=" sub"><a href="authors-charm-best-practice.html">Best practices</a></li>
114+ <li class=" sub"><a href="authors-charm-quality.html">Charm Quality Rating</a></li>
115+ <h1>Reference</h1>
116+ <ul>
117+ <li class="sub"><a href="commands.html">Juju commands</a></li>
118+ <li class="sub"><a href="glossary.html">Glossary</a></li>
119+ <li class="sub"><a href="contributing.html">Contribute to the Docs!</a></li>
120+ </ul>
121+ </nav>
122+ </div>
123+ <div class="grid-9 doc-content">
124+ <article>
125+ <section id ="best_practice">
126+ <h1>Best Practice for Charm Authors</h1>
127+
128+ <p>This document is to capture charm best practices from the community. We expect devops to be strongly opinionated, therefore some strong opinions don't make sense as policy, but do make sense to share with others to disseminate expertise.</p>
129+
130+ <p>If you'd like to share some best practice and have it added to this page we recommend you <a href="https://lists.ubuntu.com/mailman/listinfo/juju">post to the mailing list</a> with some ideas on what you've like to see added. Ideally we'd like to document all sorts of great ideas on how people are using Juju.</p>
131+
132+ <h2>Juju Best Practices and Tips from Canonical's Infrastructure Team</h2>
133+
134+ <aside>Since Canonical IS uses Juju in production they have certain requirements from charms in order for them to run on a production OpenStack deployment. Though these are requirements for use inside of Canonical, charms are not required to meet these criteria to be in the charm store, they are included here to share with the devops community.</aside>
135+
136+ <p>Tips for production usage:</p>
137+ <ul>
138+ <li>Provide an overview of the service in the README and metadata. </li>
139+ <li>Use packaged software (i.e. debian packages) where possible, and "backport" any packages needed outside of the archives from whatever PPA you have them in to the appropriate precise-cat suite
140+ <li>Not duplicate any service components that there are pre-existing charms for</li>
141+ <li>Follow the coding guidelines for charms (see below).</li>
142+ <li>Assemble code for your application outside of the Charm.</li>
143+ <li>Ship a script in <code>/srv/deploymgr/${service-name}-${instance-type}</code> that has commands for starting/stopping/checking/building code for the service <em>if you're not using upstart or an initscript doesn't provide this</em>.</li>
144+ <li>Create a <code>/srv/${external-service-name}/${instance-type}/${service-name}</code> directory for the code itself, and <code>/srv/${external-service-name}/{${instance-type}-logs,scripts,etc,var}</code> as needed.</li>
145+ <li>Ensure the owner of the code isn't the same user than runs the code</li>
146+ <li>Create monitoring checks for your application.</li>
147+ <li>Which checks are prompt-critical (in other words, constitutes a user-affecting outage that would warrant waking an "oncall" sysadmin over a weekend)?</li>
148+ <li>Confirm the service doesn't require any developer shell access to the servers that it runs on.</li>
149+ <li>Confirm what data/logs from the application needs to be made visible to developers, and in what format?</li>
150+ </ul>
151+
152+ <h2>Charm Coding Guidelines</h2>
153+
154+ <p>If written in Bash:</p>
155+ <ul>
156+ <li> <code>{variable}-value</code> rather than <code>$variable-value</code>?</li>
157+ <li> <code>$(COMMAND)</code> vs. <code>COMMAND</code>?</li>
158+ <li>Use <code>install</code> rather than <code>mkdir; chown</code>
159+ </ul>
160+ <p>If written in Python:</p>
161+ <ul>
162+ <li>Has <code>pep8</code> been run against the relevant scripts?</li>
163+ <li>Separation of code from content (i.e. all external files/templates are in the "files" or "templates" directory)?</li>
164+ </li>As an example, this populates a template from any variables in the current environment: <code>cheetah fill --env -p templates/celerymon_conf.tmpl > /etc/init/celerymon.conf</code></li>
165+ </ul>
166+ <p>In this example, the template looks like this:
167+ </pre>
168+ start on started celeryd
169+ stop on stopping celeryd
170+
171+ env CODEDIR=$CODE_LOCATION
172+ env
173+ PYTHONPATH=$CODE_LOCATION/apps:$CODE_LOCATION:$CODE_LOCATION/lib/python2.7/site-packages
174+
175+ exec sudo -u $USER_CODE_RUNNER sh -c "cd \$CODEDIR;
176+ PYTHONPATH=\$PYTHONPATH ./certification-manage.py celerycam --pidfile
177+ /srv/${BASEDIR}/var/celeryev.pid"
178+ respawn
179+ </pre>
180+ <ul>
181+ <li>Do all config options have appropriate descriptions?</li>
182+ <li>Are all hooks idempotent?</li>
183+ <li>No hard coded values for things that may need changing - exposed via config.yaml options</li>
184+ <li>No hard coding of full paths for system tools/binaries - we should ensure $PATH is set appropriately.</li>
185+ <li>Has <code>charm proof</code> been run against the charm?</li>
186+ <li>Has testing of adding units and removing units been done?</li>
187+ <li>Has testing of changing all config options and verifying they get changed in the application (and applied, i.e. service reloaded if appropriate) been done?</li>
188+ <li>Any cron entries should be in <code>/etc/cron.d</code> rather than stored in user crontabs.</li>
189+ <li>This allows for easier visibility of active cronjobs across the whole system, as well as making editing things much easier.</li>
190+ </ul>
191+ </article>
192+ </div>
193+ </div>
194+ </section>
195+ <div class="shadow"></div>
196+ <footer>
197+ <div>
198+ <nav role="navigation" class="clearfix">
199+ <ul>
200+ <li><a href="https://juju.ubuntu.com/get-started">Get started</a></li>
201+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/local/">Local</a></li>
202+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/amazon/">Amazon Web Services</a></li>
203+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/hp-cloud/">HP Cloud</a></li>
204+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/rackspace/">Rackspace</a></li>
205+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/openstack/">Openstack</a></li>
206+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/maas/">MAAS</a></li>
207+ </ul>
208+ <ul>
209+ <li><a href="https://juju.ubuntu.com/resources">Resources</a></li>
210+ <li><a href="https://juju.ubuntu.com/docs">Documentation</a></li>
211+ <li><a href="https://juju.ubuntu.com/resources/videos">Videos</a></li>
212+ <li><a href="http://uistage.jujucharms.com:8080/">Juju GUI Demo</a></li>
213+ </ul>
214+ <ul>
215+ <li><a href="https://juju.ubuntu.com/community">Community</a></li>
216+ <li class="page_item"><a href="https://juju.ubuntu.com/community/juju-blog/">Blog</a></li>
217+ <li class="page_item"><a href="https://juju.ubuntu.com/community/weekly-charm-meeting/">Charm Meetings</a></li>
218+ <li class="page_item"><a href="https://juju.ubuntu.com/community/charmers/">Charmers</a></li>
219+ <li class="page_item"><a href="https://lists.ubuntu.com/mailman/listinfo/juju">Mailing List</a></li>
220+ <li class="page_item"><a href="http://webchat.freenode.net/?channels=juju">Chat</a></li>
221+ <li class="page_item"><a href="http://askubuntu.com/questions/tagged/juju?sort=faq&amp;amp;pagesize=50">FAQ</a></li>
222+ </ul>
223+ <ul class="last">
224+ <li><a href="https://launchpad.net/juju">Code</a></li>
225+ <li><a href="https://launchpad.net/juju-core">Juju Core</a></li>
226+ <li><a href="https://launchpad.net/charms">Charms</a></li>
227+ </ul>
228+ </nav>
229+ </div>
230+ </footer>
231+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
232+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.14/jquery-ui.min.js"></script>
233+ <script type="text/javascript" src="js/main.js"></script>
234+ </body>
235+</html>
236\ No newline at end of file
237
238=== added file 'htmldocs/authors-charm-policy.html'
239--- htmldocs/authors-charm-policy.html 1970-01-01 00:00:00 +0000
240+++ htmldocs/authors-charm-policy.html 2013-06-27 17:35:30 +0000
241@@ -0,0 +1,212 @@
242+<!DOCTYPE html>
243+<html>
244+ <head>
245+ <meta charset="utf-8">
246+ <title>Juju Documentation - Charm Store Policy</title>
247+ <link href="//fonts.googleapis.com/css?family=Ubuntu:400,400italic" rel="stylesheet" type="text/css"/>
248+ <link href="//fonts.googleapis.com/css?family=Ubuntu+Mono:400" rel="stylesheet" type="text/css"/>
249+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/reset.css" rel="stylesheet" type="text/css"/>
250+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/960.css" rel="stylesheet" type="text/css"/>
251+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/base.css" rel="stylesheet" type="text/css"/>
252+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/resources.css" rel="stylesheet" type="text/css"/>
253+ <link href="css/main.css" rel="stylesheet" type="text/css"/>
254+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
255+ <script src="http://app.stacktack.com/jquery.stacktack.min.js"></script>
256+ <script type="text/javascript">
257+ $(document).ready(function() {
258+ $(document).stacktack();
259+ });
260+ </script><!--[if lt IE 9]>
261+ <script type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
262+ </head>
263+ <body class="resources">
264+ <header>
265+ <div class="header-login">
266+ <ul>
267+ <li>&nbsp;</li>
268+ </ul>
269+ </div>
270+ <div class="header-navigation">
271+ <div>
272+ <nav role="navigation">
273+ <ul>
274+ <li class="page_item"><a href="https://juju.ubuntu.com/">Home</a></li>
275+ <li class="page_item current_page_item"><a href="https://juju.ubuntu.com/">Resources</a></li>
276+ <li class="page_item"><a href="https://juju.ubuntu.com/">Community</a></li>
277+ <li class="page_item"><a href="https://juju.ubuntu.com/">Charm Store</a></li>
278+ <li class="page_item"><a href="https://juju.ubuntu.com/">Events</a></li>
279+ <li class="page_item"><a href="https://juju.ubuntu.com/">Survey</a></li>
280+ <li>
281+ <form id="form-search" method="get" action="/">
282+ <fieldset>
283+ <input id="input-search" type="text" name="s" value="Search">
284+ </fieldset>
285+ </form>
286+ </li>
287+ </ul>
288+ </nav><a href="https://juju.ubuntu.com/" class="logo-ubuntu"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/logo-ubuntu.png"></a>
289+ </div>
290+ </div>
291+ <div class="header-content">
292+ <div class="clearfix"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/arrow-nav.png" width="9" height="5" style="left:894px; display: block;" class="arrow-nav">
293+ <div class="header-navigation-secondary"></div>
294+ <div class="header-image"></div>
295+ <h1>Resources</h1>
296+ <h2>A collection of some of the most important online references for Juju users and developers.</h2>
297+ </div>
298+ </div>
299+ </header>
300+ <section id="content" class="container-12">
301+ <div class="grid-12 doc-container">
302+ <div class="grid-3 doc-navigation">
303+ <nav role="navigation">
304+ <h1>User Guide</h1>
305+ <ul>
306+ <li class=""><a href="getting-started.html">Getting Started</a></li>
307+ <li class=" sub"><a href="getting-started.html#intro">Introduction</a></li>
308+ <li class=" sub"><a href="getting-started.html#install">Installation</a></li>
309+ <li class=" sub"><a href="config-aws.html">AWS Configuration</a></li>
310+ <li class=" sub"><a href="config-hpcloud.html">HP Cloud Configuration</a></li>
311+ <li class=" sub"><a href="">OpenStack Configuration</a></li>
312+ <li class=" sub"><a href="config-maas.html">MAAS Configuration</a></li>
313+ <li class=" sub"><a href="getting-started.html#test">Testing your setup</a></li>
314+ <li class=""><a href="charms.html">Using Charms</a></li>
315+ <li class=" sub"><a href="charms.html#intro">What are Charms?</a></li>
316+ <li class=" sub"><a href="charms-deploying.html">Deploying Services</a></li>
317+ <li class=" sub"><a href="charms-constraints.html">Using constraints</a></li>
318+ <li class=" sub"><a href="charms-config.html">Service Configuration</a></li>
319+ <li class=" sub"><a href="charms-relations.html">Service Relationships</a></li>
320+ <li class=" sub"><a href="charms-exposing.html">Exposing Services</a></li>
321+ <li class=" sub"><a href="charms-scaling.html">Scaling Services</a></li>
322+ <li class=" sub"><a href="charms-destroy.html">Destroying Services</a></li>
323+ </ul>
324+ <h1>Charm Authors</h1>
325+ <ul></ul>
326+ <li class=""><a href="authors-charm-writing.html">Writing a charm</a></li>
327+ <li class=" sub"><a href="authors-subordinate-services.html">Subordinate services</a></li>
328+ <li class=" sub"><a href="authors-implicit-relations.html">Implicit Relations</a></li>
329+ <li class=" sub"><a href="authors-testing.html">Charm Testing</a></li>
330+ <li class=" sub"><a href="authors-hooks.html">Hook debugging</a></li>
331+ <li class=""><a href="authors-charm-store.html">The Juju Charm Store</a></li>
332+ <li class=" sub"><a href="authors-charm-policy.html">Charm store policy</a></li>
333+ <li class=" sub"><a href="authors-charm-best-practice.html">Best practices</a></li>
334+ <li class=" sub"><a href="authors-charm-quality.html">Charm Quality Rating</a></li>
335+ <h1>Reference</h1>
336+ <ul>
337+ <li class="sub"><a href="commands.html">Juju commands</a></li>
338+ <li class="sub"><a href="glossary.html">Glossary</a></li>
339+ <li class="sub"><a href="contributing.html">Contribute to the Docs!</a></li>
340+ </ul>
341+ </nav>
342+ </div>
343+ <div class="grid-9 doc-content">
344+ <article>
345+ <section id ="charm-policy">
346+ <h1>Charm Store Policy</h1>
347+ <p>This document serves to record the policies around charms included in the charm store, and the management of said charm collection. Charms in the store are peer reviewed by the community and are considered ready for consumption. These charms are marked as reviewed in the GUI and must follow these quality guidelines in ordered to be considered for the Store. These charms must:</p>
348+ <ul>
349+ <li>Must follow the spirit of the <a href="http://www.ubuntu.com/about/about-ubuntu/our-philosophy">Ubuntu Philosophy</a>.</li>
350+ <li>Must serve a useful purpose and have well defined behavior.</li>
351+ <li>Must also be valid for the charm format defined in Juju's documentation.</li>
352+ <li>Must verify that any software installed or utilized is verified as coming from the intended source. Any software installed from the Ubuntu archive satisfies this due to the apt sources including cryptographic signing information.</li>
353+ <li>Must be entirely self contained or depend only on reliable external services.</li>
354+ <li>Must include a full description of what the software does in the metadata.</li>
355+ <li>Must provide a means to protect users from known security vulnerabilities in a way consistent with best practices as defined by either Ubuntu policies or upstream documentation. Basically this means there must be instructions on how to apply updates if you use software not from Ubuntu.</li>
356+ <li>Must pass "charm proof" with no errors (lines prefixed with E:), remember this step!</li>
357+ <li>Must have a maintainer email address in metadata.yaml attached to a team or individual who are responsive to contact regarding the charm.</li>
358+ <li>Must include a license. Call the file 'copyright' and make sure all files' licenses are specified clearly.</li>
359+ <li>Must be under a <A href="http://opensource.org/osd">Free license</a>.
360+ <li>Must have hooks that are <A href="http://en.wikipedia.org/wiki/Idempotence">idempotent</a>.</li>
361+ <li>Must not run any network services using default passwords.</li>
362+ <li>Must call Juju API tools (relation-*, unit-*, config-*, etc) without a hard coded path. Should default to use software that is included in the Ubuntu archive, however we encourage that charm authors have a config options for allowing users to deploy from newer upstream releases, or even right from VCS if it's useful to users.</li>
363+ <li>Should not use anything infrastructure-provider specific (i.e. querying EC2 metadata service) symlinks must be self contained within a charm.</li>
364+ <li>Should make use of AppArmor to increase security</li>
365+ </ul>
366+ <p>The charm store referred to in this document is the collection of Juju charms hosted at <a href="https://launchpad.net/charms">https://launchpad.net/charms</a>.</p>
367+ </section>
368+ <section id ="charm-metadata">
369+ <h1>Charm Metadata</h1>
370+
371+ <h2>metadata.yaml</h2>
372+
373+ <p>This file is an important component of a charm, check out the <a href="https://bazaar.launchpad.net/~charmers/charms/precise/mysql/trunk/view/head:/metadata.yaml">MySQL metadata.yaml</a> as an example.</p>
374+
375+ <ul>
376+ <li><code>name</code> - Name must succinctly communicate what sort of service the charm deploys.</li>
377+ <li><code>description</code> - description should give a long form description of the service and the way that the charm configures it.</li>
378+ <li><code>maintainers</code> - all charms must have a maintainer email address. This can be an email list, as long as it is an unmoderated list (subscription required is ok).</li>
379+ <li><code>categories</code> - all charms should contain a category so it looks correctly in the web UI, any one of the following is acceptable: "databases", "file-servers", "applications", "cache-proxy", "app-servers" and "misc".</li>
380+ <li><code>requires</code> - despite the name, any interface that the charm can connect to, even one that is not required, can be enumerated here. All requires relationships must function with the same behavior as any existing de-facto implementations of said interface.</li>
381+ <li><code>provides</code> - All provides relationships listed must function with the same behavior as any existing de-facto implementations of said interface.</li>
382+ <li><code>revision</code> - All changes must increment revision. Groups of changes made all at once can increment it only once, but there are no exceptions as to what types of changes can cause the revision to go up.</li>
383+ </ul>
384+ <h2>config.yaml</h2>
385+ <p>Any de-facto config options must be kept at least until the next major charm series release. Removed config options should be deprecated first by noting that they are deprecated, and why, in their description. Instructions for converting values must be added to README as well.</p>
386+ <h2>README.md</h2>
387+ <p>Charms that want to display instructions to users can do so in either plain text by including a file called README. If the author would like to use markdown, the file should be called README.md, and if the author would like to use restructured text, the file should be called README.rst. Only one of these files can be included in the charm. We recommend Markdown due to its popularity and tooling.<p>
388+ <p>Remember that the README is used by the GUI and website as the default "front page" of the charm, so remember that it is user facing and should include easy to read instructions for deployment.</p>
389+ <h2>Interfaces</h2>
390+ <p>Charms should only implement a new interface when existing interfaces are insufficient to achieve the goal of the charm. Interfaces that have an official requires/provides in the charm store cannot be changed by adding required fields or removing existing fields. New optional fields can be added at any time.</p>
391+ <p>The charm store series denotes the OS release that the charms which are contained within it are intended to run on.</p>
392+ <h2>State</h2>
393+ <p>Each series can be in one of these states:</p>
394+ <ul>
395+ <li>Experimental - Charms can be added, but are in a state of flux.</li>
396+ <li>Active - The Charm store is actively accepting new charms and changes.</li>
397+ <li>Frozen - Only critical fixes are accepted.</li>
398+ <li>EOL - The OS version is not supported by the vendor, and thus, neither are the charms. </li>
399+ </ul>
400+ <h2>Experimental</h2>
401+ <p>Experimental series charms should adhere to the charm policy except that interfaces are never made 'de-facto' in an experimental series.</p>
402+ <ul>
403+ <li>Active - When a series is active, all changes are subject to the de-facto rules above.</li>
404+ <li>Frozen - The charmers team on launchpad has discretion when a series is frozen as to whether or not a change should be accepted.</li>
405+ <li>EOL - No changes will be accepted except those which help users who need to migrate to a supported series.</li>
406+ <li> Process - Charm store releases will be moved from Active to Frozen periodically to allow de-facto changes to settle and allow testing of infrastructure. New releases of target OS's will be reflected in the charm store as an experimental series. There can be multiple Active series at one time. Maintainers can choose whether or not to support their charm in all of the Active series, as long as the charm is maintained in at least one Active series.</li>
407+ </ul>
408+ </section>
409+ </article>
410+ </div>
411+ </div>
412+ </section>
413+ <div class="shadow"></div>
414+ <footer>
415+ <div>
416+ <nav role="navigation" class="clearfix">
417+ <ul>
418+ <li><a href="https://juju.ubuntu.com/get-started">Get started</a></li>
419+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/local/">Local</a></li>
420+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/amazon/">Amazon Web Services</a></li>
421+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/hp-cloud/">HP Cloud</a></li>
422+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/rackspace/">Rackspace</a></li>
423+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/openstack/">Openstack</a></li>
424+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/maas/">MAAS</a></li>
425+ </ul>
426+ <ul>
427+ <li><a href="https://juju.ubuntu.com/resources">Resources</a></li>
428+ <li><a href="https://juju.ubuntu.com/docs">Documentation</a></li>
429+ <li><a href="https://juju.ubuntu.com/resources/videos">Videos</a></li>
430+ <li><a href="http://uistage.jujucharms.com:8080/">Juju GUI Demo</a></li>
431+ </ul>
432+ <ul>
433+ <li><a href="https://juju.ubuntu.com/community">Community</a></li>
434+ <li class="page_item"><a href="https://juju.ubuntu.com/community/juju-blog/">Blog</a></li>
435+ <li class="page_item"><a href="https://juju.ubuntu.com/community/weekly-charm-meeting/">Charm Meetings</a></li>
436+ <li class="page_item"><a href="https://juju.ubuntu.com/community/charmers/">Charmers</a></li>
437+ <li class="page_item"><a href="https://lists.ubuntu.com/mailman/listinfo/juju">Mailing List</a></li>
438+ <li class="page_item"><a href="http://webchat.freenode.net/?channels=juju">Chat</a></li>
439+ <li class="page_item"><a href="http://askubuntu.com/questions/tagged/juju?sort=faq&amp;amp;pagesize=50">FAQ</a></li>
440+ </ul>
441+ <ul class="last">
442+ <li><a href="https://launchpad.net/juju">Code</a></li>
443+ <li><a href="https://launchpad.net/juju-core">Juju Core</a></li>
444+ <li><a href="https://launchpad.net/charms">Charms</a></li>
445+ </ul>
446+ </nav>
447+ </div>
448+ </footer>
449+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
450+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.14/jquery-ui.min.js"></script>
451+ <script type="text/javascript" src="js/main.js"></script>
452+ </body>
453+</html>
454\ No newline at end of file
455
456=== added file 'htmldocs/authors-charm-quality.html'
457--- htmldocs/authors-charm-quality.html 1970-01-01 00:00:00 +0000
458+++ htmldocs/authors-charm-quality.html 2013-06-27 17:35:30 +0000
459@@ -0,0 +1,288 @@
460+<!DOCTYPE html>
461+<html>
462+ <head>
463+ <meta charset="utf-8">
464+ <title>Juju Documentation - Authoring Charms</title>
465+ <link href="//fonts.googleapis.com/css?family=Ubuntu:400,400italic" rel="stylesheet" type="text/css"/>
466+ <link href="//fonts.googleapis.com/css?family=Ubuntu+Mono:400" rel="stylesheet" type="text/css"/>
467+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/reset.css" rel="stylesheet" type="text/css"/>
468+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/960.css" rel="stylesheet" type="text/css"/>
469+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/base.css" rel="stylesheet" type="text/css"/>
470+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/resources.css" rel="stylesheet" type="text/css"/>
471+ <link href="css/main.css" rel="stylesheet" type="text/css"/>
472+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
473+ <script src="http://app.stacktack.com/jquery.stacktack.min.js"></script>
474+ <script type="text/javascript">
475+ $(document).ready(function() {
476+ $(document).stacktack();
477+ });
478+ </script><!--[if lt IE 9]>
479+ <script type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
480+ </head>
481+ <body class="resources">
482+ <header>
483+ <div class="header-login">
484+ <ul>
485+ <li>&nbsp;</li>
486+ </ul>
487+ </div>
488+ <div class="header-navigation">
489+ <div>
490+ <nav role="navigation">
491+ <ul>
492+ <li class="page_item"><a href="https://juju.ubuntu.com/">Home</a></li>
493+ <li class="page_item current_page_item"><a href="https://juju.ubuntu.com/">Resources</a></li>
494+ <li class="page_item"><a href="https://juju.ubuntu.com/">Community</a></li>
495+ <li class="page_item"><a href="https://juju.ubuntu.com/">Charm Store</a></li>
496+ <li class="page_item"><a href="https://juju.ubuntu.com/">Events</a></li>
497+ <li class="page_item"><a href="https://juju.ubuntu.com/">Survey</a></li>
498+ <li>
499+ <form id="form-search" method="get" action="/">
500+ <fieldset>
501+ <input id="input-search" type="text" name="s" value="Search">
502+ </fieldset>
503+ </form>
504+ </li>
505+ </ul>
506+ </nav><a href="https://juju.ubuntu.com/" class="logo-ubuntu"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/logo-ubuntu.png"></a>
507+ </div>
508+ </div>
509+ <div class="header-content">
510+ <div class="clearfix"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/arrow-nav.png" width="9" height="5" style="left:894px; display: block;" class="arrow-nav">
511+ <div class="header-navigation-secondary"></div>
512+ <div class="header-image"></div>
513+ <h1>Resources</h1>
514+ <h2>A collection of some of the most important online references for Juju users and developers.</h2>
515+ </div>
516+ </div>
517+ </header>
518+ <section id="content" class="container-12">
519+ <div class="grid-12 doc-container">
520+ <div class="grid-3 doc-navigation">
521+ <nav role="navigation">
522+ <h1>User Guide</h1>
523+ <ul>
524+ <li class=""><a href="getting-started.html">Getting Started</a></li>
525+ <li class=" sub"><a href="getting-started.html#intro">Introduction</a></li>
526+ <li class=" sub"><a href="getting-started.html#install">Installation</a></li>
527+ <li class=" sub"><a href="config-aws.html">AWS Configuration</a></li>
528+ <li class=" sub"><a href="config-hpcloud.html">HP Cloud Configuration</a></li>
529+ <li class=" sub"><a href="">OpenStack Configuration</a></li>
530+ <li class=" sub"><a href="config-maas.html">MAAS Configuration</a></li>
531+ <li class=" sub"><a href="getting-started.html#test">Testing your setup</a></li>
532+ <li class=""><a href="charms.html">Using Charms</a></li>
533+ <li class=" sub"><a href="charms.html#intro">What are Charms?</a></li>
534+ <li class=" sub"><a href="charms-deploying.html">Deploying Services</a></li>
535+ <li class=" sub"><a href="charms-constraints.html">Using constraints</a></li>
536+ <li class=" sub"><a href="charms-config.html">Service Configuration</a></li>
537+ <li class=" sub"><a href="charms-relations.html">Service Relationships</a></li>
538+ <li class=" sub"><a href="charms-exposing.html">Exposing Services</a></li>
539+ <li class=" sub"><a href="charms-scaling.html">Scaling Services</a></li>
540+ <li class=" sub"><a href="charms-destroy.html">Destroying Services</a></li>
541+ </ul>
542+ <h1>Charm Authors</h1>
543+ <ul></ul>
544+ <li class=""><a href="authors-charm-writing.html">Writing a charm</a></li>
545+ <li class=" sub"><a href="authors-subordinate-services.html">Subordinate services</a></li>
546+ <li class=" sub"><a href="authors-implicit-relations.html">Implicit Relations</a></li>
547+ <li class=" sub"><a href="authors-testing.html">Charm Testing</a></li>
548+ <li class=" sub"><a href="authors-hooks.html">Hook debugging</a></li>
549+ <li class=""><a href="authors-charm-store.html">The Juju Charm Store</a></li>
550+ <li class=" sub"><a href="authors-charm-policy.html">Charm store policy</a></li>
551+ <li class=" sub"><a href="authors-charm-best-practice.html">Best practices</a></li>
552+ <li class=" sub"><a href="authors-charm-quality.html">Charm Quality Rating</a></li>
553+ <h1>Reference</h1>
554+ <ul>
555+ <li class="sub"><a href="commands.html">Juju commands</a></li>
556+ <li class="sub"><a href="glossary.html">Glossary</a></li>
557+ <li class="sub"><a href="contributing.html">Contribute to the Docs!</a></li>
558+ </ul>
559+ </nav>
560+ </div>
561+ <div class="grid-9 doc-content">
562+ <article>
563+ <section id ="authors-charm-quality">
564+ <h1>Charm Quality Rating</h1>
565+ <p>People demand quality out of their tools, and the Charm Store is no different. So what does a good charm look like? These are some guidelines on what we think an ideal charm provides users. So we rate charms by the following criteria, and give them a score, up to 39.</p>
566+ <p class="note"><strong>Note: </strong>This is an ideal list of what we'd like charms to be. No charm today comes close to getting all of these points; it's a target we set for ourselves so we can determine how we can improve individual charms. It also gives contributors a general idea of where they can spend their time to fix something.</p>
567+
568+ <h2>Reliable</h2>
569+ <p><strong>9</strong> Possible points</p>
570+
571+ <ul class="simple">
572+ <li>Deploy on every provider and pass provider tests<ul>
573+ <li>+1 AWS</li>
574+ <li>+1 HP Cloud</li>
575+ <li>+1 OpenStack</li>
576+ <li>+1 LXC</li>
577+ <li>+1 MAAS</li>
578+ <li>+1 Check for integrity from upstream source</li>
579+ <li>+1 Fail gracefully if upstream source goes missing</li>
580+ <li>+1 Contain a suite of tests with the charm that pass</li>
581+ <li>+1 Passes tests from Jenkins on jujucharms.com</li>
582+ </ul>
583+ </li>
584+ </ul>
585+
586+
587+ <h2>Secure</h2>
588+ <p><strong>4</strong> possible points</p>
589+
590+ <ul class="simple">
591+ <li>+1 Contain a well tested AppArmor profile</li>
592+ <li>+1 Conform to security policies of the charm store<ul>
593+ <li>Tight access control</li>
594+ </ul>
595+ </li>
596+ <li>+1 Doesn't run as root</li>
597+ <li>+1 Per instance or service access control</li>
598+ </ul>
599+
600+ <h2>Flexible</h2>
601+ <p><strong>2</strong> possible points</p>
602+
603+ <ul class="simple">
604+ <li>+1 Contain opinionated tuning options<ul>
605+ <li>Examples (depends on the service): &quot;safe&quot;, &quot;default&quot;, &quot;fast&quot;, &quot;real fast, not so safe&quot;</li>
606+ <li>Don't expose every configuration, pick that reflect real world usage</li>
607+ <li>Make it so I don't have to read the book.</li>
608+ </ul>
609+ </li>
610+ <li>+1 Use existing interfaces with other charms<ul>
611+ <li>Highly relatable.</li>
612+ </ul>
613+ </li>
614+ </ul>
615+
616+ <h2>Handle Data</h2>
617+ <p><strong>3</strong> possible points</p>
618+
619+ <ul>
620+ <li>Integrate data storage best practices<ul>
621+ <li>+1 Backups based on service usage</li>
622+ </ul>
623+ </li>
624+ <li>Handle the service's user data<ul>
625+ <li>+1 Version control</li>
626+ <li>+1 Automated snapshots and backup</li>
627+ </ul>
628+ </li>
629+ </ul>
630+
631+ <h2>Scaleable</h2>
632+ <p><strong>5</strong> possible points</p>
633+
634+ <ul>
635+ <li>+1 Responds to add-unit based on the service's needs<ul>
636+ <li>Configuration should not require additional steps to scale horizontally</li>
637+ </ul>
638+ </li>
639+ <li>+1 Be tested with a real workload, not just a synthetic benchmark</li>
640+ <li>Encapsulate scalability best practices<ul>
641+ <li>+1 From upstream and existing devops for that service</li>
642+ <li>+1 Community peer reviewed</li>
643+ <li>+1 Have a configure option for most performant configuration if not the default</li>
644+ </ul>
645+ </li>
646+ </ul>
647+
648+ <h2>Easy to Deploy</h2>
649+ <p><strong>7</strong> possible points</p>
650+
651+ <ul>
652+ <li>Well documented README with examples of use<ul>
653+ <li>+1 for a typical workload</li>
654+ <li>+1 for workloads at scale</li>
655+ <li>+1 Recommend best-practice relationships</li>
656+ </ul>
657+ </li>
658+ <li>Allow installation of the service from ...<ul>
659+ <li>+1 Pure upstream source</li>
660+ <li>+1 Your local source</li>
661+ <li>+1 PPA (if available)</li>
662+ <li>+1 The Ubuntu repository</li>
663+ </ul>
664+ </li>
665+ </ul>
666+
667+ <h2>Responsive to DevOps Needs</h2>
668+ <p><strong>4</strong> possible points</p>
669+
670+
671+ <ul>
672+ <li>+1 Allow for easy upgrade via juju upgrade-charm</li>
673+ <li>+1 Allow upgrading the service itself.</li>
674+ <li>Proper maintainership<ul>
675+ <li>+1 Responsive to user bug reports and concerns</li>
676+ <li>+1 Maintainable, easy to read and modify</li>
677+ </ul>
678+ </li>
679+ </ul>
680+
681+
682+ <h2>Upstream Friendly</h2>
683+ <p><strong>4</strong> possible points</p>
684+
685+
686+ <ul>
687+ <li>Follow upstream best practices<ul>
688+ <li>+1 Provide an option for a barebones &quot;pure upstream&quot; configuration</li>
689+ </ul>
690+ </li>
691+ <li>Should go lock-step with deployment recommendations<ul>
692+ <li>+1 Provide tip-of-trunk testing if feasible</li>
693+ </ul>
694+ </li>
695+ <li>Be cognizant of their release schedule<ul>
696+ <li>+1 Fresh charm on release day!</li>
697+ <li>+1 Endeavour to be upstream's recommended way to deploy that service in the cloud (website mention or something)</li>
698+ </ul>
699+ </li>
700+ </ul>
701+
702+ </section>
703+ </article>
704+ </div>
705+ </div>
706+ </section>
707+ <div class="shadow"></div>
708+ <footer>
709+ <div>
710+ <nav role="navigation" class="clearfix">
711+ <ul>
712+ <li><a href="https://juju.ubuntu.com/get-started">Get started</a></li>
713+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/local/">Local</a></li>
714+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/amazon/">Amazon Web Services</a></li>
715+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/hp-cloud/">HP Cloud</a></li>
716+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/rackspace/">Rackspace</a></li>
717+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/openstack/">Openstack</a></li>
718+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/maas/">MAAS</a></li>
719+ </ul>
720+ <ul>
721+ <li><a href="https://juju.ubuntu.com/resources">Resources</a></li>
722+ <li><a href="https://juju.ubuntu.com/docs">Documentation</a></li>
723+ <li><a href="https://juju.ubuntu.com/resources/videos">Videos</a></li>
724+ <li><a href="http://uistage.jujucharms.com:8080/">Juju GUI Demo</a></li>
725+ </ul>
726+ <ul>
727+ <li><a href="https://juju.ubuntu.com/community">Community</a></li>
728+ <li class="page_item"><a href="https://juju.ubuntu.com/community/juju-blog/">Blog</a></li>
729+ <li class="page_item"><a href="https://juju.ubuntu.com/community/weekly-charm-meeting/">Charm Meetings</a></li>
730+ <li class="page_item"><a href="https://juju.ubuntu.com/community/charmers/">Charmers</a></li>
731+ <li class="page_item"><a href="https://lists.ubuntu.com/mailman/listinfo/juju">Mailing List</a></li>
732+ <li class="page_item"><a href="http://webchat.freenode.net/?channels=juju">Chat</a></li>
733+ <li class="page_item"><a href="http://askubuntu.com/questions/tagged/juju?sort=faq&amp;amp;pagesize=50">FAQ</a></li>
734+ </ul>
735+ <ul class="last">
736+ <li><a href="https://launchpad.net/juju">Code</a></li>
737+ <li><a href="https://launchpad.net/juju-core">Juju Core</a></li>
738+ <li><a href="https://launchpad.net/charms">Charms</a></li>
739+ </ul>
740+ </nav>
741+ </div>
742+ </footer>
743+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
744+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.14/jquery-ui.min.js"></script>
745+ <script type="text/javascript" src="js/main.js"></script>
746+ </body>
747+</html>
748\ No newline at end of file
749
750=== added file 'htmldocs/authors-charm-store.html'
751--- htmldocs/authors-charm-store.html 1970-01-01 00:00:00 +0000
752+++ htmldocs/authors-charm-store.html 2013-06-27 17:35:30 +0000
753@@ -0,0 +1,290 @@
754+<!DOCTYPE html>
755+<html>
756+ <head>
757+ <meta charset="utf-8">
758+ <title>Juju Documentation - Authoring Charms</title>
759+ <link href="//fonts.googleapis.com/css?family=Ubuntu:400,400italic" rel="stylesheet" type="text/css"/>
760+ <link href="//fonts.googleapis.com/css?family=Ubuntu+Mono:400" rel="stylesheet" type="text/css"/>
761+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/reset.css" rel="stylesheet" type="text/css"/>
762+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/960.css" rel="stylesheet" type="text/css"/>
763+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/base.css" rel="stylesheet" type="text/css"/>
764+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/resources.css" rel="stylesheet" type="text/css"/>
765+ <link href="css/main.css" rel="stylesheet" type="text/css"/>
766+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
767+ <script src="http://app.stacktack.com/jquery.stacktack.min.js"></script>
768+ <script type="text/javascript">
769+ $(document).ready(function() {
770+ $(document).stacktack();
771+ });
772+ </script><!--[if lt IE 9]>
773+ <script type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
774+ </head>
775+ <body class="resources">
776+ <header>
777+ <div class="header-login">
778+ <ul>
779+ <li>&nbsp;</li>
780+ </ul>
781+ </div>
782+ <div class="header-navigation">
783+ <div>
784+ <nav role="navigation">
785+ <ul>
786+ <li class="page_item"><a href="https://juju.ubuntu.com/">Home</a></li>
787+ <li class="page_item current_page_item"><a href="https://juju.ubuntu.com/">Resources</a></li>
788+ <li class="page_item"><a href="https://juju.ubuntu.com/">Community</a></li>
789+ <li class="page_item"><a href="https://juju.ubuntu.com/">Charm Store</a></li>
790+ <li class="page_item"><a href="https://juju.ubuntu.com/">Events</a></li>
791+ <li class="page_item"><a href="https://juju.ubuntu.com/">Survey</a></li>
792+ <li>
793+ <form id="form-search" method="get" action="/">
794+ <fieldset>
795+ <input id="input-search" type="text" name="s" value="Search">
796+ </fieldset>
797+ </form>
798+ </li>
799+ </ul>
800+ </nav><a href="https://juju.ubuntu.com/" class="logo-ubuntu"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/logo-ubuntu.png"></a>
801+ </div>
802+ </div>
803+ <div class="header-content">
804+ <div class="clearfix"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/arrow-nav.png" width="9" height="5" style="left:894px; display: block;" class="arrow-nav">
805+ <div class="header-navigation-secondary"></div>
806+ <div class="header-image"></div>
807+ <h1>Resources</h1>
808+ <h2>A collection of some of the most important online references for Juju users and developers.</h2>
809+ </div>
810+ </div>
811+ </header>
812+ <section id="content" class="container-12">
813+ <div class="grid-12 doc-container">
814+ <div class="grid-3 doc-navigation">
815+ <nav role="navigation">
816+ <h1>User Guide</h1>
817+ <ul>
818+ <li class=""><a href="getting-started.html">Getting Started</a></li>
819+ <li class=" sub"><a href="getting-started.html#intro">Introduction</a></li>
820+ <li class=" sub"><a href="getting-started.html#install">Installation</a></li>
821+ <li class=" sub"><a href="config-aws.html">AWS Configuration</a></li>
822+ <li class=" sub"><a href="config-hpcloud.html">HP Cloud Configuration</a></li>
823+ <li class=" sub"><a href="">OpenStack Configuration</a></li>
824+ <li class=" sub"><a href="config-maas.html">MAAS Configuration</a></li>
825+ <li class=" sub"><a href="getting-started.html#test">Testing your setup</a></li>
826+ <li class=""><a href="charms.html">Using Charms</a></li>
827+ <li class=" sub"><a href="charms.html#intro">What are Charms?</a></li>
828+ <li class=" sub"><a href="charms-deploying.html">Deploying Services</a></li>
829+ <li class=" sub"><a href="charms-constraints.html">Using constraints</a></li>
830+ <li class=" sub"><a href="charms-config.html">Service Configuration</a></li>
831+ <li class=" sub"><a href="charms-relations.html">Service Relationships</a></li>
832+ <li class=" sub"><a href="charms-exposing.html">Exposing Services</a></li>
833+ <li class=" sub"><a href="charms-scaling.html">Scaling Services</a></li>
834+ <li class=" sub"><a href="charms-destroy.html">Destroying Services</a></li>
835+ </ul>
836+ <h1>Charm Authors</h1>
837+ <ul></ul>
838+ <li class=""><a href="authors-charm-writing.html">Writing a charm</a></li>
839+ <li class=" sub"><a href="authors-subordinate-services.html">Subordinate services</a></li>
840+ <li class=" sub"><a href="authors-implicit-relations.html">Implicit Relations</a></li>
841+ <li class=" sub"><a href="authors-testing.html">Charm Testing</a></li>
842+ <li class=" sub"><a href="authors-hooks.html">Hook debugging</a></li>
843+ <li class=""><a href="authors-charm-store.html">The Juju Charm Store</a></li>
844+ <li class=" sub"><a href="authors-charm-policy.html">Charm store policy</a></li>
845+ <li class=" sub"><a href="authors-charm-best-practice.html">Best practices</a></li>
846+ <li class=" sub"><a href="authors-charm-quality.html">Charm Quality Rating</a></li>
847+ <h1>Reference</h1>
848+ <ul>
849+ <li class="sub"><a href="commands.html">Juju commands</a></li>
850+ <li class="sub"><a href="glossary.html">Glossary</a></li>
851+ <li class="sub"><a href="contributing.html">Contribute to the Docs!</a></li>
852+ </ul>
853+ </nav>
854+ </div>
855+ <div class="grid-9 doc-content">
856+ <article>
857+ <section id ="upgrading">
858+ <h1>The Juju Charm Store</h1>
859+ <p>Juju includes a collection of what we call '''Charms''' that let you deploy whatever services you want in Juju. Since charms are open and worked on by the community, they represent a distilled set of best practices for deploying these services.</p>
860+ <ul class="simple">
861+ <li>The main distro page is here: <a class="reference external" href="https://launchpad.net/charms">https://launchpad.net/charms</a></li>
862+ <li>There are useful tools for downloading, modifying, and contributing here: <a class="reference external" href="https://launchpad.net/charm-tools">https://launchpad.net/charm-tools</a></li>
863+ <li>Here is the official tutorial for charm writing: <a class="reference external" href="https://juju.ubuntu.com/docs/write-charm.html">https://juju.ubuntu.com/docs/write-charm.html</a></li>
864+ </ul>
865+ <h2>Charm Store Process</h2>
866+ <p>This process is designed to allow prospective developers to have their charms reviewed and updated in the <a class="reference external" href="http://jujucharms.com">Charm Store</a> in a timely manner that ensures peer reviews and quality.</p>
867+
868+
869+ <h2>Submitting a new Charm</h2>
870+ <ol class="arabic simple">
871+ <li>Install juju and charm-tools.</li>
872+ <li>Create a repository, something like <tt class="docutils literal"><span class="pre">mkdir</span> <span class="pre">-p</span> <span class="pre">~/charms/precise</span></tt>, precise is the release code name for the <a class="reference external" href="http://releases.ubuntu.com">release of Ubuntu</a> you wish to target your charm at.</li>
873+ <li>If you haven't created your charm yet, you can use <tt class="docutils literal"><span class="pre">charm</span> <span class="pre">create</span> <span class="pre">&lt;ubuntu-package-name&gt;</span></tt> which will fill in some basic metadata info for you. You can check to see if it already exists at <a class="reference external" href="http://jujucharms.com/">http://jujucharms.com/</a>. Also make sure to <a class="reference external" href="http://goo.gl/mvtPh">check the list of open charms</a> to see if anybody is already working on a charm for the service you want to work on. Bugs which have had no activity by the assignee for more than 30 days are fair game and should be unassigned.</li>
874+ <li>Once your charm is working and tested with any compatible charms, make sure it passes <tt class="docutils literal"><span class="pre">charm</span> <span class="pre">proof</span> <span class="pre">path/to/your/charm</span></tt></li>
875+ <li><tt class="docutils literal"><span class="pre">bzr</span> <span class="pre">init</span></tt> in your charm's root directory</li>
876+ <li><tt class="docutils literal"><span class="pre">bzr</span> <span class="pre">add</span></tt> to add all files.</li>
877+ <li><tt class="docutils literal"><span class="pre">bzr</span> <span class="pre">commit</span> <span class="pre">-m</span> <span class="pre">'Initial</span> <span class="pre">charm'</span></tt></li>
878+ <li><tt class="docutils literal"><span class="pre">bzr</span> <span class="pre">push</span> <span class="pre">lp:~your-launchpad-username/charms/precise/your-charms-name/trunk</span></tt></li>
879+ <li>File a bug against charms at <a class="reference external" href="https://launchpad.net/charms/+filebug">https://launchpad.net/charms/+filebug</a> This is used to track the progress of your charm.</li>
880+ <li>Subscribe the <tt class="docutils literal"><span class="pre">charmers</span></tt> team by clicking &quot;Subscribe someone else&quot; on the right side of the launchpad page. This is important as it gets your charm in the review queue!</li>
881+ </ol>
882+ <p>Your charm should then be looked at in a timely manner.</p>
883+
884+
885+ <h2>Submitting a fix to an existing Charm</h2>
886+ <ol class="arabic simple">
887+ <li>Grab the charm you want to fix, we'll use Nagios as an example: <tt class="docutils literal"><span class="pre">bzr</span> <span class="pre">branch</span> <span class="pre">lp:charms/precise/nagios</span></tt></li>
888+ <li>Modify it.</li>
889+ <li>Commit your fixes <tt class="docutils literal"><span class="pre">bzr</span> <span class="pre">commit</span> <span class="pre">-m</span> <span class="pre">'Your</span> <span class="pre">changelog</span> <span class="pre">entry'</span></tt></li>
890+ <li><tt class="docutils literal"><span class="pre">bzr</span> <span class="pre">push</span> <span class="pre">lp:~your-launchpad-username/charms/precise/nagios/fixed-charms-name</span></tt></li>
891+ <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>
892+ <li>In the merge proposal form paste in the <tt class="docutils literal"><span class="pre">fixed-charms-name</span></tt> that you pushed to earlier.</li>
893+ <li>For the reviewer field put the <tt class="docutils literal"><span class="pre">charmers</span></tt> team, this will get your code into the review queue!</li>
894+ </ol>
895+
896+ <h2>Getting Help</h2>
897+ <p>Inspired by <a class="reference external" href="http://wiki.bazaar.canonical.com/PatchPilot">Bazaar's Patch Pilot programme</a> there will be patch pilots in <cite>#juju</cite> who can help you get your patch accepted. Check the topic to see who's on duty. Still need help? Poke us on <a class="reference external" href="https://lists.ubuntu.com/mailman/listinfo/juju">the mailing list</a> ; if you're from an upstream project who wants more detailed help/tutoring, then contact <a class="reference external" href="http://launchpad.net/~jorge">Jorge Castro</a> and we'd be more than happy to get a charm expert to help you out or help you run a Charm School.</p>
898+ <p>Some notes:</p>
899+ <ul>
900+ <li>Please respect that these people might have a few other charms in their queue already.</li>
901+ <li>The package you have a question have about might not necessarily be part of the patch pilot's area of expertise. They will still try to help you get your fix in and probably get you in touch with the 'right' people.</li>
902+ </ul>
903+
904+ <h2>Reviewers</h2>
905+ <ol class="arabic">
906+ <li><p class="first">Modify the topic in #juju to put yourself down as the reviewer for your shift.</p>
907+ </li>
908+ <li><p class="first">Check out <a class="reference external" href="http://jujucharms.com/review-queue">the review queue</a> and be responsive on IRC for user questions.</p>
909+ </li>
910+ <li><p class="first">Review the items in the queue. If the queue is caught up and not on fire, consider the following tasks:</p>
911+ <blockquote>
912+ <ul class="simple">
913+ <li>Answer questions on IRC, the mailing list, and the <a class="reference external" href="http://askubuntu.com/questions/tagged/juju?sort=unanswered&amp;pagesize=50">juju tag</a></li>
914+ <li>Work on <a class="reference external" href="http://juju.ubuntu.com/docs|thedocumentation">the documentation</a></li>
915+ <li>Work on simple <a class="reference external" href="http://jujucharms.com/tools/proof-errors">proof errors</a></li>
916+ <li>Triage bugs in <tt class="docutils literal"><span class="pre">lp:charms</span></tt></li>
917+ </ul>
918+ </blockquote>
919+ </li>
920+ <li><p class="first">When your shift is over modify the topic in #juju to put <tt class="docutils literal"><span class="pre">~charmers</span></tt> as the reviewer. (When no one is specifically assigned to review we just default to ~charmers).</p>
921+ </li>
922+ <li><p class="first">(Optional) Send a mail to the juju list summarizing your shift, new charms you might have promulgated or updated, issues that might have been raised by the review, or anything else you feel you should share with the community.</p>
923+ </li>
924+ <li><p class="first">Here's the <a class="reference external" href="http://goo.gl/uK9HD">Calendar for reviewing</a> if you want to check what day you have.</p>
925+ </li>
926+ </ol>
927+
928+ <h3>Review Tips and Criteria<a class="headerlink" href="#review-tips-and-criteria" title="Permalink to this headline">¶</a></h3>
929+ <dl class="docutils">
930+ <dt>Expectations:</dt>
931+ <dd><ul class="first simple">
932+ <li>The goal is to <em>welcome</em> the contributor and help them have a good experience getting fixes into Ubuntu; your first response should be to <em>thank them profusely</em>. By making collaboration easier, we can hope to see more contributors and thus lighten the development workload on everyone. This is important for a number of reasons:</li>
933+ </ul>
934+
935+ <ul>
936+ <li>We want to be a welcoming community.</li>
937+ <li>With every word of thanks you encourage new contributors and give them more confidence, which is very important, as our part of the community is sometimes hard to understand or look into.</li>
938+ <li>We want to make our whole development experience social. We not only want contributors, but team mates.</li>
939+ <li>Tips:</li>
940+ </ul>
941+
942+ <ul>
943+ <li>Start your review by saying &quot;Thanks&quot;, no matter what the outcome of the review is going to be.</li>
944+ <li>If you recognise somebody you've worked with on IRC, thank them.</li>
945+ <li>Consider blogging about a particularly nice contribution. This will not only make the contributor feel valued, but also inspire others with a good example of great work.</li>
946+ <li>Encourage contributors to apply for ~charmers if you think they're ready.</li>
947+ </ul>
948+
949+
950+ <ul class="last simple">
951+ <li>If the merge proposal or patch requires more work, encourage the contributor to join <cite>#juju</cite> and discuss the solution there.</li>
952+ <li>Follow <a class="reference external" href="http://wiki.bazaar.canonical.com/PatchPilot">these instructions</a> as well as you can.</li>
953+ </ul>
954+ </dd>
955+ <dt>Good tips:</dt>
956+ <dd><ul class="first last simple">
957+ <li>If this is your first time patch piloting, you may feel more comfortable being a co-pilot your first few runs. Find a pilot in your timezone and reschedule your time to coincide with theirs.</li>
958+ <li>''Optional:'' Send a brief mail after your stint, to say what you did and how it worked out. If you have feedback on the review system or the process, speak up.</li>
959+ <li>You're not obliged to deal with all the open patches. We appreciate what you do do.</li>
960+ <li>You can prioritize whichever you think best achieves the goal of helping people enjoy getting things done in Juju. That might be the newest ones, neglected patches, easy patches, or those from new contributors. The <a class="reference external" href="http://jujucharms.com/review-queue">Review Queue</a> sorts by age.</li>
961+ <li>If you are unfamiliar with the package, make sure you review everything you can, it's not necessarily your job to merge/promulgate it. If, after you did your review, you can get the contributor in touch with somebody who knows the codebase better, you already helped out a lot.</li>
962+ </ul>
963+ </dd>
964+ </dl>
965+ <p>Sponsorship is organized into</p>
966+
967+ <ul>
968+ <li><a class="reference external" href="https://launchpad.net/~charmers">https://launchpad.net/~charmers</a>:</li>
969+ </ul>
970+
971+ <p>If something needs review, subscribe ~charmers.</p>
972+ <p>You can see the currently pending requests at:</p>
973+
974+ <ul class="simple">
975+ <li><a class="reference external" href="https://bugs.launchpad.net/charms/+bugs?field.subscriber=charmers">https://bugs.launchpad.net/charms/+bugs?field.subscriber=charmers</a></li>
976+ <li><a class="reference external" href="https://bugs.launchpad.net/charms/+bugs?field.subscriber=charmers&amp;field.component=3&amp;field.component=4">https://bugs.launchpad.net/charms/+bugs?field.subscriber=charmers&amp;field.component=3&amp;field.component=4</a></li>
977+ <li><a class="reference external" href="http://jujucharms.com/review-queue">http://jujucharms.com/review-queue</a></li>
978+ </ul>
979+
980+
981+ <h2>Charm Inclusion Policy for Reviewers</h2>
982+ <p>Please see the official <a class="reference external" href="policy.html"><em>Charm Store Policy</em></a> document.</p>
983+
984+ <h2>Join Us!</h2>
985+ <p>We also need help reviewing and testing charms. The Charmers team is granted write access to the Charm Collection and charm-tools. If you'd like to join that group, here are some tips:</p>
986+
987+ <ul>
988+ <li>Join <a class="reference external" href="https://launchpad.net/~charm-contributors">charm-contributors</a> ! You will immediately be able to help out with bug prioritization.</li>
989+ <li>Join the discussion on IRC (Freenode) in #juju and on <a class="reference external" href="https://lists.ubuntu.com/mailman/listinfo/juju">https://lists.ubuntu.com/mailman/listinfo/juju</a></li>
990+ <li>Test charms and report your successes or file bugs.</li>
991+ <li>Write charms - pick a web app or a backend technology and write a charm.</li>
992+ <li>Review new charms <a class="reference external" href="https://bugs.launchpad.net/charms/+bugs?field.tag=new-charm">https://bugs.launchpad.net/charms/+bugs?field.tag=new-charm</a></li>
993+ </ul>
994+
995+ <p>Upon getting involved with these activities, we'll probably ask you if you'd like to join charmers. If not, go ahead and apply for membership to the team, and <em>send an email to the list letting us know about your reasons for wanting to be a member of charmers</em>.</p>
996+
997+
998+ </section>
999+ </article>
1000+ </div>
1001+ </div>
1002+ </section>
1003+ <div class="shadow"></div>
1004+ <footer>
1005+ <div>
1006+ <nav role="navigation" class="clearfix">
1007+ <ul>
1008+ <li><a href="https://juju.ubuntu.com/get-started">Get started</a></li>
1009+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/local/">Local</a></li>
1010+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/amazon/">Amazon Web Services</a></li>
1011+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/hp-cloud/">HP Cloud</a></li>
1012+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/rackspace/">Rackspace</a></li>
1013+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/openstack/">Openstack</a></li>
1014+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/maas/">MAAS</a></li>
1015+ </ul>
1016+ <ul>
1017+ <li><a href="https://juju.ubuntu.com/resources">Resources</a></li>
1018+ <li><a href="https://juju.ubuntu.com/docs">Documentation</a></li>
1019+ <li><a href="https://juju.ubuntu.com/resources/videos">Videos</a></li>
1020+ <li><a href="http://uistage.jujucharms.com:8080/">Juju GUI Demo</a></li>
1021+ </ul>
1022+ <ul>
1023+ <li><a href="https://juju.ubuntu.com/community">Community</a></li>
1024+ <li class="page_item"><a href="https://juju.ubuntu.com/community/juju-blog/">Blog</a></li>
1025+ <li class="page_item"><a href="https://juju.ubuntu.com/community/weekly-charm-meeting/">Charm Meetings</a></li>
1026+ <li class="page_item"><a href="https://juju.ubuntu.com/community/charmers/">Charmers</a></li>
1027+ <li class="page_item"><a href="https://lists.ubuntu.com/mailman/listinfo/juju">Mailing List</a></li>
1028+ <li class="page_item"><a href="http://webchat.freenode.net/?channels=juju">Chat</a></li>
1029+ <li class="page_item"><a href="http://askubuntu.com/questions/tagged/juju?sort=faq&amp;amp;pagesize=50">FAQ</a></li>
1030+ </ul>
1031+ <ul class="last">
1032+ <li><a href="https://launchpad.net/juju">Code</a></li>
1033+ <li><a href="https://launchpad.net/juju-core">Juju Core</a></li>
1034+ <li><a href="https://launchpad.net/charms">Charms</a></li>
1035+ </ul>
1036+ </nav>
1037+ </div>
1038+ </footer>
1039+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
1040+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.14/jquery-ui.min.js"></script>
1041+ <script type="text/javascript" src="js/main.js"></script>
1042+ </body>
1043+</html>
1044\ No newline at end of file
1045
1046=== added file 'htmldocs/authors-charm-writing.html'
1047--- htmldocs/authors-charm-writing.html 1970-01-01 00:00:00 +0000
1048+++ htmldocs/authors-charm-writing.html 2013-06-27 17:35:30 +0000
1049@@ -0,0 +1,467 @@
1050+<!DOCTYPE html>
1051+<html>
1052+ <head>
1053+ <meta charset="utf-8">
1054+ <title>Juju Documentation - Writing a charm</title>
1055+ <link href="//fonts.googleapis.com/css?family=Ubuntu:400,400italic" rel="stylesheet" type="text/css"/>
1056+ <link href="//fonts.googleapis.com/css?family=Ubuntu+Mono:400" rel="stylesheet" type="text/css"/>
1057+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/reset.css" rel="stylesheet" type="text/css"/>
1058+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/960.css" rel="stylesheet" type="text/css"/>
1059+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/base.css" rel="stylesheet" type="text/css"/>
1060+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/resources.css" rel="stylesheet" type="text/css"/>
1061+ <link href="css/main.css" rel="stylesheet" type="text/css"/>
1062+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
1063+ <script src="http://app.stacktack.com/jquery.stacktack.min.js"></script>
1064+ <script type="text/javascript">
1065+ $(document).ready(function() {
1066+ $(document).stacktack();
1067+ });
1068+ </script><!--[if lt IE 9]>
1069+ <script type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
1070+ </head>
1071+ <body class="resources">
1072+ <header>
1073+ <div class="header-login">
1074+ <ul>
1075+ <li>&nbsp;</li>
1076+ </ul>
1077+ </div>
1078+ <div class="header-navigation">
1079+ <div>
1080+ <nav role="navigation">
1081+ <ul>
1082+ <li class="page_item"><a href="https://juju.ubuntu.com/">Home</a></li>
1083+ <li class="page_item current_page_item"><a href="https://juju.ubuntu.com/">Resources</a></li>
1084+ <li class="page_item"><a href="https://juju.ubuntu.com/">Community</a></li>
1085+ <li class="page_item"><a href="https://juju.ubuntu.com/">Charm Store</a></li>
1086+ <li class="page_item"><a href="https://juju.ubuntu.com/">Events</a></li>
1087+ <li class="page_item"><a href="https://juju.ubuntu.com/">Survey</a></li>
1088+ <li>
1089+ <form id="form-search" method="get" action="/">
1090+ <fieldset>
1091+ <input id="input-search" type="text" name="s" value="Search">
1092+ </fieldset>
1093+ </form>
1094+ </li>
1095+ </ul>
1096+ </nav><a href="https://juju.ubuntu.com/" class="logo-ubuntu"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/logo-ubuntu.png"></a>
1097+ </div>
1098+ </div>
1099+ <div class="header-content">
1100+ <div class="clearfix"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/arrow-nav.png" width="9" height="5" style="left:894px; display: block;" class="arrow-nav">
1101+ <div class="header-navigation-secondary"></div>
1102+ <div class="header-image"></div>
1103+ <h1>Resources</h1>
1104+ <h2>A collection of some of the most important online references for Juju users and developers.</h2>
1105+ </div>
1106+ </div>
1107+ </header>
1108+ <section id="content" class="container-12">
1109+ <div class="grid-12 doc-container">
1110+ <div class="grid-3 doc-navigation">
1111+ <nav role="navigation">
1112+ <h1>User Guide</h1>
1113+ <ul>
1114+ <li class=""><a href="getting-started.html">Getting Started</a></li>
1115+ <li class=" sub"><a href="getting-started.html#intro">Introduction</a></li>
1116+ <li class=" sub"><a href="getting-started.html#install">Installation</a></li>
1117+ <li class=" sub"><a href="config-aws.html">AWS Configuration</a></li>
1118+ <li class=" sub"><a href="config-hpcloud.html">HP Cloud Configuration</a></li>
1119+ <li class=" sub"><a href="">OpenStack Configuration</a></li>
1120+ <li class=" sub"><a href="config-maas.html">MAAS Configuration</a></li>
1121+ <li class=" sub"><a href="getting-started.html#test">Testing your setup</a></li>
1122+ <li class=""><a href="charms.html">Using Charms</a></li>
1123+ <li class=" sub"><a href="charms.html#intro">What are Charms?</a></li>
1124+ <li class=" sub"><a href="charms-deploying.html">Deploying Services</a></li>
1125+ <li class=" sub"><a href="charms-constraints.html">Using constraints</a></li>
1126+ <li class=" sub"><a href="charms-config.html">Service Configuration</a></li>
1127+ <li class=" sub"><a href="charms-relations.html">Service Relationships</a></li>
1128+ <li class=" sub"><a href="charms-exposing.html">Exposing Services</a></li>
1129+ <li class=" sub"><a href="charms-scaling.html">Scaling Services</a></li>
1130+ <li class=" sub"><a href="charms-destroy.html">Destroying Services</a></li>
1131+ </ul>
1132+ <h1>Charm Authors</h1>
1133+ <ul></ul>
1134+ <li class=""><a href="authors-charm-writing.html">Writing a charm</a></li>
1135+ <li class=" sub"><a href="authors-subordinate-services.html">Subordinate services</a></li>
1136+ <li class=" sub"><a href="authors-implicit-relations.html">Implicit Relations</a></li>
1137+ <li class=" sub"><a href="authors-testing.html">Charm Testing</a></li>
1138+ <li class=" sub"><a href="authors-hooks.html">Hook debugging</a></li>
1139+ <li class=""><a href="authors-charm-store.html">The Juju Charm Store</a></li>
1140+ <li class=" sub"><a href="authors-charm-policy.html">Charm store policy</a></li>
1141+ <li class=" sub"><a href="authors-charm-best-practice.html">Best practices</a></li>
1142+ <li class=" sub"><a href="authors-charm-quality.html">Charm Quality Rating</a></li>
1143+ <h1>Reference</h1>
1144+ <ul>
1145+ <li class="sub"><a href="commands.html">Juju commands</a></li>
1146+ <li class="sub"><a href="glossary.html">Glossary</a></li>
1147+ <li class="sub"><a href="contributing.html">Contribute to the Docs!</a></li>
1148+ </ul>
1149+ </nav>
1150+ </div>
1151+ <div class="grid-9 doc-content">
1152+ <article>
1153+ <section id ="charm-writing">
1154+ <h1>Writing a charm</h1>
1155+ <p>This tutorial demonstrates the basic workflow for writing, running and debugging a juju charm. Charms are a way to package and share your service deployment and orchestration knowledge and share them with the world.</p>
1156+
1157+ <h2>Creating the charm</h2>
1158+ <p>In this example we are going to write a charm to deploy the drupal CMS system. For the sake of simplicity, we are going to use the mysql charm that comes bundled with juju. Assuming the current directory is the juju trunk, let's enter the directory</p>
1159+
1160+ <h3>Creating a README File</h3>
1161+ <p>First create a README file with your text editor. This file must be plain text,the Charm Store will parse Markdown format and display it on the Charm Store's web interface, so it will be the public facing page for your charm. We recommend you leave basic usage instructions on how to use your charm in the README.</p>
1162+
1163+ <h3>Making the metadata</h3>
1164+ <p>Now let's make the metadata and hooks directory:</p>
1165+ <pre><code>
1166+ mkdir -p drupal/hooks
1167+ vim drupal/metadata.yaml
1168+ </code></pre>
1169+ <p>Edit the metadata.yaml file to resemble:</p>
1170+ <pre><code>
1171+ <p>name: drupal</p>
1172+ <p>summary: "Drupal CMS"</p>
1173+ <p>maintainer: "Drupal PowerUser &lt;drupaluser@somedomain.foo&gt;"</p>
1174+ <p>description: Installs the drupal CMS system, relates to the mysql charm provided in examples directory. Can be scaled to multiple web servers</p>
1175+ <p> requires:</p>
1176+ <p> db</p>
1177+ <p> interface: </p>
1178+ <p> mysql</p>
1179+ </code></pre>
1180+
1181+ <p>The metadata.yaml file provides metadata around the charm. The file declares a charm with the name drupal. Since this is the first time to edit this charm, its revision number is one. A short and long description of the charm are provided. The final field is <cite>requires</cite>, this mentions the interface type required by this charm. Since this drupal charm uses the services of a mysql database, we need to require it in the metadata. Since this charm does not provide a service to any other charm, there is no <cite>provides</cite> field. You might be wondering where did the interface name &quot;mysql&quot; come from, you can locate the interface information from the mysql charm's metadata.yaml. Here it is for convenience:</p>
1182+ <pre><code>name: mysql
1183+ <p>summary: "MySQL relational database provider"
1184+ <p>maintainer: "Joe Charmer &lt;youremail@whatever.com&gt;"
1185+ <p>description: |
1186+ <p> Installs and configures the MySQL package (mysqldb), then runs it.
1187+ <p>
1188+ <p> Upon a consuming service establishing a relation, creates a new
1189+ <p> database for that service, if the database does not yet
1190+ <p> exist. Publishes the following relation settings for consuming
1191+ <p> services:
1192+ <p>
1193+ <p> database: database name
1194+ <p> user: user name to access database
1195+ <p> password: password to access the database
1196+ <p> host: local hostname
1197+ <p>provides:
1198+ <p> db:
1199+ <p> interface: mysql</p>
1200+ </code></pre>
1201+
1202+ <p>That very last line mentions that the interface that mysql provides to us is &quot;mysql&quot;. Also the description mentions that four parameters are sent to the connecting charm (database, user, password, host) in order to enable it to connect to the database. We will make use of those variables once we start writing hooks. Such interface information is either provided in a bundled README file, or in the description. You can also read the charm code to discover such information as well.</p>
1203+ <p>In the next steps we will write the necessary hook scripts.</p>
1204+
1205+ <h2>Have a plan</h2>
1206+ <p>When attempting to write a charm, it is beneficial to have a mental plan of what it takes to deploy the software. In our case, you should deploy drupal manually, understand where its configuration information is written, how the first node is deployed, and how further nodes are configured. With respect to this charm, this is the plan:</p>
1207+
1208+ <ul>
1209+ <li>Install hook installs all needed components (apache, php, drush)</li>
1210+ <li>Once the database connection information is ready, call drush on first node to perform the initial setup (creates DB tables, completes setup)</li>
1211+ <li>For scaling onto other nodes, the DB tables have already been set-up. Thus we only need to append the database connection information into drupal's settings.php file. We will use a template file for that</li>
1212+ </ul>
1213+
1214+
1215+ <p class="note"><strong>Note:</strong>The hooks in a charm are executable files that can be written using any scripting or programming language. In our case, we'll use bash</p>
1216+
1217+ <p>For production charms it is always recommended that you install software components from the Ubuntu archive (using apt-get) in order to get security updates. However in this example I am installing drush (Drupal shell) using apt-get, then using that to download and install the latest version of drupal. If you were deploying your own code, you could just as easily install a revision control tool (bzr, git, hg...etc) and use that to checkout a code branch to deploy from. This demonstrates the flexibility offered by juju which doesn't really force you into one way of doing things.</p>
1218+
1219+
1220+ <h2>Write hooks</h2>
1221+ <p>Let's change into the hooks directory:</p>
1222+ <pre><code>$ cd drupal/hooks
1223+ vim install</code></pre>
1224+
1225+ <p>Since you should have already installed drupal, you have an idea what it takes to get it installed. My install script looks like:</p>
1226+ <pre><code>#!/bin/bash
1227+ set -eux # -x for verbose logging to juju debug-log
1228+ juju-log "Installing drush,apache2,php via apt-get"
1229+ apt-get -y install drush apache2 php5-gd libapache2-mod-php5 php5-cgi mysql-client-core-5.5
1230+ a2enmod php5
1231+ /etc/init.d/apache2 restart
1232+ juju-log "Using drush to download latest Drupal"
1233+ # Typo on next line, it should be www not ww
1234+ cd /var/ww &amp;&amp; drush dl drupal --drupal-project-rename=juju
1235+ </code></pre>
1236+
1237+ <p>I have introduced an artificial typo on the last line &quot;ww not www&quot;, this is to simulate any error which you are bound to face sooner or later. Let's create other hooks:</p>
1238+ <pre>$ vim start</pre>
1239+
1240+ <p>The start hook is empty, however it needs to be a valid executable, thus we'll add the first bash shebang line, here it is:</p>
1241+ <pre><span class="c">#!/bin/bash</span>
1242+ </pre>
1243+
1244+ <p>Here's the &quot;stop&quot; script:</p>
1245+ <pre>#!/bin/bash
1246+ juju-log "Stopping apache"
1247+ /etc/init.d/apache2 stop</pre>
1248+
1249+ <p>The final script, which does most of the work is &quot;db-relation-changed&quot;. This script gets the database connection information set by the mysql charm then sets up drupal for the first time, and opens port 80 for web access. Let's start with a simple version that only installs drupal on the first node. Here it is:</p>
1250+ <pre>#!/bin/bash
1251+ set -eux # -x for verbose logging to juju debug-log
1252+ hooksdir=$PWD
1253+ user=`relation-get user`
1254+ password=`relation-get password`
1255+ host=`relation-get host`
1256+ database=`relation-get database`
1257+ # All values are set together, so checking on a single value is enough
1258+ # If $user is not set, DB is still setting itself up, we exit awaiting next run
1259+ [ -z "$user" ] &amp;&amp; exit 0
1260+ juju-log "Setting up Drupal for the first time"
1261+ cd /var/www/juju &amp;&amp; drush site-install -y standard \
1262+ --db-url=mysql://$user:$password@$host/$database \
1263+ --site-name=juju --clean-url=0
1264+ cd /var/www/juju &amp;&amp; chown www-data sites/default/settings.php
1265+ open-port 80/tcp
1266+ </code></pre>
1267+
1268+ <p>The script is quite simple, it reads the four variables needed to connect to mysql, ensures they are not null, then passes them to the drupal installer. Make sure all the hook scripts have executable permissions, and change directory above the examples directory:</p>
1269+ <pre>$ chmod +x *
1270+ $ cd ../../../..</pre>
1271+
1272+ <p>Checking on the drupal charm file-structure, this is what we have:</p>
1273+ <pre>$ find examples/precise/drupal
1274+ examples/precise/drupal
1275+ examples/precise/drupal/metadata.yaml
1276+ examples/precise/drupal/hooks
1277+ examples/precise/drupal/hooks/db-relation-changed
1278+ examples/precise/drupal/hooks/stop
1279+ examples/precise/drupal/hooks/install
1280+ examples/precise/drupal/hooks/start</pre>
1281+
1282+ <h2>Test run</h2>
1283+ <p>Let us deploy the drupal charm. Remember that the install hook has a problem and will not exit cleanly. Deploying:</p>
1284+
1285+ <pre>juju bootstrap</pre>
1286+
1287+ <p>Wait a minute for the environment to bootstrap. Keep issuing the status command till you know the environment is ready:</p>
1288+
1289+ <pre>juju status
1290+ <p>2011-06-07 14:04:06,816 INFO Connecting to environment.</p>
1291+ <p>machines:</p>
1292+ <p> 0:</p>
1293+ <p> agent-state: running</p>
1294+ <p> dns-name: ec2-50-16-107-102.compute-1.amazonaws.com
1295+ <p> instance-id: i-130c9168
1296+ <p> instance-state: running
1297+ <p>services:
1298+ <p>2011-06-07 14:04:11,125 INFO 'status' command finished successfully</pre>
1299+
1300+ <p>It can be beneficial when debugging a new charm to always have the distributed debug-log running in a separate window:</p>
1301+ <pre>juju debug-log</pre>
1302+ <p>Let's deploy the mysql and drupal charms:</p>
1303+ <pre>juju deploy --repository=examples local:precise/mysql
1304+ juju deploy --repository=examples local:precise/drupal</pre>
1305+
1306+ <p>This deploy is telling juju to look in a local repository for our charm, specifically in the examples/precise/mysql and examples/precise/drupal folders. Local repositories specified with the --repository switch must point to a directory which contains sub-directories named after an Ubuntu series (e.g. precise) and the charms. The repository can be named anything you wish.</p>
1307+ <p>Thus, when creating charms locally, this syntax should be followed:</p>
1308+ <pre><code>
1309+ repositoryName/ubuntuReleaseName/charmName</code></pre>
1310+ <p>Once the machines are started (hint: check the debug-log), issue a status command:</p>
1311+ <pre>juju status
1312+
1313+ <p>machines:
1314+ <p> 0:
1315+ <p> agent-state: running
1316+ <p> dns-name: ec2-50-16-107-102.compute-1.amazonaws.com
1317+ <p> instance-id: i-130c9168
1318+ <p> instance-state: running</p>
1319+ <p> 1:
1320+ <p> agent-state: running
1321+ <p> dns-name: ec2-50-19-24-186.compute-1.amazonaws.com
1322+ <p> instance-id: i-17079a6c
1323+ <p> instance-state: running
1324+ <p> 2:
1325+ <p> agent-state: running
1326+ <p> dns-name: ec2-23-20-194-198.compute-1.amazonaws.com
1327+ <p> instance-id: i-d7079aac
1328+ <p> instance-state: running
1329+ <p>services:
1330+ <p> mysql:
1331+ <p> charm: cs:precise/mysql-3
1332+ <p> relations: {}
1333+ <p> units:
1334+ <p> mysql/0:
1335+ <p> agent-state: started
1336+ <p> machine: 2
1337+ <p> public-address: ec2-23-20-194-198.compute-1.amazonaws.com
1338+ <p> drupal:
1339+ <p> charm: local:precise/drupal-3
1340+ <p> relations: {}
1341+ <p> units:
1342+ <p> drupal/0:
1343+ <p> agent-state: install-error
1344+ <p> machine: 1
1345+ <p> public-address: ec2-50-19-24-186.compute-1.amazonaws.com</pre>
1346+
1347+ <p>Note how mysql is listed as started, while drupal's state is install_error. This is because the install hook has an error, and did not exit cleanly (exit code 1).</p>
1348+ <h2>Debugging hooks</h2>
1349+ <p>Let's debug the install hook, from a new window:</p>
1350+ <pre>juju debug-hooks drupal/0</pre>
1351+
1352+ <p>This will connect you to the drupal machine, and present a shell. The way the debug-hooks functionality works is by starting a new terminal window instead of executing a hook when it is triggered. This way you get a chance of running the hook manually, fixing any errors and re-running it again. In order to trigger re-running the install hook, from another window:</p>
1353+ <pre>juju resolved --retry drupal/0</pre>
1354+
1355+ <p>Switching to the debug-hooks window, you will notice a new window named &quot;install&quot; popped up. Note that &quot;install&quot; is the name of the hook that this debug-hooks session is replacing. We change directory into the hooks directory and rerun the hook manually:</p>
1356+ <pre>$ cd /var/lib/juju/units/drupal-0/charm/hooks/
1357+ $ ./install
1358+ # -- snip --
1359+ + cd /var/ww
1360+ ./install: line 10: cd: /var/ww: No such file or directory</pre>
1361+
1362+ <p>Problem identified. Let's edit the script, changing ww into www. Rerunning it again should work successfully. This is why it is very good practice to write hook scripts in an idempotent manner such that rerunning them over and over always results in the same state. Do not forget to exit the install window by typing &quot;exit&quot;, this signals that the hook has finished executing successfully. If you have finished debugging, you may want to exit the debug-hooks session completely by typing &quot;exit&quot; into the very first window Window0</p>
1363+
1364+ <p>Note</p>
1365+ <p>While we have fixed the script, this was done on the remote machine only. You need to update the local copy of the charm with your changes, increment the revision number in the revision file and perform a charm upgrade to push the changes, like:</p>
1366+ <pre>juju upgrade-charm --repository=examples/ drupal</pre>
1367+
1368+ <p>Let's continue after having fixed the install error:</p>
1369+ <pre>juju add-relation mysql drupal</pre>
1370+
1371+ <p>Watching the debug-log window, you can see debugging information to verify the hooks are working as they should. If you spot any error, you can launch debug-hooks in another window to start debugging the misbehaving hooks again. Note that since &quot;add-relation&quot; relates two charms together, you cannot really retrigger it by simply issuing &quot;resolved --retry&quot; like we did for the install hook. In order to retrigger the db-relation-changed hook, you need to remove the relation, and create it again like so:</p>
1372+ <pre>juju remove-relation mysql drupal
1373+ juju add-relation mysql drupal</pre>
1374+
1375+ <p>The service should now be ready for use. The remaining step is to expose it to public access. While the charm signaled it needs port 80 to be open, for public accessibility, the port is not open until the administrator explicitly uses the expose command:</p>
1376+ <pre>juju expose drupal</pre>
1377+
1378+ <p>Let's see a status with the ports exposed:</p>
1379+ <pre>juju status
1380+
1381+ <p>machines:
1382+ <p> 0:
1383+ <p> agent-state: running
1384+ <p> dns-name: ec2-50-16-107-102.compute-1.amazonaws.com
1385+ <p> instance-id: i-130c9168
1386+ <p> instance-state: running
1387+ <p> 1:
1388+ <p> agent-state: running
1389+ <p> dns-name: ec2-50-19-24-186.compute-1.amazonaws.com
1390+ <p> instance-id: i-17079a6c
1391+ <p> instance-state: running
1392+ <p> 2:
1393+ <p> agent-state: running
1394+ <p> dns-name: ec2-23-20-194-198.compute-1.amazonaws.com
1395+ <p> instance-id: i-d7079aac
1396+ <p> instance-state: running
1397+ <p> services:
1398+ <p> mysql:
1399+ <p> charm: cs:precise/mysql-3
1400+ <p> relations:
1401+ <p> db:
1402+ <p> - drupal
1403+ <p> units:
1404+ <p> mysql/0:
1405+ <p> agent-state: started
1406+ <p> machine: 2
1407+ <p> public-address: ec2-23-20-194-198.compute-1.amazonaws.com
1408+ <p> drupal:
1409+ <p> charm: cs:precise/drupal-3
1410+ <p> exposed: true
1411+ <p> relations:
1412+ <p> db:
1413+ <p> - mysql
1414+ <p> units:
1415+ <p> drupal/0:
1416+ <p> agent-state: started
1417+ <p> machine: 1
1418+ <p> open-ports:
1419+ <p> - 80/tcp
1420+ <p> public-address: ec2-50-19-24-186.compute-1.amazonaws.com</pre>
1421+
1422+ <p>Congratulations, your charm should now be working successfully! The db-relation-changed hook previously shown is not suitable for scaling drupal to more than one node, since it always drops the database and recreates a new one. A more complete hook would need to first check whether or not the DB tables exist and act accordingly. Here is how such a hook might be written:</p>
1423+ <pre>#!/bin/bash
1424+ <p>set -eux # -x for verbose logging to juju debug-log
1425+ <p>hooksdir=$PWD
1426+ <p>user=`relation-get user`
1427+ <p>password=`relation-get password`
1428+ <p>host=`relation-get host`
1429+ <p>database=`relation-get database`
1430+ <p># All values are set together, so checking on a single value is enough
1431+ <p># If $user is not set, DB is still setting itself up, we exit awaiting next run
1432+ <p>[ -z "$user" ] &amp;&amp; exit 0
1433+ <p>
1434+ <p>if $(mysql -u $user --password=$password -h $host -e 'use drupal; show tables;' | grep -q users); then
1435+ <p>juju-log "Drupal already set-up. Adding DB info to configuration"
1436+ <p>cd /var/www/juju/sites/default
1437+ <p>cp default.settings.php settings.php
1438+ <p>sed -e "s/USER/$user/" \
1439+ <p>-e "s/PASSWORD/$password/" \
1440+ <p>-e "s/HOST/$host/" \
1441+ <p>-e "s/DATABASE/$database/" \
1442+ <p>$hooksdir/drupal-settings.template &gt;&gt; settings.php
1443+ <p>else
1444+ <p>juju-log "Setting up Drupal for the first time"
1445+ <p>cd /var/www/juju &amp;&amp; drush site-install -y standard \
1446+ <p>--db-url=mysql://$user:$password@$host/$database \
1447+ <p>--site-name=juju --clean-url=0
1448+ <p>fi
1449+ <p>cd /var/www/juju &amp;&amp; chown www-data sites/default/settings.php
1450+ <p>open-port 80/tcp</pre>
1451+
1452+
1453+ <p class="first admonition-title">Note</p>
1454+ <p class="last">Any files that you store in the hooks directory are transported as is to the deployment machine. You can drop in configuration files or templates that you can use from your hook scripts. An example of this technique is the drupal-settings.template file that is used in the previous hook. The template is rendered using sed, however any other more advanced template engine can be used</p>
1455+
1456+ <p><p>Here is the template file used:</p>
1457+ <pre>$databases = array (
1458+ <p> 'default' =&gt;
1459+ <p> array (
1460+ <p> 'default' =&gt;
1461+ <p> array (
1462+ <p> 'database' =&gt; 'DATABASE',
1463+ <p> 'username' =&gt; 'USER',
1464+ <p> 'password' =&gt; 'PASSWORD',
1465+ <p> 'host' =&gt; 'HOST',
1466+ <p> 'port' =&gt; '',
1467+ <p> 'driver' =&gt; 'mysql',
1468+ <p> 'prefix' =&gt; '',
1469+ <p> ),
1470+ <p> ),
1471+ <p>);</pre>
1472+ </article>
1473+ </div>
1474+ </div>
1475+ </section>
1476+ <div class="shadow"></div>
1477+ <footer>
1478+ <div>
1479+ <nav role="navigation" class="clearfix">
1480+ <ul>
1481+ <li><a href="https://juju.ubuntu.com/get-started">Get started</a></li>
1482+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/local/">Local</a></li>
1483+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/amazon/">Amazon Web Services</a></li>
1484+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/hp-cloud/">HP Cloud</a></li>
1485+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/rackspace/">Rackspace</a></li>
1486+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/openstack/">Openstack</a></li>
1487+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/maas/">MAAS</a></li>
1488+ </ul>
1489+ <ul>
1490+ <li><a href="https://juju.ubuntu.com/resources">Resources</a></li>
1491+ <li><a href="https://juju.ubuntu.com/docs">Documentation</a></li>
1492+ <li><a href="https://juju.ubuntu.com/resources/videos">Videos</a></li>
1493+ <li><a href="http://uistage.jujucharms.com:8080/">Juju GUI Demo</a></li>
1494+ </ul>
1495+ <ul>
1496+ <li><a href="https://juju.ubuntu.com/community">Community</a></li>
1497+ <li class="page_item"><a href="https://juju.ubuntu.com/community/juju-blog/">Blog</a></li>
1498+ <li class="page_item"><a href="https://juju.ubuntu.com/community/weekly-charm-meeting/">Charm Meetings</a></li>
1499+ <li class="page_item"><a href="https://juju.ubuntu.com/community/charmers/">Charmers</a></li>
1500+ <li class="page_item"><a href="https://lists.ubuntu.com/mailman/listinfo/juju">Mailing List</a></li>
1501+ <li class="page_item"><a href="http://webchat.freenode.net/?channels=juju">Chat</a></li>
1502+ <li class="page_item"><a href="http://askubuntu.com/questions/tagged/juju?sort=faq&amp;amp;pagesize=50">FAQ</a></li>
1503+ </ul>
1504+ <ul class="last">
1505+ <li><a href="https://launchpad.net/juju">Code</a></li>
1506+ <li><a href="https://launchpad.net/juju-core">Juju Core</a></li>
1507+ <li><a href="https://launchpad.net/charms">Charms</a></li>
1508+ </ul>
1509+ </nav>
1510+ </div>
1511+ </footer>
1512+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
1513+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.14/jquery-ui.min.js"></script>
1514+ <script type="text/javascript" src="js/main.js"></script>
1515+ </body>
1516+</html>
1517\ No newline at end of file
1518
1519=== added file 'htmldocs/authors-hooks.html'
1520--- htmldocs/authors-hooks.html 1970-01-01 00:00:00 +0000
1521+++ htmldocs/authors-hooks.html 2013-06-27 17:35:30 +0000
1522@@ -0,0 +1,176 @@
1523+<!DOCTYPE html>
1524+<html>
1525+ <head>
1526+ <meta charset="utf-8">
1527+ <title>Juju Documentation - Authoring Charms</title>
1528+ <link href="//fonts.googleapis.com/css?family=Ubuntu:400,400italic" rel="stylesheet" type="text/css"/>
1529+ <link href="//fonts.googleapis.com/css?family=Ubuntu+Mono:400" rel="stylesheet" type="text/css"/>
1530+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/reset.css" rel="stylesheet" type="text/css"/>
1531+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/960.css" rel="stylesheet" type="text/css"/>
1532+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/base.css" rel="stylesheet" type="text/css"/>
1533+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/resources.css" rel="stylesheet" type="text/css"/>
1534+ <link href="css/main.css" rel="stylesheet" type="text/css"/>
1535+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
1536+ <script src="http://app.stacktack.com/jquery.stacktack.min.js"></script>
1537+ <script type="text/javascript">
1538+ $(document).ready(function() {
1539+ $(document).stacktack();
1540+ });
1541+ </script><!--[if lt IE 9]>
1542+ <script type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
1543+ </head>
1544+ <body class="resources">
1545+ <header>
1546+ <div class="header-login">
1547+ <ul>
1548+ <li>&nbsp;</li>
1549+ </ul>
1550+ </div>
1551+ <div class="header-navigation">
1552+ <div>
1553+ <nav role="navigation">
1554+ <ul>
1555+ <li class="page_item"><a href="https://juju.ubuntu.com/">Home</a></li>
1556+ <li class="page_item current_page_item"><a href="https://juju.ubuntu.com/">Resources</a></li>
1557+ <li class="page_item"><a href="https://juju.ubuntu.com/">Community</a></li>
1558+ <li class="page_item"><a href="https://juju.ubuntu.com/">Charm Store</a></li>
1559+ <li class="page_item"><a href="https://juju.ubuntu.com/">Events</a></li>
1560+ <li class="page_item"><a href="https://juju.ubuntu.com/">Survey</a></li>
1561+ <li>
1562+ <form id="form-search" method="get" action="/">
1563+ <fieldset>
1564+ <input id="input-search" type="text" name="s" value="Search">
1565+ </fieldset>
1566+ </form>
1567+ </li>
1568+ </ul>
1569+ </nav><a href="https://juju.ubuntu.com/" class="logo-ubuntu"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/logo-ubuntu.png"></a>
1570+ </div>
1571+ </div>
1572+ <div class="header-content">
1573+ <div class="clearfix"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/arrow-nav.png" width="9" height="5" style="left:894px; display: block;" class="arrow-nav">
1574+ <div class="header-navigation-secondary"></div>
1575+ <div class="header-image"></div>
1576+ <h1>Resources</h1>
1577+ <h2>A collection of some of the most important online references for Juju users and developers.</h2>
1578+ </div>
1579+ </div>
1580+ </header>
1581+ <section id="content" class="container-12">
1582+ <div class="grid-12 doc-container">
1583+ <div class="grid-3 doc-navigation">
1584+ <nav role="navigation">
1585+ <h1>User Guide</h1>
1586+ <ul>
1587+ <li class=""><a href="getting-started.html">Getting Started</a></li>
1588+ <li class=" sub"><a href="getting-started.html#intro">Introduction</a></li>
1589+ <li class=" sub"><a href="getting-started.html#install">Installation</a></li>
1590+ <li class=" sub"><a href="config-aws.html">AWS Configuration</a></li>
1591+ <li class=" sub"><a href="config-hpcloud.html">HP Cloud Configuration</a></li>
1592+ <li class=" sub"><a href="">OpenStack Configuration</a></li>
1593+ <li class=" sub"><a href="config-maas.html">MAAS Configuration</a></li>
1594+ <li class=" sub"><a href="getting-started.html#test">Testing your setup</a></li>
1595+ <li class=""><a href="charms.html">Using Charms</a></li>
1596+ <li class=" sub"><a href="charms.html#intro">What are Charms?</a></li>
1597+ <li class=" sub"><a href="charms-deploying.html">Deploying Services</a></li>
1598+ <li class=" sub"><a href="charms-constraints.html">Using constraints</a></li>
1599+ <li class=" sub"><a href="charms-config.html">Service Configuration</a></li>
1600+ <li class=" sub"><a href="charms-relations.html">Service Relationships</a></li>
1601+ <li class=" sub"><a href="charms-exposing.html">Exposing Services</a></li>
1602+ <li class=" sub"><a href="charms-scaling.html">Scaling Services</a></li>
1603+ <li class=" sub"><a href="charms-destroy.html">Destroying Services</a></li>
1604+ </ul>
1605+ <h1>Charm Authors</h1>
1606+ <ul></ul>
1607+ <li class=""><a href="authors-charm-writing.html">Writing a charm</a></li>
1608+ <li class=" sub"><a href="authors-subordinate-services.html">Subordinate services</a></li>
1609+ <li class=" sub"><a href="authors-implicit-relations.html">Implicit Relations</a></li>
1610+ <li class=" sub"><a href="authors-testing.html">Charm Testing</a></li>
1611+ <li class=" sub"><a href="authors-hooks.html">Hook debugging</a></li>
1612+ <li class=""><a href="authors-charm-store.html">The Juju Charm Store</a></li>
1613+ <li class=" sub"><a href="authors-charm-policy.html">Charm store policy</a></li>
1614+ <li class=" sub"><a href="authors-charm-best-practice.html">Best practices</a></li>
1615+ <li class=" sub"><a href="authors-charm-quality.html">Charm Quality Rating</a></li>
1616+ <h1>Reference</h1>
1617+ <ul>
1618+ <li class="sub"><a href="commands.html">Juju commands</a></li>
1619+ <li class="sub"><a href="glossary.html">Glossary</a></li>
1620+ <li class="sub"><a href="contributing.html">Contribute to the Docs!</a></li>
1621+ </ul>
1622+ </nav>
1623+ </div>
1624+ <div class="grid-9 doc-content">
1625+ <article>
1626+ <section id ="hook-debugging">
1627+ <h1>Hook debugging</h1>
1628+
1629+ <p>An important facility in any distributed system is the ability to introspect the running system, and to debug it. Within juju the actions performed by the system are executing charm defined hooks. The <tt class="docutils literal"><span class="pre">debug-log</span></tt> cli provides for inspecting the total state of the system via capturing the logs of all agents and output of all hooks run by the system.</p>
1630+ <p>To facilitate better debugging of hooks, the <tt class="docutils literal"><span class="pre">debug-hooks</span></tt> cli provides for interactive shell usage as a substitute for running a hook. This allows a charm author or system adminstrator the ability to interact with the system in a live environment and either develop or debug a hook.</p>
1631+
1632+ <h2>How it works</h2>
1633+ <p>When the juju user utilizes the hook debug command like so:</p>
1634+ <pre>juju debug-hooks unit_name [hook_name]</pre>
1635+
1636+ <p>juju is instructed to replace the execution of the hook from the charm of the respective service unit, and instead to execute it in a shell associated to a tmux session. If no hook name is given, then all hooks will be debugged in this fashion. Multiple hook names can also be specified on the command line. Shell regular expressions can also be utilized to specify hook names.</p>
1637+ <p>The <tt class="docutils literal"><span class="pre">debug-hooks</span></tt> command line invocation will immediately connect to the remote machine of the remote unit and start a named shell connected to the same tmux session there.</p>
1638+ <p>The native capabilities of tmux can be exploited to construct a full debug/development environment on the remote machine.</p>
1639+ <p>When a debugged hook is executed a new named window will pop up in the tmux session with the hook shell started. The new window's title will match the hook name, and the shell environment will have all the juju environment variables in place, and all of the hook cli API may be utilized (relation-get, relation-set, relation-list, etc.).</p>
1640+ <p>It's important to note that juju serializes hook execution, so while the shell is active, no other hooks will be executed on the unit. Once the experimentation is done, the user must stop the hook by exiting the shell session. At this point the system is then free to execute additional hooks.</p>
1641+ <p>It's important to note that any state changes performed while in the hook window via relation-set are buffered till the hook is done executing, in the same way performed for all the relation hooks when running outside of a debug session.</p>
1642+ <p>The debug-hooks can be used to debug the same hook being invoked multiple times as long as the user has not closed the debug screen session.</p>
1643+ <p>The user can exit debug mode by exiting the tmux session (e.g. exiting all shells). The unit will then resume its normal processing.</p>
1644+
1645+ <h2>Internals</h2>
1646+ <p>Internally the <tt class="docutils literal"><span class="pre">debug-hooks</span></tt> cli begins by verifying its arguments, namely the unit exists, and the named hook is valid for the charm. After that it modifies the zookeeper state of the unit node, setting a flag noting the hook to debug. It then establishes an ssh connection to the machine and executes the tmux command.</p>
1647+ <p>The unit-agent will establish a watch on its own debug settings, on changes introspecting the debug flag, and pass any named hook values down to the hook executor, which will construct debug hook scripts on the fly for matching hooks. These debug hook scripts are responsible for connecting to tmux and monitoring the execution of the hook therein.</p>
1648+ <p>Special care will be taken to ensure the viability of the tmux session and that debug mode is active before creating the interactive hook window in tmux.</p>
1649+
1650+
1651+ <h2>Screen vs. tmux</h2>
1652+ <p>Initially juju used GNU screen for the debugging sessions rather than tmux, but tmux turned out to make it easier to avoid race conditions when starting the same session concurrently, as done for the debugging system. This was the main motivation that prompted the change to tmux. They both worked very similarly otherwise.</p>
1653+ </section>
1654+ </article>
1655+ </div>
1656+ </div>
1657+ </section>
1658+ <div class="shadow"></div>
1659+ <footer>
1660+ <div>
1661+ <nav role="navigation" class="clearfix">
1662+ <ul>
1663+ <li><a href="https://juju.ubuntu.com/get-started">Get started</a></li>
1664+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/local/">Local</a></li>
1665+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/amazon/">Amazon Web Services</a></li>
1666+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/hp-cloud/">HP Cloud</a></li>
1667+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/rackspace/">Rackspace</a></li>
1668+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/openstack/">Openstack</a></li>
1669+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/maas/">MAAS</a></li>
1670+ </ul>
1671+ <ul>
1672+ <li><a href="https://juju.ubuntu.com/resources">Resources</a></li>
1673+ <li><a href="https://juju.ubuntu.com/docs">Documentation</a></li>
1674+ <li><a href="https://juju.ubuntu.com/resources/videos">Videos</a></li>
1675+ <li><a href="http://uistage.jujucharms.com:8080/">Juju GUI Demo</a></li>
1676+ </ul>
1677+ <ul>
1678+ <li><a href="https://juju.ubuntu.com/community">Community</a></li>
1679+ <li class="page_item"><a href="https://juju.ubuntu.com/community/juju-blog/">Blog</a></li>
1680+ <li class="page_item"><a href="https://juju.ubuntu.com/community/weekly-charm-meeting/">Charm Meetings</a></li>
1681+ <li class="page_item"><a href="https://juju.ubuntu.com/community/charmers/">Charmers</a></li>
1682+ <li class="page_item"><a href="https://lists.ubuntu.com/mailman/listinfo/juju">Mailing List</a></li>
1683+ <li class="page_item"><a href="http://webchat.freenode.net/?channels=juju">Chat</a></li>
1684+ <li class="page_item"><a href="http://askubuntu.com/questions/tagged/juju?sort=faq&amp;amp;pagesize=50">FAQ</a></li>
1685+ </ul>
1686+ <ul class="last">
1687+ <li><a href="https://launchpad.net/juju">Code</a></li>
1688+ <li><a href="https://launchpad.net/juju-core">Juju Core</a></li>
1689+ <li><a href="https://launchpad.net/charms">Charms</a></li>
1690+ </ul>
1691+ </nav>
1692+ </div>
1693+ </footer>
1694+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
1695+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.14/jquery-ui.min.js"></script>
1696+ <script type="text/javascript" src="js/main.js"></script>
1697+ </body>
1698+</html>
1699\ No newline at end of file
1700
1701=== added file 'htmldocs/authors-implicit-relations.html'
1702--- htmldocs/authors-implicit-relations.html 1970-01-01 00:00:00 +0000
1703+++ htmldocs/authors-implicit-relations.html 2013-06-27 17:35:30 +0000
1704@@ -0,0 +1,179 @@
1705+<!DOCTYPE html>
1706+<html>
1707+ <head>
1708+ <meta charset="utf-8">
1709+ <title>Juju Documentation - Authoring Charms</title>
1710+ <link href="//fonts.googleapis.com/css?family=Ubuntu:400,400italic" rel="stylesheet" type="text/css"/>
1711+ <link href="//fonts.googleapis.com/css?family=Ubuntu+Mono:400" rel="stylesheet" type="text/css"/>
1712+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/reset.css" rel="stylesheet" type="text/css"/>
1713+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/960.css" rel="stylesheet" type="text/css"/>
1714+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/base.css" rel="stylesheet" type="text/css"/>
1715+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/resources.css" rel="stylesheet" type="text/css"/>
1716+ <link href="css/main.css" rel="stylesheet" type="text/css"/>
1717+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
1718+ <script src="http://app.stacktack.com/jquery.stacktack.min.js"></script>
1719+ <script type="text/javascript">
1720+ $(document).ready(function() {
1721+ $(document).stacktack();
1722+ });
1723+ </script><!--[if lt IE 9]>
1724+ <script type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
1725+ </head>
1726+ <body class="resources">
1727+ <header>
1728+ <div class="header-login">
1729+ <ul>
1730+ <li>&nbsp;</li>
1731+ </ul>
1732+ </div>
1733+ <div class="header-navigation">
1734+ <div>
1735+ <nav role="navigation">
1736+ <ul>
1737+ <li class="page_item"><a href="https://juju.ubuntu.com/">Home</a></li>
1738+ <li class="page_item current_page_item"><a href="https://juju.ubuntu.com/">Resources</a></li>
1739+ <li class="page_item"><a href="https://juju.ubuntu.com/">Community</a></li>
1740+ <li class="page_item"><a href="https://juju.ubuntu.com/">Charm Store</a></li>
1741+ <li class="page_item"><a href="https://juju.ubuntu.com/">Events</a></li>
1742+ <li class="page_item"><a href="https://juju.ubuntu.com/">Survey</a></li>
1743+ <li>
1744+ <form id="form-search" method="get" action="/">
1745+ <fieldset>
1746+ <input id="input-search" type="text" name="s" value="Search">
1747+ </fieldset>
1748+ </form>
1749+ </li>
1750+ </ul>
1751+ </nav><a href="https://juju.ubuntu.com/" class="logo-ubuntu"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/logo-ubuntu.png"></a>
1752+ </div>
1753+ </div>
1754+ <div class="header-content">
1755+ <div class="clearfix"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/arrow-nav.png" width="9" height="5" style="left:894px; display: block;" class="arrow-nav">
1756+ <div class="header-navigation-secondary"></div>
1757+ <div class="header-image"></div>
1758+ <h1>Resources</h1>
1759+ <h2>A collection of some of the most important online references for Juju users and developers.</h2>
1760+ </div>
1761+ </div>
1762+ </header>
1763+ <section id="content" class="container-12">
1764+ <div class="grid-12 doc-container">
1765+ <div class="grid-3 doc-navigation">
1766+ <nav role="navigation">
1767+ <h1>User Guide</h1>
1768+ <ul>
1769+ <li class=""><a href="getting-started.html">Getting Started</a></li>
1770+ <li class=" sub"><a href="getting-started.html#intro">Introduction</a></li>
1771+ <li class=" sub"><a href="getting-started.html#install">Installation</a></li>
1772+ <li class=" sub"><a href="config-aws.html">AWS Configuration</a></li>
1773+ <li class=" sub"><a href="config-hpcloud.html">HP Cloud Configuration</a></li>
1774+ <li class=" sub"><a href="">OpenStack Configuration</a></li>
1775+ <li class=" sub"><a href="config-maas.html">MAAS Configuration</a></li>
1776+ <li class=" sub"><a href="getting-started.html#test">Testing your setup</a></li>
1777+ <li class=""><a href="charms.html">Using Charms</a></li>
1778+ <li class=" sub"><a href="charms.html#intro">What are Charms?</a></li>
1779+ <li class=" sub"><a href="charms-deploying.html">Deploying Services</a></li>
1780+ <li class=" sub"><a href="charms-constraints.html">Using constraints</a></li>
1781+ <li class=" sub"><a href="charms-config.html">Service Configuration</a></li>
1782+ <li class=" sub"><a href="charms-relations.html">Service Relationships</a></li>
1783+ <li class=" sub"><a href="charms-exposing.html">Exposing Services</a></li>
1784+ <li class=" sub"><a href="charms-scaling.html">Scaling Services</a></li>
1785+ <li class=" sub"><a href="charms-destroy.html">Destroying Services</a></li>
1786+ </ul>
1787+ <h1>Charm Authors</h1>
1788+ <ul></ul>
1789+ <li class=""><a href="authors-charm-writing.html">Writing a charm</a></li>
1790+ <li class=" sub"><a href="authors-subordinate-services.html">Subordinate services</a></li>
1791+ <li class=" sub"><a href="authors-implicit-relations.html">Implicit Relations</a></li>
1792+ <li class=" sub"><a href="authors-testing.html">Charm Testing</a></li>
1793+ <li class=" sub"><a href="authors-hooks.html">Hook debugging</a></li>
1794+ <li class=""><a href="authors-charm-store.html">The Juju Charm Store</a></li>
1795+ <li class=" sub"><a href="authors-charm-policy.html">Charm store policy</a></li>
1796+ <li class=" sub"><a href="authors-charm-best-practice.html">Best practices</a></li>
1797+ <li class=" sub"><a href="authors-charm-quality.html">Charm Quality Rating</a></li>
1798+ <h1>Reference</h1>
1799+ <ul>
1800+ <li class="sub"><a href="commands.html">Juju commands</a></li>
1801+ <li class="sub"><a href="glossary.html">Glossary</a></li>
1802+ <li class="sub"><a href="contributing.html">Contribute to the Docs!</a></li>
1803+ </ul>
1804+ </nav>
1805+ </div>
1806+ <div class="grid-9 doc-content">
1807+ <article>
1808+ <section id ="implicit-relations">
1809+ <h1>Implicit relations</h1>
1810+ <p>Implicit relations allow for interested services to gather lifecycle-oriented events and data about other services without expecting or requiring any modifications on the part of the author of the other service's charm.</p>
1811+ <p>Implicit relationships are named in the reserved the juju-* namespace. Both the relation name and interface names provided by juju are prefixed with <cite>juju-</cite>. Charms attempting to provide new relationships in this namespace will trigger an error.</p>
1812+ <p>Juju currently provides one implicit relationship to all deployed services.</p>
1813+ <p><cite>juju-info</cite>, if specified would look like:</p>
1814+ <pre>provides:
1815+ juju-info:
1816+ interface: juju-info</pre>
1817+
1818+ <p>The charm author should not declare the <cite>juju-info</cite> relation and is provided here only as an example. The <cite>juju-info</cite> relation is implicitly provided by all charms, and enables the requiring unit to obtain basic details about the related-to unit. The following settings will be implicitly provided by the remote unit in a relation through its <cite>juju-info</cite> relation</p>
1819+ <pre><span class="n">private</span><span class="o">-</span><span class="n">address</span> <span class="n">public</span><span class="o">-</span><span class="n">address</span>
1820+ </pre>
1821+
1822+
1823+ <h2>Relationship resolution</h2>
1824+ <p>If <strong>rsyslog</strong> is a <a class="reference external" href="authors-subordinate-services.html"><em>subordinate charm</em></a> and requires a valid <cite>scope: container</cite> relationship in order to deploy. It can take advantage of optional support from the principal charm but in the event that the principal charm doesn't provide this support it will still require a <cite>scope: container</cite> relationship. In this event the logging charm author can take advantage of the implicit relationship offered by all charms, <cite>juju-info</cite>.</p>
1825+ <pre>requires:
1826+ logging:
1827+ interface: logging-directory
1828+ scope: container
1829+ juju-info:
1830+ interface: juju-info
1831+ scope: container</pre>
1832+
1833+ <p>The admin then issues the following</p>
1834+ <pre>juju add-relation wordpress rsyslog</pre>
1835+
1836+ <p>If the wordpress charm author doesn't define the <cite>logging-directory</cite> interface juju will use the less-specific (in the sense that it likely provides less information) <cite>juju-info</cite> interface. juju always attempts to match user provided relations outside the <cite>juju-*</cite> namespace before looking for possible relationship matches in the <cite>juju-*</cite> namespace.</p>
1837+
1838+ </section>
1839+ </article>
1840+ </div>
1841+ </div>
1842+ </section>
1843+ <div class="shadow"></div>
1844+ <footer>
1845+ <div>
1846+ <nav role="navigation" class="clearfix">
1847+ <ul>
1848+ <li><a href="https://juju.ubuntu.com/get-started">Get started</a></li>
1849+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/local/">Local</a></li>
1850+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/amazon/">Amazon Web Services</a></li>
1851+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/hp-cloud/">HP Cloud</a></li>
1852+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/rackspace/">Rackspace</a></li>
1853+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/openstack/">Openstack</a></li>
1854+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/maas/">MAAS</a></li>
1855+ </ul>
1856+ <ul>
1857+ <li><a href="https://juju.ubuntu.com/resources">Resources</a></li>
1858+ <li><a href="https://juju.ubuntu.com/docs">Documentation</a></li>
1859+ <li><a href="https://juju.ubuntu.com/resources/videos">Videos</a></li>
1860+ <li><a href="http://uistage.jujucharms.com:8080/">Juju GUI Demo</a></li>
1861+ </ul>
1862+ <ul>
1863+ <li><a href="https://juju.ubuntu.com/community">Community</a></li>
1864+ <li class="page_item"><a href="https://juju.ubuntu.com/community/juju-blog/">Blog</a></li>
1865+ <li class="page_item"><a href="https://juju.ubuntu.com/community/weekly-charm-meeting/">Charm Meetings</a></li>
1866+ <li class="page_item"><a href="https://juju.ubuntu.com/community/charmers/">Charmers</a></li>
1867+ <li class="page_item"><a href="https://lists.ubuntu.com/mailman/listinfo/juju">Mailing List</a></li>
1868+ <li class="page_item"><a href="http://webchat.freenode.net/?channels=juju">Chat</a></li>
1869+ <li class="page_item"><a href="http://askubuntu.com/questions/tagged/juju?sort=faq&amp;amp;pagesize=50">FAQ</a></li>
1870+ </ul>
1871+ <ul class="last">
1872+ <li><a href="https://launchpad.net/juju">Code</a></li>
1873+ <li><a href="https://launchpad.net/juju-core">Juju Core</a></li>
1874+ <li><a href="https://launchpad.net/charms">Charms</a></li>
1875+ </ul>
1876+ </nav>
1877+ </div>
1878+ </footer>
1879+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
1880+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.14/jquery-ui.min.js"></script>
1881+ <script type="text/javascript" src="js/main.js"></script>
1882+ </body>
1883+</html>
1884\ No newline at end of file
1885
1886=== added file 'htmldocs/authors-subordinate-services.html'
1887--- htmldocs/authors-subordinate-services.html 1970-01-01 00:00:00 +0000
1888+++ htmldocs/authors-subordinate-services.html 2013-06-27 17:35:30 +0000
1889@@ -0,0 +1,227 @@
1890+<!DOCTYPE html>
1891+<html>
1892+ <head>
1893+ <meta charset="utf-8">
1894+ <title>Juju Documentation - Authoring Charms</title>
1895+ <link href="//fonts.googleapis.com/css?family=Ubuntu:400,400italic" rel="stylesheet" type="text/css"/>
1896+ <link href="//fonts.googleapis.com/css?family=Ubuntu+Mono:400" rel="stylesheet" type="text/css"/>
1897+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/reset.css" rel="stylesheet" type="text/css"/>
1898+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/960.css" rel="stylesheet" type="text/css"/>
1899+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/base.css" rel="stylesheet" type="text/css"/>
1900+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/resources.css" rel="stylesheet" type="text/css"/>
1901+ <link href="css/main.css" rel="stylesheet" type="text/css"/>
1902+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
1903+ <script src="http://app.stacktack.com/jquery.stacktack.min.js"></script>
1904+ <script type="text/javascript">
1905+ $(document).ready(function() {
1906+ $(document).stacktack();
1907+ });
1908+ </script><!--[if lt IE 9]>
1909+ <script type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
1910+ </head>
1911+ <body class="resources">
1912+ <header>
1913+ <div class="header-login">
1914+ <ul>
1915+ <li>&nbsp;</li>
1916+ </ul>
1917+ </div>
1918+ <div class="header-navigation">
1919+ <div>
1920+ <nav role="navigation">
1921+ <ul>
1922+ <li class="page_item"><a href="https://juju.ubuntu.com/">Home</a></li>
1923+ <li class="page_item current_page_item"><a href="https://juju.ubuntu.com/">Resources</a></li>
1924+ <li class="page_item"><a href="https://juju.ubuntu.com/">Community</a></li>
1925+ <li class="page_item"><a href="https://juju.ubuntu.com/">Charm Store</a></li>
1926+ <li class="page_item"><a href="https://juju.ubuntu.com/">Events</a></li>
1927+ <li class="page_item"><a href="https://juju.ubuntu.com/">Survey</a></li>
1928+ <li>
1929+ <form id="form-search" method="get" action="/">
1930+ <fieldset>
1931+ <input id="input-search" type="text" name="s" value="Search">
1932+ </fieldset>
1933+ </form>
1934+ </li>
1935+ </ul>
1936+ </nav><a href="https://juju.ubuntu.com/" class="logo-ubuntu"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/logo-ubuntu.png"></a>
1937+ </div>
1938+ </div>
1939+ <div class="header-content">
1940+ <div class="clearfix"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/arrow-nav.png" width="9" height="5" style="left:894px; display: block;" class="arrow-nav">
1941+ <div class="header-navigation-secondary"></div>
1942+ <div class="header-image"></div>
1943+ <h1>Resources</h1>
1944+ <h2>A collection of some of the most important online references for Juju users and developers.</h2>
1945+ </div>
1946+ </div>
1947+ </header>
1948+ <section id="content" class="container-12">
1949+ <div class="grid-12 doc-container">
1950+ <div class="grid-3 doc-navigation">
1951+ <nav role="navigation">
1952+ <h1>User Guide</h1>
1953+ <ul>
1954+ <li class=""><a href="getting-started.html">Getting Started</a></li>
1955+ <li class=" sub"><a href="getting-started.html#intro">Introduction</a></li>
1956+ <li class=" sub"><a href="getting-started.html#install">Installation</a></li>
1957+ <li class=" sub"><a href="config-aws.html">AWS Configuration</a></li>
1958+ <li class=" sub"><a href="config-hpcloud.html">HP Cloud Configuration</a></li>
1959+ <li class=" sub"><a href="">OpenStack Configuration</a></li>
1960+ <li class=" sub"><a href="config-maas.html">MAAS Configuration</a></li>
1961+ <li class=" sub"><a href="getting-started.html#test">Testing your setup</a></li>
1962+ <li class=""><a href="charms.html">Using Charms</a></li>
1963+ <li class=" sub"><a href="charms.html#intro">What are Charms?</a></li>
1964+ <li class=" sub"><a href="charms-deploying.html">Deploying Services</a></li>
1965+ <li class=" sub"><a href="charms-constraints.html">Using constraints</a></li>
1966+ <li class=" sub"><a href="charms-config.html">Service Configuration</a></li>
1967+ <li class=" sub"><a href="charms-relations.html">Service Relationships</a></li>
1968+ <li class=" sub"><a href="charms-exposing.html">Exposing Services</a></li>
1969+ <li class=" sub"><a href="charms-scaling.html">Scaling Services</a></li>
1970+ <li class=" sub"><a href="charms-destroy.html">Destroying Services</a></li>
1971+ </ul>
1972+ <h1>Charm Authors</h1>
1973+ <ul></ul>
1974+ <li class=""><a href="authors-charm-writing.html">Writing a charm</a></li>
1975+ <li class=" sub"><a href="authors-subordinate-services.html">Subordinate services</a></li>
1976+ <li class=" sub"><a href="authors-implicit-relations.html">Implicit Relations</a></li>
1977+ <li class=" sub"><a href="authors-testing.html">Charm Testing</a></li>
1978+ <li class=" sub"><a href="authors-hooks.html">Hook debugging</a></li>
1979+ <li class=""><a href="authors-charm-store.html">The Juju Charm Store</a></li>
1980+ <li class=" sub"><a href="authors-charm-policy.html">Charm store policy</a></li>
1981+ <li class=" sub"><a href="authors-charm-best-practice.html">Best practices</a></li>
1982+ <li class=" sub"><a href="authors-charm-quality.html">Charm Quality Rating</a></li>
1983+ <h1>Reference</h1>
1984+ <ul>
1985+ <li class="sub"><a href="commands.html">Juju commands</a></li>
1986+ <li class="sub"><a href="glossary.html">Glossary</a></li>
1987+ <li class="sub"><a href="contributing.html">Contribute to the Docs!</a></li>
1988+ </ul>
1989+ </nav>
1990+ </div>
1991+ <div class="grid-9 doc-content">
1992+ <article>
1993+ <section id ="subordinate-services">
1994+
1995+ <h1>Subordinate services</h1>
1996+ <p>Services are composed of one or more service units. A service unit runs the service's software and is the smallest entity managed by juju. Service units are typically run in an isolated container on a machine with no knowledge or access to other services deployed onto the same machine. Subordinate services allows for units of different services to be deployed into the same container and to have knowledge of each other.</p>
1997+
1998+ <h2>Motivations</h2>
1999+ <p>Services such as logging, monitoring, backups and some types of storage often require some access to the runtime of the service they wish to operate on. Under the current modeling of services it is only possible to relate services to other services with an explicit interface pairing. Requiring a specified relation implies that every charm author need be aware of any and all services a deployment might wish to depend on, even if the other service can operate without any explicit cooperation. For example a logging service may only require access to the container level logging directory to function.</p>
2000+ <p>The following changes are designed to address these issues and allow a class of charm that can execute in the context of an existing container while still taking advantage of the existing relationship machinery.</p>
2001+ <h2>Terms</h2>
2002+ <dl class="docutils">
2003+ <dt>Principal service</dt>
2004+ <dd>A traditional service or charm in whose container subordinate services will execute.</dd>
2005+ <dt>Subordinate service/charm</dt>
2006+ <dd>A service designed for and deployed to the running container of another service unit.</dd>
2007+ <dt>Container relation</dt>
2008+ <dd>A <cite>scope: container</cite> relationship. While modeled identically to traditional, <cite>scope: global</cite>, relationships, juju only implements the relationship between the units belonging to the same container.</dd>
2009+ </dl>
2010+
2011+ <h2>Relations</h2>
2012+ <p>When a traditional relation is added between two services, all the service units for the first service will receive relation events about all service units for the second service. Subordinate services have a very tight relationship with their principal service, so it makes sense to be able to restrict that communication in some cases so that they only receive events about each other. That's precisely what happens when a relation is tagged as being a scoped to the container. See <a class="reference external" href="charm.html"><em>scoped relations</em></a>.</p>
2013+ <p>Container relations exist because they simplify responsibilities for the subordinate service charm author who would otherwise always have to filter units of their relation before finding the unit they can operate on.</p>
2014+ <p>If a subordinate service needs to communicate with all units of the principal service, it can still establish a traditional (non-container) relationship to it.</p>
2015+ <p>In order to deploy a subordinate service a <cite>scope: container</cite> relationship is required. Even when the principal services' charm author doesn't provide an explicit relationship for the subordinate to join, using an <a class="reference external" href="implicit-relations.html"><em>implicit relation</em></a> with <cite>scope: container</cite> will satisfy this constraint.</p>
2016+
2017+ <h2>Addressability</h2>
2018+ <p>No special changes are made for the purpose of naming or addressing subordinate units. If a subordinate logging service is deployed with a single unit of wordpress we would expect the logging unit to be addressable as logging/0, if this service were then related to a mysql service with a single unit we'd expect logging/1 to be deployed in its container. Subordinate units inherit the public/private address of the principal service. The container of the principal defines the network setup.</p>
2019+
2020+ <h2>Declaring subordinate charms</h2>
2021+ <p>When a charm author wishes to indicate their charm should operate as a subordinate service only a small change to the subordinate charm's metadata is required. Adding <cite>subordinate: true</cite> as a top-level attribute indicates the charm is intended only to deploy in an existing container. Subordinate charms should then declare a required interface with <cite>scope: container</cite> in the relation definition of the charms metadata. Subordinate services may still declare traditional relations to any service. The deployment is delayed until a container relation is added.</p>
2022+ <p><cite>subordinate: false</cite> charms (the default) may still declare relations as <cite>scope: container</cite>. Principal charms providing or requiring <cite>scope: container</cite> relations will only be able to form relations with <cite>subordinate: true</cite> charms.</p>
2023+ <p>The example below shows adding a container relation to a charm.</p>
2024+ <pre>requires:
2025+ logging-directory:
2026+ interface: logging
2027+ scope: container</pre>
2028+
2029+
2030+ <h2>Status of subordinates</h2>
2031+ <p>The status output contains details about subordinate units under the status of the principal service unit that it is sharing the container with. The subordinate unit's output matches the formatting of existing unit entries but omits <cite>machine</cite>, <cite>public-address</cite> and <cite>subordinates</cite> (which are all the same as the principal unit).</p>
2032+ <p>The subordinate service is listed in the top level <cite>services</cite> dictionary in an abbreviated form. The <cite>subordinate-to: []</cite> list is
2033+ added to the service which contains the names of all services this service is subordinate to.</p>
2034+ <pre>services:
2035+ rsyslog:
2036+ charm: local:series/rsyslog-1
2037+ subordinate-to: [wordpress]
2038+ relations:
2039+ rsyslog-directory: wordpress
2040+ wordpress:
2041+ machine: 0
2042+ public-address: wordpress-0.example.com
2043+ charm: local:series/wordpress-3
2044+ relations: {rsyslog-directory: rsyslog}
2045+ units:
2046+ wordpress/0:
2047+ relations:
2048+ rsyslog: {state: up}
2049+ state: started
2050+ subordinates:
2051+ rsyslog/0:
2052+ relations:
2053+ rsyslog-directory: {state: up}</pre>
2054+
2055+ <h2>Usage</h2>
2056+ <p>Assume the following deployment:</p>
2057+ <pre>juju deploy mysql
2058+ juju deploy wordpress
2059+ juju add-relation mysql wordpress</pre>
2060+
2061+ <p>Now we'll create a subordinate rsyslog service:</p>
2062+ <pre>juju deploy rsyslog
2063+ juju add-relation rsyslog mysql
2064+ juju add-relation rsyslog wordpress</pre>
2065+
2066+ <p>This will create a rsyslog service unit inside each of the containers holding the mysql and wordpress units. The rsyslog service has a standard client-server relation to both wordpress and mysql but these new relationships are implemented only between the principal unit and the subordinate unit . A subordinate unit may still have standard relations established with any unit in its environment as usual.</p>
2067+
2068+ <h2>Restrictions</h2>
2069+ <p>The initial release of subordinates doesn't include support for removing subordinate units from their principal service apart from removing the principal service itself. This limitation stems from the current policy around service shutdown and the invocation of stop hooks.</p>
2070+
2071+ </section>
2072+ </article>
2073+ </div>
2074+ </div>
2075+ </section>
2076+ <div class="shadow"></div>
2077+ <footer>
2078+ <div>
2079+ <nav role="navigation" class="clearfix">
2080+ <ul>
2081+ <li><a href="https://juju.ubuntu.com/get-started">Get started</a></li>
2082+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/local/">Local</a></li>
2083+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/amazon/">Amazon Web Services</a></li>
2084+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/hp-cloud/">HP Cloud</a></li>
2085+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/rackspace/">Rackspace</a></li>
2086+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/openstack/">Openstack</a></li>
2087+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/maas/">MAAS</a></li>
2088+ </ul>
2089+ <ul>
2090+ <li><a href="https://juju.ubuntu.com/resources">Resources</a></li>
2091+ <li><a href="https://juju.ubuntu.com/docs">Documentation</a></li>
2092+ <li><a href="https://juju.ubuntu.com/resources/videos">Videos</a></li>
2093+ <li><a href="http://uistage.jujucharms.com:8080/">Juju GUI Demo</a></li>
2094+ </ul>
2095+ <ul>
2096+ <li><a href="https://juju.ubuntu.com/community">Community</a></li>
2097+ <li class="page_item"><a href="https://juju.ubuntu.com/community/juju-blog/">Blog</a></li>
2098+ <li class="page_item"><a href="https://juju.ubuntu.com/community/weekly-charm-meeting/">Charm Meetings</a></li>
2099+ <li class="page_item"><a href="https://juju.ubuntu.com/community/charmers/">Charmers</a></li>
2100+ <li class="page_item"><a href="https://lists.ubuntu.com/mailman/listinfo/juju">Mailing List</a></li>
2101+ <li class="page_item"><a href="http://webchat.freenode.net/?channels=juju">Chat</a></li>
2102+ <li class="page_item"><a href="http://askubuntu.com/questions/tagged/juju?sort=faq&amp;amp;pagesize=50">FAQ</a></li>
2103+ </ul>
2104+ <ul class="last">
2105+ <li><a href="https://launchpad.net/juju">Code</a></li>
2106+ <li><a href="https://launchpad.net/juju-core">Juju Core</a></li>
2107+ <li><a href="https://launchpad.net/charms">Charms</a></li>
2108+ </ul>
2109+ </nav>
2110+ </div>
2111+ </footer>
2112+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
2113+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.14/jquery-ui.min.js"></script>
2114+ <script type="text/javascript" src="js/main.js"></script>
2115+ </body>
2116+</html>
2117\ No newline at end of file
2118
2119=== added file 'htmldocs/authors-testing.html'
2120--- htmldocs/authors-testing.html 1970-01-01 00:00:00 +0000
2121+++ htmldocs/authors-testing.html 2013-06-27 17:35:30 +0000
2122@@ -0,0 +1,350 @@
2123+<!DOCTYPE html>
2124+<html>
2125+ <head>
2126+ <meta charset="utf-8">
2127+ <title>Juju Documentation - Authoring Charms</title>
2128+ <link href="//fonts.googleapis.com/css?family=Ubuntu:400,400italic" rel="stylesheet" type="text/css"/>
2129+ <link href="//fonts.googleapis.com/css?family=Ubuntu+Mono:400" rel="stylesheet" type="text/css"/>
2130+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/reset.css" rel="stylesheet" type="text/css"/>
2131+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/960.css" rel="stylesheet" type="text/css"/>
2132+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/base.css" rel="stylesheet" type="text/css"/>
2133+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/resources.css" rel="stylesheet" type="text/css"/>
2134+ <link href="css/main.css" rel="stylesheet" type="text/css"/>
2135+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
2136+ <script src="http://app.stacktack.com/jquery.stacktack.min.js"></script>
2137+ <script type="text/javascript">
2138+ $(document).ready(function() {
2139+ $(document).stacktack();
2140+ });
2141+ </script><!--[if lt IE 9]>
2142+ <script type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
2143+ </head>
2144+ <body class="resources">
2145+ <header>
2146+ <div class="header-login">
2147+ <ul>
2148+ <li>&nbsp;</li>
2149+ </ul>
2150+ </div>
2151+ <div class="header-navigation">
2152+ <div>
2153+ <nav role="navigation">
2154+ <ul>
2155+ <li class="page_item"><a href="https://juju.ubuntu.com/">Home</a></li>
2156+ <li class="page_item current_page_item"><a href="https://juju.ubuntu.com/">Resources</a></li>
2157+ <li class="page_item"><a href="https://juju.ubuntu.com/">Community</a></li>
2158+ <li class="page_item"><a href="https://juju.ubuntu.com/">Charm Store</a></li>
2159+ <li class="page_item"><a href="https://juju.ubuntu.com/">Events</a></li>
2160+ <li class="page_item"><a href="https://juju.ubuntu.com/">Survey</a></li>
2161+ <li>
2162+ <form id="form-search" method="get" action="/">
2163+ <fieldset>
2164+ <input id="input-search" type="text" name="s" value="Search">
2165+ </fieldset>
2166+ </form>
2167+ </li>
2168+ </ul>
2169+ </nav><a href="https://juju.ubuntu.com/" class="logo-ubuntu"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/logo-ubuntu.png"></a>
2170+ </div>
2171+ </div>
2172+ <div class="header-content">
2173+ <div class="clearfix"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/arrow-nav.png" width="9" height="5" style="left:894px; display: block;" class="arrow-nav">
2174+ <div class="header-navigation-secondary"></div>
2175+ <div class="header-image"></div>
2176+ <h1>Resources</h1>
2177+ <h2>A collection of some of the most important online references for Juju users and developers.</h2>
2178+ </div>
2179+ </div>
2180+ </header>
2181+ <section id="content" class="container-12">
2182+ <div class="grid-12 doc-container">
2183+ <div class="grid-3 doc-navigation">
2184+ <nav role="navigation">
2185+ <h1>User Guide</h1>
2186+ <ul>
2187+ <li class=""><a href="getting-started.html">Getting Started</a></li>
2188+ <li class=" sub"><a href="getting-started.html#intro">Introduction</a></li>
2189+ <li class=" sub"><a href="getting-started.html#install">Installation</a></li>
2190+ <li class=" sub"><a href="config-aws.html">AWS Configuration</a></li>
2191+ <li class=" sub"><a href="config-hpcloud.html">HP Cloud Configuration</a></li>
2192+ <li class=" sub"><a href="">OpenStack Configuration</a></li>
2193+ <li class=" sub"><a href="config-maas.html">MAAS Configuration</a></li>
2194+ <li class=" sub"><a href="getting-started.html#test">Testing your setup</a></li>
2195+ <li class=""><a href="charms.html">Using Charms</a></li>
2196+ <li class=" sub"><a href="charms.html#intro">What are Charms?</a></li>
2197+ <li class=" sub"><a href="charms-deploying.html">Deploying Services</a></li>
2198+ <li class=" sub"><a href="charms-constraints.html">Using constraints</a></li>
2199+ <li class=" sub"><a href="charms-config.html">Service Configuration</a></li>
2200+ <li class=" sub"><a href="charms-relations.html">Service Relationships</a></li>
2201+ <li class=" sub"><a href="charms-exposing.html">Exposing Services</a></li>
2202+ <li class=" sub"><a href="charms-scaling.html">Scaling Services</a></li>
2203+ <li class=" sub"><a href="charms-destroy.html">Destroying Services</a></li>
2204+ </ul>
2205+ <h1>Charm Authors</h1>
2206+ <ul></ul>
2207+ <li class=""><a href="authors-charm-writing.html">Writing a charm</a></li>
2208+ <li class=" sub"><a href="authors-subordinate-services.html">Subordinate services</a></li>
2209+ <li class=" sub"><a href="authors-implicit-relations.html">Implicit Relations</a></li>
2210+ <li class=" sub"><a href="authors-testing.html">Charm Testing</a></li>
2211+ <li class=" sub"><a href="authors-hooks.html">Hook debugging</a></li>
2212+ <li class=""><a href="authors-charm-store.html">The Juju Charm Store</a></li>
2213+ <li class=" sub"><a href="authors-charm-policy.html">Charm store policy</a></li>
2214+ <li class=" sub"><a href="authors-charm-best-practice.html">Best practices</a></li>
2215+ <li class=" sub"><a href="authors-charm-quality.html">Charm Quality Rating</a></li>
2216+ <h1>Reference</h1>
2217+ <ul>
2218+ <li class="sub"><a href="commands.html">Juju commands</a></li>
2219+ <li class="sub"><a href="glossary.html">Glossary</a></li>
2220+ <li class="sub"><a href="contributing.html">Contribute to the Docs!</a></li>
2221+ </ul>
2222+ </nav>
2223+ </div>
2224+ <div class="grid-9 doc-content">
2225+ <article>
2226+ <section id='authors-charm-testing'>
2227+ <h1>Charm Testing</h1>
2228+ <p>Juju has been designed from the start to foster a large collection of &quot;charms&quot;. Charms are expected to number in the thousands, and be self contained, with well defined interfaces for defining their relationships to one another.</p>
2229+ <p>Because this is a large complex system, not unlike a Linux software distribution, there is a need to test the charms and how they interact with one another. This specification defines a plan for implementing a simple framework to help this happen.</p>
2230+ <p>Static tests have already been implemented in the <tt class="docutils literal"><span class="pre">charm</span> <span class="pre">proof</span></tt> command as part of <tt class="docutils literal"><span class="pre">charm-tools</span></tt>. Any static testing of charms is beyond the scope of this specification.</p>
2231+
2232+
2233+ <h2>Phase 1 - Generic tests</h2>
2234+ <p>All charms share some of the same characteristics. They all have a yaml file called <tt class="docutils literal"><span class="pre">metadata.yaml</span></tt>, and when deployed, juju will always attempt to progress the state of the service from install to config to started. Because of this, all charms can be tested using the following algorithm:</p>
2235+ <pre>deploy charm
2236+ &nbsp;while state != started
2237+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if timeout is reached, FAIL
2238+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if state == install_error, config_error, or start_error, FAIL
2239+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if state == started, PASS</pre>
2240+
2241+ <p>Other generic tests may be identified, so a collection of generic tests should be the focus of an implementation.</p>
2242+ <p>Note that this requirement is already satisfied by Mark Mims' jenkins tester: <a class="reference external" href="http://charmtests.markmims.com/">http://charmtests.markmims.com/</a></p>
2243+
2244+ <h2>Phase 2 - Charm Specific tests</h2>
2245+ <p>Charm authors will have the best insight into whether or not a charm is working properly.</p>
2246+ <p>A simple structure will be utilized to attach tests to charms. Under the charm root directory, a sub-directory named 'tests' will be scanned by a test runner for executable files matching the glob <tt class="docutils literal"><span class="pre">*.test</span></tt>. These will be run in lexical order by the test runner, with a predictible environment. The tests can make the following assumptions:</p>
2247+ <ul class="simple">
2248+ <li>A minimal install of the release of Ubuntu which the charm is targetted at will be available.</li>
2249+ <li>A version of juju is installed and available in the system path.</li>
2250+ <li>A juju environment with no services deployed inside it is already bootstrapped, and will be the default for command line usage.</li>
2251+ <li>The CWD is the <tt class="docutils literal"><span class="pre">tests</span></tt> directory off the charm root.</li>
2252+ <li>Full network access to deployed nodes will be allowed.</li>
2253+ <li>the bare name of any charm in arguments to juju will be resolved to a charm url and/or repository arguments of the test runner's choice. This means that if you need mysql, you do not do <tt class="docutils literal"><span class="pre">juju</span> <span class="pre">deploy</span> <span class="pre">cs:mysql</span></tt> or <tt class="docutils literal"><span class="pre">juju</span> <span class="pre">deploy</span> <span class="pre">--repository</span> <span class="pre">~/charms</span> <span class="pre">local:mysql</span></tt>, but just <tt class="docutils literal"><span class="pre">juju</span> <span class="pre">deploy</span> <span class="pre">mysql</span></tt>. A wrapper will resolve this to the latest version of the given charm from the list of official charms.</li>
2254+ </ul>
2255+ <p>The following restrictions may be enforced:</p>
2256+ <ul class="simple">
2257+ <li>Internet access will be restricted from the testing host.</li>
2258+ </ul>
2259+ <p>If present, tests/tests.yaml will be read to determine packages that need to be installed on the host running tests in order to facilitate the tests. The packages can <em>only</em> be installed from the official, default Ubuntu archive for the release which the charm is intended for, from any of the repositories enabled by default in said release. The format of tests.yaml is as such:</p>
2260+ <pre>packages: [ package1, package2, package3 ]</pre>
2261+
2262+ <p>If a tool is needed to perform a test and is not available in the Ubuntu archive, it can also be included in the <tt class="docutils literal"><span class="pre">tests/</span></tt> directory, as long as the file which contains it does not end in <tt class="docutils literal"><span class="pre">.test</span></tt>. Note that build tools cannot be assumed to be available on the testing system.</p>
2263+ <div class="section" id="purpose-of-tests">
2264+ <h3>Purpose of tests</h3>
2265+ <p>The purpose of these tests is to assert that the charm works well on the intended platform and performs the expected configuration steps. Examples of things to test in each charm beyond install/start is:</p>
2266+ <ul class="simple">
2267+ <li>After install, expose, and adding of required relations, the service is listening on the intended ports and is functional.</li>
2268+ <li>Adding, removing, and re-adding a relation should work without error.</li>
2269+ <li>Setting config values should result in the config value reflected in the service's configuraion.</li>
2270+ <li>Adding multiple units to a web app charm and relating to a load balancer results in the same HTML on both units directly and the load balancer.</li>
2271+ </ul>
2272+
2273+ <h3>Exit Codes</h3>
2274+ <p>Upon exit, the test's exit code will be evaluated to mean the following:</p>
2275+ <ul class="simple">
2276+ <li>0: Test passed</li>
2277+ <li>1: Failed test</li>
2278+ <li>100: Test is skipped because of incomplete environment</li>
2279+ </ul>
2280+
2281+ <h3>Output</h3>
2282+ <p>There is a general convention which output should follow, though it will not be interpreted by machine. On stdout, a message indicating the reason for the exit code should be printed, with a prefix string corresponding to the exit codes defined above. The correlation is:</p>
2283+ <ul class="simple">
2284+ <li>PASS - 0</li>
2285+ <li>FAIL - 1</li>
2286+ <li>SKIP - 100</li>
2287+ </ul>
2288+ <p>Anything else intentional should be prefixed with the word 'INFO'. If the
2289+ contents of files are to be logged, the contents should be preceeded by
2290+ <tt class="docutils literal"><span class="pre">INFO:</span> <span class="pre">BEGIN</span> <span class="pre">filename</span></tt>, where filename is a logical name unique to
2291+ this run of the test, and then the file ended with <tt class="docutils literal"><span class="pre">INFO:</span> <span class="pre">END</span> <span class="pre">filename</span></tt>.</p>
2292+
2293+ <h3>Example Tests<</h3>
2294+
2295+ <h4>Deploy requirements and Poll</h4>
2296+ <p>The test below <a class="footnote-reference" href="#id2" id="id1">[*]</a> deploys mediawiki with mysql and memcached related to it,
2297+ and then tests to make sure it returns a page via http with &quot;&lt;title&gt;&quot;
2298+ somewhere in the content.:</p>
2299+ <pre>#!/bin/sh
2300+
2301+ &nbsp;set -e
2302+
2303+ &nbsp;teardown() {
2304+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if [ -n "$datadir" ] ; then
2305+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if [ -f $datadir/passed ]; then
2306+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rm -r $datadir
2307+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else
2308+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo INFO: $datadir preserved
2309+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if [ -f $datadir/wget.log ] ; then
2310+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo INFO: BEGIN wget.log
2311+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cat $datadir/wget.log
2312+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo INFO: END wget.log
2313+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fi
2314+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fi
2315+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fi
2316+ &nbsp;}
2317+ &nbsp;trap teardown EXIT
2318+
2319+
2320+ &nbsp;juju deploy mediawiki
2321+ &nbsp;juju deploy mysql
2322+ &nbsp;juju deploy memcached
2323+ &nbsp;juju add-relation mediawiki:db mysql:db
2324+ &nbsp;juju add-relation memcached mediawiki
2325+ &nbsp;juju expose mediawiki
2326+
2327+ &nbsp;for try in `seq 1 600` ; do
2328+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;host=`juju status | tests/get-unit-info mediawiki public-address`
2329+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if [ -z "$host" ] ; then
2330+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sleep 1
2331+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else
2332+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break
2333+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fi
2334+ &nbsp;done
2335+
2336+ &nbsp;if [ -z "$host" ] ; then
2337+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo FAIL: status timed out
2338+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit 1
2339+ &nbsp;fi
2340+
2341+ &nbsp;datadir=`mktemp -d ${TMPDIR:-/tmp}/wget.test.XXXXXXX`
2342+ &nbsp;echo INFO: datadir=$datadir
2343+
2344+ &nbsp;wget --tries=100 --timeout=6 http://$host/ -O - -a $datadir/wget.log | grep -q '&lt;title&gt;'
2345+
2346+ &nbsp;if [ $try -eq 600 ] ; then
2347+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo FAIL: Timed out waiting.
2348+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit 1
2349+ &nbsp;fi
2350+
2351+ &nbsp;touch $datadir/passed
2352+
2353+ &nbsp;trap - EXIT
2354+ &nbsp;teardown
2355+
2356+ &nbsp;echo PASS
2357+ &nbsp;exit 0</pre>
2358+
2359+ <h3>Test config settings</h4>
2360+ <p>The following example tests checks to see if the default_port change the admin asks for is actually respected post-deploy:</p>
2361+ <pre>#!/bin/sh
2362+
2363+ &nbsp;if [ -z "`which nc`" ] ; then
2364+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo "SKIP: cannot run tests without netcat"
2365+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit 100
2366+ &nbsp;fi
2367+
2368+ &nbsp;set -e
2369+
2370+ &nbsp;juju deploy mongodb
2371+ &nbsp;juju expose mongodb
2372+ &nbsp;
2373+ &nbsp;for try in `seq 1 600` ; do
2374+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;host=`juju status | tests/get-unit-info mongodb public-address`
2375+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if [ -z "$host" ] ; then
2376+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sleep 1
2377+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else
2378+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break
2379+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fi
2380+ &nbsp;done
2381+ &nbsp;
2382+ &nbsp;if [ -z "$host" ] ; then
2383+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo FAIL: status timed out
2384+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit 1
2385+ &nbsp;fi
2386+ &nbsp;
2387+ &nbsp;assert_is_listening() {
2388+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local port=$1
2389+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;listening=""
2390+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for try in `seq 1 10` ; do
2391+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ! nc $host $port &lt; /dev/null ; then
2392+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;continue
2393+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fi
2394+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;listening="$port"
2395+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break
2396+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;done
2397+ &nbsp;
2398+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if [ -z "$listening" ] ; then
2399+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo "FAIL: not listening on port $port after 10 retries"
2400+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return 1
2401+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else
2402+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo "PASS: listening on port $listening"
2403+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return 0
2404+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fi
2405+ &nbsp;}
2406+
2407+ &nbsp;assert_is_listening 27017
2408+
2409+ &nbsp;juju set mongodb default_port=55555
2410+
2411+ &nbsp;assert_is_listening 55555
2412+ &nbsp;echo PASS: config change tests passed.
2413+ &nbsp;exit 0</pre>
2414+
2415+ <table class="docutils footnote" frame="void" id="id2" rules="none">
2416+ <colgroup><col class="label" /><col /></colgroup>
2417+ <tbody valign="top">
2418+ <tr><td class="label"><a class="fn-backref" href="#id1">[*]</a></td><td>get-unit-info
2419+ The example tests script uses a tool that is not widely available yet, <tt class="docutils literal"><span class="pre">get-unit-info</span></tt>. In the future enhancements should be made to juju core to allow such things to be made into plugins. Until then, it can be included in each test dir that uses it, or we can build a package of tools that are common to tests.</td></tr>
2420+ </tbody>
2421+ </table>
2422+
2423+ <h2>Test Runner</h2>
2424+ <p>A test runner will periodically poll the collection of charms for changes since the last test run. If there have been changes, the entire set of changes will be tested as one delta. This delta will be recorded in the test results in such a way where a developer can repeat the exact set of changes for debugging purposes.</p>
2425+ <p>All of the charms will be scanned for tests in lexical order by series, charm name, branch name. Non official charms which have not been reviewed by charmers will not have their tests run until the test runner's restrictions have been vetted for security, since we will be running potentially malicious code. It is left to the implementor to determine what mix of juju, client platform, and environment settings are appropriate, as all of these are variables that will affect the running charms, and so may affect the outcome.</p>
2426+ <p>If tests exit with services still in the environment, the test runner may clean them up, whether by destroying the environment or destroying the services explicitly, and the machines may be terminated as well. Any artifacts needed from the test machines should be retrieved and displayed before the test exits.</p>
2427+ </section>
2428+ </article>
2429+ </div>
2430+ </div>
2431+ </section>
2432+ <div class="shadow"></div>
2433+ <footer>
2434+ <div>
2435+ <nav role="navigation" class="clearfix">
2436+ <ul>
2437+ <li><a href="https://juju.ubuntu.com/get-started">Get started</a></li>
2438+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/local/">Local</a></li>
2439+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/amazon/">Amazon Web Services</a></li>
2440+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/hp-cloud/">HP Cloud</a></li>
2441+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/rackspace/">Rackspace</a></li>
2442+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/openstack/">Openstack</a></li>
2443+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/maas/">MAAS</a></li>
2444+ </ul>
2445+ <ul>
2446+ <li><a href="https://juju.ubuntu.com/resources">Resources</a></li>
2447+ <li><a href="https://juju.ubuntu.com/docs">Documentation</a></li>
2448+ <li><a href="https://juju.ubuntu.com/resources/videos">Videos</a></li>
2449+ <li><a href="http://uistage.jujucharms.com:8080/">Juju GUI Demo</a></li>
2450+ </ul>
2451+ <ul>
2452+ <li><a href="https://juju.ubuntu.com/community">Community</a></li>
2453+ <li class="page_item"><a href="https://juju.ubuntu.com/community/juju-blog/">Blog</a></li>
2454+ <li class="page_item"><a href="https://juju.ubuntu.com/community/weekly-charm-meeting/">Charm Meetings</a></li>
2455+ <li class="page_item"><a href="https://juju.ubuntu.com/community/charmers/">Charmers</a></li>
2456+ <li class="page_item"><a href="https://lists.ubuntu.com/mailman/listinfo/juju">Mailing List</a></li>
2457+ <li class="page_item"><a href="http://webchat.freenode.net/?channels=juju">Chat</a></li>
2458+ <li class="page_item"><a href="http://askubuntu.com/questions/tagged/juju?sort=faq&amp;amp;pagesize=50">FAQ</a></li>
2459+ </ul>
2460+ <ul class="last">
2461+ <li><a href="https://launchpad.net/juju">Code</a></li>
2462+ <li><a href="https://launchpad.net/juju-core">Juju Core</a></li>
2463+ <li><a href="https://launchpad.net/charms">Charms</a></li>
2464+ </ul>
2465+ </nav>
2466+ </div>
2467+ </footer>
2468+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
2469+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.14/jquery-ui.min.js"></script>
2470+ <script type="text/javascript" src="js/main.js"></script>
2471+ </body>
2472+</html>
2473\ No newline at end of file
2474
2475=== added file 'htmldocs/charms-config.html'
2476--- htmldocs/charms-config.html 1970-01-01 00:00:00 +0000
2477+++ htmldocs/charms-config.html 2013-06-27 17:35:30 +0000
2478@@ -0,0 +1,217 @@
2479+<!DOCTYPE html>
2480+<html>
2481+ <head>
2482+ <meta charset="utf-8">
2483+ <title>Juju Documentation - Exposing Charms</title>
2484+ <link href="//fonts.googleapis.com/css?family=Ubuntu:400,400italic" rel="stylesheet" type="text/css"/>
2485+ <link href="//fonts.googleapis.com/css?family=Ubuntu+Mono:400" rel="stylesheet" type="text/css"/>
2486+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/reset.css" rel="stylesheet" type="text/css"/>
2487+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/960.css" rel="stylesheet" type="text/css"/>
2488+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/base.css" rel="stylesheet" type="text/css"/>
2489+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/resources.css" rel="stylesheet" type="text/css"/>
2490+ <link href="css/main.css" rel="stylesheet" type="text/css"/>
2491+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
2492+ <script src="http://app.stacktack.com/jquery.stacktack.min.js"></script>
2493+ <script type="text/javascript">
2494+ $(document).ready(function() {
2495+ $(document).stacktack();
2496+ });
2497+ </script><!--[if lt IE 9]>
2498+ <script type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
2499+ </head>
2500+ <body class="resources">
2501+ <header>
2502+ <div class="header-login">
2503+ <ul>
2504+ <li>&nbsp;</li>
2505+ </ul>
2506+ </div>
2507+ <div class="header-navigation">
2508+ <div>
2509+ <nav role="navigation">
2510+ <ul>
2511+ <li class="page_item"><a href="https://juju.ubuntu.com/">Home</a></li>
2512+ <li class="page_item current_page_item"><a href="https://juju.ubuntu.com/">Resources</a></li>
2513+ <li class="page_item"><a href="https://juju.ubuntu.com/">Community</a></li>
2514+ <li class="page_item"><a href="https://juju.ubuntu.com/">Charm Store</a></li>
2515+ <li class="page_item"><a href="https://juju.ubuntu.com/">Events</a></li>
2516+ <li class="page_item"><a href="https://juju.ubuntu.com/">Survey</a></li>
2517+ <li>
2518+ <form id="form-search" method="get" action="/">
2519+ <fieldset>
2520+ <input id="input-search" type="text" name="s" value="Search">
2521+ </fieldset>
2522+ </form>
2523+ </li>
2524+ </ul>
2525+ </nav><a href="https://juju.ubuntu.com/" class="logo-ubuntu"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/logo-ubuntu.png"></a>
2526+ </div>
2527+ </div>
2528+ <div class="header-content">
2529+ <div class="clearfix"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/arrow-nav.png" width="9" height="5" style="left:894px; display: block;" class="arrow-nav">
2530+ <div class="header-navigation-secondary"></div>
2531+ <div class="header-image"></div>
2532+ <h1>Resources</h1>
2533+ <h2>A collection of some of the most important online references for Juju users and developers.</h2>
2534+ </div>
2535+ </div>
2536+ </header>
2537+ <section id="content" class="container-12">
2538+ <div class="grid-12 doc-container">
2539+ <div class="grid-3 doc-navigation">
2540+ <nav role="navigation">
2541+ <h1>User Guide</h1>
2542+ <ul>
2543+ <li class=""><a href="getting-started.html">Getting Started</a></li>
2544+ <li class=" sub"><a href="getting-started.html#intro">Introduction</a></li>
2545+ <li class=" sub"><a href="getting-started.html#install">Installation</a></li>
2546+ <li class=" sub"><a href="config-aws.html">AWS Configuration</a></li>
2547+ <li class=" sub"><a href="config-hpcloud.html">HP Cloud Configuration</a></li>
2548+ <li class=" sub"><a href="">OpenStack Configuration</a></li>
2549+ <li class=" sub"><a href="config-maas.html">MAAS Configuration</a></li>
2550+ <li class=" sub"><a href="getting-started.html#test">Testing your setup</a></li>
2551+ <li class=""><a href="charms.html">Using Charms</a></li>
2552+ <li class=" sub"><a href="charms.html#intro">What are Charms?</a></li>
2553+ <li class=" sub"><a href="charms-deploying.html">Deploying Services</a></li>
2554+ <li class=" sub"><a href="charms-constraints.html">Using constraints</a></li>
2555+ <li class=" sub"><a href="charms-config.html">Service Configuration</a></li>
2556+ <li class=" sub"><a href="charms-relations.html">Service Relationships</a></li>
2557+ <li class=" sub"><a href="charms-exposing.html">Exposing Services</a></li>
2558+ <li class=" sub"><a href="charms-scaling.html">Scaling Services</a></li>
2559+ <li class=" sub"><a href="charms-destroy.html">Destroying Services</a></li>
2560+ </ul>
2561+ <h1>Charm Authors</h1>
2562+ <ul></ul>
2563+ <li class=""><a href="authors-charm-writing.html">Writing a charm</a></li>
2564+ <li class=" sub"><a href="authors-subordinate-services.html">Subordinate services</a></li>
2565+ <li class=" sub"><a href="authors-implicit-relations.html">Implicit Relations</a></li>
2566+ <li class=" sub"><a href="authors-testing.html">Charm Testing</a></li>
2567+ <li class=" sub"><a href="authors-hooks.html">Hook debugging</a></li>
2568+ <li class=""><a href="authors-charm-store.html">The Juju Charm Store</a></li>
2569+ <li class=" sub"><a href="authors-charm-policy.html">Charm store policy</a></li>
2570+ <li class=" sub"><a href="authors-charm-best-practice.html">Best practices</a></li>
2571+ <li class=" sub"><a href="authors-charm-quality.html">Charm Quality Rating</a></li>
2572+ <h1>Reference</h1>
2573+ <ul>
2574+ <li class="sub"><a href="commands.html">Juju commands</a></li>
2575+ <li class="sub"><a href="glossary.html">Glossary</a></li>
2576+ <li class="sub"><a href="contributing.html">Contribute to the Docs!</a></li>
2577+ </ul>
2578+ </nav>
2579+ </div>
2580+ <div class="grid-9 doc-content">
2581+ <article>
2582+ <section id ="service_config">
2583+ <h1>Service Configuration</h1>
2584+ <p>When deploying a service, the charm you use will often support or even require specific configuration options to be set.</p>
2585+ <p>Juju provides tools to help manage these options and respond to changes over the lifetime of the service deployment. These options apply to the entire service, as opposed to only a specific unit or relation. The configuration can modified by an administrator at deployment time or after the services are operational.<p>
2586+ <h1>Discovering service configuration options</h1>
2587+ <p>You can discover what configuration options are available for a specific charm in various ways</p>
2588+ <ul>
2589+ <li>By running the <span class="pre">juju get &LT;service&GT;</span> command.</li>
2590+ <li>By viewing the charm in the <a href="http://jujucharms.com">charm store.</a></li>
2591+ <li>By examining the <strong>config.yaml</strong> file in the charm itself.</li>
2592+ </ul>
2593+ <p>The configurations setting names and the values they take will obviously vary between charms. The options and possible values are all well documented however, so you should consult one of the above sources to find out particular details.
2594+ <h1>Configuring a service at deployment</h1>
2595+ <p>It is possible to set configuration values when deploying a service by providing a yaml-formatted file containing configuration values.</p>
2596+ <p>For example, upon investigation we discover that the Mediawiki charm allows us to set values for the name of the wiki and the 'skin' to use. We can put these inside a configuration file.</p>
2597+ <pre><code>
2598+ mediawiki:
2599+ &nbsp;&nbsp;name: Juju Wiki
2600+ &nbsp;&nbsp;skin: monobook
2601+ &nbsp;&nbsp;admins: admin:admin
2602+ </code></pre>
2603+ <p>We can then use this configuration when we deploy the service:</p>
2604+ <pre><code>
2605+ juju deploy --config myconfig.yaml mediawiki
2606+ </code></pre>
2607+
2608+ <p class="caution"><strong>Caution:</strong> If the yaml configuration file cannot be read or contains some syntax errors or invalid options, you will receive an error message to this effect. However, <strong>the service will still be deployed </strong>.
2609+ <h1>Configuring a service which is already deployed</h1>
2610+ <p>It is possible to set or change configuration of a service which is already deployed. </p>
2611+ <p>Before you set any of these options, you may want to check what current options are already set, using the <span class="pre"> juju get &LT;service&GT; </span> command. For example:</p>
2612+ <pre><code>
2613+ juju get mediawiki
2614+ </code></pre>
2615+ <p>Should return something like this:</p>
2616+ <pre><code>
2617+ charm: mediawiki
2618+ service: mediawiki
2619+ settings:
2620+ &nbsp;&nbsp;admins:
2621+ &nbsp;&nbsp;&nbsp;&nbsp;default: true
2622+ &nbsp;&nbsp;&nbsp;&nbsp;description: Admin users to create, user:pass
2623+ &nbsp;&nbsp;&nbsp;&nbsp;type: string
2624+ &nbsp;&nbsp;&nbsp;&nbsp;value: null
2625+ &nbsp;&nbsp;debug:
2626+ &nbsp;&nbsp;&nbsp;&nbsp;default: true
2627+ &nbsp;&nbsp;&nbsp;&nbsp;description: turn on debugging features of mediawiki
2628+ &nbsp;&nbsp;&nbsp;&nbsp;type: boolean
2629+ &nbsp;&nbsp;&nbsp;&nbsp;value: false
2630+ &nbsp;&nbsp;logo:
2631+ &nbsp;&nbsp;&nbsp;&nbsp;default: true
2632+ &nbsp;&nbsp;&nbsp;&nbsp;description: URL to fetch logo from
2633+ &nbsp;&nbsp;&nbsp;&nbsp;type: string
2634+ &nbsp;&nbsp;&nbsp;&nbsp;value: null
2635+ &nbsp;&nbsp;name:
2636+ &nbsp;&nbsp;&nbsp;&nbsp;default: true
2637+ &nbsp;&nbsp;&nbsp;&nbsp;description: The name, or Title of the Wiki
2638+ &nbsp;&nbsp;&nbsp;&nbsp;type: string
2639+ &nbsp;&nbsp;&nbsp;&nbsp;value: Please set name of wiki
2640+ &nbsp;&nbsp;skin:
2641+ &nbsp;&nbsp;&nbsp;&nbsp;default: true
2642+ &nbsp;&nbsp;&nbsp;&nbsp;description: skin for the Wiki
2643+ &nbsp;&nbsp;&nbsp;&nbsp;type: string
2644+ &nbsp;&nbsp;&nbsp;&nbsp;value: vector
2645+ </code></pre>
2646+ <p>You can set the options using the <span class="pre"> juju set &LT;service&GT; </span>, specifying multiple key:value pairs if necessary:</p>
2647+ <pre><code>
2648+ juju set mediawiki skin=monoblock name='Juju Wiki'
2649+ </code></pre>
2650+ </section>
2651+ </article>
2652+ </div>
2653+ </div>
2654+ </section>
2655+ <div class="shadow"></div>
2656+ <footer>
2657+ <div>
2658+ <nav role="navigation" class="clearfix">
2659+ <ul>
2660+ <li><a href="https://juju.ubuntu.com/get-started">Get started</a></li>
2661+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/local/">Local</a></li>
2662+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/amazon/">Amazon Web Services</a></li>
2663+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/hp-cloud/">HP Cloud</a></li>
2664+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/rackspace/">Rackspace</a></li>
2665+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/openstack/">Openstack</a></li>
2666+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/maas/">MAAS</a></li>
2667+ </ul>
2668+ <ul>
2669+ <li><a href="https://juju.ubuntu.com/resources">Resources</a></li>
2670+ <li><a href="https://juju.ubuntu.com/docs">Documentation</a></li>
2671+ <li><a href="https://juju.ubuntu.com/resources/videos">Videos</a></li>
2672+ <li><a href="http://uistage.jujucharms.com:8080/">Juju GUI Demo</a></li>
2673+ </ul>
2674+ <ul>
2675+ <li><a href="https://juju.ubuntu.com/community">Community</a></li>
2676+ <li class="page_item"><a href="https://juju.ubuntu.com/community/juju-blog/">Blog</a></li>
2677+ <li class="page_item"><a href="https://juju.ubuntu.com/community/weekly-charm-meeting/">Charm Meetings</a></li>
2678+ <li class="page_item"><a href="https://juju.ubuntu.com/community/charmers/">Charmers</a></li>
2679+ <li class="page_item"><a href="https://lists.ubuntu.com/mailman/listinfo/juju">Mailing List</a></li>
2680+ <li class="page_item"><a href="http://webchat.freenode.net/?channels=juju">Chat</a></li>
2681+ <li class="page_item"><a href="http://askubuntu.com/questions/tagged/juju?sort=faq&amp;amp;pagesize=50">FAQ</a></li>
2682+ </ul>
2683+ <ul class="last">
2684+ <li><a href="https://launchpad.net/juju">Code</a></li>
2685+ <li><a href="https://launchpad.net/juju-core">Juju Core</a></li>
2686+ <li><a href="https://launchpad.net/charms">Charms</a></li>
2687+ </ul>
2688+ </nav>
2689+ </div>
2690+ </footer>
2691+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
2692+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.14/jquery-ui.min.js"></script>
2693+ <script type="text/javascript" src="js/main.js"></script>
2694+ </body>
2695+</html>
2696\ No newline at end of file
2697
2698=== added file 'htmldocs/charms-constraints.html'
2699--- htmldocs/charms-constraints.html 1970-01-01 00:00:00 +0000
2700+++ htmldocs/charms-constraints.html 2013-06-27 17:35:30 +0000
2701@@ -0,0 +1,242 @@
2702+<!DOCTYPE html>
2703+<html>
2704+ <head>
2705+ <meta charset="utf-8">
2706+ <title>Juju Documentation - Using Constraints</title>
2707+ <link href="//fonts.googleapis.com/css?family=Ubuntu:400,400italic" rel="stylesheet" type="text/css"/>
2708+ <link href="//fonts.googleapis.com/css?family=Ubuntu+Mono:400" rel="stylesheet" type="text/css"/>
2709+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/reset.css" rel="stylesheet" type="text/css"/>
2710+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/960.css" rel="stylesheet" type="text/css"/>
2711+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/base.css" rel="stylesheet" type="text/css"/>
2712+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/resources.css" rel="stylesheet" type="text/css"/>
2713+ <link href="css/main.css" rel="stylesheet" type="text/css"/>
2714+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
2715+ <script src="http://app.stacktack.com/jquery.stacktack.min.js"></script>
2716+ <script type="text/javascript">
2717+ $(document).ready(function() {
2718+ $(document).stacktack();
2719+ });
2720+ </script><!--[if lt IE 9]>
2721+ <script type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
2722+ </head>
2723+ <body class="resources">
2724+ <header>
2725+ <div class="header-login">
2726+ <ul>
2727+ <li>&nbsp;</li>
2728+ </ul>
2729+ </div>
2730+ <div class="header-navigation">
2731+ <div>
2732+ <nav role="navigation">
2733+ <ul>
2734+ <li class="page_item"><a href="https://juju.ubuntu.com/">Home</a></li>
2735+ <li class="page_item current_page_item"><a href="https://juju.ubuntu.com/">Resources</a></li>
2736+ <li class="page_item"><a href="https://juju.ubuntu.com/">Community</a></li>
2737+ <li class="page_item"><a href="https://juju.ubuntu.com/">Charm Store</a></li>
2738+ <li class="page_item"><a href="https://juju.ubuntu.com/">Events</a></li>
2739+ <li class="page_item"><a href="https://juju.ubuntu.com/">Survey</a></li>
2740+ <li>
2741+ <form id="form-search" method="get" action="/">
2742+ <fieldset>
2743+ <input id="input-search" type="text" name="s" value="Search">
2744+ </fieldset>
2745+ </form>
2746+ </li>
2747+ </ul>
2748+ </nav><a href="https://juju.ubuntu.com/" class="logo-ubuntu"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/logo-ubuntu.png"></a>
2749+ </div>
2750+ </div>
2751+ <div class="header-content">
2752+ <div class="clearfix"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/arrow-nav.png" width="9" height="5" style="left:894px; display: block;" class="arrow-nav">
2753+ <div class="header-navigation-secondary"></div>
2754+ <div class="header-image"></div>
2755+ <h1>Resources</h1>
2756+ <h2>A collection of some of the most important online references for Juju users and developers.</h2>
2757+ </div>
2758+ </div>
2759+ </header>
2760+ <section id="content" class="container-12">
2761+ <div class="grid-12 doc-container">
2762+ <div class="grid-3 doc-navigation">
2763+ <nav role="navigation">
2764+ <h1>User Guide</h1>
2765+ <ul>
2766+ <li class=""><a href="getting-started.html">Getting Started</a></li>
2767+ <li class=" sub"><a href="getting-started.html#intro">Introduction</a></li>
2768+ <li class=" sub"><a href="getting-started.html#install">Installation</a></li>
2769+ <li class=" sub"><a href="config-aws.html">AWS Configuration</a></li>
2770+ <li class=" sub"><a href="config-hpcloud.html">HP Cloud Configuration</a></li>
2771+ <li class=" sub"><a href="">OpenStack Configuration</a></li>
2772+ <li class=" sub"><a href="config-maas.html">MAAS Configuration</a></li>
2773+ <li class=" sub"><a href="getting-started.html#test">Testing your setup</a></li>
2774+ <li class=""><a href="charms.html">Using Charms</a></li>
2775+ <li class=" sub"><a href="charms.html#intro">What are Charms?</a></li>
2776+ <li class=" sub"><a href="charms-deploying.html">Deploying Services</a></li>
2777+ <li class=" sub"><a href="charms-constraints.html">Using constraints</a></li>
2778+ <li class=" sub"><a href="charms-config.html">Service Configuration</a></li>
2779+ <li class=" sub"><a href="charms-relations.html">Service Relationships</a></li>
2780+ <li class=" sub"><a href="charms-exposing.html">Exposing Services</a></li>
2781+ <li class=" sub"><a href="charms-scaling.html">Scaling Services</a></li>
2782+ <li class=" sub"><a href="charms-destroy.html">Destroying Services</a></li>
2783+ </ul>
2784+ <h1>Charm Authors</h1>
2785+ <ul></ul>
2786+ <li class=""><a href="authors-charm-writing.html">Writing a charm</a></li>
2787+ <li class=" sub"><a href="authors-subordinate-services.html">Subordinate services</a></li>
2788+ <li class=" sub"><a href="authors-implicit-relations.html">Implicit Relations</a></li>
2789+ <li class=" sub"><a href="authors-testing.html">Charm Testing</a></li>
2790+ <li class=" sub"><a href="authors-hooks.html">Hook debugging</a></li>
2791+ <li class=""><a href="authors-charm-store.html">The Juju Charm Store</a></li>
2792+ <li class=" sub"><a href="authors-charm-policy.html">Charm store policy</a></li>
2793+ <li class=" sub"><a href="authors-charm-best-practice.html">Best practices</a></li>
2794+ <li class=" sub"><a href="authors-charm-quality.html">Charm Quality Rating</a></li>
2795+ <h1>Reference</h1>
2796+ <ul>
2797+ <li class="sub"><a href="commands.html">Juju commands</a></li>
2798+ <li class="sub"><a href="glossary.html">Glossary</a></li>
2799+ <li class="sub"><a href="contributing.html">Contribute to the Docs!</a></li>
2800+ </ul>
2801+ </nav>
2802+ </div>
2803+ <div class="grid-9 doc-content">
2804+ <article>
2805+ <section id ="charms-constraints">
2806+ <h1>Machine Constraints</h1>
2807+ <p>Machine constraints allow you to pick the hardware to which your services will be deployed.</p>
2808+ <p>Constraints can be set for environments and services, with lookups for each key falling back from more specific to more general settings, and with default values set by juju when otherwise unspecified. Changes to constraints do not affect any unit that has already been assigned to a machine.</p>
2809+ <p>Constraints will be controlled with a new command, <span class="pre">juju set-constraints</span>, taking an optional <span class="pre">--service</span> arg, and any number of <span class="pre">key=value</span> pairs. When the service name is specified, the constraints are set on that service; otherwise they are set on the environment.</p>
2810+ <p>Valid choices for the <span class="pre">value</span> are generally dependent on the particular constraint, with two exceptions:</p>
2811+
2812+ <ul>
2813+ <li>An empty value always means &quot;use the juju default setting&quot;. This allows you to ignore environment settings at the service level without having to explicitly remember and re-set the juju default values. Note that there is no way to change the juju default values.</li>
2814+ <li>A value of <span class="pre">any</span> explicitly unsets a constraint, and will cause it to be chosen completely arbitrarily.</li>
2815+ </ul>
2816+
2817+ <p>We also extend the syntax for <span class="pre">juju deploy</span>, and <span class="pre">juju bootstrap</span>, such that <span class="pre">--constraints</span> expects a single string of space-separated constraints, understood as above; deployment constraints will be set on the service before the first unit is deployed, and bootstrap constraints will be set on the environment and used to provision the initial master machine.</p>
2818+ <p>Please note that there are no changes to the <span class="pre">juju add-unit</span> command; juju is explicitly focused on <strong>service</strong> orchestration, and it is counterproductive to encourage users to consider individual units. This can be worked around by setting new service constraints before adding new units, but is not encouraged.</p>
2819+ <p>The new <span class="pre">juju get-constraints</span> command is used to see the currently applicable constraints. When called without arguments, it outputs the environment constraints as a single yaml-formatted dict; alternatively, it can be called with any number of arguments referencing any mix of services, service units, or machines, and will output a yaml-formatted dict of dicts with the outer dict keyed on the requested entities.</p>
2820+
2821+ <h1>Examples</h1>
2822+
2823+ <p>Launch a new deployment running on an m1.medium (running an i386 image), and defaulting to that for future services:</p>
2824+ <pre><code>juju bootstrap --constraints "instance-type=m1.medium arch=i386"</code></pre>
2825+
2826+ <p>Deploy MySQL on a machine with at least 32GiB of RAM, and at least 8 ECU of CPU power (architecture will be inherited from the environment, or default to amd64):</p>
2827+ <pre><code>juju deploy --constraints "cpu=8 mem=32G" mysql</code></pre>
2828+
2829+
2830+ <p>Launch all future &quot;mysql&quot; machines with at least 8GiB of RAM and 4 ECU:</p>
2831+ <pre><code>juju set-constraints --service mysql mem=8G cpu=4</code></pre>
2832+
2833+ <p>Output current environment constraints:</p>
2834+ <pre><code>juju get-constraints</code></pre>
2835+
2836+ <p>Output constraints for machine 3, service &quot;mysql&quot;, and service unit &quot;wordpress/7&quot;:</p>
2837+ <pre><code>juju get-constraints 3 mysql wordpress/7</code></pre>
2838+
2839+ <h1>Provider Constraints</h1>
2840+ <p>The constraints available vary by provider, but should include:</p>
2841+
2842+ <ul>
2843+ <li><span class="pre">cpu</span>: The minimum processing power of the machine, measured in <a class="reference external" href="http://en.wikipedia.org/wiki/Amazon_Elastic_Compute_Cloud#Elastic_compute_units">ECU</a>,defaulting to 1; any real number &gt;= 0 is valid.</li>
2844+ <li><span class="pre">mem</span>: The minimum memory for the machine, defaulting to 512MB; any real number &gt;= 0, and optionally suffixed with M, G or T is valid.</li>
2845+ <li><span class="pre">arch</span>: The machine's processor architecture, defaulting to &quot;amd64&quot;. Valid values are &quot;i386&quot;, &quot;amd64&quot;, and &quot;arm&quot;.</li>
2846+
2847+ </ul>
2848+
2849+ <p>The currently available MAAS constraint is:</p>
2850+
2851+ <ul>
2852+ <li><span class="pre">maas-name</span>: The MAAS name to which each unit must be deployed. This is philosophically problematic, on the basis that teaching users that it's OK to specify single machines will lead them to pain when they attempt to scale out large deployments; but it's justified on the basis that MAAS itself needs to act as a stepping stone between the &quot;metal&quot; and &quot;cloud&quot; mindsets. <span class="pre">maas-name</span> is unset by default, and should correspond to a name known by the MAAS provider.</li>
2853+ </ul>
2854+
2855+
2856+
2857+ <h1>Working with constraints</h1>
2858+ <p>Here follows a worked example of constraints usage. Assume an Amazon ec2 provider throughout.</p>
2859+ <p>When bootstrapping an environment, you can set the constraints directly:</p>
2860+ <pre><code>juju bootstrap --constraints arch=i386</code></pre>
2861+
2862+ <p>The above command did two things:</p>
2863+
2864+ <ul>
2865+ <li><p class="first">Set the environment constraints to require machines with an i386 architecture, leaving the other defaults untouched; this is precisely equivalent to:</p>
2866+
2867+ <pre><code>juju bootstrap --constraints "arch=i386 cpu= mem= "</code></pre>
2868+
2869+ <p>...but rather more convenient to type.</p>
2870+ </li>
2871+ <li><p class="first">Started the bootstrap/master machine with the above constraints.</p>
2872+ </li>
2873+ </ul>
2874+
2875+ <p>Because the environment constraints were set, subsequent deployments will use the same values:</p>
2876+ <pre><code>juju deploy mysql</code></pre>
2877+
2878+ <p>...but other services can be started with their own constraints:</p>
2879+ <pre><code>juju deploy wordpress --constraints mem=1024</code></pre>
2880+
2881+ <p>Note that the <span class="pre">arch=i386</span> constraint is still inherited from the environment, and that this presents a potential problem:</p>
2882+ <pre><code>juju deploy minecraft --constraints instance-type=cc2.8xlarge</code></pre>
2883+
2884+ <p>The above command will still inherit the environment constraints, and will lead to an undeployable service (because cc2.8xlarge cannot run on i386). Running juju debug-log will expose the problem; you can fix it as follows:</p>
2885+ <pre><code>
2886+ juju remove-unit minecraft/0
2887+ juju terminate-machine 1
2888+ juju set-constraints --service minecraft arch=amd64 instance-type=cc2.8xlarge
2889+ juju add-unit minecraft
2890+ </code></pre>
2891+ <p>(You need to remove machine 1's assigned unit before you can terminate it; you need to explicitly terminate the machine to stop the provisioning agent from continuing to attempt to launch it; and you need to set the new service constraints before adding a new unit that will use those constraints.)</p>
2892+ <p>Work on the constraints feature is ongoing, and it will shortly become impossible to specify knowably inconsistent constraints; but it is in general impossible to detect undeployable constraints with absolute certainty (for example, you could deploy with <span class="pre">ec2-zone=a</span> and be running perfectly happily, but see us-east-1a suddenly go down just as you add a unit).</p>
2893+ <h1>Distinctions Between Entities</h1>
2894+ <p>As noted, it is impossible to directly set constraints on machines or service units; however, it is still possible to call <span class="pre">juju get-constraints</span> on those entities. In either case, the constraints are a snapshot of the applicable constraints at entity creation time; so the unit constraints are the combined environment/service constraints from the time at which the unit was created, and the machine constraints are a copy of the unit constraints at that same point in time.</p>
2895+ <p>Storing this data allows us to automatically reprovision unexpectedly dead machines (for example, if you terminate machine 7 via the AWS management console, the provisioning agent will spin up a new instance with the same constraints and redeploy the assigned units); and making the data available via the CLI gives you visibility into the state of your deployment, and allows you to answer questions like &quot;why is this unit running on that machine?&quot;.</p>
2896+ <h1>Legacy Deployments</h1>
2897+ <p>Attempting to use constraints against a deployment that predates their inclusion in juju will not work, because the running legacy code (specifically, the provisioning agent) will not be able to interpret them. Therefore, attempts to specify constraints against legacy deployments will generate errors to inform users of their invalidity; at the agent level they are simply ignored.</p>
2898+ <p>All commands valid before the client upgrade should continue to work as before, as will the EC2 <span class="pre">default-image-id</span> and <span class="pre">default-instance-type</span> environment settings.</p>
2899+ </article>
2900+ </div>
2901+ </div>
2902+ </section>
2903+ <div class="shadow"></div>
2904+ <footer>
2905+ <div>
2906+ <nav role="navigation" class="clearfix">
2907+ <ul>
2908+ <li><a href="https://juju.ubuntu.com/get-started">Get started</a></li>
2909+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/local/">Local</a></li>
2910+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/amazon/">Amazon Web Services</a></li>
2911+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/hp-cloud/">HP Cloud</a></li>
2912+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/rackspace/">Rackspace</a></li>
2913+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/openstack/">Openstack</a></li>
2914+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/maas/">MAAS</a></li>
2915+ </ul>
2916+ <ul>
2917+ <li><a href="https://juju.ubuntu.com/resources">Resources</a></li>
2918+ <li><a href="https://juju.ubuntu.com/docs">Documentation</a></li>
2919+ <li><a href="https://juju.ubuntu.com/resources/videos">Videos</a></li>
2920+ <li><a href="http://uistage.jujucharms.com:8080/">Juju GUI Demo</a></li>
2921+ </ul>
2922+ <ul>
2923+ <li><a href="https://juju.ubuntu.com/community">Community</a></li>
2924+ <li class="page_item"><a href="https://juju.ubuntu.com/community/juju-blog/">Blog</a></li>
2925+ <li class="page_item"><a href="https://juju.ubuntu.com/community/weekly-charm-meeting/">Charm Meetings</a></li>
2926+ <li class="page_item"><a href="https://juju.ubuntu.com/community/charmers/">Charmers</a></li>
2927+ <li class="page_item"><a href="https://lists.ubuntu.com/mailman/listinfo/juju">Mailing List</a></li>
2928+ <li class="page_item"><a href="http://webchat.freenode.net/?channels=juju">Chat</a></li>
2929+ <li class="page_item"><a href="http://askubuntu.com/questions/tagged/juju?sort=faq&amp;amp;pagesize=50">FAQ</a></li>
2930+ </ul>
2931+ <ul class="last">
2932+ <li><a href="https://launchpad.net/juju">Code</a></li>
2933+ <li><a href="https://launchpad.net/juju-core">Juju Core</a></li>
2934+ <li><a href="https://launchpad.net/charms">Charms</a></li>
2935+ </ul>
2936+ </nav>
2937+ </div>
2938+ </footer>
2939+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
2940+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.14/jquery-ui.min.js"></script>
2941+ <script type="text/javascript" src="js/main.js"></script>
2942+ </body>
2943+</html>
2944\ No newline at end of file
2945
2946=== added file 'htmldocs/charms-deploying.html'
2947--- htmldocs/charms-deploying.html 1970-01-01 00:00:00 +0000
2948+++ htmldocs/charms-deploying.html 2013-06-27 17:35:30 +0000
2949@@ -0,0 +1,189 @@
2950+<!DOCTYPE html>
2951+<html>
2952+ <head>
2953+ <meta charset="utf-8">
2954+ <title>Juju Documentation - Deploying charms</title>
2955+ <link href="//fonts.googleapis.com/css?family=Ubuntu:400,400italic" rel="stylesheet" type="text/css"/>
2956+ <link href="//fonts.googleapis.com/css?family=Ubuntu+Mono:400" rel="stylesheet" type="text/css"/>
2957+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/reset.css" rel="stylesheet" type="text/css"/>
2958+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/960.css" rel="stylesheet" type="text/css"/>
2959+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/base.css" rel="stylesheet" type="text/css"/>
2960+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/resources.css" rel="stylesheet" type="text/css"/>
2961+ <link href="css/main.css" rel="stylesheet" type="text/css"/>
2962+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
2963+ <script src="http://app.stacktack.com/jquery.stacktack.min.js"></script>
2964+ <script type="text/javascript">
2965+ $(document).ready(function() {
2966+ $(document).stacktack();
2967+ });
2968+ </script><!--[if lt IE 9]>
2969+ <script type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
2970+ </head>
2971+ <body class="resources">
2972+ <header>
2973+ <div class="header-login">
2974+ <ul>
2975+ <li>&nbsp;</li>
2976+ </ul>
2977+ </div>
2978+ <div class="header-navigation">
2979+ <div>
2980+ <nav role="navigation">
2981+ <ul>
2982+ <li class="page_item"><a href="https://juju.ubuntu.com/">Home</a></li>
2983+ <li class="page_item current_page_item"><a href="https://juju.ubuntu.com/">Resources</a></li>
2984+ <li class="page_item"><a href="https://juju.ubuntu.com/">Community</a></li>
2985+ <li class="page_item"><a href="https://juju.ubuntu.com/">Charm Store</a></li>
2986+ <li class="page_item"><a href="https://juju.ubuntu.com/">Events</a></li>
2987+ <li class="page_item"><a href="https://juju.ubuntu.com/">Survey</a></li>
2988+ <li>
2989+ <form id="form-search" method="get" action="/">
2990+ <fieldset>
2991+ <input id="input-search" type="text" name="s" value="Search">
2992+ </fieldset>
2993+ </form>
2994+ </li>
2995+ </ul>
2996+ </nav><a href="https://juju.ubuntu.com/" class="logo-ubuntu"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/logo-ubuntu.png"></a>
2997+ </div>
2998+ </div>
2999+ <div class="header-content">
3000+ <div class="clearfix"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/arrow-nav.png" width="9" height="5" style="left:894px; display: block;" class="arrow-nav">
3001+ <div class="header-navigation-secondary"></div>
3002+ <div class="header-image"></div>
3003+ <h1>Resources</h1>
3004+ <h2>A collection of some of the most important online references for Juju users and developers.</h2>
3005+ </div>
3006+ </div>
3007+ </header>
3008+ <section id="content" class="container-12">
3009+ <div class="grid-12 doc-container">
3010+ <div class="grid-3 doc-navigation">
3011+ <nav role="navigation">
3012+ <h1>User Guide</h1>
3013+ <ul>
3014+ <li class=""><a href="getting-started.html">Getting Started</a></li>
3015+ <li class=" sub"><a href="getting-started.html#intro">Introduction</a></li>
3016+ <li class=" sub"><a href="getting-started.html#install">Installation</a></li>
3017+ <li class=" sub"><a href="config-aws.html">AWS Configuration</a></li>
3018+ <li class=" sub"><a href="config-hpcloud.html">HP Cloud Configuration</a></li>
3019+ <li class=" sub"><a href="">OpenStack Configuration</a></li>
3020+ <li class=" sub"><a href="config-maas.html">MAAS Configuration</a></li>
3021+ <li class=" sub"><a href="getting-started.html#test">Testing your setup</a></li>
3022+ <li class=""><a href="charms.html">Using Charms</a></li>
3023+ <li class=" sub"><a href="charms.html#intro">What are Charms?</a></li>
3024+ <li class=" sub"><a href="charms-deploying.html">Deploying Services</a></li>
3025+ <li class=" sub"><a href="charms-constraints.html">Using constraints</a></li>
3026+ <li class=" sub"><a href="charms-config.html">Service Configuration</a></li>
3027+ <li class=" sub"><a href="charms-relations.html">Service Relationships</a></li>
3028+ <li class=" sub"><a href="charms-exposing.html">Exposing Services</a></li>
3029+ <li class=" sub"><a href="charms-scaling.html">Scaling Services</a></li>
3030+ <li class=" sub"><a href="charms-destroy.html">Destroying Services</a></li>
3031+ </ul>
3032+ <h1>Charm Authors</h1>
3033+ <ul></ul>
3034+ <li class=""><a href="authors-charm-writing.html">Writing a charm</a></li>
3035+ <li class=" sub"><a href="authors-subordinate-services.html">Subordinate services</a></li>
3036+ <li class=" sub"><a href="authors-implicit-relations.html">Implicit Relations</a></li>
3037+ <li class=" sub"><a href="authors-testing.html">Charm Testing</a></li>
3038+ <li class=" sub"><a href="authors-hooks.html">Hook debugging</a></li>
3039+ <li class=""><a href="authors-charm-store.html">The Juju Charm Store</a></li>
3040+ <li class=" sub"><a href="authors-charm-policy.html">Charm store policy</a></li>
3041+ <li class=" sub"><a href="authors-charm-best-practice.html">Best practices</a></li>
3042+ <li class=" sub"><a href="authors-charm-quality.html">Charm Quality Rating</a></li>
3043+ <h1>Reference</h1>
3044+ <ul>
3045+ <li class="sub"><a href="commands.html">Juju commands</a></li>
3046+ <li class="sub"><a href="glossary.html">Glossary</a></li>
3047+ <li class="sub"><a href="contributing.html">Contribute to the Docs!</a></li>
3048+ </ul>
3049+ </nav>
3050+ </div>
3051+ <div class="grid-9 doc-content">
3052+ <article>
3053+ <section id="deploying">
3054+ <h1>Deploying Services</h1>
3055+ <p>The fundamental point of Juju is that you can use it to deploy serivces through the use of charms (the magic bits of code that make things just work). These charms can be fetched from the charm store, stored in a local repository, or if you are feeling clever, written by you. Just as there are different series of Ubuntu ('precise', 'raring', etc), so there needs to be different series of charms to take into account any subtle changes in the underlying OS. For the most part you can forget about this, as Juju will always try to apply the most relevant charm, so deploying can be straightforward and easy.</p>
3056+ <h1>Deploying from the Charm Store</h1>
3057+ <p>In most cases, you will want to deploy charms by fetching them directly from the charm store. This ensures that you get the relevant, up to date version of the charm and "everything just works". To deploy a charm like this you can just specify:</p>
3058+ <code><pre>juju deploy mysql</code></pre>
3059+ <p>Running this will do exactly what you expect - fetch the latest juju charm for the series you are running and then use the bootstrap environment to initiate a new instance and deploy MySQL</p>
3060+ <p>Juju usefully supports a system of namespaces that means you can actually deploy charms from a variety of sources. The default source is the charm store. The above command is the same as running:</p>
3061+ <pre><code>juju deploy cs:precise/mysql</code></pre>
3062+ <p>which follows the format:</p>
3063+ <pre><code>&LT;repository&GT;:&LT;series&GT;&LT;service&GT;</code></pre>
3064+
3065+ <h1>Deploying from a local repository</h1>
3066+ <p>There are many cases when you may wish to deploy charms from a local filesytem source rather than the charm store:</p>
3067+ <ul>
3068+ <li>When testing charms you have written.</li>
3069+ <li>When you have modified store charms for some reason.</li>
3070+ <li>When you don't have direct internet access.</li>
3071+ </ul>
3072+ <p>... and probably a lot more times which you can imagine yourselves.</p>
3073+ <p>Juju can be pointed at a local directory to source charms from using the <span class="pre">--repository=&LT;path/to/files&GT;</span> switch like this:</p>
3074+
3075+ <pre><code>juju deploy --repository=/usr/share/charms/ vsftpd</code></pre>
3076+ <p>You can also make use of standard filesystem shortcuts, so the following examples are also valid:</p>
3077+ <pre><code>juju deploy --repository=. haproxy</code></pre>
3078+ <pre><code>juju deploy --repository=~/charms/ wordpress</code></pre>
3079+ <p class="note"><strong>Note:</strong> Specifying a local repository makes juju look there <strong>first</strong>, but if the relevant charm is not found in that repository, it will fall back to fetching it from the charm store. If you wish to check where a charm was installed from, it is listed in the <span class="pre">juju status</span> output.</p>
3080+ <h1>Changing the defaults</h1>
3081+ <p>As we have seen, we can specify repositories to install from on the commandline. In fact, this only introduces another potential source and changes the searching order. To permanently change the defaults (e.g. if you would prefer to always deploy from a local service first), you can enter a list of repositories in your <span class="pre">environments.yaml</span> file:</p>
3082+ <pre><code>...
3083+ repositories:
3084+
3085+ - http://charms.ubuntu.com/collection/ubuntu
3086+ - http://charms.ubuntu.com/collection/openstack
3087+ - http://charms.ubuntu.com/people/miked
3088+ - /var/lib/charms
3089+ </code></pre>
3090+ <h1>A note about caching...</h1>
3091+ <p>After juju resolves a charm and its dependencies, it bundles them and deploys them to a machine provider charm cache/repository (e.g. ~/.juju/charmcache). This allows the same charm to be deployed to multiple machines repeatably and with minimal network transfers.</p>
3092+
3093+ </section>
3094+ </article>
3095+ </div>
3096+ </div>
3097+ </section>
3098+ <div class="shadow"></div>
3099+ <footer>
3100+ <div>
3101+ <nav role="navigation" class="clearfix">
3102+ <ul>
3103+ <li><a href="https://juju.ubuntu.com/get-started">Get started</a></li>
3104+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/local/">Local</a></li>
3105+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/amazon/">Amazon Web Services</a></li>
3106+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/hp-cloud/">HP Cloud</a></li>
3107+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/rackspace/">Rackspace</a></li>
3108+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/openstack/">Openstack</a></li>
3109+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/maas/">MAAS</a></li>
3110+ </ul>
3111+ <ul>
3112+ <li><a href="https://juju.ubuntu.com/resources">Resources</a></li>
3113+ <li><a href="https://juju.ubuntu.com/docs">Documentation</a></li>
3114+ <li><a href="https://juju.ubuntu.com/resources/videos">Videos</a></li>
3115+ <li><a href="http://uistage.jujucharms.com:8080/">Juju GUI Demo</a></li>
3116+ </ul>
3117+ <ul>
3118+ <li><a href="https://juju.ubuntu.com/community">Community</a></li>
3119+ <li class="page_item"><a href="https://juju.ubuntu.com/community/juju-blog/">Blog</a></li>
3120+ <li class="page_item"><a href="https://juju.ubuntu.com/community/weekly-charm-meeting/">Charm Meetings</a></li>
3121+ <li class="page_item"><a href="https://juju.ubuntu.com/community/charmers/">Charmers</a></li>
3122+ <li class="page_item"><a href="https://lists.ubuntu.com/mailman/listinfo/juju">Mailing List</a></li>
3123+ <li class="page_item"><a href="http://webchat.freenode.net/?channels=juju">Chat</a></li>
3124+ <li class="page_item"><a href="http://askubuntu.com/questions/tagged/juju?sort=faq&amp;amp;pagesize=50">FAQ</a></li>
3125+ </ul>
3126+ <ul class="last">
3127+ <li><a href="https://launchpad.net/juju">Code</a></li>
3128+ <li><a href="https://launchpad.net/juju-core">Juju Core</a></li>
3129+ <li><a href="https://launchpad.net/charms">Charms</a></li>
3130+ </ul>
3131+ </nav>
3132+ </div>
3133+ </footer>
3134+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
3135+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.14/jquery-ui.min.js"></script>
3136+ <script type="text/javascript" src="js/main.js"></script>
3137+ </body>
3138+</html>
3139\ No newline at end of file
3140
3141=== added file 'htmldocs/charms-destroy.html'
3142--- htmldocs/charms-destroy.html 1970-01-01 00:00:00 +0000
3143+++ htmldocs/charms-destroy.html 2013-06-27 17:35:30 +0000
3144@@ -0,0 +1,189 @@
3145+<!DOCTYPE html>
3146+<html>
3147+ <head>
3148+ <meta charset="utf-8">
3149+ <title>Juju Documentation - Destroying Services</title>
3150+ <link href="//fonts.googleapis.com/css?family=Ubuntu:400,400italic" rel="stylesheet" type="text/css"/>
3151+ <link href="//fonts.googleapis.com/css?family=Ubuntu+Mono:400" rel="stylesheet" type="text/css"/>
3152+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/reset.css" rel="stylesheet" type="text/css"/>
3153+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/960.css" rel="stylesheet" type="text/css"/>
3154+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/base.css" rel="stylesheet" type="text/css"/>
3155+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/resources.css" rel="stylesheet" type="text/css"/>
3156+ <link href="css/main.css" rel="stylesheet" type="text/css"/>
3157+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
3158+ <script src="http://app.stacktack.com/jquery.stacktack.min.js"></script>
3159+ <script type="text/javascript">
3160+ $(document).ready(function() {
3161+ $(document).stacktack();
3162+ });
3163+ </script><!--[if lt IE 9]>
3164+ <script type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
3165+ </head>
3166+ <body class="resources">
3167+ <header>
3168+ <div class="header-login">
3169+ <ul>
3170+ <li>&nbsp;</li>
3171+ </ul>
3172+ </div>
3173+ <div class="header-navigation">
3174+ <div>
3175+ <nav role="navigation">
3176+ <ul>
3177+ <li class="page_item"><a href="https://juju.ubuntu.com/">Home</a></li>
3178+ <li class="page_item current_page_item"><a href="https://juju.ubuntu.com/">Resources</a></li>
3179+ <li class="page_item"><a href="https://juju.ubuntu.com/">Community</a></li>
3180+ <li class="page_item"><a href="https://juju.ubuntu.com/">Charm Store</a></li>
3181+ <li class="page_item"><a href="https://juju.ubuntu.com/">Events</a></li>
3182+ <li class="page_item"><a href="https://juju.ubuntu.com/">Survey</a></li>
3183+ <li>
3184+ <form id="form-search" method="get" action="/">
3185+ <fieldset>
3186+ <input id="input-search" type="text" name="s" value="Search">
3187+ </fieldset>
3188+ </form>
3189+ </li>
3190+ </ul>
3191+ </nav><a href="https://juju.ubuntu.com/" class="logo-ubuntu"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/logo-ubuntu.png"></a>
3192+ </div>
3193+ </div>
3194+ <div class="header-content">
3195+ <div class="clearfix"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/arrow-nav.png" width="9" height="5" style="left:894px; display: block;" class="arrow-nav">
3196+ <div class="header-navigation-secondary"></div>
3197+ <div class="header-image"></div>
3198+ <h1>Resources</h1>
3199+ <h2>A collection of some of the most important online references for Juju users and developers.</h2>
3200+ </div>
3201+ </div>
3202+ </header>
3203+ <section id="content" class="container-12">
3204+ <div class="grid-12 doc-container">
3205+ <div class="grid-3 doc-navigation">
3206+ <nav role="navigation">
3207+ <h1>User Guide</h1>
3208+ <ul>
3209+ <li class=""><a href="getting-started.html">Getting Started</a></li>
3210+ <li class=" sub"><a href="getting-started.html#intro">Introduction</a></li>
3211+ <li class=" sub"><a href="getting-started.html#install">Installation</a></li>
3212+ <li class=" sub"><a href="config-aws.html">AWS Configuration</a></li>
3213+ <li class=" sub"><a href="config-hpcloud.html">HP Cloud Configuration</a></li>
3214+ <li class=" sub"><a href="">OpenStack Configuration</a></li>
3215+ <li class=" sub"><a href="config-maas.html">MAAS Configuration</a></li>
3216+ <li class=" sub"><a href="getting-started.html#test">Testing your setup</a></li>
3217+ <li class=""><a href="charms.html">Using Charms</a></li>
3218+ <li class=" sub"><a href="charms.html#intro">What are Charms?</a></li>
3219+ <li class=" sub"><a href="charms-deploying.html">Deploying Services</a></li>
3220+ <li class=" sub"><a href="charms-constraints.html">Using constraints</a></li>
3221+ <li class=" sub"><a href="charms-config.html">Service Configuration</a></li>
3222+ <li class=" sub"><a href="charms-relations.html">Service Relationships</a></li>
3223+ <li class=" sub"><a href="charms-exposing.html">Exposing Services</a></li>
3224+ <li class=" sub"><a href="charms-scaling.html">Scaling Services</a></li>
3225+ <li class=" sub"><a href="charms-destroy.html">Destroying Services</a></li>
3226+ </ul>
3227+ <h1>Charm Authors</h1>
3228+ <ul></ul>
3229+ <li class=""><a href="authors-charm-writing.html">Writing a charm</a></li>
3230+ <li class=" sub"><a href="authors-subordinate-services.html">Subordinate services</a></li>
3231+ <li class=" sub"><a href="authors-implicit-relations.html">Implicit Relations</a></li>
3232+ <li class=" sub"><a href="authors-testing.html">Charm Testing</a></li>
3233+ <li class=" sub"><a href="authors-hooks.html">Hook debugging</a></li>
3234+ <li class=""><a href="authors-charm-store.html">The Juju Charm Store</a></li>
3235+ <li class=" sub"><a href="authors-charm-policy.html">Charm store policy</a></li>
3236+ <li class=" sub"><a href="authors-charm-best-practice.html">Best practices</a></li>
3237+ <li class=" sub"><a href="authors-charm-quality.html">Charm Quality Rating</a></li>
3238+ <h1>Reference</h1>
3239+ <ul>
3240+ <li class="sub"><a href="commands.html">Juju commands</a></li>
3241+ <li class="sub"><a href="glossary.html">Glossary</a></li>
3242+ <li class="sub"><a href="contributing.html">Contribute to the Docs!</a></li>
3243+ </ul>
3244+ </nav>
3245+ </div>
3246+ <div class="grid-9 doc-content">
3247+ <article>
3248+ <section id ="charms-destroy">
3249+
3250+ <h1>Destroy Stuff</h1>
3251+ <p>Juju isn't just about magically spinning up services as and when you need them, it is also about quickly, sanely and efficiently destroying everything when you no longer need it. This section deals with the sort of things you can ruthlessly destroy, and how to go about it.</p>
3252+
3253+ <h1>Destroying/Removing Services</h1>
3254+ <p>Once a service is no longer required it can be removed with a simple command.</p>
3255+ <pre><code>juju destroy-service &LT;service-name&GT;</code></pre>
3256+ <p>Before you take this step though, it is important to remove any relationships so that it can be removed cleanly, otherwise an error state may exist elsewhere.</p>
3257+ <p>A service can take a while to "die", but if running a juju status reveals that the service is listed as dying, but also reports an error state, then the zombied service will still be hanging around. See <a href="troubleshooting.html#die">"Why won't it just die?" in the troubleshooting section.</a>
3258+
3259+ <p class="warning"><strong>Warning!:</strong>Destroying a service which has active relations with another running service can cause errors in both services. You should destroy any relationships first if possible. </p>
3260+
3261+ <p class="note"><strong>Note:</strong> Destroying a service removes that service, but not any nodes which may have been created for it to run on.</p>
3262+
3263+ <h1>Destroying/Removing Units</h1>
3264+ <p>It is also possible to spin down individual units, or a sequence of units running a service:</p>
3265+ <pre><code>juju remove-unit mediawiki/1</code></pre>
3266+ <p>The 'remove-unit' command is an alias for 'destroy-unit', and can be used interchangeably, so the above is identical to:</p>
3267+ <pre><code>juju destroy-unit mediawiki/1</code></pre>
3268+ <p>If you wish to remove more than one unit, you may list them all following the command:</p>
3269+ <pre><code>juju remove-unit mediawiki/1 mediawiki/2 mediawiki/3 mysql/2 ...</code></pre>
3270+ <p class="note"><strong>Note:</strong> As with destroying a service, removing units will NOT actually remove any instances which were created, it only removes the service unitsm.</p>
3271+
3272+ <h1>Destroying/Removing machines</h1>
3273+ <p>Instances or machines which have no currently assigned workload can be removed from your cloud using the following command:
3274+ <pre><code>juju destory-machine &LT;number&GT;</code></pre>
3275+ <p>A machine which currently idle will be removed almost instantaneously from the cloud, along with anything else which may have been on the instance which juju was not aware of. To prevent accidents and awkward moments with running services, it is not possible to remove an instance which is currently allocated to a service. If you try to do so, you will get a polite error message in the form:</p>
3276+ <pre><code>error: no machines were destroyed: machine 3 has unit "mysql/0" assigned</code></pre>
3277+
3278+ <h1>Destroying Environments</h1>
3279+ <p>To completely remove and terminate all running services, the instances they were running on and the bootstrap node itself, simply run the command:</p>
3280+ <pre><code>juju destroy-environment </code></pre>
3281+ <p> This will completely remove all instances running under the current environment profile. You can of course specify a different environment profile using the -e switch:</p>
3282+ <pre><code>juju destroy-environment -e mycloud </code></pre>
3283+ <p>You should be pretty sure that this is what you want to do, as there is no undo command! Everything in the selected environment will be removed.</p>
3284+
3285+ <h1>Destroying Relations</h1>
3286+ <p>To remove relations between deployed services, you should see <a href="charms-relations.html#removing"> the docs section on charm relationships</a></p>.
3287+ </section>
3288+
3289+ </article>
3290+ </div>
3291+ </div>
3292+ </section>
3293+ <div class="shadow"></div>
3294+ <footer>
3295+ <div>
3296+ <nav role="navigation" class="clearfix">
3297+ <ul>
3298+ <li><a href="https://juju.ubuntu.com/get-started">Get started</a></li>
3299+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/local/">Local</a></li>
3300+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/amazon/">Amazon Web Services</a></li>
3301+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/hp-cloud/">HP Cloud</a></li>
3302+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/rackspace/">Rackspace</a></li>
3303+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/openstack/">Openstack</a></li>
3304+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/maas/">MAAS</a></li>
3305+ </ul>
3306+ <ul>
3307+ <li><a href="https://juju.ubuntu.com/resources">Resources</a></li>
3308+ <li><a href="https://juju.ubuntu.com/docs">Documentation</a></li>
3309+ <li><a href="https://juju.ubuntu.com/resources/videos">Videos</a></li>
3310+ <li><a href="http://uistage.jujucharms.com:8080/">Juju GUI Demo</a></li>
3311+ </ul>
3312+ <ul>
3313+ <li><a href="https://juju.ubuntu.com/community">Community</a></li>
3314+ <li class="page_item"><a href="https://juju.ubuntu.com/community/juju-blog/">Blog</a></li>
3315+ <li class="page_item"><a href="https://juju.ubuntu.com/community/weekly-charm-meeting/">Charm Meetings</a></li>
3316+ <li class="page_item"><a href="https://juju.ubuntu.com/community/charmers/">Charmers</a></li>
3317+ <li class="page_item"><a href="https://lists.ubuntu.com/mailman/listinfo/juju">Mailing List</a></li>
3318+ <li class="page_item"><a href="http://webchat.freenode.net/?channels=juju">Chat</a></li>
3319+ <li class="page_item"><a href="http://askubuntu.com/questions/tagged/juju?sort=faq&amp;amp;pagesize=50">FAQ</a></li>
3320+ </ul>
3321+ <ul class="last">
3322+ <li><a href="https://launchpad.net/juju">Code</a></li>
3323+ <li><a href="https://launchpad.net/juju-core">Juju Core</a></li>
3324+ <li><a href="https://launchpad.net/charms">Charms</a></li>
3325+ </ul>
3326+ </nav>
3327+ </div>
3328+ </footer>
3329+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
3330+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.14/jquery-ui.min.js"></script>
3331+ <script type="text/javascript" src="js/main.js"></script>
3332+ </body>
3333+</html>
3334\ No newline at end of file
3335
3336=== added file 'htmldocs/charms-exposing.html'
3337--- htmldocs/charms-exposing.html 1970-01-01 00:00:00 +0000
3338+++ htmldocs/charms-exposing.html 2013-06-27 17:35:30 +0000
3339@@ -0,0 +1,179 @@
3340+<!DOCTYPE html>
3341+<html>
3342+ <head>
3343+ <meta charset="utf-8">
3344+ <title>Juju Documentation - Exposing Charms</title>
3345+ <link href="//fonts.googleapis.com/css?family=Ubuntu:400,400italic" rel="stylesheet" type="text/css"/>
3346+ <link href="//fonts.googleapis.com/css?family=Ubuntu+Mono:400" rel="stylesheet" type="text/css"/>
3347+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/reset.css" rel="stylesheet" type="text/css"/>
3348+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/960.css" rel="stylesheet" type="text/css"/>
3349+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/base.css" rel="stylesheet" type="text/css"/>
3350+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/resources.css" rel="stylesheet" type="text/css"/>
3351+ <link href="css/main.css" rel="stylesheet" type="text/css"/>
3352+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
3353+ <script src="http://app.stacktack.com/jquery.stacktack.min.js"></script>
3354+ <script type="text/javascript">
3355+ $(document).ready(function() {
3356+ $(document).stacktack();
3357+ });
3358+ </script><!--[if lt IE 9]>
3359+ <script type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
3360+ </head>
3361+ <body class="resources">
3362+ <header>
3363+ <div class="header-login">
3364+ <ul>
3365+ <li>&nbsp;</li>
3366+ </ul>
3367+ </div>
3368+ <div class="header-navigation">
3369+ <div>
3370+ <nav role="navigation">
3371+ <ul>
3372+ <li class="page_item"><a href="https://juju.ubuntu.com/">Home</a></li>
3373+ <li class="page_item current_page_item"><a href="https://juju.ubuntu.com/">Resources</a></li>
3374+ <li class="page_item"><a href="https://juju.ubuntu.com/">Community</a></li>
3375+ <li class="page_item"><a href="https://juju.ubuntu.com/">Charm Store</a></li>
3376+ <li class="page_item"><a href="https://juju.ubuntu.com/">Events</a></li>
3377+ <li class="page_item"><a href="https://juju.ubuntu.com/">Survey</a></li>
3378+ <li>
3379+ <form id="form-search" method="get" action="/">
3380+ <fieldset>
3381+ <input id="input-search" type="text" name="s" value="Search">
3382+ </fieldset>
3383+ </form>
3384+ </li>
3385+ </ul>
3386+ </nav><a href="https://juju.ubuntu.com/" class="logo-ubuntu"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/logo-ubuntu.png"></a>
3387+ </div>
3388+ </div>
3389+ <div class="header-content">
3390+ <div class="clearfix"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/arrow-nav.png" width="9" height="5" style="left:894px; display: block;" class="arrow-nav">
3391+ <div class="header-navigation-secondary"></div>
3392+ <div class="header-image"></div>
3393+ <h1>Resources</h1>
3394+ <h2>A collection of some of the most important online references for Juju users and developers.</h2>
3395+ </div>
3396+ </div>
3397+ </header>
3398+ <section id="content" class="container-12">
3399+ <div class="grid-12 doc-container">
3400+ <div class="grid-3 doc-navigation">
3401+ <nav role="navigation">
3402+ <h1>User Guide</h1>
3403+ <ul>
3404+ <li class=""><a href="getting-started.html">Getting Started</a></li>
3405+ <li class=" sub"><a href="getting-started.html#intro">Introduction</a></li>
3406+ <li class=" sub"><a href="getting-started.html#install">Installation</a></li>
3407+ <li class=" sub"><a href="config-aws.html">AWS Configuration</a></li>
3408+ <li class=" sub"><a href="config-hpcloud.html">HP Cloud Configuration</a></li>
3409+ <li class=" sub"><a href="">OpenStack Configuration</a></li>
3410+ <li class=" sub"><a href="config-maas.html">MAAS Configuration</a></li>
3411+ <li class=" sub"><a href="getting-started.html#test">Testing your setup</a></li>
3412+ <li class=""><a href="charms.html">Using Charms</a></li>
3413+ <li class=" sub"><a href="charms.html#intro">What are Charms?</a></li>
3414+ <li class=" sub"><a href="charms-deploying.html">Deploying Services</a></li>
3415+ <li class=" sub"><a href="charms-constraints.html">Using constraints</a></li>
3416+ <li class=" sub"><a href="charms-config.html">Service Configuration</a></li>
3417+ <li class=" sub"><a href="charms-relations.html">Service Relationships</a></li>
3418+ <li class=" sub"><a href="charms-exposing.html">Exposing Services</a></li>
3419+ <li class=" sub"><a href="charms-scaling.html">Scaling Services</a></li>
3420+ <li class=" sub"><a href="charms-destroy.html">Destroying Services</a></li>
3421+ </ul>
3422+ <h1>Charm Authors</h1>
3423+ <ul></ul>
3424+ <li class=""><a href="authors-charm-writing.html">Writing a charm</a></li>
3425+ <li class=" sub"><a href="authors-subordinate-services.html">Subordinate services</a></li>
3426+ <li class=" sub"><a href="authors-implicit-relations.html">Implicit Relations</a></li>
3427+ <li class=" sub"><a href="authors-testing.html">Charm Testing</a></li>
3428+ <li class=" sub"><a href="authors-hooks.html">Hook debugging</a></li>
3429+ <li class=""><a href="authors-charm-store.html">The Juju Charm Store</a></li>
3430+ <li class=" sub"><a href="authors-charm-policy.html">Charm store policy</a></li>
3431+ <li class=" sub"><a href="authors-charm-best-practice.html">Best practices</a></li>
3432+ <li class=" sub"><a href="authors-charm-quality.html">Charm Quality Rating</a></li>
3433+ <h1>Reference</h1>
3434+ <ul>
3435+ <li class="sub"><a href="commands.html">Juju commands</a></li>
3436+ <li class="sub"><a href="glossary.html">Glossary</a></li>
3437+ <li class="sub"><a href="contributing.html">Contribute to the Docs!</a></li>
3438+ </ul>
3439+ </nav>
3440+ </div>
3441+ <div class="grid-9 doc-content">
3442+ <article>
3443+ <section id ="exposing">
3444+ <h1>Exposing Services</h1>
3445+ <p>By design, Juju operates a very secure environment for deploying your services. Even if you have deployed services, they won't be publically available unless you explicitly make them so. To allow public access to services, the appropriate changes must be made to the cloud provider firewall settings. As the procedure or doing this varies depending on the provider, Juju helpfully abtracts this into a single command, <span class="pre">juju expose &LT;servicename&GT;</p>
3446+ <p>For example, you may have deployed a WordPress service using the relevant charm. Once deployed, the service still cannot be accessed by the public, so you would run:<p>
3447+ <pre><code>juju expose wordpress</code></pre>
3448+ <p>Juju will then take the steps necessary to adjust firewall rules and any other settings to expose the service via it's given address. This process may take anything from a few moments to several minutes. You can check on the current status of your services by running:</p>
3449+ <pre><code>juju status</code></pre>
3450+ <p>This will return a status report like this:</p>
3451+ <pre><code>...
3452+ &nbsp;services:
3453+ &nbsp;&nbsp;wordpress:
3454+ &nbsp;&nbsp;&nbsp;&nbsp;exposed: true
3455+ &nbsp;&nbsp;&nbsp;&nbsp;charm: local:precise/wordpress-42
3456+ &nbsp;&nbsp;&nbsp;&nbsp;relations: {db: mysql}
3457+ &nbsp;&nbsp;units:
3458+ &nbsp;&nbsp;&nbsp;&nbsp;wordpress/0:
3459+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;machine: 2
3460+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;open-ports: [80/tcp]
3461+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;relations:
3462+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;db: {state: up}
3463+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;state: started
3464+ ...
3465+ </code></pre>
3466+ <p>As you can see here, the <strong>exposed:</strong> status is listed as true, and the service is running and available to users.</p>
3467+ <p class="note"><strong>Note:</strong> Exposing the service does not change any DNS or other settings which may be neccessary to get your service running as you expect.</p>
3468+ <h1>Unexposing a service</h1>
3469+ <p>To return the firewall settings and make a service non-public again, you simly need to run the <span class="pre">juju unexpose</span> command. For example:</p>
3470+ <pre><code>juju unexpose wordpress</code></pre>
3471+
3472+
3473+ </section>
3474+ </article>
3475+ </div>
3476+ </div>
3477+ </section>
3478+ <div class="shadow"></div>
3479+ <footer>
3480+ <div>
3481+ <nav role="navigation" class="clearfix">
3482+ <ul>
3483+ <li><a href="https://juju.ubuntu.com/get-started">Get started</a></li>
3484+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/local/">Local</a></li>
3485+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/amazon/">Amazon Web Services</a></li>
3486+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/hp-cloud/">HP Cloud</a></li>
3487+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/rackspace/">Rackspace</a></li>
3488+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/openstack/">Openstack</a></li>
3489+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/maas/">MAAS</a></li>
3490+ </ul>
3491+ <ul>
3492+ <li><a href="https://juju.ubuntu.com/resources">Resources</a></li>
3493+ <li><a href="https://juju.ubuntu.com/docs">Documentation</a></li>
3494+ <li><a href="https://juju.ubuntu.com/resources/videos">Videos</a></li>
3495+ <li><a href="http://uistage.jujucharms.com:8080/">Juju GUI Demo</a></li>
3496+ </ul>
3497+ <ul>
3498+ <li><a href="https://juju.ubuntu.com/community">Community</a></li>
3499+ <li class="page_item"><a href="https://juju.ubuntu.com/community/juju-blog/">Blog</a></li>
3500+ <li class="page_item"><a href="https://juju.ubuntu.com/community/weekly-charm-meeting/">Charm Meetings</a></li>
3501+ <li class="page_item"><a href="https://juju.ubuntu.com/community/charmers/">Charmers</a></li>
3502+ <li class="page_item"><a href="https://lists.ubuntu.com/mailman/listinfo/juju">Mailing List</a></li>
3503+ <li class="page_item"><a href="http://webchat.freenode.net/?channels=juju">Chat</a></li>
3504+ <li class="page_item"><a href="http://askubuntu.com/questions/tagged/juju?sort=faq&amp;amp;pagesize=50">FAQ</a></li>
3505+ </ul>
3506+ <ul class="last">
3507+ <li><a href="https://launchpad.net/juju">Code</a></li>
3508+ <li><a href="https://launchpad.net/juju-core">Juju Core</a></li>
3509+ <li><a href="https://launchpad.net/charms">Charms</a></li>
3510+ </ul>
3511+ </nav>
3512+ </div>
3513+ </footer>
3514+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
3515+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.14/jquery-ui.min.js"></script>
3516+ <script type="text/javascript" src="js/main.js"></script>
3517+ </body>
3518+</html>
3519\ No newline at end of file
3520
3521=== added file 'htmldocs/charms-relations.html'
3522--- htmldocs/charms-relations.html 1970-01-01 00:00:00 +0000
3523+++ htmldocs/charms-relations.html 2013-06-27 17:35:30 +0000
3524@@ -0,0 +1,222 @@
3525+<!DOCTYPE html>
3526+<html>
3527+ <head>
3528+ <meta charset="utf-8">
3529+ <title>Juju Documentation - Relations</title>
3530+ <link href="//fonts.googleapis.com/css?family=Ubuntu:400,400italic" rel="stylesheet" type="text/css"/>
3531+ <link href="//fonts.googleapis.com/css?family=Ubuntu+Mono:400" rel="stylesheet" type="text/css"/>
3532+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/reset.css" rel="stylesheet" type="text/css"/>
3533+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/960.css" rel="stylesheet" type="text/css"/>
3534+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/base.css" rel="stylesheet" type="text/css"/>
3535+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/resources.css" rel="stylesheet" type="text/css"/>
3536+ <link href="css/main.css" rel="stylesheet" type="text/css"/>
3537+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
3538+ <script src="http://app.stacktack.com/jquery.stacktack.min.js"></script>
3539+ <script type="text/javascript">
3540+ $(document).ready(function() {
3541+ $(document).stacktack();
3542+ });
3543+ </script><!--[if lt IE 9]>
3544+ <script type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
3545+ </head>
3546+ <body class="resources">
3547+ <header>
3548+ <div class="header-login">
3549+ <ul>
3550+ <li>&nbsp;</li>
3551+ </ul>
3552+ </div>
3553+ <div class="header-navigation">
3554+ <div>
3555+ <nav role="navigation">
3556+ <ul>
3557+ <li class="page_item"><a href="https://juju.ubuntu.com/">Home</a></li>
3558+ <li class="page_item current_page_item"><a href="https://juju.ubuntu.com/">Resources</a></li>
3559+ <li class="page_item"><a href="https://juju.ubuntu.com/">Community</a></li>
3560+ <li class="page_item"><a href="https://juju.ubuntu.com/">Charm Store</a></li>
3561+ <li class="page_item"><a href="https://juju.ubuntu.com/">Events</a></li>
3562+ <li class="page_item"><a href="https://juju.ubuntu.com/">Survey</a></li>
3563+ <li>
3564+ <form id="form-search" method="get" action="/">
3565+ <fieldset>
3566+ <input id="input-search" type="text" name="s" value="Search">
3567+ </fieldset>
3568+ </form>
3569+ </li>
3570+ </ul>
3571+ </nav><a href="https://juju.ubuntu.com/" class="logo-ubuntu"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/logo-ubuntu.png"></a>
3572+ </div>
3573+ </div>
3574+ <div class="header-content">
3575+ <div class="clearfix"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/arrow-nav.png" width="9" height="5" style="left:894px; display: block;" class="arrow-nav">
3576+ <div class="header-navigation-secondary"></div>
3577+ <div class="header-image"></div>
3578+ <h1>Resources</h1>
3579+ <h2>A collection of some of the most important online references for Juju users and developers.</h2>
3580+ </div>
3581+ </div>
3582+ </header>
3583+ <section id="content" class="container-12">
3584+ <div class="grid-12 doc-container">
3585+ <div class="grid-3 doc-navigation">
3586+ <nav role="navigation">
3587+ <h1>User Guide</h1>
3588+ <ul>
3589+ <li class=""><a href="getting-started.html">Getting Started</a></li>
3590+ <li class=" sub"><a href="getting-started.html#intro">Introduction</a></li>
3591+ <li class=" sub"><a href="getting-started.html#install">Installation</a></li>
3592+ <li class=" sub"><a href="config-aws.html">AWS Configuration</a></li>
3593+ <li class=" sub"><a href="config-hpcloud.html">HP Cloud Configuration</a></li>
3594+ <li class=" sub"><a href="">OpenStack Configuration</a></li>
3595+ <li class=" sub"><a href="config-maas.html">MAAS Configuration</a></li>
3596+ <li class=" sub"><a href="getting-started.html#test">Testing your setup</a></li>
3597+ <li class=""><a href="charms.html">Using Charms</a></li>
3598+ <li class=" sub"><a href="charms.html#intro">What are Charms?</a></li>
3599+ <li class=" sub"><a href="charms-deploying.html">Deploying Services</a></li>
3600+ <li class=" sub"><a href="charms-constraints.html">Using constraints</a></li>
3601+ <li class=" sub"><a href="charms-config.html">Service Configuration</a></li>
3602+ <li class=" sub"><a href="charms-relations.html">Service Relationships</a></li>
3603+ <li class=" sub"><a href="charms-exposing.html">Exposing Services</a></li>
3604+ <li class=" sub"><a href="charms-scaling.html">Scaling Services</a></li>
3605+ <li class=" sub"><a href="charms-destroy.html">Destroying Services</a></li>
3606+ </ul>
3607+ <h1>Charm Authors</h1>
3608+ <ul></ul>
3609+ <li class=""><a href="authors-charm-writing.html">Writing a charm</a></li>
3610+ <li class=" sub"><a href="authors-subordinate-services.html">Subordinate services</a></li>
3611+ <li class=" sub"><a href="authors-implicit-relations.html">Implicit Relations</a></li>
3612+ <li class=" sub"><a href="authors-testing.html">Charm Testing</a></li>
3613+ <li class=" sub"><a href="authors-hooks.html">Hook debugging</a></li>
3614+ <li class=""><a href="authors-charm-store.html">The Juju Charm Store</a></li>
3615+ <li class=" sub"><a href="authors-charm-policy.html">Charm store policy</a></li>
3616+ <li class=" sub"><a href="authors-charm-best-practice.html">Best practices</a></li>
3617+ <li class=" sub"><a href="authors-charm-quality.html">Charm Quality Rating</a></li>
3618+ <h1>Reference</h1>
3619+ <ul>
3620+ <li class="sub"><a href="commands.html">Juju commands</a></li>
3621+ <li class="sub"><a href="glossary.html">Glossary</a></li>
3622+ <li class="sub"><a href="contributing.html">Contribute to the Docs!</a></li>
3623+ </ul>
3624+ </nav>
3625+ </div>
3626+ <div class="grid-9 doc-content">
3627+ <article>
3628+ <section id ="charms-relations">
3629+ <h1>Managing Relationships</h1>
3630+ <p>Few services you might want to run can do so completely independently - most of them rely on some other software components to be present and running too (e.g. a database). There would be little point in Juju making it supremely easy to deploy services if it didn't also make it easy to connect them up to services they need to get running! The Juju magic in this case involves the <strong>hooks</strong> built in to each charm which allow them to communicate. Unless you are writing charms, there is no need to go into detail on hooks, but these are the parts that make creating relationships between services so easy.</p>
3631+ <p>The charm for WordPress, for example, knows that it requires a database. It therefore has some code to deal with creating that connection and configuring the WordPress instance appropriately when it is told which database to connect to. Similarly, the MySQL charm knows that it is a database, and has code to create different types of database depending on what is required. The act of joining these services together causes this code to run, the WordPress charm saying what tables, users and data it requires, and the MySQL charm fulfilling that and acknowledging the task. As you will see though, adding a relationship is much easier than even this brief explanation.</p>
3632+ <h1>Creating Relations</h1>
3633+ <p>Creating relationships is usually very straightforward. Simply deploy the two services:</p>
3634+ <pre><code>juju deploy mediawiki
3635+ juju deploy mysql
3636+ </code></pre>
3637+ <p>Then you create the relationship by specifying these two services with the <strong>add-relation</strong> command:</p>
3638+ <code><pre>juju add-relation mysql wordpress</code></pre>
3639+ <p>These services will then communicate and establish an appropriate connection, in this case WordPress using the available MySQL service for its database requirement, and MySQL generating and providing the necessary tables required for WordPress.</p>
3640+ <p>In some cases, there may be ambiguity about how the services should connect. For example, in the case of specifying a database for the Mediawiki charm.</p>
3641+ <pre><code>juju add-relation mediawiki mysql -e hpc
3642+ error: ambiguous relation: "mediawiki mysql" could refer to "mediawiki:db mysql:db"; "mediawiki:slave mysql:db"
3643+ </code></pre>
3644+ <p> the soloution in these cases is to specify the nature of the relation using the hook identifier. In this case, we want MySQL to provide the backend database for mediawiki, so this is what we need to enter:</p>
3645+ <pre><code>juju add-relation mediawiki:db mysql</code></pre>
3646+ <p>we can check the output from 'juju status' to make sure the correct relationship has been established:</p>
3647+ <pre><code>juju status -e hpc
3648+machines:
3649+&nbsp;&nbsp;"0":
3650+&nbsp;&nbsp;&nbsp;&nbsp;agent-state: started
3651+&nbsp;&nbsp;&nbsp;&nbsp;agent-version: 1.10.0
3652+&nbsp;&nbsp;&nbsp;&nbsp;dns-name: 15.185.88.51
3653+&nbsp;&nbsp;&nbsp;&nbsp;instance-id: "1736045"
3654+&nbsp;&nbsp;&nbsp;&nbsp;series: precise
3655+&nbsp;&nbsp;"1":
3656+&nbsp;&nbsp;&nbsp;&nbsp;agent-state: started
3657+&nbsp;&nbsp;&nbsp;&nbsp;agent-version: 1.10.0
3658+&nbsp;&nbsp;&nbsp;&nbsp;dns-name: 15.185.89.204
3659+&nbsp;&nbsp;&nbsp;&nbsp;instance-id: "1736065"
3660+&nbsp;&nbsp;&nbsp;&nbsp;series: precise
3661+&nbsp;&nbsp;"3":
3662+&nbsp;&nbsp;&nbsp;&nbsp;agent-state: started
3663+&nbsp;&nbsp;&nbsp;&nbsp;agent-version: 1.10.0
3664+&nbsp;&nbsp;&nbsp;&nbsp;dns-name: 15.185.89.236
3665+&nbsp;&nbsp;&nbsp;&nbsp;instance-id: "1736119"
3666+&nbsp;&nbsp;&nbsp;&nbsp;series: precise
3667+services:
3668+&nbsp;&nbsp;mediawiki:
3669+&nbsp;&nbsp;&nbsp;&nbsp;charm: cs:precise/mediawiki-8
3670+&nbsp;&nbsp;&nbsp;&nbsp;exposed: false
3671+&nbsp;&nbsp;&nbsp;&nbsp;relations:
3672+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;db:
3673+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- mysql
3674+&nbsp;&nbsp;&nbsp;&nbsp;units:
3675+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mediawiki/0:
3676+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;agent-state: pending
3677+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;agent-version: 1.10.0
3678+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;machine: "3"
3679+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public-address: 15.185.89.236
3680+&nbsp;&nbsp;mysql:
3681+&nbsp;&nbsp;&nbsp;&nbsp;charm: cs:precise/mysql-24
3682+&nbsp;&nbsp;&nbsp;&nbsp;exposed: false
3683+&nbsp;&nbsp;&nbsp;&nbsp;relations:
3684+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cluster:
3685+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- mysql
3686+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;db:
3687+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- mediawiki
3688+&nbsp;&nbsp;&nbsp;&nbsp;units:
3689+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mysql/0:
3690+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;agent-state: started
3691+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;agent-version: 1.10.0
3692+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;machine: "1"
3693+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public-address: 15.185.89.204
3694+</code></pre>
3695+<h1>Removing Relations</h1>
3696+<p>There are times when a relationship just isn't working and it is time to move on. Fortunately, it is a simple single-line command to break off these relationships:</p>
3697+<pre><code>juju destroy-relation mediawiki mysql</code></pre>
3698+
3699+
3700+
3701+ </section>
3702+ </article>
3703+ </div>
3704+ </div>
3705+ </section>
3706+ <div class="shadow"></div>
3707+ <footer>
3708+ <div>
3709+ <nav role="navigation" class="clearfix">
3710+ <ul>
3711+ <li><a href="https://juju.ubuntu.com/get-started">Get started</a></li>
3712+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/local/">Local</a></li>
3713+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/amazon/">Amazon Web Services</a></li>
3714+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/hp-cloud/">HP Cloud</a></li>
3715+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/rackspace/">Rackspace</a></li>
3716+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/openstack/">Openstack</a></li>
3717+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/maas/">MAAS</a></li>
3718+ </ul>
3719+ <ul>
3720+ <li><a href="https://juju.ubuntu.com/resources">Resources</a></li>
3721+ <li><a href="https://juju.ubuntu.com/docs">Documentation</a></li>
3722+ <li><a href="https://juju.ubuntu.com/resources/videos">Videos</a></li>
3723+ <li><a href="http://uistage.jujucharms.com:8080/">Juju GUI Demo</a></li>
3724+ </ul>
3725+ <ul>
3726+ <li><a href="https://juju.ubuntu.com/community">Community</a></li>
3727+ <li class="page_item"><a href="https://juju.ubuntu.com/community/juju-blog/">Blog</a></li>
3728+ <li class="page_item"><a href="https://juju.ubuntu.com/community/weekly-charm-meeting/">Charm Meetings</a></li>
3729+ <li class="page_item"><a href="https://juju.ubuntu.com/community/charmers/">Charmers</a></li>
3730+ <li class="page_item"><a href="https://lists.ubuntu.com/mailman/listinfo/juju">Mailing List</a></li>
3731+ <li class="page_item"><a href="http://webchat.freenode.net/?channels=juju">Chat</a></li>
3732+ <li class="page_item"><a href="http://askubuntu.com/questions/tagged/juju?sort=faq&amp;amp;pagesize=50">FAQ</a></li>
3733+ </ul>
3734+ <ul class="last">
3735+ <li><a href="https://launchpad.net/juju">Code</a></li>
3736+ <li><a href="https://launchpad.net/juju-core">Juju Core</a></li>
3737+ <li><a href="https://launchpad.net/charms">Charms</a></li>
3738+ </ul>
3739+ </nav>
3740+ </div>
3741+ </footer>
3742+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
3743+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.14/jquery-ui.min.js"></script>
3744+ <script type="text/javascript" src="js/main.js"></script>
3745+ </body>
3746+</html>
3747
3748=== added file 'htmldocs/charms-scaling.html'
3749--- htmldocs/charms-scaling.html 1970-01-01 00:00:00 +0000
3750+++ htmldocs/charms-scaling.html 2013-06-27 17:35:30 +0000
3751@@ -0,0 +1,176 @@
3752+<!DOCTYPE html>
3753+<html>
3754+ <head>
3755+ <meta charset="utf-8">
3756+ <title>Juju Documentation - scaling charms</title>
3757+ <link href="//fonts.googleapis.com/css?family=Ubuntu:400,400italic" rel="stylesheet" type="text/css"/>
3758+ <link href="//fonts.googleapis.com/css?family=Ubuntu+Mono:400" rel="stylesheet" type="text/css"/>
3759+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/reset.css" rel="stylesheet" type="text/css"/>
3760+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/960.css" rel="stylesheet" type="text/css"/>
3761+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/base.css" rel="stylesheet" type="text/css"/>
3762+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/resources.css" rel="stylesheet" type="text/css"/>
3763+ <link href="css/main.css" rel="stylesheet" type="text/css"/>
3764+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
3765+ <script src="http://app.stacktack.com/jquery.stacktack.min.js"></script>
3766+ <script type="text/javascript">
3767+ $(document).ready(function() {
3768+ $(document).stacktack();
3769+ });
3770+ </script><!--[if lt IE 9]>
3771+ <script type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
3772+ </head>
3773+ <body class="resources">
3774+ <header>
3775+ <div class="header-login">
3776+ <ul>
3777+ <li>&nbsp;</li>
3778+ </ul>
3779+ </div>
3780+ <div class="header-navigation">
3781+ <div>
3782+ <nav role="navigation">
3783+ <ul>
3784+ <li class="page_item"><a href="https://juju.ubuntu.com/">Home</a></li>
3785+ <li class="page_item current_page_item"><a href="https://juju.ubuntu.com/">Resources</a></li>
3786+ <li class="page_item"><a href="https://juju.ubuntu.com/">Community</a></li>
3787+ <li class="page_item"><a href="https://juju.ubuntu.com/">Charm Store</a></li>
3788+ <li class="page_item"><a href="https://juju.ubuntu.com/">Events</a></li>
3789+ <li class="page_item"><a href="https://juju.ubuntu.com/">Survey</a></li>
3790+ <li>
3791+ <form id="form-search" method="get" action="/">
3792+ <fieldset>
3793+ <input id="input-search" type="text" name="s" value="Search">
3794+ </fieldset>
3795+ </form>
3796+ </li>
3797+ </ul>
3798+ </nav><a href="https://juju.ubuntu.com/" class="logo-ubuntu"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/logo-ubuntu.png"></a>
3799+ </div>
3800+ </div>
3801+ <div class="header-content">
3802+ <div class="clearfix"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/arrow-nav.png" width="9" height="5" style="left:894px; display: block;" class="arrow-nav">
3803+ <div class="header-navigation-secondary"></div>
3804+ <div class="header-image"></div>
3805+ <h1>Resources</h1>
3806+ <h2>A collection of some of the most important online references for Juju users and developers.</h2>
3807+ </div>
3808+ </div>
3809+ </header>
3810+ <section id="content" class="container-12">
3811+ <div class="grid-12 doc-container">
3812+ <div class="grid-3 doc-navigation">
3813+ <nav role="navigation">
3814+ <h1>User Guide</h1>
3815+ <ul>
3816+ <li class=""><a href="getting-started.html">Getting Started</a></li>
3817+ <li class=" sub"><a href="getting-started.html#intro">Introduction</a></li>
3818+ <li class=" sub"><a href="getting-started.html#install">Installation</a></li>
3819+ <li class=" sub"><a href="config-aws.html">AWS Configuration</a></li>
3820+ <li class=" sub"><a href="config-hpcloud.html">HP Cloud Configuration</a></li>
3821+ <li class=" sub"><a href="">OpenStack Configuration</a></li>
3822+ <li class=" sub"><a href="config-maas.html">MAAS Configuration</a></li>
3823+ <li class=" sub"><a href="getting-started.html#test">Testing your setup</a></li>
3824+ <li class=""><a href="charms.html">Using Charms</a></li>
3825+ <li class=" sub"><a href="charms.html#intro">What are Charms?</a></li>
3826+ <li class=" sub"><a href="charms-deploying.html">Deploying Services</a></li>
3827+ <li class=" sub"><a href="charms-constraints.html">Using constraints</a></li>
3828+ <li class=" sub"><a href="charms-config.html">Service Configuration</a></li>
3829+ <li class=" sub"><a href="charms-relations.html">Service Relationships</a></li>
3830+ <li class=" sub"><a href="charms-exposing.html">Exposing Services</a></li>
3831+ <li class=" sub"><a href="charms-scaling.html">Scaling Services</a></li>
3832+ <li class=" sub"><a href="charms-destroy.html">Destroying Services</a></li>
3833+ </ul>
3834+ <h1>Charm Authors</h1>
3835+ <ul></ul>
3836+ <li class=""><a href="authors-charm-writing.html">Writing a charm</a></li>
3837+ <li class=" sub"><a href="authors-subordinate-services.html">Subordinate services</a></li>
3838+ <li class=" sub"><a href="authors-implicit-relations.html">Implicit Relations</a></li>
3839+ <li class=" sub"><a href="authors-testing.html">Charm Testing</a></li>
3840+ <li class=" sub"><a href="authors-hooks.html">Hook debugging</a></li>
3841+ <li class=""><a href="authors-charm-store.html">The Juju Charm Store</a></li>
3842+ <li class=" sub"><a href="authors-charm-policy.html">Charm store policy</a></li>
3843+ <li class=" sub"><a href="authors-charm-best-practice.html">Best practices</a></li>
3844+ <li class=" sub"><a href="authors-charm-quality.html">Charm Quality Rating</a></li>
3845+ <h1>Reference</h1>
3846+ <ul>
3847+ <li class="sub"><a href="commands.html">Juju commands</a></li>
3848+ <li class="sub"><a href="glossary.html">Glossary</a></li>
3849+ <li class="sub"><a href="contributing.html">Contribute to the Docs!</a></li>
3850+ </ul>
3851+ </nav>
3852+ </div>
3853+ <div class="grid-9 doc-content">
3854+ <article>
3855+ <section id="charms-scaling">
3856+ <h1>Scaling Charms</h1>
3857+ <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>
3858+ <h1> Adding Units </h1>
3859+ <p>Scaling up services is really as simple as asking for more instances. Consider the following setup for a mediawiki:</p>
3860+ <pre class="runnable"><code>
3861+ juju bootstrap
3862+ juju deploy mysql
3863+ juju deploy mediawiki
3864+ juju add-relation mysql mediawiki:db
3865+ juju expose mediawiki
3866+ </code></pre>
3867+ <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>
3868+ <pre class="runnable"><code>
3869+ juju add-unit mediawiki
3870+ </code></pre>
3871+ <p>This will cause a new instance to be run and configured to work alongside the currently running one.</p>
3872+ <p>If that isn't the sort of scale you had in mind, you can use a --count or -c switch to specify a number of instances to add:</p>
3873+
3874+ <h1>Scaling Back</h1>
3875+ <p>Sometimes you also want to scale back some of your services, and this too is easy with Juju.</p>
3876+ <pre class="runnable"><code>
3877+ juju remove-unit mediawiki/1
3878+ </code></pre>
3879+ <p>The <span class="pre">remove-unit</span> command can be run to remove running units safely. The running services should automatically adjust to the change. Should you wish to remove a service, please see the section on <a href="charms-destroy.html">destroying services</a>.
3880+ </section>
3881+
3882+
3883+ </article>
3884+ </div>
3885+ </div>
3886+ </section>
3887+ <div class="shadow"></div>
3888+ <footer>
3889+ <div>
3890+ <nav role="navigation" class="clearfix">
3891+ <ul>
3892+ <li><a href="https://juju.ubuntu.com/get-started">Get started</a></li>
3893+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/local/">Local</a></li>
3894+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/amazon/">Amazon Web Services</a></li>
3895+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/hp-cloud/">HP Cloud</a></li>
3896+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/rackspace/">Rackspace</a></li>
3897+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/openstack/">Openstack</a></li>
3898+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/maas/">MAAS</a></li>
3899+ </ul>
3900+ <ul>
3901+ <li><a href="https://juju.ubuntu.com/resources">Resources</a></li>
3902+ <li><a href="https://juju.ubuntu.com/docs">Documentation</a></li>
3903+ <li><a href="https://juju.ubuntu.com/resources/videos">Videos</a></li>
3904+ <li><a href="http://uistage.jujucharms.com:8080/">Juju GUI Demo</a></li>
3905+ </ul>
3906+ <ul>
3907+ <li><a href="https://juju.ubuntu.com/community">Community</a></li>
3908+ <li class="page_item"><a href="https://juju.ubuntu.com/community/juju-blog/">Blog</a></li>
3909+ <li class="page_item"><a href="https://juju.ubuntu.com/community/weekly-charm-meeting/">Charm Meetings</a></li>
3910+ <li class="page_item"><a href="https://juju.ubuntu.com/community/charmers/">Charmers</a></li>
3911+ <li class="page_item"><a href="https://lists.ubuntu.com/mailman/listinfo/juju">Mailing List</a></li>
3912+ <li class="page_item"><a href="http://webchat.freenode.net/?channels=juju">Chat</a></li>
3913+ <li class="page_item"><a href="http://askubuntu.com/questions/tagged/juju?sort=faq&amp;amp;pagesize=50">FAQ</a></li>
3914+ </ul>
3915+ <ul class="last">
3916+ <li><a href="https://launchpad.net/juju">Code</a></li>
3917+ <li><a href="https://launchpad.net/juju-core">Juju Core</a></li>
3918+ <li><a href="https://launchpad.net/charms">Charms</a></li>
3919+ </ul>
3920+ </nav>
3921+ </div>
3922+ </footer>
3923+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
3924+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.14/jquery-ui.min.js"></script>
3925+ <script type="text/javascript" src="js/main.js"></script>
3926+ </body>
3927+</html>
3928\ No newline at end of file
3929
3930=== added file 'htmldocs/charms-upgrading.html'
3931--- htmldocs/charms-upgrading.html 1970-01-01 00:00:00 +0000
3932+++ htmldocs/charms-upgrading.html 2013-06-27 17:35:30 +0000
3933@@ -0,0 +1,154 @@
3934+<!DOCTYPE html>
3935+<html>
3936+ <head>
3937+ <meta charset="utf-8">
3938+ <title>Juju Documentation - Upgrading</title>
3939+ <link href="//fonts.googleapis.com/css?family=Ubuntu:400,400italic" rel="stylesheet" type="text/css"/>
3940+ <link href="//fonts.googleapis.com/css?family=Ubuntu+Mono:400" rel="stylesheet" type="text/css"/>
3941+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/reset.css" rel="stylesheet" type="text/css"/>
3942+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/960.css" rel="stylesheet" type="text/css"/>
3943+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/base.css" rel="stylesheet" type="text/css"/>
3944+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/resources.css" rel="stylesheet" type="text/css"/>
3945+ <link href="css/main.css" rel="stylesheet" type="text/css"/>
3946+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
3947+ <script src="http://app.stacktack.com/jquery.stacktack.min.js"></script>
3948+ <script type="text/javascript">
3949+ $(document).ready(function() {
3950+ $(document).stacktack();
3951+ });
3952+ </script><!--[if lt IE 9]>
3953+ <script type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
3954+ </head>
3955+ <body class="resources">
3956+ <header>
3957+ <div class="header-login">
3958+ <ul>
3959+ <li>&nbsp;</li>
3960+ </ul>
3961+ </div>
3962+ <div class="header-navigation">
3963+ <div>
3964+ <nav role="navigation">
3965+ <ul>
3966+ <li class="page_item"><a href="https://juju.ubuntu.com/">Home</a></li>
3967+ <li class="page_item current_page_item"><a href="https://juju.ubuntu.com/">Resources</a></li>
3968+ <li class="page_item"><a href="https://juju.ubuntu.com/">Community</a></li>
3969+ <li class="page_item"><a href="https://juju.ubuntu.com/">Charm Store</a></li>
3970+ <li class="page_item"><a href="https://juju.ubuntu.com/">Events</a></li>
3971+ <li class="page_item"><a href="https://juju.ubuntu.com/">Survey</a></li>
3972+ <li>
3973+ <form id="form-search" method="get" action="/">
3974+ <fieldset>
3975+ <input id="input-search" type="text" name="s" value="Search">
3976+ </fieldset>
3977+ </form>
3978+ </li>
3979+ </ul>
3980+ </nav><a href="https://juju.ubuntu.com/" class="logo-ubuntu"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/logo-ubuntu.png"></a>
3981+ </div>
3982+ </div>
3983+ <div class="header-content">
3984+ <div class="clearfix"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/arrow-nav.png" width="9" height="5" style="left:894px; display: block;" class="arrow-nav">
3985+ <div class="header-navigation-secondary"></div>
3986+ <div class="header-image"></div>
3987+ <h1>Resources</h1>
3988+ <h2>A collection of some of the most important online references for Juju users and developers.</h2>
3989+ </div>
3990+ </div>
3991+ </header>
3992+ <section id="content" class="container-12">
3993+ <div class="grid-12 doc-container">
3994+ <div class="grid-3 doc-navigation">
3995+ <nav role="navigation">
3996+ <h1>User Guide</h1>
3997+ <ul>
3998+ <li class=""><a href="getting-started.html">Getting Started</a></li>
3999+ <li class=" sub"><a href="getting-started.html#intro">Introduction</a></li>
4000+ <li class=" sub"><a href="getting-started.html#install">Installation</a></li>
4001+ <li class=" sub"><a href="config-aws.html">AWS Configuration</a></li>
4002+ <li class=" sub"><a href="config-hpcloud.html">HP Cloud Configuration</a></li>
4003+ <li class=" sub"><a href="">OpenStack Configuration</a></li>
4004+ <li class=" sub"><a href="config-maas.html">MAAS Configuration</a></li>
4005+ <li class=" sub"><a href="getting-started.html#test">Testing your setup</a></li>
4006+ <li class=""><a href="charms.html">Using Charms</a></li>
4007+ <li class=" sub"><a href="charms.html#intro">What are Charms?</a></li>
4008+ <li class=" sub"><a href="charms-deploying.html">Deploying Services</a></li>
4009+ <li class=" sub"><a href="charms-constraints.html">Using constraints</a></li>
4010+ <li class=" sub"><a href="charms-config.html">Service Configuration</a></li>
4011+ <li class=" sub"><a href="charms-relations.html">Service Relationships</a></li>
4012+ <li class=" sub"><a href="charms-exposing.html">Exposing Services</a></li>
4013+ <li class=" sub"><a href="charms-scaling.html">Scaling Services</a></li>
4014+ <li class=" sub"><a href="charms-destroy.html">Destroying Services</a></li>
4015+ </ul>
4016+ <h1>Charm Authors</h1>
4017+ <ul></ul>
4018+ <li class=""><a href="authors-charm-writing.html">Writing a charm</a></li>
4019+ <li class=" sub"><a href="authors-subordinate-services.html">Subordinate services</a></li>
4020+ <li class=" sub"><a href="authors-implicit-relations.html">Implicit Relations</a></li>
4021+ <li class=" sub"><a href="authors-testing.html">Charm Testing</a></li>
4022+ <li class=" sub"><a href="authors-hooks.html">Hook debugging</a></li>
4023+ <li class=""><a href="authors-charm-store.html">The Juju Charm Store</a></li>
4024+ <li class=" sub"><a href="authors-charm-policy.html">Charm store policy</a></li>
4025+ <li class=" sub"><a href="authors-charm-best-practice.html">Best practices</a></li>
4026+ <li class=" sub"><a href="authors-charm-quality.html">Charm Quality Rating</a></li>
4027+ <h1>Reference</h1>
4028+ <ul>
4029+ <li class="sub"><a href="commands.html">Juju commands</a></li>
4030+ <li class="sub"><a href="glossary.html">Glossary</a></li>
4031+ <li class="sub"><a href="contributing.html">Contribute to the Docs!</a></li>
4032+ </ul>
4033+ </nav>
4034+ </div>
4035+ <div class="grid-9 doc-content">
4036+ <article>
4037+ <section id ="upgrading">
4038+ <h1>Upgrades</h1>
4039+ <h1>Charm upgrades</h1>
4040+ <h1>Service upgrades</h1>
4041+ <h1>Juju</h1>
4042+ </section>
4043+ </article>
4044+ </div>
4045+ </div>
4046+ </section>
4047+ <div class="shadow"></div>
4048+ <footer>
4049+ <div>
4050+ <nav role="navigation" class="clearfix">
4051+ <ul>
4052+ <li><a href="https://juju.ubuntu.com/get-started">Get started</a></li>
4053+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/local/">Local</a></li>
4054+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/amazon/">Amazon Web Services</a></li>
4055+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/hp-cloud/">HP Cloud</a></li>
4056+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/rackspace/">Rackspace</a></li>
4057+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/openstack/">Openstack</a></li>
4058+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/maas/">MAAS</a></li>
4059+ </ul>
4060+ <ul>
4061+ <li><a href="https://juju.ubuntu.com/resources">Resources</a></li>
4062+ <li><a href="https://juju.ubuntu.com/docs">Documentation</a></li>
4063+ <li><a href="https://juju.ubuntu.com/resources/videos">Videos</a></li>
4064+ <li><a href="http://uistage.jujucharms.com:8080/">Juju GUI Demo</a></li>
4065+ </ul>
4066+ <ul>
4067+ <li><a href="https://juju.ubuntu.com/community">Community</a></li>
4068+ <li class="page_item"><a href="https://juju.ubuntu.com/community/juju-blog/">Blog</a></li>
4069+ <li class="page_item"><a href="https://juju.ubuntu.com/community/weekly-charm-meeting/">Charm Meetings</a></li>
4070+ <li class="page_item"><a href="https://juju.ubuntu.com/community/charmers/">Charmers</a></li>
4071+ <li class="page_item"><a href="https://lists.ubuntu.com/mailman/listinfo/juju">Mailing List</a></li>
4072+ <li class="page_item"><a href="http://webchat.freenode.net/?channels=juju">Chat</a></li>
4073+ <li class="page_item"><a href="http://askubuntu.com/questions/tagged/juju?sort=faq&amp;amp;pagesize=50">FAQ</a></li>
4074+ </ul>
4075+ <ul class="last">
4076+ <li><a href="https://launchpad.net/juju">Code</a></li>
4077+ <li><a href="https://launchpad.net/juju-core">Juju Core</a></li>
4078+ <li><a href="https://launchpad.net/charms">Charms</a></li>
4079+ </ul>
4080+ </nav>
4081+ </div>
4082+ </footer>
4083+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
4084+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.14/jquery-ui.min.js"></script>
4085+ <script type="text/javascript" src="js/main.js"></script>
4086+ </body>
4087+</html>
4088\ No newline at end of file
4089
4090=== added file 'htmldocs/charms.html'
4091--- htmldocs/charms.html 1970-01-01 00:00:00 +0000
4092+++ htmldocs/charms.html 2013-06-27 17:35:30 +0000
4093@@ -0,0 +1,173 @@
4094+<!DOCTYPE html>
4095+<html>
4096+ <head>
4097+ <meta charset="utf-8">
4098+ <title>Juju Documentation - Charms!</title>
4099+ <link href="//fonts.googleapis.com/css?family=Ubuntu:400,400italic" rel="stylesheet" type="text/css"/>
4100+ <link href="//fonts.googleapis.com/css?family=Ubuntu+Mono:400" rel="stylesheet" type="text/css"/>
4101+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/reset.css" rel="stylesheet" type="text/css"/>
4102+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/960.css" rel="stylesheet" type="text/css"/>
4103+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/base.css" rel="stylesheet" type="text/css"/>
4104+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/resources.css" rel="stylesheet" type="text/css"/>
4105+ <link href="css/main.css" rel="stylesheet" type="text/css"/>
4106+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
4107+ <script src="http://app.stacktack.com/jquery.stacktack.min.js"></script>
4108+ <script type="text/javascript">
4109+ $(document).ready(function() {
4110+ $(document).stacktack();
4111+ });
4112+ </script><!--[if lt IE 9]>
4113+ <script type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
4114+ </head>
4115+ <body class="resources">
4116+ <header>
4117+ <div class="header-login">
4118+ <ul>
4119+ <li>&nbsp;</li>
4120+ </ul>
4121+ </div>
4122+ <div class="header-navigation">
4123+ <div>
4124+ <nav role="navigation">
4125+ <ul>
4126+ <li class="page_item"><a href="https://juju.ubuntu.com/">Home</a></li>
4127+ <li class="page_item current_page_item"><a href="https://juju.ubuntu.com/">Resources</a></li>
4128+ <li class="page_item"><a href="https://juju.ubuntu.com/">Community</a></li>
4129+ <li class="page_item"><a href="https://juju.ubuntu.com/">Charm Store</a></li>
4130+ <li class="page_item"><a href="https://juju.ubuntu.com/">Events</a></li>
4131+ <li class="page_item"><a href="https://juju.ubuntu.com/">Survey</a></li>
4132+ <li>
4133+ <form id="form-search" method="get" action="/">
4134+ <fieldset>
4135+ <input id="input-search" type="text" name="s" value="Search">
4136+ </fieldset>
4137+ </form>
4138+ </li>
4139+ </ul>
4140+ </nav><a href="https://juju.ubuntu.com/" class="logo-ubuntu"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/logo-ubuntu.png"></a>
4141+ </div>
4142+ </div>
4143+ <div class="header-content">
4144+ <div class="clearfix"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/arrow-nav.png" width="9" height="5" style="left:894px; display: block;" class="arrow-nav">
4145+ <div class="header-navigation-secondary"></div>
4146+ <div class="header-image"></div>
4147+ <h1>Resources</h1>
4148+ <h2>A collection of some of the most important online references for Juju users and developers.</h2>
4149+ </div>
4150+ </div>
4151+ </header>
4152+ <section id="content" class="container-12">
4153+ <div class="grid-12 doc-container">
4154+ <div class="grid-3 doc-navigation">
4155+ <nav role="navigation">
4156+ <h1>User Guide</h1>
4157+ <ul>
4158+ <li class=""><a href="getting-started.html">Getting Started</a></li>
4159+ <li class=" sub"><a href="getting-started.html#intro">Introduction</a></li>
4160+ <li class=" sub"><a href="getting-started.html#install">Installation</a></li>
4161+ <li class=" sub"><a href="config-aws.html">AWS Configuration</a></li>
4162+ <li class=" sub"><a href="config-hpcloud.html">HP Cloud Configuration</a></li>
4163+ <li class=" sub"><a href="">OpenStack Configuration</a></li>
4164+ <li class=" sub"><a href="config-maas.html">MAAS Configuration</a></li>
4165+ <li class=" sub"><a href="getting-started.html#test">Testing your setup</a></li>
4166+ <li class="selected"><a href="charms.html">Using Charms</a></li>
4167+ <li class=" sub"><a href="charms.html#intro">What are Charms?</a></li>
4168+ <li class=" sub"><a href="charms-deploying.html">Deploying Services</a></li>
4169+ <li class=" sub"><a href="charms-constraints.html">Using constraints</a></li>
4170+ <li class=" sub"><a href="charms-config.html">Service Configuration</a></li>
4171+ <li class=" sub"><a href="charms-relations.html">Service Relationships</a></li>
4172+ <li class=" sub"><a href="charms-exposing.html">Exposing Services</a></li>
4173+ <li class=" sub"><a href="charms-scaling.html">Scaling Services</a></li>
4174+ <li class=" sub"><a href="charms-destroy.html">Destroying Services</a></li>
4175+ </ul>
4176+ <h1>Charm Authors</h1>
4177+ <ul></ul>
4178+ <li class="selected"><a href="authors-charm-writing.html">Writing a charm</a></li>
4179+ <li class=" sub"><a href="authors-subordinate-services.html">Subordinate services</a></li>
4180+ <li class=" sub"><a href="authors-implicit-relations.html">Implicit Relations</a></li>
4181+ <li class=" sub"><a href="authors-testing.html">Charm Testing</a></li>
4182+ <li class=" sub"><a href="authors-hooks.html">Hook debugging</a></li>
4183+ <li class=""><a href="authors-charm-store.html">The Juju Charm Store</a></li>
4184+ <li class=" sub"><a href="authors-charm-policy.html">Charm store policy</a></li>
4185+ <li class=" sub"><a href="authors-charm-best-practice.html">Best practices</a></li>
4186+ <li class=" sub"><a href="authors-charm-quality.html">Charm Quality Rating</a></li>
4187+ <h1>Reference</h1>
4188+ <ul>
4189+ <li class="sub"><a href="commands.html">Juju commands</a></li>
4190+ <li class="sub"><a href="glossary.html">Glossary</a></li>
4191+ <li class="sub"><a href="contributing.html">Contribute to the Docs!</a></li>
4192+ </ul>
4193+ </nav>
4194+ </div>
4195+ <div class="grid-9 doc-content">
4196+ <article>
4197+ <section id="charms">
4198+ <h1>Introducing Charms</h1>
4199+ <aside>
4200+ <iframe class="youtube-player" type="text/html" width="400" height="300" src="http://www.youtube.com/embed/0AT6qKyam9I" frameborder="0">
4201+ </iframe>
4202+ </aside>
4203+
4204+ <p>The magic behind Juju is a collection of software components called charms. These are the encapsulated knowledge of how to properly deploy and configure the services you will want to deploy on your cloud. The charms available online in the <a href="">Charm Store</a> represent the distilled DevOps knowledge of experts, and they are freely available for you to use (or you can write your own).</p>
4205+ <p>Charms make it quick and easy to reliably and repeatedly deploy services in your cloud. If you haven't already tried the <a href=""> Juju walkthrough,</a> you should give it a go and see how ridiculously easy it is to deploy services in minutes. </p>
4206+ <p>In many cases, you will simply deploy, configure and expose services in your cloud. The following sections explore in more detail the everyday Juju and Charm operations you are likely to perform </p>
4207+ <ul>
4208+
4209+ <li><a href="charms-deploying.html">Deploying services</a></li>
4210+
4211+
4212+ <li><a href="charms-config.html">Configuring Services</a></li>
4213+ <li><a href="charms-relations.html">Managing Relationships</a></li>
4214+ <li><a href="charms-constraints.html">Using Constraints</a></li>
4215+ <li><a href="charms-scaling.html">Scaling</a></li>
4216+ <li><a href="charms-expose.html">Exposing services</a></li>
4217+
4218+ </ul>
4219+ </section>
4220+
4221+
4222+ </article>
4223+ </div>
4224+ </div>
4225+ </section>
4226+ <div class="shadow"></div>
4227+ <footer>
4228+ <div>
4229+ <nav role="navigation" class="clearfix">
4230+ <ul>
4231+ <li><a href="https://juju.ubuntu.com/get-started">Get started</a></li>
4232+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/local/">Local</a></li>
4233+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/amazon/">Amazon Web Services</a></li>
4234+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/hp-cloud/">HP Cloud</a></li>
4235+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/rackspace/">Rackspace</a></li>
4236+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/openstack/">Openstack</a></li>
4237+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/maas/">MAAS</a></li>
4238+ </ul>
4239+ <ul>
4240+ <li><a href="https://juju.ubuntu.com/resources">Resources</a></li>
4241+ <li><a href="https://juju.ubuntu.com/docs">Documentation</a></li>
4242+ <li><a href="https://juju.ubuntu.com/resources/videos">Videos</a></li>
4243+ <li><a href="http://uistage.jujucharms.com:8080/">Juju GUI Demo</a></li>
4244+ </ul>
4245+ <ul>
4246+ <li><a href="https://juju.ubuntu.com/community">Community</a></li>
4247+ <li class="page_item"><a href="https://juju.ubuntu.com/community/juju-blog/">Blog</a></li>
4248+ <li class="page_item"><a href="https://juju.ubuntu.com/community/weekly-charm-meeting/">Charm Meetings</a></li>
4249+ <li class="page_item"><a href="https://juju.ubuntu.com/community/charmers/">Charmers</a></li>
4250+ <li class="page_item"><a href="https://lists.ubuntu.com/mailman/listinfo/juju">Mailing List</a></li>
4251+ <li class="page_item"><a href="http://webchat.freenode.net/?channels=juju">Chat</a></li>
4252+ <li class="page_item"><a href="http://askubuntu.com/questions/tagged/juju?sort=faq&amp;amp;pagesize=50">FAQ</a></li>
4253+ </ul>
4254+ <ul class="last">
4255+ <li><a href="https://launchpad.net/juju">Code</a></li>
4256+ <li><a href="https://launchpad.net/juju-core">Juju Core</a></li>
4257+ <li><a href="https://launchpad.net/charms">Charms</a></li>
4258+ </ul>
4259+ </nav>
4260+ </div>
4261+ </footer>
4262+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
4263+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.14/jquery-ui.min.js"></script>
4264+ <script type="text/javascript" src="js/main.js"></script>
4265+ </body>
4266+</html>
4267\ No newline at end of file
4268
4269=== added file 'htmldocs/commands.html'
4270--- htmldocs/commands.html 1970-01-01 00:00:00 +0000
4271+++ htmldocs/commands.html 2013-06-27 17:35:30 +0000
4272@@ -0,0 +1,189 @@
4273+<!DOCTYPE html>
4274+<html>
4275+ <head>
4276+ <meta charset="utf-8">
4277+ <title>Juju Documentation - Destroying Services</title>
4278+ <link href="//fonts.googleapis.com/css?family=Ubuntu:400,400italic" rel="stylesheet" type="text/css"/>
4279+ <link href="//fonts.googleapis.com/css?family=Ubuntu+Mono:400" rel="stylesheet" type="text/css"/>
4280+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/reset.css" rel="stylesheet" type="text/css"/>
4281+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/960.css" rel="stylesheet" type="text/css"/>
4282+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/base.css" rel="stylesheet" type="text/css"/>
4283+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/resources.css" rel="stylesheet" type="text/css"/>
4284+ <link href="css/main.css" rel="stylesheet" type="text/css"/>
4285+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
4286+ <script src="http://app.stacktack.com/jquery.stacktack.min.js"></script>
4287+ <script type="text/javascript">
4288+ $(document).ready(function() {
4289+ $(document).stacktack();
4290+ });
4291+ </script><!--[if lt IE 9]>
4292+ <script type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
4293+ </head>
4294+ <body class="resources">
4295+ <header>
4296+ <div class="header-login">
4297+ <ul>
4298+ <li>&nbsp;</li>
4299+ </ul>
4300+ </div>
4301+ <div class="header-navigation">
4302+ <div>
4303+ <nav role="navigation">
4304+ <ul>
4305+ <li class="page_item"><a href="https://juju.ubuntu.com/">Home</a></li>
4306+ <li class="page_item current_page_item"><a href="https://juju.ubuntu.com/">Resources</a></li>
4307+ <li class="page_item"><a href="https://juju.ubuntu.com/">Community</a></li>
4308+ <li class="page_item"><a href="https://juju.ubuntu.com/">Charm Store</a></li>
4309+ <li class="page_item"><a href="https://juju.ubuntu.com/">Events</a></li>
4310+ <li class="page_item"><a href="https://juju.ubuntu.com/">Survey</a></li>
4311+ <li>
4312+ <form id="form-search" method="get" action="/">
4313+ <fieldset>
4314+ <input id="input-search" type="text" name="s" value="Search">
4315+ </fieldset>
4316+ </form>
4317+ </li>
4318+ </ul>
4319+ </nav><a href="https://juju.ubuntu.com/" class="logo-ubuntu"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/logo-ubuntu.png"></a>
4320+ </div>
4321+ </div>
4322+ <div class="header-content">
4323+ <div class="clearfix"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/arrow-nav.png" width="9" height="5" style="left:894px; display: block;" class="arrow-nav">
4324+ <div class="header-navigation-secondary"></div>
4325+ <div class="header-image"></div>
4326+ <h1>Resources</h1>
4327+ <h2>A collection of some of the most important online references for Juju users and developers.</h2>
4328+ </div>
4329+ </div>
4330+ </header>
4331+ <section id="content" class="container-12">
4332+ <div class="grid-12 doc-container">
4333+ <div class="grid-3 doc-navigation">
4334+ <nav role="navigation">
4335+ <h1>User Guide</h1>
4336+ <ul>
4337+ <li class=""><a href="getting-started.html">Getting Started</a></li>
4338+ <li class=" sub"><a href="getting-started.html#intro">Introduction</a></li>
4339+ <li class=" sub"><a href="getting-started.html#install">Installation</a></li>
4340+ <li class=" sub"><a href="config-aws.html">AWS Configuration</a></li>
4341+ <li class=" sub"><a href="config-hpcloud.html">HP Cloud Configuration</a></li>
4342+ <li class=" sub"><a href="">OpenStack Configuration</a></li>
4343+ <li class=" sub"><a href="config-maas.html">MAAS Configuration</a></li>
4344+ <li class=" sub"><a href="getting-started.html#test">Testing your setup</a></li>
4345+ <li class=""><a href="charms.html">Using Charms</a></li>
4346+ <li class=" sub"><a href="charms.html#intro">What are Charms?</a></li>
4347+ <li class=" sub"><a href="charms-deploying.html">Deploying Services</a></li>
4348+ <li class=" sub"><a href="charms-constraints.html">Using constraints</a></li>
4349+ <li class=" sub"><a href="charms-config.html">Service Configuration</a></li>
4350+ <li class=" sub"><a href="charms-relations.html">Service Relationships</a></li>
4351+ <li class=" sub"><a href="charms-exposing.html">Exposing Services</a></li>
4352+ <li class=" sub"><a href="charms-scaling.html">Scaling Services</a></li>
4353+ <li class=" sub"><a href="charms-destroy.html">Destroying Services</a></li>
4354+ </ul>
4355+ <h1>Charm Authors</h1>
4356+ <ul></ul>
4357+ <li class=""><a href="authors-charm-writing.html">Writing a charm</a></li>
4358+ <li class=" sub"><a href="authors-subordinate-services.html">Subordinate services</a></li>
4359+ <li class=" sub"><a href="authors-implicit-relations.html">Implicit Relations</a></li>
4360+ <li class=" sub"><a href="authors-testing.html">Charm Testing</a></li>
4361+ <li class=" sub"><a href="authors-hooks.html">Hook debugging</a></li>
4362+ <li class=""><a href="authors-charm-store.html">The Juju Charm Store</a></li>
4363+ <li class=" sub"><a href="authors-charm-policy.html">Charm store policy</a></li>
4364+ <li class=" sub"><a href="authors-charm-best-practice.html">Best practices</a></li>
4365+ <li class=" sub"><a href="authors-charm-quality.html">Charm Quality Rating</a></li>
4366+ <h1>Reference</h1>
4367+ <ul>
4368+ <li class="sub"><a href="commands.html">Juju commands</a></li>
4369+ <li class="sub"><a href="glossary.html">Glossary</a></li>
4370+ <li class="sub"><a href="contributing.html">Contribute to the Docs!</a></li>
4371+ </ul>
4372+ </nav>
4373+ </div>
4374+ <div class="grid-9 doc-content">
4375+ <article>
4376+ <section id ="charms-destroy">
4377+ <h1>Juju Command reference</h1>
4378+ <p>You can get a list of the currently used commands by entering <span class="pre">juju help commands</span> from the commandline. The currently understood commands are listed here, with some examples.</p>
4379+ <ul>
4380+ <li><strong>add-relation</strong> add a relation between two services</li>
4381+ <li><strong>add-unit</strong> add a service unit</li>
4382+ <li><strong>bootstrap</strong> start up an environment from scratch</li>
4383+ <li><strong>debug-log</strong> display the consolidated log file</li>
4384+ <li><strong>deploy</strong> deploy a new service</li>
4385+ <li><strong>destroy-environment</strong> terminate all machines and other associated resources for an environment</li>
4386+ <li><strong>destroy-machine</strong> destroy machines</li>
4387+ <li><strong>destroy-relation</strong> destroy a relation between two services</li>
4388+ <li><strong>destroy-service</strong> destroy a service</li>
4389+ <li><strong>destroy-unit</strong> destroy service units</li>
4390+ <li><strong>expose</strong> expose a service</li>
4391+ <li><strong>generate-config</strong> alias for init</li>
4392+ <li><strong>get</strong> get service config options</li>
4393+ <li><strong>get-constraints</strong> view constraints</li>
4394+ <li><strong>get-env</strong> alias for get-environment</li>
4395+ <li><strong>get-environment</strong> view environment values</li>
4396+ <li><strong>help</strong> show help on a command or other topic</li>
4397+ <li><strong>init</strong> generate boilerplate configuration for juju environments</li>
4398+ <li><strong>publish</strong> publish charm to the store</li>
4399+ <li><strong>remove-relation</strong> alias for destroy-relation</li>
4400+ <li><strong>remove-unit</strong> alias for destroy-unit</li>
4401+ <li><strong>resolved</strong> marks unit errors resolved</li>
4402+ <li><strong>scp</strong> launch a scp command to copy files to/from remote machine(s)</li>
4403+ <li><strong>set</strong> set service config options</li>
4404+ <li><strong>set-constraints</strong> replace constraints</li>
4405+ <li><strong>set-env</strong> alias for set-environment</li>
4406+ <li><strong>set-environment</strong> replace environment values</li>
4407+ <li><strong>ssh</strong> launch an ssh shell on a given unit or machine</li>
4408+ <li><strong>stat</strong> alias for status</li>
4409+ <li><strong>status</strong> output status information about an environment</li>
4410+ <li><strong>sync-tools</strong> copy tools from the official bucket into a local environment</li>
4411+ <li><strong>terminate-machine</strong> alias for destroy-machine</li>
4412+ <li><strong>unexpose</strong> unexpose a service</li>
4413+ <li><strong>upgrade-charm</strong> upgrade a service's charm</li>
4414+ <li><strong>upgrade-juju</strong> upgrade the tools in a juju environment</li>
4415+ <li><strong>version</strong> print the current version</li>
4416+ </ul>
4417+ </article>
4418+ </div>
4419+ </div>
4420+ </section>
4421+ <div class="shadow"></div>
4422+ <footer>
4423+ <div>
4424+ <nav role="navigation" class="clearfix">
4425+ <ul>
4426+ <li><a href="https://juju.ubuntu.com/get-started">Get started</a></li>
4427+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/local/">Local</a></li>
4428+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/amazon/">Amazon Web Services</a></li>
4429+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/hp-cloud/">HP Cloud</a></li>
4430+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/rackspace/">Rackspace</a></li>
4431+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/openstack/">Openstack</a></li>
4432+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/maas/">MAAS</a></li>
4433+ </ul>
4434+ <ul>
4435+ <li><a href="https://juju.ubuntu.com/resources">Resources</a></li>
4436+ <li><a href="https://juju.ubuntu.com/docs">Documentation</a></li>
4437+ <li><a href="https://juju.ubuntu.com/resources/videos">Videos</a></li>
4438+ <li><a href="http://uistage.jujucharms.com:8080/">Juju GUI Demo</a></li>
4439+ </ul>
4440+ <ul>
4441+ <li><a href="https://juju.ubuntu.com/community">Community</a></li>
4442+ <li class="page_item"><a href="https://juju.ubuntu.com/community/juju-blog/">Blog</a></li>
4443+ <li class="page_item"><a href="https://juju.ubuntu.com/community/weekly-charm-meeting/">Charm Meetings</a></li>
4444+ <li class="page_item"><a href="https://juju.ubuntu.com/community/charmers/">Charmers</a></li>
4445+ <li class="page_item"><a href="https://lists.ubuntu.com/mailman/listinfo/juju">Mailing List</a></li>
4446+ <li class="page_item"><a href="http://webchat.freenode.net/?channels=juju">Chat</a></li>
4447+ <li class="page_item"><a href="http://askubuntu.com/questions/tagged/juju?sort=faq&amp;amp;pagesize=50">FAQ</a></li>
4448+ </ul>
4449+ <ul class="last">
4450+ <li><a href="https://launchpad.net/juju">Code</a></li>
4451+ <li><a href="https://launchpad.net/juju-core">Juju Core</a></li>
4452+ <li><a href="https://launchpad.net/charms">Charms</a></li>
4453+ </ul>
4454+ </nav>
4455+ </div>
4456+ </footer>
4457+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
4458+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.14/jquery-ui.min.js"></script>
4459+ <script type="text/javascript" src="js/main.js"></script>
4460+ </body>
4461+</html>
4462\ No newline at end of file
4463
4464=== added file 'htmldocs/config-aws.html'
4465--- htmldocs/config-aws.html 1970-01-01 00:00:00 +0000
4466+++ htmldocs/config-aws.html 2013-06-27 17:35:30 +0000
4467@@ -0,0 +1,179 @@
4468+<!DOCTYPE html>
4469+<html>
4470+ <head>
4471+ <meta charset="utf-8">
4472+ <title>Juju Documentation - Configuring Juju to work with AWS</title>
4473+ <link href="//fonts.googleapis.com/css?family=Ubuntu:400,400italic" rel="stylesheet" type="text/css"/>
4474+ <link href="//fonts.googleapis.com/css?family=Ubuntu+Mono:400" rel="stylesheet" type="text/css"/>
4475+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/reset.css" rel="stylesheet" type="text/css"/>
4476+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/960.css" rel="stylesheet" type="text/css"/>
4477+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/base.css" rel="stylesheet" type="text/css"/>
4478+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/resources.css" rel="stylesheet" type="text/css"/>
4479+ <link href="css/main.css" rel="stylesheet" type="text/css"/>
4480+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
4481+ <script src="http://app.stacktack.com/jquery.stacktack.min.js"></script>
4482+ <script type="text/javascript">
4483+ $(document).ready(function() {
4484+ $(document).stacktack();
4485+ });
4486+ </script><!--[if lt IE 9]>
4487+ <script type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
4488+ </head>
4489+ <body class="resources">
4490+ <header>
4491+ <div class="header-login">
4492+ <ul>
4493+ <li>&nbsp;</li>
4494+ </ul>
4495+ </div>
4496+ <div class="header-navigation">
4497+ <div>
4498+ <nav role="navigation">
4499+ <ul>
4500+ <li class="page_item"><a href="https://juju.ubuntu.com/">Home</a></li>
4501+ <li class="page_item current_page_item"><a href="https://juju.ubuntu.com/">Resources</a></li>
4502+ <li class="page_item"><a href="https://juju.ubuntu.com/">Community</a></li>
4503+ <li class="page_item"><a href="https://juju.ubuntu.com/">Charm Store</a></li>
4504+ <li class="page_item"><a href="https://juju.ubuntu.com/">Events</a></li>
4505+ <li class="page_item"><a href="https://juju.ubuntu.com/">Survey</a></li>
4506+ <li>
4507+ <form id="form-search" method="get" action="/">
4508+ <fieldset>
4509+ <input id="input-search" type="text" name="s" value="Search">
4510+ </fieldset>
4511+ </form>
4512+ </li>
4513+ </ul>
4514+ </nav><a href="https://juju.ubuntu.com/" class="logo-ubuntu"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/logo-ubuntu.png"></a>
4515+ </div>
4516+ </div>
4517+ <div class="header-content">
4518+ <div class="clearfix"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/arrow-nav.png" width="9" height="5" style="left:894px; display: block;" class="arrow-nav">
4519+ <div class="header-navigation-secondary"></div>
4520+ <div class="header-image"></div>
4521+ <h1>Resources</h1>
4522+ <h2>A collection of some of the most important online references for Juju users and developers.</h2>
4523+ </div>
4524+ </div>
4525+ </header>
4526+ <section id="content" class="container-12">
4527+ <div class="grid-12 doc-container">
4528+ <div class="grid-3 doc-navigation">
4529+ <nav role="navigation">
4530+ <h1>User Guide</h1>
4531+ <ul>
4532+ <li class=""><a href="getting-started.html">Getting Started</a></li>
4533+ <li class=" sub"><a href="getting-started.html#intro">Introduction</a></li>
4534+ <li class=" sub"><a href="getting-started.html#install">Installation</a></li>
4535+ <li class=" sub"><a href="config-aws.html">AWS Configuration</a></li>
4536+ <li class=" sub"><a href="config-hpcloud.html">HP Cloud Configuration</a></li>
4537+ <li class=" sub"><a href="">OpenStack Configuration</a></li>
4538+ <li class=" sub"><a href="config-maas.html">MAAS Configuration</a></li>
4539+ <li class=" sub"><a href="getting-started.html#test">Testing your setup</a></li>
4540+ <li class=""><a href="charms.html">Using Charms</a></li>
4541+ <li class=" sub"><a href="charms.html#intro">What are Charms?</a></li>
4542+ <li class=" sub"><a href="charms-deploying.html">Deploying Services</a></li>
4543+ <li class=" sub"><a href="charms-constraints.html">Using constraints</a></li>
4544+ <li class=" sub"><a href="charms-config.html">Service Configuration</a></li>
4545+ <li class=" sub"><a href="charms-relations.html">Service Relationships</a></li>
4546+ <li class=" sub"><a href="charms-exposing.html">Exposing Services</a></li>
4547+ <li class=" sub"><a href="charms-scaling.html">Scaling Services</a></li>
4548+ <li class=" sub"><a href="charms-destroy.html">Destroying Services</a></li>
4549+ </ul>
4550+ <h1>Charm Authors</h1>
4551+ <ul></ul>
4552+ <li class=""><a href="authors-charm-writing.html">Writing a charm</a></li>
4553+ <li class=" sub"><a href="authors-subordinate-services.html">Subordinate services</a></li>
4554+ <li class=" sub"><a href="authors-implicit-relations.html">Implicit Relations</a></li>
4555+ <li class=" sub"><a href="authors-testing.html">Charm Testing</a></li>
4556+ <li class=" sub"><a href="authors-hooks.html">Hook debugging</a></li>
4557+ <li class=""><a href="authors-charm-store.html">The Juju Charm Store</a></li>
4558+ <li class=" sub"><a href="authors-charm-policy.html">Charm store policy</a></li>
4559+ <li class=" sub"><a href="authors-charm-best-practice.html">Best practices</a></li>
4560+ <li class=" sub"><a href="authors-charm-quality.html">Charm Quality Rating</a></li>
4561+ <h1>Reference</h1>
4562+ <ul>
4563+ <li class="sub"><a href="commands.html">Juju commands</a></li>
4564+ <li class="sub"><a href="glossary.html">Glossary</a></li>
4565+ <li class="sub"><a href="contributing.html">Contribute to the Docs!</a></li>
4566+ </ul>
4567+ </nav>
4568+ </div>
4569+ <div class="grid-9 doc-content">
4570+ <article>
4571+ <section id="config_aws">
4572+ <h1>Configuring for Amazon AWS</h1>
4573+ <p>You should start by generating a generic configuration file for Juju, using the command:
4574+ <pre><code>juju generate-config -w</code></pre>
4575+ <p>This will generate a file, <strong>environments.yaml</strong>, which will live in your <strong>~/.juju/</strong> directory (and will create the directory if it doesn't already exist).
4576+ <p>The generic configuration sections generated for AWS will look something like this:</p>
4577+ <pre><code>
4578+
4579+ &nbsp;&nbsp;## https://juju.ubuntu.com/get-started/amazon/
4580+ &nbsp;&nbsp;amazon:
4581+ &nbsp;&nbsp;&nbsp;&nbsp;type: ec2
4582+ &nbsp;&nbsp;&nbsp;&nbsp;admin-secret: 772b97c4c31c6b5883475e396d9a6d32
4583+ &nbsp;&nbsp;&nbsp;&nbsp;# globally unique S3 bucket name
4584+ &nbsp;&nbsp;&nbsp;&nbsp;control-bucket: juju-a29403f89d8223343d3cab01f1ca5a4d
4585+ &nbsp;&nbsp;&nbsp;&nbsp;# override if your machine is on a different series than what you're deploying
4586+ &nbsp;&nbsp;&nbsp;&nbsp;# default-series: precise
4587+ &nbsp;&nbsp;&nbsp;&nbsp;# region defaults to us-east-1, override if required
4588+ &nbsp;&nbsp;&nbsp;&nbsp;# region: us-east-1
4589+ &nbsp;&nbsp;&nbsp;&nbsp;# Usually set via the env variable AWS_ACCESS_KEY_ID, but can be specified here
4590+ &nbsp;&nbsp;&nbsp;&nbsp;# access-key: &LT;secret&GT;
4591+ &nbsp;&nbsp;&nbsp;&nbsp;# Can be set via the env variable AWS_SECRET_ACCESS_KEY, or specified here
4592+ &nbsp;&nbsp;&nbsp;&nbsp;# secret-key: &LT;secret&GT;
4593+ </code></pre>
4594+ <p>This is a simple configuration intended to run on EC2 with S3 permanent storage. Values for the default setting can be changed simply by editing this file, uncommenting the relevant lines and adding your own settings. All you need to do to get this configuration to work is to either set the <span class="pre">AWS_ACCESS_KEY_ID</span> and <span class="pre">AWS_SECRET_ACCESS_KEY</span> via environment variables, or uncomment and add the values to the configuration file.</p>
4595+ <p>You can retrieve these values easily from your Amazon account at <a href="http://aws.amazon.com/account">http://aws.amazon.com/account</a> and following on the link for "Security Credentials"...</p>
4596+ <img src="./media/getting_started-aws_security.png" alt="Amazon accounts page showing Security Credentials link" >
4597+ <p>Under the Access Credentials heading, you will see a list of access keys. Clicking on the "Show" link will display the secret key, and you can simply copy and paste these into your environments.yaml configuration file.</p>
4598+ <img src="./media/getting_started-aws_keys.png" alt="Amazon Access Credentials page showing key values" >
4599+ <p>The <strong>region:</strong> value corresponds to the AWS regions.
4600+ </section>
4601+
4602+ </article>
4603+ </div>
4604+ </div>
4605+ </section>
4606+ <div class="shadow"></div>
4607+ <footer>
4608+ <div>
4609+ <nav role="navigation" class="clearfix">
4610+ <ul>
4611+ <li><a href="https://juju.ubuntu.com/get-started">Get started</a></li>
4612+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/local/">Local</a></li>
4613+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/amazon/">Amazon Web Services</a></li>
4614+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/hp-cloud/">HP Cloud</a></li>
4615+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/rackspace/">Rackspace</a></li>
4616+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/openstack/">Openstack</a></li>
4617+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/maas/">MAAS</a></li>
4618+ </ul>
4619+ <ul>
4620+ <li><a href="https://juju.ubuntu.com/resources">Resources</a></li>
4621+ <li><a href="https://juju.ubuntu.com/docs">Documentation</a></li>
4622+ <li><a href="https://juju.ubuntu.com/resources/videos">Videos</a></li>
4623+ <li><a href="http://uistage.jujucharms.com:8080/">Juju GUI Demo</a></li>
4624+ </ul>
4625+ <ul>
4626+ <li><a href="https://juju.ubuntu.com/community">Community</a></li>
4627+ <li class="page_item"><a href="https://juju.ubuntu.com/community/juju-blog/">Blog</a></li>
4628+ <li class="page_item"><a href="https://juju.ubuntu.com/community/weekly-charm-meeting/">Charm Meetings</a></li>
4629+ <li class="page_item"><a href="https://juju.ubuntu.com/community/charmers/">Charmers</a></li>
4630+ <li class="page_item"><a href="https://lists.ubuntu.com/mailman/listinfo/juju">Mailing List</a></li>
4631+ <li class="page_item"><a href="http://webchat.freenode.net/?channels=juju">Chat</a></li>
4632+ <li class="page_item"><a href="http://askubuntu.com/questions/tagged/juju?sort=faq&amp;amp;pagesize=50">FAQ</a></li>
4633+ </ul>
4634+ <ul class="last">
4635+ <li><a href="https://launchpad.net/juju">Code</a></li>
4636+ <li><a href="https://launchpad.net/juju-core">Juju Core</a></li>
4637+ <li><a href="https://launchpad.net/charms">Charms</a></li>
4638+ </ul>
4639+ </nav>
4640+ </div>
4641+ </footer>
4642+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
4643+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.14/jquery-ui.min.js"></script>
4644+ <script type="text/javascript" src="js/main.js"></script>
4645+ </body>
4646+</html>
4647\ No newline at end of file
4648
4649=== added file 'htmldocs/config-hpcloud.html'
4650--- htmldocs/config-hpcloud.html 1970-01-01 00:00:00 +0000
4651+++ htmldocs/config-hpcloud.html 2013-06-27 17:35:30 +0000
4652@@ -0,0 +1,193 @@
4653+<!DOCTYPE html>
4654+<html>
4655+ <head>
4656+ <meta charset="utf-8">
4657+ <title>Juju Documentation - Configuring Juju to work with HPCloud</title>
4658+ <link href="//fonts.googleapis.com/css?family=Ubuntu:400,400italic" rel="stylesheet" type="text/css"/>
4659+ <link href="//fonts.googleapis.com/css?family=Ubuntu+Mono:400" rel="stylesheet" type="text/css"/>
4660+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/reset.css" rel="stylesheet" type="text/css"/>
4661+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/960.css" rel="stylesheet" type="text/css"/>
4662+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/base.css" rel="stylesheet" type="text/css"/>
4663+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/resources.css" rel="stylesheet" type="text/css"/>
4664+ <link href="css/main.css" rel="stylesheet" type="text/css"/>
4665+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
4666+ <script src="http://app.stacktack.com/jquery.stacktack.min.js"></script>
4667+ <script type="text/javascript">
4668+ $(document).ready(function() {
4669+ $(document).stacktack();
4670+ });
4671+ </script><!--[if lt IE 9]>
4672+ <script type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
4673+ </head>
4674+ <body class="resources">
4675+ <header>
4676+ <div class="header-login">
4677+ <ul>
4678+ <li>&nbsp;</li>
4679+ </ul>
4680+ </div>
4681+ <div class="header-navigation">
4682+ <div>
4683+ <nav role="navigation">
4684+ <ul>
4685+ <li class="page_item"><a href="https://juju.ubuntu.com/">Home</a></li>
4686+ <li class="page_item current_page_item"><a href="https://juju.ubuntu.com/">Resources</a></li>
4687+ <li class="page_item"><a href="https://juju.ubuntu.com/">Community</a></li>
4688+ <li class="page_item"><a href="https://juju.ubuntu.com/">Charm Store</a></li>
4689+ <li class="page_item"><a href="https://juju.ubuntu.com/">Events</a></li>
4690+ <li class="page_item"><a href="https://juju.ubuntu.com/">Survey</a></li>
4691+ <li>
4692+ <form id="form-search" method="get" action="/">
4693+ <fieldset>
4694+ <input id="input-search" type="text" name="s" value="Search">
4695+ </fieldset>
4696+ </form>
4697+ </li>
4698+ </ul>
4699+ </nav><a href="https://juju.ubuntu.com/" class="logo-ubuntu"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/logo-ubuntu.png"></a>
4700+ </div>
4701+ </div>
4702+ <div class="header-content">
4703+ <div class="clearfix"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/arrow-nav.png" width="9" height="5" style="left:894px; display: block;" class="arrow-nav">
4704+ <div class="header-navigation-secondary"></div>
4705+ <div class="header-image"></div>
4706+ <h1>Resources</h1>
4707+ <h2>A collection of some of the most important online references for Juju users and developers.</h2>
4708+ </div>
4709+ </div>
4710+ </header>
4711+ <section id="content" class="container-12">
4712+ <div class="grid-12 doc-container">
4713+ <div class="grid-3 doc-navigation">
4714+ <nav role="navigation">
4715+ <h1>User Guide</h1>
4716+ <ul>
4717+ <li class=""><a href="getting-started.html">Getting Started</a></li>
4718+ <li class=" sub"><a href="getting-started.html#intro">Introduction</a></li>
4719+ <li class=" sub"><a href="getting-started.html#install">Installation</a></li>
4720+ <li class=" sub"><a href="config-aws.html">AWS Configuration</a></li>
4721+ <li class=" sub"><a href="config-hpcloud.html">HP Cloud Configuration</a></li>
4722+ <li class=" sub"><a href="">OpenStack Configuration</a></li>
4723+ <li class=" sub"><a href="config-maas.html">MAAS Configuration</a></li>
4724+ <li class=" sub"><a href="getting-started.html#test">Testing your setup</a></li>
4725+ <li class=""><a href="charms.html">Using Charms</a></li>
4726+ <li class=" sub"><a href="charms.html#intro">What are Charms?</a></li>
4727+ <li class=" sub"><a href="charms-deploying.html">Deploying Services</a></li>
4728+ <li class=" sub"><a href="charms-constraints.html">Using constraints</a></li>
4729+ <li class=" sub"><a href="charms-config.html">Service Configuration</a></li>
4730+ <li class=" sub"><a href="charms-relations.html">Service Relationships</a></li>
4731+ <li class=" sub"><a href="charms-exposing.html">Exposing Services</a></li>
4732+ <li class=" sub"><a href="charms-scaling.html">Scaling Services</a></li>
4733+ <li class=" sub"><a href="charms-destroy.html">Destroying Services</a></li>
4734+ </ul>
4735+ <h1>Charm Authors</h1>
4736+ <ul></ul>
4737+ <li class=""><a href="authors-charm-writing.html">Writing a charm</a></li>
4738+ <li class=" sub"><a href="authors-subordinate-services.html">Subordinate services</a></li>
4739+ <li class=" sub"><a href="authors-implicit-relations.html">Implicit Relations</a></li>
4740+ <li class=" sub"><a href="authors-testing.html">Charm Testing</a></li>
4741+ <li class=" sub"><a href="authors-hooks.html">Hook debugging</a></li>
4742+ <li class=""><a href="authors-charm-store.html">The Juju Charm Store</a></li>
4743+ <li class=" sub"><a href="authors-charm-policy.html">Charm store policy</a></li>
4744+ <li class=" sub"><a href="authors-charm-best-practice.html">Best practices</a></li>
4745+ <li class=" sub"><a href="authors-charm-quality.html">Charm Quality Rating</a></li>
4746+ <h1>Reference</h1>
4747+ <ul>
4748+ <li class="sub"><a href="commands.html">Juju commands</a></li>
4749+ <li class="sub"><a href="glossary.html">Glossary</a></li>
4750+ <li class="sub"><a href="contributing.html">Contribute to the Docs!</a></li>
4751+ </ul>
4752+ </nav>
4753+ </div>
4754+ <div class="grid-9 doc-content">
4755+ <article>
4756+ <section id="config_hpcloud">
4757+ <h1>Configuring for HPCloud</h1>
4758+ <p>You should start by generating a generic configuration file for Juju, using the command:
4759+ <pre><code>juju generate-config -w</code></pre>
4760+ <p>This will generate a file, <strong>environments.yaml</strong>, which will live in your <strong>~/.juju/</strong> directory (and will create the directory if it doesn't already exist).
4761+ <p>The essential configuration sections for HPCloud look like this:</p>
4762+ <pre><code>
4763+ &nbsp;&nbsp;hpcloud:
4764+ &nbsp;&nbsp;&nbsp;&nbsp;type: openstack
4765+ &nbsp;&nbsp;&nbsp;&nbsp;admin-secret: 6638bebf0c54de791007e0247d4dae98
4766+ &nbsp;&nbsp;&nbsp;&nbsp;control-bucket: juju-bc66a4a4adbee50b2cea6570436528e5
4767+ &nbsp;&nbsp;&nbsp;&nbsp;tenant-name: <strong class="code">"juju-project1"</strong>
4768+ &nbsp;&nbsp;&nbsp;&nbsp;auth-url: <strong class="code">https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0</strong>
4769+ &nbsp;&nbsp;&nbsp;&nbsp;default-image-id: <strong class="code">"81078"</strong>
4770+ &nbsp;&nbsp;&nbsp;&nbsp;default-instance-type: "standard.xsmall"
4771+ &nbsp;&nbsp;&nbsp;&nbsp;auth-mode: userpass
4772+ &nbsp;&nbsp;&nbsp;&nbsp;username: <strong class="code">"xxxyour-hpcloud-usernamexxx"</strong>
4773+ &nbsp;&nbsp;&nbsp;&nbsp;password: <strong class="code">"xxxpasswordxxx"</strong>
4774+ &nbsp;&nbsp;&nbsp;&nbsp;region: <strong class="code">az-1.region-a.geo-1</strong>
4775+ &nbsp;&nbsp;&nbsp;&nbsp;public-bucket-url: <strong class="code">https://region-a.geo-1.objects.hpcloudsvc.com/v1/60502529753910</strong>
4776+ </code></pre>
4777+ <p> The items highlighted are values you will need to enter, and are explained below. You will find most of the relevant information on the <a href="https://account.hpcloud.com/account/api_keys"> HP Cloud API Keys page</a></p>
4778+ <ul>
4779+ <li><strong>tenant-name:</strong> For HPCloud, this is listed as the project name on the API keys page.</li>
4780+ </ul>
4781+ <img src="./media/getting_started-hpc-tenant.png" alt="image showing project name">
4782+
4783+ <ul>
4784+ <li><strong>auth-url:</strong>This is the keystone url for authentication. It is given (on a region by region basis) under the heading "Service Endpoints - identity"
4785+ </li>
4786+ </ul>
4787+ <img src="./media/getting_started-hpc-config1.png" alt="image showing service endpoints">
4788+ <ul>
4789+ <li><strong>region:</strong> This is the longer format region name, given under the headings for Block Storage and Compute sections.</li>
4790+ </ul>
4791+ <img src="./media/getting_started-hpc-region.png" alt="image showing project name">
4792+ <ul>
4793+ <li><strong>default-image-id:</strong> This is the number assigned to the images available to the HP Cloud. Current;y, these may vary from region to region. The best way to ensure that you have the correct image id is to go to the <a href="https://console.hpcloud.com/compute/az-1_region-a_geo-1/servers"> HP Cloud Console &GT; Servers </a> page and Click on the link to "Create a new server from an image". This will display a list of available images. In the "partner provided images" section you should find a relevant version of Ubuntu. The number in brackets after the image description is the id number you require. </li>
4794+ </ul>
4795+ <img src="./media/getting_started-hpc-image.png" alt="determining the image id number">
4796+ <ul>
4797+ <li><strong>username:</strong> Enter your HP Cloud login username. </li>
4798+ <li><strong>password:</strong> Enter your HP Cloud login password. </li>
4799+ <li><strong>public-bucket-url:</strong> Currently up to date tools are provided to HP Cloud by a public bucket. You should enter the url "https://region-a.geo-1.objects.hpcloudsvc.com/v1/60502529753910" here. </li>
4800+ </section>
4801+ </article>
4802+ </div>
4803+ </div>
4804+ </section>
4805+ <div class="shadow"></div>
4806+ <footer>
4807+ <div>
4808+ <nav role="navigation" class="clearfix">
4809+ <ul>
4810+ <li><a href="https://juju.ubuntu.com/get-started">Get started</a></li>
4811+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/local/">Local</a></li>
4812+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/amazon/">Amazon Web Services</a></li>
4813+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/hp-cloud/">HP Cloud</a></li>
4814+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/rackspace/">Rackspace</a></li>
4815+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/openstack/">Openstack</a></li>
4816+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/maas/">MAAS</a></li>
4817+ </ul>
4818+ <ul>
4819+ <li><a href="https://juju.ubuntu.com/resources">Resources</a></li>
4820+ <li><a href="https://juju.ubuntu.com/docs">Documentation</a></li>
4821+ <li><a href="https://juju.ubuntu.com/resources/videos">Videos</a></li>
4822+ <li><a href="http://uistage.jujucharms.com:8080/">Juju GUI Demo</a></li>
4823+ </ul>
4824+ <ul>
4825+ <li><a href="https://juju.ubuntu.com/community">Community</a></li>
4826+ <li class="page_item"><a href="https://juju.ubuntu.com/community/juju-blog/">Blog</a></li>
4827+ <li class="page_item"><a href="https://juju.ubuntu.com/community/weekly-charm-meeting/">Charm Meetings</a></li>
4828+ <li class="page_item"><a href="https://juju.ubuntu.com/community/charmers/">Charmers</a></li>
4829+ <li class="page_item"><a href="https://lists.ubuntu.com/mailman/listinfo/juju">Mailing List</a></li>
4830+ <li class="page_item"><a href="http://webchat.freenode.net/?channels=juju">Chat</a></li>
4831+ <li class="page_item"><a href="http://askubuntu.com/questions/tagged/juju?sort=faq&amp;amp;pagesize=50">FAQ</a></li>
4832+ </ul>
4833+ <ul class="last">
4834+ <li><a href="https://launchpad.net/juju">Code</a></li>
4835+ <li><a href="https://launchpad.net/juju-core">Juju Core</a></li>
4836+ <li><a href="https://launchpad.net/charms">Charms</a></li>
4837+ </ul>
4838+ </nav>
4839+ </div>
4840+ </footer>
4841+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
4842+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.14/jquery-ui.min.js"></script>
4843+ <script type="text/javascript" src="js/main.js"></script>
4844+ </body>
4845+</html>
4846\ No newline at end of file
4847
4848=== added file 'htmldocs/config-maas.html'
4849--- htmldocs/config-maas.html 1970-01-01 00:00:00 +0000
4850+++ htmldocs/config-maas.html 2013-06-27 17:35:30 +0000
4851@@ -0,0 +1,174 @@
4852+<!DOCTYPE html>
4853+<html>
4854+ <head>
4855+ <meta charset="utf-8">
4856+ <title>Juju Documentation - Configuring Juju to work with MAAS</title>
4857+ <link href="//fonts.googleapis.com/css?family=Ubuntu:400,400italic" rel="stylesheet" type="text/css"/>
4858+ <link href="//fonts.googleapis.com/css?family=Ubuntu+Mono:400" rel="stylesheet" type="text/css"/>
4859+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/reset.css" rel="stylesheet" type="text/css"/>
4860+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/960.css" rel="stylesheet" type="text/css"/>
4861+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/base.css" rel="stylesheet" type="text/css"/>
4862+ <link href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/resources.css" rel="stylesheet" type="text/css"/>
4863+ <link href="css/main.css" rel="stylesheet" type="text/css"/>
4864+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
4865+ <script src="http://app.stacktack.com/jquery.stacktack.min.js"></script>
4866+ <script type="text/javascript">
4867+ $(document).ready(function() {
4868+ $(document).stacktack();
4869+ });
4870+ </script><!--[if lt IE 9]>
4871+ <script type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
4872+ </head>
4873+ <body class="resources">
4874+ <header>
4875+ <div class="header-login">
4876+ <ul>
4877+ <li>&nbsp;</li>
4878+ </ul>
4879+ </div>
4880+ <div class="header-navigation">
4881+ <div>
4882+ <nav role="navigation">
4883+ <ul>
4884+ <li class="page_item"><a href="https://juju.ubuntu.com/">Home</a></li>
4885+ <li class="page_item current_page_item"><a href="https://juju.ubuntu.com/">Resources</a></li>
4886+ <li class="page_item"><a href="https://juju.ubuntu.com/">Community</a></li>
4887+ <li class="page_item"><a href="https://juju.ubuntu.com/">Charm Store</a></li>
4888+ <li class="page_item"><a href="https://juju.ubuntu.com/">Events</a></li>
4889+ <li class="page_item"><a href="https://juju.ubuntu.com/">Survey</a></li>
4890+ <li>
4891+ <form id="form-search" method="get" action="/">
4892+ <fieldset>
4893+ <input id="input-search" type="text" name="s" value="Search">
4894+ </fieldset>
4895+ </form>
4896+ </li>
4897+ </ul>
4898+ </nav><a href="https://juju.ubuntu.com/" class="logo-ubuntu"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/logo-ubuntu.png"></a>
4899+ </div>
4900+ </div>
4901+ <div class="header-content">
4902+ <div class="clearfix"><img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/arrow-nav.png" width="9" height="5" style="left:894px; display: block;" class="arrow-nav">
4903+ <div class="header-navigation-secondary"></div>
4904+ <div class="header-image"></div>
4905+ <h1>Resources</h1>
4906+ <h2>A collection of some of the most important online references for Juju users and developers.</h2>
4907+ </div>
4908+ </div>
4909+ </header>
4910+ <section id="content" class="container-12">
4911+ <div class="grid-12 doc-container">
4912+ <div class="grid-3 doc-navigation">
4913+ <nav role="navigation">
4914+ <h1>User Guide</h1>
4915+ <ul>
4916+ <li class=""><a href="getting-started.html">Getting Started</a></li>
4917+ <li class=" sub"><a href="getting-started.html#intro">Introduction</a></li>
4918+ <li class=" sub"><a href="getting-started.html#install">Installation</a></li>
4919+ <li class=" sub"><a href="config-aws.html">AWS Configuration</a></li>
4920+ <li class=" sub"><a href="config-hpcloud.html">HP Cloud Configuration</a></li>
4921+ <li class=" sub"><a href="">OpenStack Configuration</a></li>
4922+ <li class=" sub"><a href="config-maas.html">MAAS Configuration</a></li>
4923+ <li class=" sub"><a href="getting-started.html#test">Testing your setup</a></li>
4924+ <li class=""><a href="charms.html">Using Charms</a></li>
4925+ <li class=" sub"><a href="charms.html#intro">What are Charms?</a></li>
4926+ <li class=" sub"><a href="charms-deploying.html">Deploying Services</a></li>
4927+ <li class=" sub"><a href="charms-constraints.html">Using constraints</a></li>
4928+ <li class=" sub"><a href="charms-config.html">Service Configuration</a></li>
4929+ <li class=" sub"><a href="charms-relations.html">Service Relationships</a></li>
4930+ <li class=" sub"><a href="charms-exposing.html">Exposing Services</a></li>
4931+ <li class=" sub"><a href="charms-scaling.html">Scaling Services</a></li>
4932+ <li class=" sub"><a href="charms-destroy.html">Destroying Services</a></li>
4933+ </ul>
4934+ <h1>Charm Authors</h1>
4935+ <ul></ul>
4936+ <li class=""><a href="authors-charm-writing.html">Writing a charm</a></li>
4937+ <li class=" sub"><a href="authors-subordinate-services.html">Subordinate services</a></li>
4938+ <li class=" sub"><a href="authors-implicit-relations.html">Implicit Relations</a></li>
4939+ <li class=" sub"><a href="authors-testing.html">Charm Testing</a></li>
4940+ <li class=" sub"><a href="authors-hooks.html">Hook debugging</a></li>
4941+ <li class=""><a href="authors-charm-store.html">The Juju Charm Store</a></li>
4942+ <li class=" sub"><a href="authors-charm-policy.html">Charm store policy</a></li>
4943+ <li class=" sub"><a href="authors-charm-best-practice.html">Best practices</a></li>
4944+ <li class=" sub"><a href="authors-charm-quality.html">Charm Quality Rating</a></li>
4945+ <h1>Reference</h1>
4946+ <ul>
4947+ <li class="sub"><a href="commands.html">Juju commands</a></li>
4948+ <li class="sub"><a href="glossary.html">Glossary</a></li>
4949+ <li class="sub"><a href="contributing.html">Contribute to the Docs!</a></li>
4950+ </ul>
4951+ </nav>
4952+ </div>
4953+ <div class="grid-9 doc-content">
4954+ <article>
4955+ <section id="config_maas">
4956+ <h1>Configuring for MAAS</h1>
4957+ <p>Metal As A Service is software which allows you to deal with physical hardware just as easily as virtual nodes. For more information about MAAS, see <a href="maas.ubuntu.com"> maas.ubuntu.com </a> </p>
4958+ <h1> Get your API key</h1>
4959+ <p>You'll need an API key from MAAS so that the Juju client can access it. Each user account in MAAS can have as many API keys as desired. One hard and fast rule is that you'll need to use a different API key for each Juju environment you set up within a single MAAS cluster.</p>
4960+ <p>To get the API key:</p>
4961+
4962+ <ol>
4963+ <li>Go to your MAAS preferences page, or go to your MAAS home page and choose Preferences from the drop-down menu that appears when clicking your username at the top-right of the page.</li>
4964+ <li>Optionally add a new MAAS key. Do this if you're setting up another environment within the same MAAS cluster.</li>
4965+ <li>Copy the key value - you will need it shortly!</li>
4966+ </ol>
4967+
4968+ <h1> Edit or create the configuration</h1>
4969+ <p>Create or modify <strong>~/.juju/environments.yaml</strong> with the following content:
4970+
4971+ <pre><code>
4972+ &nbsp;&nbsp;maas:
4973+ &nbsp;&nbsp;&nbsp;&nbsp;type: maas
4974+ &nbsp;&nbsp;&nbsp;&nbsp;maas-server: 'http://localhost:5240'
4975+ &nbsp;&nbsp;&nbsp;&nbsp;maas-oauth: '$MAAS_API_KEY'
4976+ &nbsp;&nbsp;&nbsp;&nbsp;admin-secret: 'nothing'
4977+ </code></pre>
4978+
4979+ <p>Substitute the API key from earlier into the <span class="pre">$MAAS_API_KEY</span> slot. You may need to modify the maas-server setting too; if you're running from the maas package it should be something like "http://hostname.xxxx.yyy/MAAS".</p>
4980+ </section>
4981+ </article>
4982+ </div>
4983+ </div>
4984+ </section>
4985+ <div class="shadow"></div>
4986+ <footer>
4987+ <div>
4988+ <nav role="navigation" class="clearfix">
4989+ <ul>
4990+ <li><a href="https://juju.ubuntu.com/get-started">Get started</a></li>
4991+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/local/">Local</a></li>
4992+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/amazon/">Amazon Web Services</a></li>
4993+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/hp-cloud/">HP Cloud</a></li>
4994+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/rackspace/">Rackspace</a></li>
4995+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/openstack/">Openstack</a></li>
4996+ <li class="page_item"><a href="https://juju.ubuntu.com/get-started/maas/">MAAS</a></li>
4997+ </ul>
4998+ <ul>
4999+ <li><a href="https://juju.ubuntu.com/resources">Resources</a></li>
5000+ <li><a href="https://juju.ubuntu.com/docs">Documentation</a></li>
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: