Merge lp:~evilnick/juju-core/docs-environments 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: 143
Proposed branch: lp:~evilnick/juju-core/docs-environments
Merge into: lp:juju-core/docs
Diff against target: 269 lines (+230/-2)
4 files modified
htmldocs/authors-charm-config.html (+1/-1)
htmldocs/charms-environments.html (+226/-0)
htmldocs/navigation.html (+1/-0)
htmldocs/navigation.json (+2/-1)
To merge this branch: bzr merge lp:~evilnick/juju-core/docs-environments
Reviewer Review Type Date Requested Status
charmers Pending
Review via email: mp+190429@code.launchpad.net

Commit message

added page on managing environments

Description of the change

Add section on managing environments

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=== modified file 'htmldocs/authors-charm-config.html'
2--- htmldocs/authors-charm-config.html 2013-10-10 01:00:24 +0000
3+++ htmldocs/authors-charm-config.html 2013-10-10 17:08:29 +0000
4@@ -155,7 +155,7 @@
5 </section>
6
7 </article>
8-</article>
9+
10 <!--Postamble-->
11 </div>
12 </div>
13
14=== added file 'htmldocs/charms-environments.html'
15--- htmldocs/charms-environments.html 1970-01-01 00:00:00 +0000
16+++ htmldocs/charms-environments.html 2013-10-10 17:08:29 +0000
17@@ -0,0 +1,226 @@
18+<!DOCTYPE html>
19+<html>
20+<!--Head-->
21+ <head>
22+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
23+ <title>Juju Documentation</title>
24+ <script src="/wp-content/themes/ubuntu/library/js/all-yui.js"></script>
25+ <link href="https://fonts.googleapis.com/css?family=Ubuntu:400,300,300italic,400italic,700,700italic|Ubuntu+Mono" rel="stylesheet" type="text/css">
26+ <link rel="stylesheet" type="text/css" media="screen" href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/reset.css">
27+ <link rel="shortcut icon" href="//assets.ubuntu.com/sites/ubuntu/latest/u/img/favicon.ico" />
28+ <link rel="stylesheet" type="text/css" media="screen" href="//assets.ubuntu.com/sites/guidelines/css/latest/ubuntu-styles.css" />
29+ <link rel="stylesheet" type="text/css" media="screen" href="//assets.ubuntu.com/sites/ubuntu/latest/u/css/global.css" />
30+ <link rel="stylesheet" type="text/css" media="screen" href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/960.css">
31+ <link rel="stylesheet" type="text/css" media="screen" href="https://juju.ubuntu.com/wp-content/themes/juju-website/css/home-new.css">
32+ <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">
33+ <link href="./css/main.css" rel="stylesheet" type="text/css">
34+
35+ <!--[if lt IE 9]>
36+ <script type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
37+ <![endif]-->
38+ </head>
39+<!--End-Head-->
40+
41+
42+
43+ <body class="resources">
44+<!--Header-->
45+
46+ <header class="banner global" role="banner">
47+ <nav role="navigation" class="nav-primary nav-right">
48+ <div class="logo">
49+ <a class="logo-ubuntu" href="https://juju.ubuntu.com/">
50+ <img width="118" height="27" src="//assets.ubuntu.com/sites/ubuntu/latest/u/img/logo.png" alt="Juju logo" />
51+ <span>Juju</span>
52+ </a>
53+ </div>
54+ <ul>
55+ <li class="accessibility-aid"><a accesskey="s" href="#main-content">Jump to content</a></li>
56+ <li class="page_item page-item-8"><a href="https://juju.ubuntu.com/charms/">Charms</a></li>
57+ <li class="page_item page-item-10"><a href="https://juju.ubuntu.com/features/">Features</a></li>
58+ <li class="page_item page-item-12"><a href="https://juju.ubuntu.com/deployment/">Deploy</a></li>
59+ <li class="page_item page-item-14"><a href="https://juju.ubuntu.com/resources/">Resources</a></li>
60+ <li class="page_item page-item-16"><a href="https://juju.ubuntu.com/community/">Community</a></li>
61+ <li class="page_item page-item-18"><a href="https://juju.ubuntu.com/download/">Install Juju</a></li>
62+ </ul>
63+ <div id="box-search">
64+ <form class="search-form" method="get" id="searchform" action="https://juju.ubuntu.com/">
65+ <label class="off-left" for="s">Search:</label>
66+ <input class="form-text" type="text" value="" name="s" id="s" />
67+ <button class="off-left form-submit" type="submit" id="searchsubmit">Search</button>
68+ </form>
69+ </div>
70+ </nav>
71+ </header>
72+<!--End-Header-->
73+<!--Preamble-->
74+<div class="wrapper">
75+ <div id="main-content" class="inner-wrapper" role="main">
76+ <div class="row no-border">
77+ <div class="header-navigation-secondary"></div>
78+ <h2 class="pagetitle">Juju documentation</h2>
79+ </div>
80+ <section id="content" class="container-12">
81+ <div class="grid-12 doc-container">
82+ <div id="navlinks" class="grid-3 doc-navigation">LINKS</div>
83+ <div class="grid-9 doc-content">
84+<!--End-Preamble-->
85+<article>
86+ <section id='environments'>
87+ <h1>Managing environments</h1>
88+ <p>Juju can be used to manage multiple clouds on different environments. The environments themselves need only be defined in the <code>environments.yaml</code> file as more fully described in the configuration section of the documentation. It is entirely possible to have multiple environments with the same cloud provider (providing they are of course separate environments on the cloud too) or across all the different types of supported cloud providers.</p>
89+
90+ <h2 id="environment-identifying">Identifying the current environment</h2>
91+ <p>The order of precedence for determining the environment a command will be executed on is:</p>
92+ <ol>
93+ <li> The environment specified by the use of the <code>-e</code> switch.</li>
94+ <li> The environment set by the <code>JUJU_ENV</code> environment variable.</li>
95+ <li> The environment last specified with the <code>switch</code> command. </li>
96+ <li> The environment specified as the default in <code>environments.yaml</code>.</li>
97+ </ol>
98+<p>Currently it is possible to determine which environment a command will act on by checking the <code>JUJU_ENV</code> variable, and if that is empty, the contents of the file <code>~/.juju/current-environment</code>:</p>
99+<pre class="prettyprint lang-bash">
100+echo $JUJU_ENV
101+
102+cat ~/.juju/current-environment
103+</pre>
104+
105+
106+ <h2 id="environment-e">Specifying an environment</h2>
107+ <p> You can use the <code>-e</code> switch with a Juju command, followed by a valid environment label, to specify that the command should be run against that environment. Using the <code>-e</code> switch takes precedence over any other setting.<p>
108+ <p> For example:</p>
109+<pre class="prettyprint lang-bash">
110+juju bootstrap # bootstraps the default environment
111+juju switch amazon # switches the environment to the cloud defined by 'amazon'
112+juju deploy mysql -e mycloud # deploys mysql charm on the cloud defined by 'mycloud'
113+</pre>
114+
115+
116+ <h2 id="environment-switch">Switching environments</h2>
117+ <p> When managing several cloud environments, it can be bothersome to issue a long list of commands and remember to prepend the <code>-e</code> switch to each one. For this reason, you can switch the current environment using the <code>switch</code> command:</p>
118+
119+<pre class="prettyprint lang-bash">
120+juju switch hpcloud
121+juju bootstrap
122+</pre>
123+ <p>... will bootstrap the environment defined by the 'hpcloud' label</p>
124+ <p>This command will return with an error message if <code>JUJU_ENV</code>is set (as this takes precedence)</p>
125+<p class="note"><strong>Note: </strong>The environment selected with <code>switch</code> is persistent. Even if you log out, switch your computer off, travel into space or sail around the world, when you start using Juju again, it will still point at the last environment you specified with <code>switch</code>.</p>
126+
127+
128+
129+ <h2 id="environment-default">Default environment</h2>
130+ <p>The default environment is the environment which will be used if you have not issued a <a href="#environment-switch"><code>switch</code> command</a> and do not specify an environment to use with the <code>-e</code> switch or alter the <code>JUJU_ENV</code> environment variable. The default environment is specified at the top of the <code>environments.yaml</code> file, before the environment specifications themselves, like this:</p>
131+<pre class="prettyprint lang-yaml">
132+...
133+default: amazon
134+
135+environments:
136+ ## https://juju.ubuntu.com/docs/config-openstack.html
137+ openstack:
138+...
139+</pre>
140+
141+
142+ <h2 id="environment-update">Updating environments</h2>
143+ <p>Juju will attempt to maintain a high degree of legacy compatibility for the environments.yaml definitions, so you should be able to update to stable versions of the software without worring about reconfiguring your environments each time. However, new releases do sometimes add support for new cloud providers, add additional settings or change to adapt to configuration changes for the providers themselves. In these cases it can be useful to generate a new boilerplate <code>environmants.yaml</code> so you can easily manually edit your own configurations or cut and paste new environments into your existing configuration.<p>
144+ <p>To generate a new boilerplate <code>environments.yaml</code> file direct to the console you can use:</p>
145+<pre class="prettyprint lang-bash">
146+juju generate-config --show
147+</pre>
148+ <p> Or:</p>
149+<pre class="prettyprint lang-bash">
150+juju init --show
151+</pre>
152+<p>as the <code>init</code>command is an alias for <code>generate-config</code>.</p>
153+</section>
154+</article>
155+<!--Postamble-->
156+ </div>
157+ </div>
158+ </section>
159+ </div>
160+</div>
161+<!--End-Postamble-->
162+<!--Footer-->
163+ <footer class="global clearfix" role="contentinfo">
164+ <nav role="navigation">
165+ <div class="footer-a">
166+ <div class="clearfix">
167+ <ul>
168+ <li>
169+ <h2><a href="/">Juju</a></h2>
170+ <ul>
171+ <li><a href="/charms">Charms</a></li>
172+ <li><a href="/features">Features</a></li>
173+ <li><a href="/deployment">Deployment</a></li>
174+ </ul>
175+ </li>
176+ <li>
177+ <h2><a href="/resources">Resources</a></h2>
178+ <ul>
179+ <li><a href="/resources/juju-overview/">Overview</a></li>
180+ <li><a href="/docs/">Documentation</a></li>
181+ <li><a href="/resources/the-juju-gui/">The Juju web UI</a></li>
182+ <li><a href="/docs/authors-charm-store.html">The charm store</a></li>
183+ <li><a href="/docs/getting-started.html#test">Tutorial</a></li>
184+ <li><a href="/resources/videos/">Videos</a></li>
185+ <li><a href="/resources/easy-tasks-for-new-developers/">Easy tasks for new developers</a></li>
186+ </ul>
187+ </li>
188+ <li>
189+ <h2><a href="/community">Community</a></h2>
190+ <ul>
191+ <li><a href="/community/blog/">Juju Blog</a></li>
192+ <li><a href="/events/">Events</a></li>
193+ <li><a href="/community/weekly-charm-meeting/">Weekly charm meeting</a></li>
194+ <li><a href="/community/charmers/">Charmers</a></li>
195+ <li><a href="/docs/authors-charm-writing.html">Write a charm</a></li>
196+ <li><a href="/docs/contributing.html">Help with documentation</a></li>
197+ <li><a href="https://bugs.launchpad.net/juju-website/+filebug">File a bug</a></li> <li><a href="/labs/">Juju Labs</a></li>
198+ </ul>
199+ </li>
200+ <li>
201+ <h2><a href="https://jujucharms.com/sidebar/">Try Juju</a></h2>
202+ <ul>
203+ <li><a href="https://jujucharms.com/">Charm store</a></li>
204+ <li><a href="/download/">Download Juju</a></li>
205+ </ul>
206+ </li>
207+ </ul>
208+ </div>
209+ </div>
210+ </nav>
211+ <div class="legal clearfix">
212+ <p>&copy; 2013 Canonical Ltd. Ubuntu and Canonical are registered trademarks of <a href="http://canonical.com">Canonical Ltd</a>.</p>
213+ </div>
214+ </footer>
215+
216+<!--End-Footer-->
217+<!--Scripts-->
218+ <script src="//google-code-prettify.googlecode.com/svn/loader/run_prettify.js?skin=sunburst"></script>
219+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
220+ <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js"></script>
221+ <script src="//d38yea5fb4e2oh.cloudfront.net/jquery.stacktack.min.js"></script>
222+ <script type="text/javascript" src="//code.jquery.com/jquery-1.9.1.js"></script>
223+ <script type="text/javascript" src="./js/main.js"></script>
224+ <script type="text/javascript" src="./js/jquery.details.js"></script>
225+ <script src="//assets.ubuntu.com/sites/ubuntu/latest/u/js/core.js"></script>
226+ <script src="//assets.ubuntu.com/sites/ubuntu/latest/u/js/global.js"></script>
227+ <!-- google analytics -->
228+ <script>
229+ var _gaq = _gaq || [];
230+ _gaq.push(['_setAccount', 'UA-1018242-41']);
231+ _gaq.push(['_trackPageview']);
232+
233+ (function() {
234+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
235+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
236+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
237+ })();
238+ </script>
239+<!--End-Scripts-->
240+
241+
242+
243+</body></html>
244
245=== modified file 'htmldocs/navigation.html'
246--- htmldocs/navigation.html 2013-10-09 20:04:32 +0000
247+++ htmldocs/navigation.html 2013-10-10 17:08:29 +0000
248@@ -17,6 +17,7 @@
249 <li class=" sub"><a href="charms-scaling.html">Scaling Services</a></li>
250 <li class=" sub"><a href="charms-service-groups.html">Groups of Services</a></li>
251 <li class=" sub"><a href="charms-destroy.html">Destroying Services</a></li>
252+ <li class=" sub"><a href="charms-environments.html">Managing environments</a></li>
253 <li class=""><a href="howto.html">How to...</a></li>
254 <li class=" sub"><a href="howto-node.html">Deploy a Node.js app</a></li>
255 <li class=" sub"><a href="howto-rails.html">Test and deploy on Rails</a></li>
256
257=== modified file 'htmldocs/navigation.json'
258--- htmldocs/navigation.json 2013-10-09 20:04:32 +0000
259+++ htmldocs/navigation.json 2013-10-10 17:08:29 +0000
260@@ -22,7 +22,8 @@
261 "Exposing Services": "charms-exposing.html",
262 "Scaling Services": "charms-scaling.html",
263 "Groups of Services": "charms-service-groups.html",
264- "Destroying Services": "charms-destroy.html"
265+ "Destroying Services": "charms-destroy.html",
266+ "Managing environments": "charms-environments.html"
267 }
268 },
269 "How to...": {

Subscribers

People subscribed via source and target branches