Merge lp:~jorge/juju-core/bundle-docs into lp:juju-core/docs

Proposed by Jorge Castro
Status: Merged
Merged at revision: 183
Proposed branch: lp:~jorge/juju-core/bundle-docs
Merge into: lp:juju-core/docs
Diff against target: 89 lines (+35/-25)
1 file modified
htmldocs/charms-bundles.html (+35/-25)
To merge this branch: bzr merge lp:~jorge/juju-core/bundle-docs
Reviewer Review Type Date Requested Status
Nick Veitch (community) Approve
Review via email: mp+196602@code.launchpad.net

Description of the change

This adds some screenshots, a video, and some examples to the bundle page

To post a comment you must log in.
Revision history for this message
Nick Veitch (evilnick) wrote :

I have rewritten it in English. thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'htmldocs/charms-bundles.html'
2--- htmldocs/charms-bundles.html 2013-11-21 16:23:17 +0000
3+++ htmldocs/charms-bundles.html 2013-11-25 17:09:12 +0000
4@@ -77,8 +77,30 @@
5
6 <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>
7
8+<h2 id="using">Using bundles</h2>
9+<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.
10+
11+<h3>Local import to Juju GUI</h3>
12+
13+<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>
14+
15+<iframe class="youtube-player" type="text/html" width="640" height="360" src="//www.youtube.com/embed/oSPB_qjeEsg" frameborder="0"></iframe>
16+
17+<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>
18+
19+<h3>Local deploy via command-line</h3>
20+
21+<p>A bundle file can be deployed via the command-line interface by using the <code>juju quickstart</code> tool. You should always check the bundle to make sure it is correct, then deploy it:</p>
22+<pre class="prettyprint lang-yaml">
23+juju bundle proof bundles.yaml # optional
24+juju quickstart bundles.yaml
25+</pre>
26+
27 <h2 id="creating">Creating a bundle</h2>
28 <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>
29+
30+<img src="media/charm_bundles_export-bundle.png" alt="Export button in the Juju GU">
31+
32 <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>
33 <pre class="prettyprint lang-yaml">envExport:
34 services:
35@@ -99,26 +121,6 @@
36 - "mysql:db"
37 </pre>
38
39-<h2 id="using">Using bundles</h2>
40-<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.
41-<h3>Local import to Juju GUI</h3>
42-
43-<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>
44-
45-<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>
46-<h3>Local deploy via command-line</h3>
47-
48-<p>A bundle file can be deployed via the command-line interface by using the <code>juju-deployer</code> tool.</p>
49-<p>To install into a virtual environment, do the following:</p>
50-<pre class="prettyprint lang-yaml">
51-virtualenv --system-site-packages deployer
52-./deployer/bin/easy_install juju-deployer
53-./deployer/bin/juju-deployer -h
54-</pre>
55-<p>To deploy a bundle file you need just issue the command:</p>
56-<pre class="prettyprint lang-yaml">./deployer/bin/juju-deployer -e &LT;environment&GT; -c deployer_file bundle_name</pre>
57-<p>where <code>&LT;environment&GT;</code> is an already bootstrapped Juju environment.</p>
58-
59 <h2 id="sharing">Sharing your bundle with the community</h2>
60 <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>
61
62@@ -132,11 +134,19 @@
63 </pre>
64
65 <p>Inside the Bazaar branch, the following files are expected:</p>
66-<ul>
67-
68-<li>bundles.yaml - the exported bundle file.</li>
69-<li>README - user-readable description of the bundle.</li>
70-</ul>
71+
72+<pre class="prettyprint lang-bash">
73+.
74+├── bundles.yaml
75+└── README.md
76+</pre>
77+
78+<p>After you have created the bundles.yaml and readme, you need to proof the bundle to make sure it is valid. You can push them to your namespace, the Juju Charm store will automatically find your bundle and index it in the store. Ensure you are using your launchpad name and a unique bundle name:</p>
79+
80+<pre class="prettyprint lang-bash">
81+juju bundle proof bundles.yaml
82+bzr push lp:~yourusername/charms/bundle/yourbundlename/bundle
83+</pre>
84
85 <h2 id="store-deploy">Deploying a Bundle from the Charm Store with the GUI</h2>
86
87
88=== added file 'htmldocs/media/charm_bundles_export-bundle.png'
89Binary files htmldocs/media/charm_bundles_export-bundle.png 1970-01-01 00:00:00 +0000 and htmldocs/media/charm_bundles_export-bundle.png 2013-11-25 17:09:12 +0000 differ

Subscribers

People subscribed via source and target branches