Merge lp:~evilnick/juju-core/docs-bundles02 into lp:juju-core/docs

Proposed by Nick Veitch
Status: Merged
Approved by: Nick Veitch
Approved revision: no longer in the source branch.
Merged at revision: 178
Proposed branch: lp:~evilnick/juju-core/docs-bundles02
Merge into: lp:juju-core/docs
Diff against target: 276 lines (+247/-1)
3 files modified
htmldocs/charms-bundles.html (+244/-0)
htmldocs/navigation.html (+1/-0)
htmldocs/navigation.json (+2/-1)
To merge this branch: bzr merge lp:~evilnick/juju-core/docs-bundles02
Reviewer Review Type Date Requested Status
Nick Veitch Pending
Review via email: mp+195997@code.launchpad.net

Description of the change

bundles page added

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'htmldocs/charms-bundles.html'
2--- htmldocs/charms-bundles.html 1970-01-01 00:00:00 +0000
3+++ htmldocs/charms-bundles.html 2013-11-20 18:44:46 +0000
4@@ -0,0 +1,244 @@
5+<!DOCTYPE html>
6+<html>
7+<!--Head-->
8+ <head>
9+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
10+ <title>Juju Documentation</title>
11+ <script src="/wp-content/themes/ubuntu/library/js/all-yui.js"></script>
12+ <link href="https://fonts.googleapis.com/css?family=Ubuntu:400,300,300italic,400italic,700,700italic|Ubuntu+Mono" rel="stylesheet" type="text/css">
13+ <link rel="stylesheet" type="text/css" media="screen" href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/reset.css">
14+ <link rel="shortcut icon" href="//assets.ubuntu.com/sites/ubuntu/latest/u/img/favicon.ico" />
15+ <link rel="stylesheet" type="text/css" media="screen" href="//assets.ubuntu.com/sites/guidelines/css/latest/ubuntu-styles.css" />
16+ <link rel="stylesheet" type="text/css" media="screen" href="//assets.ubuntu.com/sites/ubuntu/latest/u/css/global.css" />
17+ <link rel="stylesheet" type="text/css" media="screen" href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/960.css">
18+ <link rel="stylesheet" type="text/css" media="screen" href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/home-new.css">
19+ <link rel="stylesheet" id="stacktack-css" href="https://juju.ubuntu.com/wp-content/plugins/stacktack/css/stacktack.min.css?ver=3.4.2" type="text/css" media="all">
20+ <link href="./css/main.css" rel="stylesheet" type="text/css">
21+
22+ <!--[if lt IE 9]>
23+ <script type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
24+ <![endif]-->
25+ </head>
26+<!--End-Head-->
27+
28+
29+
30+
31+
32+
33+ <body class="resources">
34+
35+<!--Header-->
36+
37+ <header class="banner global" role="banner">
38+ <nav role="navigation" class="nav-primary nav-right">
39+ <div class="logo">
40+ <a class="logo-ubuntu" href="https://juju.ubuntu.com/">
41+ <img width="118" height="27" src="//assets.ubuntu.com/sites/ubuntu/latest/u/img/logo.png" alt="Juju logo" />
42+ <span>Juju</span>
43+ </a>
44+ </div>
45+ <ul>
46+ <li class="accessibility-aid"><a accesskey="s" href="#main-content">Jump to content</a></li>
47+ <li class="page_item page-item-8"><a href="https://juju.ubuntu.com/charms/">Charms</a></li>
48+ <li class="page_item page-item-10"><a href="https://juju.ubuntu.com/features/">Features</a></li>
49+ <li class="page_item page-item-12"><a href="https://juju.ubuntu.com/deployment/">Deploy</a></li>
50+ <li class="page_item page-item-14"><a href="https://juju.ubuntu.com/resources/">Resources</a></li>
51+ <li class="page_item page-item-16"><a href="https://juju.ubuntu.com/community/">Community</a></li>
52+ <li class="page_item page-item-18"><a href="https://juju.ubuntu.com/download/">Install Juju</a></li>
53+ </ul>
54+ <div id="box-search">
55+ <form class="search-form" method="get" id="searchform" action="https://juju.ubuntu.com/">
56+ <label class="off-left" for="s">Search:</label>
57+ <input class="form-text" type="text" value="" name="s" id="s" />
58+ <button class="off-left form-submit" type="submit" id="searchsubmit">Search</button>
59+ </form>
60+ </div>
61+ </nav>
62+ </header>
63+<!--End-Header-->
64+<!--Preamble-->
65+<div class="wrapper">
66+ <div id="main-content" class="inner-wrapper" role="main">
67+ <div class="row no-border">
68+ <div class="header-navigation-secondary"></div>
69+ <h2 class="pagetitle">Juju documentation</h2>
70+ </div>
71+ <section id="content" class="container-12">
72+ <div class="grid-12 doc-container">
73+ <div id="navlinks" class="grid-3 doc-navigation">LINKS</div>
74+ <div class="grid-9 doc-content">
75+<!--End-Preamble-->
76+ <article>
77+ <section id ="bundles">
78+<h1 id="top">Creating and using Bundles</h1>
79+
80+<p>A bundle is a set of services with a specific configuration and their corresponding relations that can be deployed together via a single step. Instead of deploying a single service, they can be used to deploy an entire workload, with working relations and configuration. The use of bundles allows for easy repeatability and for sharing of complex, multi-service deployments.</p>
81+
82+<p>Bundles are defined in text files, called “bundle files” or “deployer files”. Each file may contain one or more bundle definitions. For simplicity, the files generated as described below will only have one bundle.</p>
83+
84+<h2 id="creating">Creating a bundle</h2>
85+<p>The standard way to create a bundle is via the Juju GUI. When a set of services are deployed and configured the bundle definition can be saved via the export functionality which is invoked either by clicking on the export icon on the Juju GUI masthead or via the keyboard shortcut “shift-d”. The result of exporting is a file called “export.yaml” that is saved in your “Downloads” directory as defined by your browser.</p>
86+<p>As an example here is an environment with a MySQL service and a Wordpress service with a relation between the two. The exported bundle file contains the following data:</p>
87+<pre class="prettyprint lang-yaml">envExport:
88+ services:
89+ mysql:
90+ charm: "cs:precise/mysql-27"
91+ num_units: 1
92+ annotations:
93+ "gui-x": "139"
94+ "gui-y": "168"
95+ wordpress:
96+ charm: "cs:precise/wordpress-20"
97+ num_units: 1
98+ annotations:
99+ "gui-x": "481"
100+ "gui-y": "178"
101+ relations:
102+ - - "wordpress:db"
103+ - "mysql:db"
104+</pre>
105+
106+<h2 id="using">Using bundles</h2>
107+<p>A bundle file can be used in two distinct ways. One is to use it locally, deploying from your computer, which is useful to initially ensure it works and for experimenting. After you are satisfied with the bundle, you can push it to Launchpad where it will be available to you and others via the Charm Store.
108+<h3>Local import to Juju GUI</h3>
109+
110+<p>The easiest way to import a bundle into the GUI is by dragging the bundle file from your desktop and dropping it on the GUI canvas. If the file has multiple bundles in it you’ll be prompted to select the single bundle you wish to deploy.</p>
111+
112+<p>A second way to import into the GUI is via the <code>Import</code> button on the GUI masthead. After clicking the button you’ll be prompted to select the bundle file. Once a file is selected the process is the same as the drag-and-drop method.</p>
113+<h3>Local deploy via command-line</h3>
114+
115+<p>A bundle file can be deployed via the command-line interface by using the <code>juju-deployer</code> tool.</p>
116+<p>To install into a virtual environment, do the following:</p>
117+<pre class="prettyprint lang-yaml">
118+virtualenv --system-site-packages deployer
119+./deployer/bin/easy_install juju-deployer
120+./deployer/bin/juju-deployer -h
121+</pre>
122+<p>To deploy a bundle file you need just issue the command:</p>
123+<pre class="prettyprint lang-yaml">./deployer/bin/juju-deployer -e &LT;environment&GT; -c deployer_file bundle_name</pre>
124+<p>where <code>&LT;environment&GT;</code> is an already bootstrapped Juju environment.</p>
125+
126+<h2 id="sharing">Sharing your bundle with the community</h2>
127+<p>Bundles are shared by putting a branch onto Launchpad with specific naming which will then be pulled into the Charm Store. The branch must be constructed and named according to the following rules.</p>
128+
129+<p>The branch name must structured as:</p>
130+<pre class="prettyprint lang-bash">lp:~&LT;your launchpad id&GT;/charms/bundles/<&LT;your bundle name&GT;/bundle
131+</pre>
132+
133+<p>A concrete example would be:</p>
134+<pre class="prettyprint lang-bash">
135+lp:~bac/charms/bundles/wiki/bundle
136+</pre>
137+
138+<p>Inside the Bazaar branch, the following files are expected:</p>
139+<ul>
140+
141+<li>bundles.yaml - the exported bundle file.</li>
142+<li>README - user-readable description of the bundle.</li>
143+</ul>
144+
145+<h2 id="store-deploy">Deploying a Bundle from the Charm Store with the GUI</h2>
146+
147+<image class="noshadow right" src="./media/charms-bundle.png" width=400>
148+<p>To deploy a bundle from the Charm Store using the GUI, first find the bundle you wish to deploy via search or browsing the bundles to the left. To view bundle details, click on the bundle in the left sidebar; a pane will slide out containing the bundle details. You can then add the bundle to the canvas by clicking the button on the upper-right of the pane.</p>
149+
150+<p>Alternatively, you can add the bundle to the canvas without expanding the detail pane by dragging the bundle onto the environment.</p>
151+
152+<p>After the service is on the canvas it is in a ghost state. Now you can configure the service in the service inspector to the right of the screen and then click the "Deploy" button.</p>
153+
154+</section>
155+
156+ </article>
157+<!--Postamble-->
158+ </div>
159+ </div>
160+ </section>
161+ </div>
162+</div>
163+<!--End-Postamble-->
164+<!--Footer-->
165+ <footer class="global clearfix" role="contentinfo">
166+ <nav role="navigation">
167+ <div class="footer-a">
168+ <div class="clearfix">
169+ <ul>
170+ <li>
171+ <h2><a href="/">Juju</a></h2>
172+ <ul>
173+ <li><a href="/charms">Charms</a></li>
174+ <li><a href="/features">Features</a></li>
175+ <li><a href="/deployment">Deployment</a></li>
176+ </ul>
177+ </li>
178+ <li>
179+ <h2><a href="/resources">Resources</a></h2>
180+ <ul>
181+ <li><a href="/resources/juju-overview/">Overview</a></li>
182+ <li><a href="/docs/">Documentation</a></li>
183+ <li><a href="/resources/the-juju-gui/">The Juju web UI</a></li>
184+ <li><a href="/docs/authors-charm-store.html">The charm store</a></li>
185+ <li><a href="/docs/getting-started.html#test">Tutorial</a></li>
186+ <li><a href="/resources/videos/">Videos</a></li>
187+ <li><a href="/resources/easy-tasks-for-new-developers/">Easy tasks for new developers</a></li>
188+ </ul>
189+ </li>
190+ <li>
191+ <h2><a href="/community">Community</a></h2>
192+ <ul>
193+ <li><a href="/community/blog/">Juju Blog</a></li>
194+ <li><a href="/events/">Events</a></li>
195+ <li><a href="/community/weekly-charm-meeting/">Weekly charm meeting</a></li>
196+ <li><a href="/community/charmers/">Charmers</a></li>
197+ <li><a href="/docs/authors-charm-writing.html">Write a charm</a></li>
198+ <li><a href="/docs/contributing.html">Help with documentation</a></li>
199+ <li><a href="https://bugs.launchpad.net/juju-website/+filebug">File a bug</a></li> <li><a href="/labs/">Juju Labs</a></li>
200+ </ul>
201+ </li>
202+ <li>
203+ <h2><a href="https://jujucharms.com/sidebar/">Try Juju</a></h2>
204+ <ul>
205+ <li><a href="https://jujucharms.com/">Charm store</a></li>
206+ <li><a href="/download/">Download Juju</a></li>
207+ </ul>
208+ </li>
209+ </ul>
210+ </div>
211+ </div>
212+ </nav>
213+ <div class="legal clearfix">
214+ <p>&copy; 2013 Canonical Ltd. Ubuntu and Canonical are registered trademarks of <a href="http://canonical.com">Canonical Ltd</a>.</p>
215+ </div>
216+ </footer>
217+
218+<!--End-Footer-->
219+
220+<!--Scripts-->
221+ <script src="//google-code-prettify.googlecode.com/svn/loader/run_prettify.js?skin=sunburst"></script>
222+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
223+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js"></script>
224+ <script src="//d38yea5fb4e2oh.cloudfront.net/jquery.stacktack.min.js"></script>
225+ <script type="text/javascript" src="//code.jquery.com/jquery-1.9.1.js"></script>
226+ <script type="text/javascript" src="./js/main.js"></script>
227+ <script type="text/javascript" src="./js/jquery.details.js"></script>
228+ <script src="//assets.ubuntu.com/sites/ubuntu/latest/u/js/core.js"></script>
229+ <script src="//assets.ubuntu.com/sites/ubuntu/latest/u/js/global.js"></script>
230+ <!-- google analytics -->
231+ <script>
232+ var _gaq = _gaq || [];
233+ _gaq.push(['_setAccount', 'UA-1018242-41']);
234+ _gaq.push(['_trackPageview']);
235+
236+ (function() {
237+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
238+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
239+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
240+ })();
241+ </script>
242+<!--End-Scripts-->
243+
244+
245+
246+
247+
248+</body></html>
249
250=== added file 'htmldocs/media/charms-bundle.png'
251Binary files htmldocs/media/charms-bundle.png 1970-01-01 00:00:00 +0000 and htmldocs/media/charms-bundle.png 2013-11-20 18:44:46 +0000 differ
252=== modified file 'htmldocs/navigation.html'
253--- htmldocs/navigation.html 2013-11-08 10:06:03 +0000
254+++ htmldocs/navigation.html 2013-11-20 18:44:46 +0000
255@@ -19,6 +19,7 @@
256 <li class=" sub"><a href="charms-service-groups.html">Groups of Services</a></li>
257 <li class=" sub"><a href="charms-destroy.html">Destroying Services</a></li>
258 <li class=" sub"><a href="charms-environments.html">Managing environments</a></li>
259+ <li class=" sub"><a href="charms-bundles.html">Creating and using bundles</a></li>
260 <li class=""><a href="howto.html">How to...</a></li>
261 <li class=" sub"><a href="howto-node.html">Deploy a Node.js app</a></li>
262 <li class=" sub"><a href="howto-rails.html">Test and deploy on Rails</a></li>
263
264=== modified file 'htmldocs/navigation.json'
265--- htmldocs/navigation.json 2013-11-09 15:38:25 +0000
266+++ htmldocs/navigation.json 2013-11-20 18:44:46 +0000
267@@ -24,7 +24,8 @@
268 "Scaling Services": "charms-scaling.html",
269 "Groups of Services": "charms-service-groups.html",
270 "Destroying Services": "charms-destroy.html",
271- "Managing environments": "charms-environments.html"
272+ "Managing environments": "charms-environments.html",
273+ "Creating and using bundles": "charms-bundles.html"
274 }
275 },
276 "How to...": {

Subscribers

People subscribed via source and target branches