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
=== modified file 'htmldocs/charms-bundles.html'
--- htmldocs/charms-bundles.html 2013-11-21 16:23:17 +0000
+++ htmldocs/charms-bundles.html 2013-11-25 17:09:12 +0000
@@ -77,8 +77,30 @@
7777
78<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>78<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>
7979
80<h2 id="using">Using bundles</h2>
81<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.
82
83<h3>Local import to Juju GUI</h3>
84
85<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>
86
87<iframe class="youtube-player" type="text/html" width="640" height="360" src="//www.youtube.com/embed/oSPB_qjeEsg" frameborder="0"></iframe>
88
89<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>
90
91<h3>Local deploy via command-line</h3>
92
93<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>
94<pre class="prettyprint lang-yaml">
95juju bundle proof bundles.yaml # optional
96juju quickstart bundles.yaml
97</pre>
98
80<h2 id="creating">Creating a bundle</h2>99<h2 id="creating">Creating a bundle</h2>
81<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>100<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>
101
102<img src="media/charm_bundles_export-bundle.png" alt="Export button in the Juju GU">
103
82<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>104<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>
83<pre class="prettyprint lang-yaml">envExport: 105<pre class="prettyprint lang-yaml">envExport:
84 services: 106 services:
@@ -99,26 +121,6 @@
99 - "mysql:db"121 - "mysql:db"
100</pre>122</pre>
101123
102<h2 id="using">Using bundles</h2>
103<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.
104<h3>Local import to Juju GUI</h3>
105
106<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>
107
108<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>
109<h3>Local deploy via command-line</h3>
110
111<p>A bundle file can be deployed via the command-line interface by using the <code>juju-deployer</code> tool.</p>
112<p>To install into a virtual environment, do the following:</p>
113<pre class="prettyprint lang-yaml">
114virtualenv --system-site-packages deployer
115./deployer/bin/easy_install juju-deployer
116./deployer/bin/juju-deployer -h
117</pre>
118<p>To deploy a bundle file you need just issue the command:</p>
119<pre class="prettyprint lang-yaml">./deployer/bin/juju-deployer -e &LT;environment&GT; -c deployer_file bundle_name</pre>
120<p>where <code>&LT;environment&GT;</code> is an already bootstrapped Juju environment.</p>
121
122<h2 id="sharing">Sharing your bundle with the community</h2>124<h2 id="sharing">Sharing your bundle with the community</h2>
123<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>125<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>
124126
@@ -132,11 +134,19 @@
132</pre>134</pre>
133135
134<p>Inside the Bazaar branch, the following files are expected:</p>136<p>Inside the Bazaar branch, the following files are expected:</p>
135<ul>137
136138<pre class="prettyprint lang-bash">
137<li>bundles.yaml - the exported bundle file.</li>139.
138<li>README - user-readable description of the bundle.</li>140├── bundles.yaml
139</ul>141└── README.md
142</pre>
143
144<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>
145
146<pre class="prettyprint lang-bash">
147juju bundle proof bundles.yaml
148bzr push lp:~yourusername/charms/bundle/yourbundlename/bundle
149</pre>
140150
141<h2 id="store-deploy">Deploying a Bundle from the Charm Store with the GUI</h2>151<h2 id="store-deploy">Deploying a Bundle from the Charm Store with the GUI</h2>
142152
143153
=== added file 'htmldocs/media/charm_bundles_export-bundle.png'
144Binary 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 differ154Binary 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