Merge lp:~gz/juju-core/docs-reference-constraints into lp:juju-core/docs

Proposed by Martin Packman
Status: Merged
Merged at revision: 81
Proposed branch: lp:~gz/juju-core/docs-reference-constraints
Merge into: lp:juju-core/docs
Diff against target: 228 lines (+177/-14)
4 files modified
htmldocs/charms-constraints.html (+6/-14)
htmldocs/navigation.html (+1/-0)
htmldocs/navigation.json (+1/-0)
htmldocs/reference-constraints.html (+169/-0)
To merge this branch: bzr merge lp:~gz/juju-core/docs-reference-constraints
Reviewer Review Type Date Requested Status
charmers Pending
Review via email: mp+183239@code.launchpad.net

Description of the change

First pass reference documentation for constraints.

There may be some style issues that need fixing, as I only eyeballed in lynx
to sanity check the markup.

Included previous, unimplemented constraints as we should get to their
equivalents in juju-core sooner rather than later.

Also corrected a few issues with the current constraints howto by just
deleting some incorrect statements (maas-name is not implemented, and so on).

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

I changed a few bits in the nav and fixed the styles, but otherwise thanks very much!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'htmldocs/charms-constraints.html'
2--- htmldocs/charms-constraints.html 2013-08-23 15:56:11 +0000
3+++ htmldocs/charms-constraints.html 2013-08-30 17:36:09 +0000
4@@ -91,20 +91,12 @@
5
6 <h1>Provider Constraints</h1>
7
8- <p>The constraints available vary by provider, but should include:</p>
9-
10- <ul>
11- <li><span class="pre">cpu-cores</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>
12- <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>
13- <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>
14-
15- </ul>
16-
17- <p>The currently available MAAS constraint is:</p>
18-
19- <ul>
20- <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>
21- </ul>
22+ <p>See a <a href="reference-constraints.html">complete listing of constraints</a> for details on what each constraint means. Two of the most commonly used are:</p>
23+
24+ <ul>
25+ <li><span class="pre">cpu-cores</span>: The minimum processing power of the machine, roughly indicated by how many cores are available.</li>
26+ <li><span class="pre">mem</span>: The minimum memory for the machine, defaulting to 512MB.</li>
27+
28 <p class="note"><strong> Note: </strong> The <span class="pre">instance-type</span> constraint is not currently supported by juju-core, but support will be added soon. Some of the following examples make use of this setting merely to illustrate a point. </p>
29
30
31
32=== modified file 'htmldocs/navigation.html'
33--- htmldocs/navigation.html 2013-08-22 13:48:21 +0000
34+++ htmldocs/navigation.html 2013-08-30 17:36:09 +0000
35@@ -37,6 +37,7 @@
36 <h1>Reference</h1>
37 <ul>
38 <li class="sub"><a href="commands.html">Juju commands</a></li>
39+ <li class="sub"><a href="reference-constraints.html">Constraints Listing</a></li>
40 <li class="sub"><a href="glossary.html">Glossary</a></li>
41 <li class="sub"><a href="contributing.html">Contribute to the Docs!</a></li>
42 </ul>
43
44=== modified file 'htmldocs/navigation.json'
45--- htmldocs/navigation.json 2013-08-16 13:29:42 +0000
46+++ htmldocs/navigation.json 2013-08-30 17:36:09 +0000
47@@ -51,6 +51,7 @@
48 "References": {
49 "children": {
50 "Juju Commands": "commands.html",
51+ "Constraints Listing": "reference-constraints.html",
52 "Glossary": "glossary.html",
53 "Contribute to the Docs!": "contributing.html"
54 }
55
56=== added file 'htmldocs/reference-constraints.html'
57--- htmldocs/reference-constraints.html 1970-01-01 00:00:00 +0000
58+++ htmldocs/reference-constraints.html 2013-08-30 17:36:09 +0000
59@@ -0,0 +1,169 @@
60+<!DOCTYPE html>
61+<html>
62+ <head>
63+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
64+ <title>Juju Documentation - Constraints Reference</title>
65+ <link href='https://fonts.googleapis.com/css?family=Ubuntu:400,300,300italic,400italic,700,700italic|Ubuntu+Mono' rel='stylesheet' type='text/css' />
66+ <link rel="stylesheet" type="text/css" media="screen" href="//juju.ubuntu.com/wp-content/themes/juju-website/css/reset.css" />
67+ <link rel="stylesheet" type="text/css" media="screen" href="//juju.ubuntu.com/wp-content/themes/juju-website/css/960.css" />
68+ <link rel="stylesheet" type="text/css" media="screen" href="//juju.ubuntu.com/wp-content/themes/juju-website/css/base.css" />
69+ <link rel="stylesheet" type="text/css" media="screen" href="//juju.ubuntu.com/wp-content/themes/juju-website/css/home-new.css" />
70+ <link rel='stylesheet' id='stacktack-css' href='//juju.ubuntu.com/wp-content/plugins/stacktack/css/stacktack.min.css?ver=3.4.2' type='text/css' media='all' />
71+ <link href="css/main.css?1375975745" rel="stylesheet" type="text/css"/>
72+
73+ <!--[if lt IE 9]>
74+ <script type="text/javascript" src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
75+ <![endif]-->
76+</head>
77+ <body class="resources">
78+ <header class="global clearfix" role="banner">
79+ <div class="header-navigation">
80+ <div>
81+ <nav role="navigation">
82+ <ul>
83+ <li class="page_item page-item-6"><a href="https://juju.ubuntu.com/">Home</a></li>
84+ <li class="page_item page-item-7"><a href="https://juju.ubuntu.com/get-started/">Get started</a></li>
85+ <li class="page_item page-item-9 current_page_item"><a href="https://juju.ubuntu.com/resources/">Resources</a></li>
86+ <li class="page_item page-item-13"><a href="https://juju.ubuntu.com/community/">Community</a></li>
87+ <li class="page_item page-item-3688"><a href="https://juju.ubuntu.com/charm-store/">Charm Store</a></li>
88+ <li class="page_item page-item-3691"><a href="https://juju.ubuntu.com/events/">Events</a></li>
89+ <li class="page_item page-item-4474"><a href="https://juju.ubuntu.com/charm-championship/">Charm Championship</a></li>
90+ <li class="page_item page-item-4249"><a href="https://juju.ubuntu.com/survey/">Survey</a></li>
91+ <li>
92+ <form id="form-search" method="get" action="https://juju.ubuntu.com/">
93+ <fieldset>
94+ <input id="input-search" type="text" name="s" value="Search" />
95+ </fieldset>
96+ </form>
97+ </li>
98+ </ul>
99+ </nav>
100+ </div>
101+ </div>
102+ <div class="header-content">
103+ <div class="clearfix">
104+ <img src="https://juju.ubuntu.com/wp-content/themes/juju-website/img/arrow-nav.png" width="9" height="5" style="left:455px; display: block;" class="arrow-nav">
105+ <div class="header-navigation-secondary"></div>
106+ <div class="header-image"></div>
107+ <h1>Resources</h1>
108+ <h2>A collection of some of the most important online references for Juju users and developers.</h2>
109+ </div>
110+ </div>
111+</header>
112+
113+ <section id="content" class="container-12">
114+ <div class="grid-12 doc-container">
115+ <div id="navlinks" class="grid-3 doc-navigation">LINKS</div>
116+ <div class="grid-9 doc-content">
117+ <article>
118+
119+ <section id="constraints">
120+ <h1>Constraints</h1>
121+
122+ <p>Complete listing of constraints supported by juju and what they mean. See <a href="charms-constraints.html">using constraints</a> for how to specify these in a deployment.</p>
123+
124+ <h2>Generic constraints</h2>
125+ <dl>
126+ <dt>arch</dt>
127+ <dd>Short name of architecture that a service must run on. Can be left blank to indicate any architecture is acceptable, or one of <code>amd64</code>, <code>arm</code>, or <code>i386</code>.</dd>
128+ <dt>container</dt>
129+ <dd>Name of container type that a service unit must run inside. Can be left blank to indicate no preference, or one of <code>none</code> for uncontainerised, <code>lxc</code>, or <code>kvm</code>.</dd>
130+ <dt>cpu-cores</dt>
131+ <dd>Minimum number of effective CPU cores that must be available to a service unit.</dd>
132+ <dt>cpu-power</dt>
133+ <dd>Minimum amount of abstract CPU power that must be available to a service unit, where 100 units is roughly equivalent to "a single 2007-era Xeon" as reflected by 1 Amazon ECU. <strong>Warning: Not all providers support this constraint, use <code>cpu-cores</code> for portability.</strong></dd>
134+ <dt>mem</dt>
135+ <dd>Minimum number of megabytes of RAM that must be available to a service unit. An optional suffix of M/G/T/P indicates the value is mega-/giga-/tera-/peta- bytes.</dd>
136+ <dt>root-disk</dt>
137+ <dd>Minimum amount of of disk space on the root drive on each service unit. Additional storage that may be attached separately does not count towards this value.</dd>
138+ </dl>
139+
140+ <!--TODO(gz): When provider-specific constraints are implemented,
141+ document that here.
142+ -->
143+
144+ <h2>Legacy constraints</h2>
145+ <p>In pre-1.0 juju some additional or differently named constraints were also supported, these need to be migrated when upgrading.</p>
146+ <dl>
147+ <dt>cpu</dt>
148+ <dd>Number of CPU cores for most providers, but equivalent to an Amazon ECU on AWS. Use <code>cpu-cores</code> instead.</dd>
149+ <dt>instance-type</dt>
150+ <dd>Cloud-specific instance-type name that a service used must be deployed on. Valid values vary by provider, and individual deployment in some cases. Use appropriate values for <code>cpu-count</code>, <code>mem</code>, and <code>root-disk</code> instead where possible for portability.</dd>
151+ <dt>ec2-zone</dt>
152+ <dd>EC2 availability zone that a service unit must be deployed into. No equivalent implemented as of juju 1.12, follow <a href="https://bugs.launchpad.net/juju-core/+bug/1183831">bug 1183831</a>.</dd>
153+ <dt>maas-name</dt>
154+ <dd>Specific MAAS machine name that a service unit must be deployed on. Use <code>maas-tags</code> instead by preference.</dd>
155+ <dt>maas-tags</dt>
156+ <dd>List of tags a MAAS machine must have for a service unit to be deployed on. No equivalent implemented as of juju 1.12, follow <a href="https://bugs.launchpad.net/juju-core/+bug/1170337">bug 1170337</a>.</dd>
157+ <dt>os-scheduler-hints</dt>
158+ <dd>Experimental constraint exposing Openstack-specific scheduler hints features. Do not use.</dd>
159+ </dl>
160+
161+ </section>
162+
163+ </article>
164+ </div>
165+ </div>
166+ </section>
167+ <div class="shadow"></div>
168+ <footer class="global clearfix" role="contentinfo">
169+ <div class="row">
170+ <div class="inner-wrapper">
171+ <nav role="navigation" class="clearfix">
172+ <ul class="footer-a">
173+ <li class="grid-3 first-col">
174+ <h4><a href="/get-started">Get started</a></h4>
175+ <ul>
176+ <li class="page_item page-item-20"><a href="https://juju.ubuntu.com/get-started/local/">Local</a></li>
177+ <li class="page_item page-item-22"><a href="https://juju.ubuntu.com/get-started/amazon/">Amazon Web Services</a></li>
178+ <li class="page_item page-item-18"><a href="https://juju.ubuntu.com/get-started/hp-cloud/">HP Cloud</a></li>
179+ <li class="page_item page-item-16"><a href="https://juju.ubuntu.com/get-started/rackspace/">Rackspace</a></li>
180+ <li class="page_item page-item-3596"><a href="https://juju.ubuntu.com/get-started/openstack/">Openstack</a></li>
181+ <li class="page_item page-item-3600"><a href="https://juju.ubuntu.com/get-started/maas/">MAAS</a></li>
182+ </ul>
183+ </li>
184+ <li class="grid-3">
185+ <h4><a href="/resources">Resources</a></h4>
186+ <ul>
187+ <li><a href="http://juju.ubuntu.com/docs">Documentation</a></li>
188+ <li><a href="/resources/videos/">Videos</a></li>
189+ <li><a href="http://uistage.jujucharms.com:8080/">Juju GUI demo site</a></li>
190+ </ul>
191+ </li>
192+ <li class="grid-3">
193+ <h4><a href="/community">Community</a></h4>
194+ <ul>
195+ <li class="page_item page-item-28"><a href="https://juju.ubuntu.com/community/juju-blog/">Juju Blog</a></li>
196+ <li class="page_item page-item-4262"><a href="https://juju.ubuntu.com/community/weekly-charm-meeting/">Weekly Charm Meeting</a></li>
197+ <li class="page_item page-item-4036"><a href="https://juju.ubuntu.com/community/charmers/">Charmers</a></li>
198+ <li><a href="https://lists.ubuntu.com/mailman/listinfo/juju">Mailing List</a></li>
199+ <li><a href="http://webchat.freenode.net/?channels=juju">Chat</a></li>
200+ <li><a href="http://askubuntu.com/questions/tagged/juju?sort=faq&pagesize=50">FAQ</a></li>
201+ </ul>
202+ </li>
203+ <li class="grid-3 last-col">
204+ <h4><a href="https://launchpad.net/juju">Code</a></h4>
205+ <ul>
206+ <li><a href="https://launchpad.net/juju-core">Juju Core</a></li>
207+ <li><a href="https://launchpad.net/charms">Charms</a></li>
208+ </ul>
209+ </li>
210+ </ul>
211+ </nav>
212+ </div>
213+ </div>
214+ <div class="row no-border">
215+ <div class="legal inner-wrapper">
216+ <p>&copy; 2013 Canonical Ltd. Ubuntu and Canonical are registered trademarks of Canonical Ltd.</p>
217+ <p><a href="https://bugs.launchpad.net/juju-website/+filebug">Report a bug on this site</a></p>
218+ </div>
219+ </div>
220+</footer>
221+
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="js/main.js"></script>
226+ <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script>
227+ </body>
228+</html>

Subscribers

People subscribed via source and target branches