Merge lp:~niemeyer/pyjuju/user-oriented-docs into lp:pyjuju

Proposed by Gustavo Niemeyer
Status: Merged
Merged at revision: 178
Proposed branch: lp:~niemeyer/pyjuju/user-oriented-docs
Merge into: lp:pyjuju
Diff against target: 1020 lines (+262/-415)
21 files modified
README (+1/-1)
docs/source/about.rst (+38/-0)
docs/source/cli.rst (+0/-178)
docs/source/drafts/formula-namespaces.rst (+4/-1)
docs/source/ensemble-drafts.rst (+10/-0)
docs/source/ensemble-internals.rst (+11/-0)
docs/source/formula.rst (+25/-24)
docs/source/getting-started.rst (+36/-50)
docs/source/glossary.rst (+83/-7)
docs/source/hook-debugging.rst (+6/-3)
docs/source/index.rst (+14/-19)
docs/source/internals/agent-presence.rst (+4/-4)
docs/source/internals/unit-agent-hooks.rst (+16/-17)
docs/source/internals/unit-agent-startup.rst (+12/-19)
docs/source/internals/zookeeper.rst (+2/-2)
docs/source/notes.rst (+0/-19)
docs/source/overview.rst (+0/-43)
docs/source/specifications/environment.rst (+0/-7)
docs/source/specifications/repository.rst (+0/-7)
docs/source/specifications/template.rst (+0/-5)
docs/source/specs.rst (+0/-9)
To merge this branch: bzr merge lp:~niemeyer/pyjuju/user-oriented-docs
Reviewer Review Type Date Requested Status
Benjamin Saller (community) Approve
Review via email: mp+53751@code.launchpad.net

Description of the change

This cleans up the documentation so that it is user oriented and up-to-date
(no non-existing features looking like they are in place).

For your viewing pleasure, a compiled version of the tip of this
branch is at:

    http://j.mp/ensemble-docs

To post a comment you must log in.
187. By Gustavo Niemeyer

getting-started: Lowercase title.

Revision history for this message
Ahmed Kamal (kim0) wrote :

FWIW, I've read the changes, and they look good. Got a couple of notes
- Can we explain what bootstrapping means somewhere
- Are relation interfaces of enum'eratable types? or free form

Revision history for this message
Benjamin Saller (bcsaller) wrote :
Download full text (5.8 KiB)

This patch represent a much needed improvement to the documentation
situation (which I think is now better than many project at this phase
of its lifecycle).

More detailed comments below.

> === added file 'docs/source/about.rst'
> --- docs/source/about.rst       1970-01-01 00:00:00 +0000
> +++ docs/source/about.rst       2011-03-17 08:38:25 +0000
> @@ -0,0 +1,32 @@
> +About Ensemble
> +==============
> +
> +Since long ago, Linux server deployments have been moving towards the
> +collaboration of multiple physical machines. In some cases, different servers
> +run each a different set of applications, bringing organization, isolation,
> +reserved resources, and other desirable characteristics to the composed
> +assembly. In other situations, servers are set up with very similar
> +configurations, so that the system becomes more scalable by having load
> +distributed among the several instances, and so that the overall system becomes
> +more reliable when the failure of any individual machine does not affect the
> +assembly as a whole. In this reality, server administrators become invaluable
> +maestros which orchestrate the placement and connectivity of services within
> +the assembly of servers.
> +
> +Given that scenario, it's surprising that most of the efforts towards advancing
> +the management of software configuration is still bound to individual machines.
> +Package managers, and softwares like dbus and gconf are examples of this. Other
> +efforts do look at the problem of managing multiple machines as a unit, but
> +interestingly, they are still a mechanism for scaling up the management of
> +services individually. In other words, they empower the administrator with the
> +ability to tweak the individual configuration of multiple services at once,
> +but they do not collaborate towards offering services themselves and other tools
> +the understanding of the composed ensemble. This distinction looks subtle in
> +principle, but it may be a key factor in enabling all the parties (system
> +administrators, software developers, vendors, and integrators) to collaborate
> +in deploying, maintaining, and enriching distributed software configurations.
> +
> +This is the challenge which motivates the research happening through the
> +Ensemble project at Canonical. Ensemble aims to be a service deployment and
> +orchestration tool which enables the same kind of collaboration which today is
> +seen around package management to happen on a higher level, around services.
>

[1] Understanding that machines is not central is important but I
think for end users the 'apt for cloud' idea should be emphasized a
bit more here. While it is the conclusion it might still make some
sense to talk about the desire of users to have a service running in
the cloud with much less through to how its deployed. The SaaS story.

As a nit-pick I think it should be 'software like dbus ...'

> === removed file 'docs/source/cli.rst'
> --- docs/source/cli.rst 2010-11-11 20:13:38 +0000
> +++ docs/source/cli.rst 1970-01-01 00:00:00 +0000
> -Service Deployment
> -------------------
> -
> -The ``ensemble deploy`` command lets you add a service to an
> -environment::
> -
> -  $...

Read more...

188. By Gustavo Niemeyer

Fixes after review from Ben.

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :
Download full text (4.1 KiB)

> This patch represent a much needed improvement to the documentation
> situation (which I think is now better than many project at this phase
> of its lifecycle).

Thanks Ben, and thanks for the great review as well.

> [1] Understanding that machines is not central is important but I
> think for end users the 'apt for cloud' idea should be emphasized a
> bit more here. While it is the conclusion it might still make some
> sense to talk about the desire of users to have a service running in
> the cloud with much less through to how its deployed. The SaaS story.

Good point. I've changed the last paragraph and attempted to drive it
a towards that side. Please note that we're walking a thin line
in those terms. We can't emphasize too much the "no thinking" aspect,
because it's both untrue (people will still need a good level of
knowledge at this point) and discouraging for an important part of our
user base, in the sense that it may drive the *real* admins away
("What!? No thinking!? Nevermind.").

> As a nit-pick I think it should be 'software like dbus ...'

I certainly appreciate that kind of nitpick, but I'm not entirely sure
I get it. Is it the case that "software" has no plural form?

> [2] I'm fine with this file being removed but we should have a
> sections that at minimum dumps the logical output of
>
> for subcommand in ensemble:
> ensemble subcommand --help

This sounds like a nice idea, but we have to automate that, otherwise
it very quickly becomes obsolete and then is worse than having nothing
(after all, people can already type --help and get those details).

We can introduce that automated generation in a separate branch,
if desired.

> I think as it stands now there is no usage for things like deploy in the
> docs.

We need to improve the getting-started document. I'm hoping to take
the input from Clint and append at the bottom of it in a separate
branch.

> [3] While these types of notes (the not yet supported one) are helpful
> they are hard to track down and keep up to date. I suppose the author
> of a change adding support for this feature would be able to grep for
> all usage of 'peer' in the docs and find things like this, but I worry
> that it will not always be clear.

Agreed. I'm also not sure about how to handle those details properly.
Either we review every once in a while, or we comment out that
information entirely.

What I'm trying to achieve with those notes is making the documentation
realistic. Having a full body of documentation which mixes fantasy
and working pieces generates lack of trust in what is written. To
avoid that, we have to ensure that whatever we ask people to read should
be the status quo. This also means that those new specifications we
are writing should either sit within the Drafts section, or should have
a top-level ".. :note:" pointing the status out.

> [4] I'll have to merge in the other common elements when the
> config/settings stuff lands, just noting it here so we both keep it in
> mind later.

Super, thanks.

You can also document it right away, and leave it commented out for
the moment, or add the note saying it's in progress.

> [5] Very nice to have these additio...

Read more...

189. By Gustavo Niemeyer

s/softwares/software/, thanks Ben.

Revision history for this message
Benjamin Saller (bcsaller) wrote :

After the last minor rounds change this looks good. Thanks +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'README'
2--- README 2011-03-03 07:17:37 +0000
3+++ README 2011-03-22 18:29:09 +0000
4@@ -9,5 +9,5 @@
5
6 The Ensemble bug tracker is at https://bugs.launchpad.net/ensemble/.
7
8-doc/sources/getting_started.rst explains how to actually get Ensemble up and
9+doc/sources/getting-started.rst explains how to actually get Ensemble up and
10 running.
11
12=== added file 'docs/source/about.rst'
13--- docs/source/about.rst 1970-01-01 00:00:00 +0000
14+++ docs/source/about.rst 2011-03-22 18:29:09 +0000
15@@ -0,0 +1,38 @@
16+About Ensemble
17+==============
18+
19+Since long ago, Linux server deployments have been moving towards the
20+collaboration of multiple physical machines. In some cases, different servers
21+run each a different set of applications, bringing organization, isolation,
22+reserved resources, and other desirable characteristics to the composed
23+assembly. In other situations, servers are set up with very similar
24+configurations, so that the system becomes more scalable by having load
25+distributed among the several instances, and so that the overall system becomes
26+more reliable when the failure of any individual machine does not affect the
27+assembly as a whole. In this reality, server administrators become invaluable
28+maestros which orchestrate the placement and connectivity of services within
29+the assembly of servers.
30+
31+Given that scenario, it's surprising that most of the efforts towards advancing
32+the management of software configuration are still bound to individual machines.
33+Package managers, and software like dbus and gconf are examples of this. Other
34+efforts do look at the problem of managing multiple machines as a unit, but
35+interestingly, they are still a mechanism for scaling up the management of
36+services individually. In other words, they empower the administrator with the
37+ability to tweak the individual configuration of multiple services at once,
38+but they do not collaborate towards offering services themselves and other tools
39+the understanding of the composed ensemble. This distinction looks subtle in
40+principle, but it may be a key factor in enabling all the parties (system
41+administrators, software developers, vendors, and integrators) to collaborate
42+in deploying, maintaining, and enriching distributed software configurations.
43+
44+This is the challenge which motivates the research happening through the
45+Ensemble project at Canonical. Ensemble aims to be a service deployment and
46+orchestration tool which enables the same kind of collaboration and ease of
47+use which today is seen around package management to happen on a higher
48+level, around services. With Ensemble, different authors are able to create
49+services independently, and make those services communicate through a simple
50+configuration protocol. Then, users can take the product of both authors
51+and very comfortably deploy those services in an environment, in way
52+resembling how people are able to install a network of packages with a single
53+command via APT.
54
55=== removed file 'docs/source/cli.rst'
56--- docs/source/cli.rst 2010-11-11 20:13:38 +0000
57+++ docs/source/cli.rst 1970-01-01 00:00:00 +0000
58@@ -1,178 +0,0 @@
59-.. _cli:
60-
61-Command-line Interface
62-======================
63-
64-:term:`Ensemble` offers a command-line utility to manage your deployments.
65-
66-The use of the command-line interface requires the configuration of
67-one or more :ref:`environments <environment>` and one
68-or more :ref:`formula repositories <formula-repository>` (see the
69-:ref:`getting started <getting-started>` section for a general
70-introduction).
71-
72-
73-Formula Search
74---------------
75-
76-The ``ensemble search`` command lets you query one or more formula
77-repositories to list matching formulas::
78-
79- $ ensemble search [OPTION] ...
80-
81-Formulas for which the provided query string occur in their name are
82-listed in alphabetical order.
83-
84-
85-Service Deployment
86-------------------
87-
88-The ``ensemble deploy`` command lets you add a service to an
89-environment::
90-
91- $ ensemble deploy [OPTION] ...
92-
93-Since there can be multiple distinct services of the same kind running
94-in a single deployment, we identify each service with a string
95-identifier.
96-
97-Each service must be listed as ``<service>:<name>``. For instance, we
98-could add a blogging engine::
99-
100- $ ensemble deploy wordpress:myblog
101-
102-This assumes an environment configured with the name ``"default"``. By
103-providing the ``--environment`` option, an alternative environment may
104-be used.
105-
106-::
107-
108- $ ensemble deploy --environment mycloud wordpress:myblog
109-
110-
111-Managing Relations
112-------------------
113-
114-Services are linked by relations. In order for a service to talk to
115-another service, you need to first add that relation in your Ensemble
116-environment (synonym, establish a relation). Likewise, you can also
117-remove a given relation between services (synonym, break a relation).
118-
119-.. note:: Service interchangeability
120-
121- Relation management is fundamental to Ensemble. Services do not
122- define relations, only how they may be related to other services.
123- This concept then enables an interchangeability of services. For
124- example, if your service uses the MySQL database service, you can
125- replace it with a logically equivalent MySQL service, perhaps with
126- better scalability because it uses sharding. To perform this
127- migration, use the following process:
128-
129- 1. Remove the relation to the old service.
130-
131- 2. Add a relation to the desired new service in its place.
132-
133- This section documents the necessary commands to add and remove
134- relations.
135-
136-To add a relation between two services, use the ``ensemble
137-add-relation`` command::
138-
139- $ ensemble add-relation <service name 1>[:<relation name>] <service name 2>[:<relation name>]
140-
141-The order of services in this command (``<service name 1>``, ``<service
142-name 2>``) is not important. Instead, the services themselves
143-define whether they are a provider or consumer on a given ``<relation
144-name>``. The ``<relation name>`` is only necessary to disambiguate
145-situations where a service consumes or produces multiple relations.
146-
147-For example, you might have a service provider in your formula::
148-
149- ensemble: formula
150- name: mysql
151- revision: 1
152- summary: "A pretty popular database"
153- provides:
154- server: mysql
155-
156-And you also have a formula for a corresponding service consumer::
157-
158- ensemble: formula
159- name: wordpress
160- revision: 3
161- summary: "A pretty popular blog engine"
162- provides:
163- url: http
164- requires:
165- db: mysql
166-
167-Let's work through how to read these formulas. ``mysql`` is the common
168-relation type for these two services. In the ``mysql`` service (note
169-it's the same name as the relation type!), the relation name is
170-``server``, whereas in ``wordpress``, the relation name is ``db``.
171-Assume you have deployed your services, as in the previous
172-section. Now add the required relation::
173-
174- $ ensemble add-relation wordpress mysql
175- Adding wordpress:db(5) ---mysql--> mysql:server(2)...
176- Added mysql relation to all service units.
177-
178-In the above formulas, there are no ambiguities, so the relation name
179-can be omitted. For the sake of this example, imagine you currently
180-have running 2 MySQL service units for the backing database and 5
181-WordPress service units for the frontend under Ensemble. This command
182-output then indicates that the relation was successfully added to all
183-of them.
184-
185-.. note::
186-
187- Was the underlying physical linkage pairwise for all the service
188- units, or a subset? It's up to your formula :ref:`hooks <hooks>` to
189- decide the actual interconnectivity of the service units implied by
190- an established relation.
191-
192-Additional verbosity is supported via a ``--verbose`` flag. You might
193-use this flag to help debug a hook.
194-
195-The following commands are also valid and entirely equivalent to the
196-preceding command, given the above formula definitions::
197-
198- $ ensemble add-relation mysql wordpress:db
199-
200- $ ensemble add-relation mysql:server wordpress:db
201-
202- $ ensemble add-relation wordpress mysql:server
203-
204-In any of these invocations, during its execution the ``ensemble
205-add-relation`` command will in turn propagate through the Ensemble
206-platform to all running service units on both sides of the ``mysql``
207-relation type. This means that for the MySQL service, Ensemble will
208-run the hook ``server-relation-changed`` script defined by the
209-corresponding formula in the corresponding service units; for
210-WordPress, the ``db-relation-changed`` hook is run.
211-
212-You can also remove relations. You might need to take this action
213-because you're replacing a service. Or you might have multiple
214-interfaces for a relation. Maybe you support both `http` and `https`,
215-and now you would like to stop supporting `http`. In any of these
216-cases, use the ``ensemble remove-relation`` command::
217-
218- $ ensemble remove-relation <service name 1>[:<relation name>] <service name 2>[:<relation name>]
219-
220-(This command is also symmetrical with respect to ``<service name>``.)
221-
222-To remove the ``mysql`` relation in the previous example::
223-
224- $ ensemble remove-relation mysql wordpress
225- Removing wordpress:db(5) ---mysql--> mysql:server(2)...
226- Removed mysql relation from all service units.
227-
228-During this removal, the ``<relation name>-relation-changed`` hooks
229-are called. The command completes upon successful removal of the
230-relation.
231-
232-.. note::
233-
234- TODO Add sequence diagrams with `sdedit
235- <http://www.shibu.jp/sdeditext/>`_ to show add/remove in conjunction
236- with deploy
237
238=== added directory 'docs/source/drafts'
239=== renamed file 'docs/source/specifications/formula-namespace.rst' => 'docs/source/drafts/formula-namespaces.rst'
240--- docs/source/specifications/formula-namespace.rst 2010-07-30 16:17:04 +0000
241+++ docs/source/drafts/formula-namespaces.rst 2011-03-22 18:29:09 +0000
242@@ -1,6 +1,9 @@
243
244 Formula Namespaces
245-------------------
246+==================
247+
248+Introduction
249+------------
250
251 Ensemble supports deployment of formulas from multiple sources.
252
253
254=== added file 'docs/source/ensemble-drafts.rst'
255--- docs/source/ensemble-drafts.rst 1970-01-01 00:00:00 +0000
256+++ docs/source/ensemble-drafts.rst 2011-03-22 18:29:09 +0000
257@@ -0,0 +1,10 @@
258+Drafts
259+======
260+
261+This section contains documents which may be unreviewed, incomplete,
262+incorrect, out-of-date, or all of those.
263+
264+.. toctree::
265+ :glob:
266+
267+ drafts/*
268
269=== added file 'docs/source/ensemble-internals.rst'
270--- docs/source/ensemble-internals.rst 1970-01-01 00:00:00 +0000
271+++ docs/source/ensemble-internals.rst 2011-03-22 18:29:09 +0000
272@@ -0,0 +1,11 @@
273+Implementation details
274+======================
275+
276+This section details topics which are generally not very useful
277+for running Ensemble, but may be interesting if you want to hack it.
278+
279+.. toctree::
280+ :glob:
281+
282+ internals/*
283+
284
285=== renamed file 'docs/source/specifications/formula.rst' => 'docs/source/formula.rst'
286--- docs/source/specifications/formula.rst 2010-10-29 13:17:33 +0000
287+++ docs/source/formula.rst 2011-03-22 18:29:09 +0000
288@@ -1,6 +1,9 @@
289
290-Formula Specification
291-=====================
292+Formulas
293+========
294+
295+Introduction
296+------------
297
298 In Ensemble, formulas are the description of how services should
299 behave when deployed and run. A single service definition may be run
300@@ -15,7 +18,8 @@
301 The metadata file
302 -----------------
303
304-The metadata file contains details about the Formula.
305+The file named `metadata.yaml`, at the root of the formula, contains
306+details about the formula.
307
308 The following fields are supported:
309
310@@ -62,11 +66,11 @@
311 * **limit:** - The maximum number of relations of this kind which
312 may be established to other service units. Defaults to 1 for
313 `requires` relations, and to "none" (no limit) for `provides`
314- and `peers` relations.
315+ and `peers` relations (note: that's not yet supported).
316
317 * **optional:** - Whether this relation is required for the
318 service unit to function or not. Defaults to `false`, meaning
319- that the relation is required.
320+ that the relation is required (note: that's not yet supported).
321
322 As a shortcut, if these properties are not defined, and instead
323 a single string value is provided next to the relation name,
324@@ -132,8 +136,18 @@
325 3. A remote service unit which was part of the relation has
326 had its relation broken.
327
328- The following environment variables are defined when this hook is
329- run:
330+
331+Hook environment
332+----------------
333+
334+Hooks can expect to be invoked with a standard environment and
335+context. The following be included:
336+
337+ * `$ENSEMBLE_UNIT_NAME` - The name of the local unit executing,
338+ in the form `<service name>/<unit sequence>`. E.g. myblog/3.
339+
340+Hooks called for relation changes will have the follow additional
341+environment variables available to them.
342
343 * `$ENSEMBLE_RELATION` - The relation name this hook is running
344 for. It's redundant with the hook name, but is necessary for
345@@ -167,7 +181,7 @@
346 relation-get port wordpress/3
347
348 Get the IP address in a relation which can only be established
349- with a single unit::
350+ with a single remote unit::
351
352 relation-get ip
353
354@@ -176,7 +190,7 @@
355 relation-get - wordpress/3
356
357 Get all the settings in a relation which can only be established
358- with a single unit::
359+ with a single remote unit::
360
361 relation-get
362
363@@ -206,21 +220,8 @@
364 MEMBERS=$(relation-list)
365
366
367-Persistence
368------------
369-
370-Right now Ensemble doesn't support any kind of persistence management,
371-so any service units destroyed are gone for good, so don't destroy a
372-service unit before the data has been properly backed up (manually).
373-For now, manual backups can be achieved via snapshotting the instance
374-as all formulas are run on EBS backed instances.
375-
376-In the near future, the formula will be able to define a persistent
377-directory which will be automatically managed by Ensemble.
378-
379-
380-Formula metadata examples
381--------------------------
382+Sample metadata.yaml files
383+--------------------------
384
385 Below are presented some sample metadata files.
386
387
388=== modified file 'docs/source/getting-started.rst'
389--- docs/source/getting-started.rst 2011-03-03 07:17:37 +0000
390+++ docs/source/getting-started.rst 2011-03-22 18:29:09 +0000
391@@ -1,13 +1,16 @@
392 .. _getting-started:
393
394-Getting Started
395+Getting started
396 ===============
397
398-This tutorial gets you started with :term:`Ensemble`. A prerequisite
399-is the access credentials to a dedicated computing environment such as
400-what is offered by a virtualized cloud hosting environment.
401-
402-The software has been designed for environments which can provide a
403+Introduction
404+------------
405+
406+This tutorial gets you started with Ensemble. A prerequisite is the
407+access credentials to a dedicated computing environment such as what
408+is offered by a virtualized cloud hosting environment.
409+
410+Ensemble has been designed for environments which can provide a
411 new machine with an Ubuntu cloud operating system image
412 on-demand. This includes services such as `Amazon EC2
413 <http://aws.amazon.com/ec2/>`_ or `RackSpace
414@@ -16,27 +19,11 @@
415 It's also required that the environment provides a permanent storage
416 facility such as `Amazon S3 <https://s3.amazonaws.com/>`_.
417
418-Installing the management software
419-----------------------------------
420-
421-:term:`Ensemble` deployments are managed using a command-line
422-interface on a machine with network access to the machine provider.
423-
424-To install the :term:`Ensemble` management client software on your
425-Ubuntu desktop system, use your package manager or enter the following
426-into a terminal::
427-
428- $ sudo apt-get install ensemble-client
429-
430-This package sets up a default :ref:`formula repository
431-<formula-repository>` and installs the :ref:`command line utility
432-<cli>`.
433-
434-You do not normally need to install the server software manually; this
435-is automatically taken care of during machine bootstrapping.
436+For the moment, though, the only environment supported is EC2.
437+
438
439 Running from trunk
440-~~~~~~~~~~~~~~~~~~
441+------------------
442
443 To run Ensemble, you will need the following dependencies installed:
444
445@@ -46,16 +33,15 @@
446
447 You will also need Python 2.6 or better.
448
449-To get Ensemble, run::
450-
451- $ bzr branch lp:ensemble
452-
453-And to run Ensemble from trunk, do::
454-
455- $ PYTHONPATH=.:$PYTHONPATH ./bin/ensemble
456-
457-Note that you must configure your environment before Ensemble will be of any
458-use.
459+To get Ensemble and run it from trunk, do::
460+
461+ $ bzr branch lp:ensemble
462+ $ cd ensemble
463+ $ export PYTHONPATH=$PWD:$PYTHONPATH
464+ $ bin/ensemble
465+
466+Note that you must configure your environment before Ensemble will
467+be of any use. See below.
468
469
470 Configuring your environment
471@@ -64,7 +50,7 @@
472 Run the command-line utility with no arguments to create a sample
473 environment::
474
475- $ ensemble
476+ $ bin/ensemble
477
478 This will create the file ``~/.ensemble/environments.yaml``, which will look
479 something like this::
480@@ -77,13 +63,13 @@
481 control-bucket: ensemble-faefb490d69a41f0a3616a4808e0766b
482 admin-secret: 81a1e7429e6847c4941fda7591246594
483
484-Which is a sample :term:`AWS` environment configured to run with :term:`EC2`
485-machines and :term:`S3` permanent storage. To make this environment actually
486-useful, you will need to tell Ensemble about an AWS access key and secret key.
487-To do this, you can either set the ``AWS_ACCESS_KEY_ID`` and
488-``AWS_SECRET_ACCESS_KEY`` environment variables or you can add an
489-``access-key`` and a ``secret-key`` to your ``environments.yaml``. For
490-example::
491+Which is a sample environment configured to run with EC2 machines and S3
492+permanent storage. To make this environment actually useful, you will need
493+to tell Ensemble about an AWS access key and secret key. To do this, you
494+can either set the ``AWS_ACCESS_KEY_ID`` and ``AWS_SECRET_ACCESS_KEY``
495+environment variables (as usual for other EC2 tools) or you can add
496+``access-key`` and ``secret-key`` options to your ``environments.yaml``.
497+For example::
498
499 ensemble: environments
500
501@@ -95,11 +81,11 @@
502 control-bucket: ensemble-faefb490d69a41f0a3616a4808e0766b
503 admin-secret: 81a1e7429e6847c4941fda7591246594
504
505-The :term:`S3` bucket does not need to exist already; the default name
506-is ``"ensemble"``.
507+The S3 bucket does not need to exist already.
508
509-If you already have an AWS account, you can determine your access key by
510-visiting http://aws.amazon.com/account, clicking "Security Credentials" and
511-then clicking "Access Credentials". You'll be taken to a table that lists
512-your access keys and has a "show" link for each access key that will reveal
513-the associated secret key.
514+.. note::
515+ If you already have an AWS account, you can determine your access key by
516+ visiting http://aws.amazon.com/account, clicking "Security Credentials" and
517+ then clicking "Access Credentials". You'll be taken to a table that lists
518+ your access keys and has a "show" link for each access key that will reveal
519+ the associated secret key.
520
521=== modified file 'docs/source/glossary.rst'
522--- docs/source/glossary.rst 2010-08-02 19:33:23 +0000
523+++ docs/source/glossary.rst 2011-03-22 18:29:09 +0000
524@@ -4,14 +4,90 @@
525 ========
526
527 .. glossary::
528- :sorted:
529+
530+ Bootstrap
531+ To boostrap an environment means initializing it so that Services may be
532+ deployed on it.
533
534 Ensemble
535- ...
536+ The whole software here documented.
537
538 Environment
539- ...
540-
541-**XXX** This is all available in the architecture spec. To avoid
542-duplication and conflicts, we must either move from there, or remove this
543-glossary and make the spec available instead.
544+ An Environment is a configured location where Services can be deployed
545+ onto. An Environment typically has a name, which can usually be omitted
546+ when there's a single Environment configured, or when a default is explicitly
547+ defined. Depending on the type of Environment, it may have to be
548+ bootstrapped before interactions with it may take place (e.g. EC2).
549+ The local environment configuration is defined in the ~/.ensemble/environments.yaml
550+ file.
551+
552+ Formula
553+ A Formula provides the definition of the service, including its metadata,
554+ dependencies to other services, packages necessary, as well as the logic
555+ for management of the application. It is the layer that integrates an
556+ external application component like Postgres or Wordpress into Ensemble.
557+ An Ensemble Service may generally be seen as the composition of its Ensemble
558+ Formula and the upstream application (traditionally made available through
559+ its package).
560+
561+ Repository
562+ A location where multiple formulas are stored. Repositories may be as simple
563+ as a directory in the local disk, or as complex as a rich smart server
564+ supporting remote searching and so on.
565+
566+ Relation
567+ Relations are the way in which Ensemble enables Services to communicate
568+ to each other, and the way in which the topology of Services is assembled.
569+ The Formula defines which Relations a given Service may establish, and
570+ what kind of interface these Relations require. In many cases, the
571+ establishment of a Relation will result into an actual TCP connection being
572+ created between the Service Units, but that's not necessarily the case.
573+ Relations may also be established to inform Services of configuration
574+ parameters, to request monitoring information, or any other details which
575+ the Formula author has chosen to make available.
576+
577+ Service
578+ Ensemble operates in terms of services.
579+
580+ A service is any application (or set of applications) that is
581+ integrated into the framework as an individual component which should
582+ generally be joined with other components to perform a more complex
583+ goal.
584+
585+ As an example, Wordpress could be deployed as a service and, to perform
586+ its tasks properly, might communicate with a database service
587+ and a load balancer service.
588+
589+ Service Unit
590+ A running instance of a given Ensemble Service. Simple Services may
591+ be deployed with a single Service Unit, but it is possible for an
592+ individual Service to have multiple Service Units running in independent
593+ machines. All Service Units for a given Service will share the same
594+ Formula, the same relations, and the same user-provided configuration.
595+
596+ For instance, one may deploy a single MongoDB Service, and specify that
597+ it should run 3 Units, so that the replica set is resilient to failures.
598+ Internally, even though the replica set shares the same user-provided
599+ configuration, each Unit may be performing different roles within th
600+ replica set, as defined by the Formula.
601+
602+ Service Configuration
603+ There are many different settings in an Ensemble deployment, but
604+ the term Service Configuration refers to the settings which a user can
605+ define to customize the behavior of a Service.
606+
607+ The behavior of a Service when its Service Configuration changes is
608+ entirely defined by its Formula.
609+
610+ Provisioning Agent
611+ Software responsible for automatically allocating and terminating
612+ machines in an Environment, as necessary for the requested configuration.
613+
614+ Machine Agent
615+ Software which runs inside each machine that is part of an Environment,
616+ and is able to handle the needs of deploying and managing Service Units
617+ in this machine.
618+
619+ Service Unit Agent
620+ Software which manages all the lifecycle of a single Service Unit.
621+
622
623=== renamed file 'docs/source/specifications/debug-hook.rst' => 'docs/source/hook-debugging.rst'
624--- docs/source/specifications/debug-hook.rst 2011-02-27 01:52:06 +0000
625+++ docs/source/hook-debugging.rst 2011-03-22 18:29:09 +0000
626@@ -1,6 +1,9 @@
627-Hook Debugging
628+Hook debugging
629 ==============
630
631+Introduction
632+------------
633+
634 An important facility in any distributed system is the ability to
635 introspect the running system, and to debug it. Within ensemble the
636 actions performed by the system are executing formula defined
637@@ -15,7 +18,7 @@
638 or debug a hook.
639
640 How it works
641-============
642+------------
643
644 When the ensemble user utilizes the hook debug command like so::
645
646@@ -61,7 +64,7 @@
647
648
649 Internals
650-=========
651+---------
652
653 Internally the ``debug-hooks`` cli begins by verifying its arguments,
654 namely the unit exists, and the named hook is valid for the formula.
655
656=== modified file 'docs/source/index.rst'
657--- docs/source/index.rst 2010-08-02 21:59:18 +0000
658+++ docs/source/index.rst 2011-03-22 18:29:09 +0000
659@@ -1,25 +1,20 @@
660-Ensemble
661-========
662-
663-With the advent of technologies such as virtualization and cloud
664-computing, Linux server deployment is quickly moving towards a
665-landscape of multiple machines.
666-
667-To orchestrate the configuration and deployment of more than a handful
668-machines, tools are necessary. :term:`Ensemble` is one such tool that
669-brings together a community to collaborate on best practices in the
670-huge problem space of system administration.
671-
672-Core Documentation
673-==================
674+Ensemble Documentation
675+======================
676+
677+.. note:: Ensemble is still in a stage of fast development, and is not yet
678+ ready for prime time. The current software is being made available as
679+ an early technology preview, and while it can be experimented with, it
680+ should not be used in real deployments just yet.
681
682 .. toctree::
683- :maxdepth: 1
684+ :maxdepth: 2
685
686- overview
687- getting_started
688- cli
689- specs
690+ about
691+ getting-started
692+ formula
693+ hook-debugging
694+ ensemble-internals
695+ ensemble-drafts
696
697 Index and Glossary
698 ==================
699
700=== added directory 'docs/source/internals'
701=== renamed file 'docs/source/specifications/agent-state-presence-settings.rst' => 'docs/source/internals/agent-presence.rst'
702--- docs/source/specifications/agent-state-presence-settings.rst 2010-11-10 16:52:41 +0000
703+++ docs/source/internals/agent-presence.rst 2011-03-22 18:29:09 +0000
704@@ -1,5 +1,5 @@
705-Agent Presence and Settings
706----------------------------
707+Agent presence and settings
708+===========================
709
710 Agents are a set of distributed processes within the ensemble
711 framework tasked individually with various ensemble roles. Each agent
712@@ -88,7 +88,7 @@
713 that it matches the runtime state.
714
715
716-Startup and Recovery
717+Startup and recovery
718 --------------------
719
720 On startup, an agent will attempt to create its presence node. For
721@@ -105,7 +105,7 @@
722 process should terminate with an error message.
723
724
725-Agent State API
726+Agent state API
727 ---------------
728
729
730
731=== renamed file 'docs/source/specifications/unit-agent-hooks.rst' => 'docs/source/internals/unit-agent-hooks.rst'
732--- docs/source/specifications/unit-agent-hooks.rst 2010-12-03 17:01:20 +0000
733+++ docs/source/internals/unit-agent-hooks.rst 2011-03-22 18:29:09 +0000
734@@ -1,6 +1,8 @@
735+Unit Agent hooks
736+================
737
738-Unit Agent Process Specification
739-================================
740+Introduction
741+------------
742
743 The Unit Agent (**UA**) in Ensemble is responsible for managing and
744 maintaining the per-machine service units. By calling life-cycle and
745@@ -15,7 +17,7 @@
746 Hooks_ are defined in another document. This specification only
747 captures how they are invoked and managed, not why.
748
749-.. _Hooks: ./formula.html#hooks
750+.. _Hooks: ../formula.html#hooks
751
752 When the Machine Agent (**MA**) spawns a UA it does so in order to
753 manage the smallest managed unit of service deployment and
754@@ -28,8 +30,9 @@
755 semantics of it are described in this document.
756
757
758-Hooks access to Settings
759------------------------------
760+Hooks access to settings
761+------------------------
762+
763 Hooks have access to two kinds of settings. The first is the
764 *"service settings"*, which cover configuration details for the
765 all units of the given service. These are usually provided
766@@ -77,7 +80,7 @@
767 is updated with the current value.
768
769
770-Service Unit Name
771+Service Unit name
772 -----------------
773
774 A service unit name in ensemble is formed by including both the name
775@@ -123,9 +126,7 @@
776 being returned to the client.
777
778
779-
780-
781-Hook Invocation and Communication
782+Hook invocation and communication
783 ---------------------------------
784
785 Twisted (which is used to handle networking and asynchronous
786@@ -182,9 +183,7 @@
787 * **wait(client_id, keyname)** - reserved
788
789
790-
791-
792-Unit Agent Internal State
793+Unit Agent internal state
794 -------------------------
795
796 This is a list of internal state which the UA maintains for the proper
797@@ -198,7 +197,7 @@
798 particular hook invocations.
799
800
801-Command Line Interface
802+Command line interface
803 ----------------------
804
805 While the command line utilities provided use the underlying AMP
806@@ -253,8 +252,9 @@
807 provided to communicate more complex logging messages to the
808 UA and help them be made available to the user.
809
810-Standard Calling Environment
811-----------------------------
812+
813+Calling environment
814+-------------------
815
816 Hooks can expect to be invoked with a standard environment and
817 context. The following be included:
818@@ -285,8 +285,7 @@
819 * `$ENSEMBLE_CHANGE` - Set to `joined`, `departed` or `changed`.
820
821
822-
823-Open Issues
824+Open issues
825 -----------
826
827 There are still a number of open issues with this specification. There
828
829=== renamed file 'docs/source/specifications/unit-agent.rst' => 'docs/source/internals/unit-agent-startup.rst'
830--- docs/source/specifications/unit-agent.rst 2010-11-16 22:48:23 +0000
831+++ docs/source/internals/unit-agent-startup.rst 2011-03-22 18:29:09 +0000
832@@ -1,13 +1,8 @@
833-Unit Agent
834-----------
835-
836-A unit is a running machine resource/instance of a service. A unit
837-agent is responsible for interacting with zookeeper to coordinate
838-state on the units behalf. The agent interacts with the unit via
839-invocation of hooks as defined in the formula specification.
840-
841-Agent State and Startup
842-=======================
843+Unit Agent startup
844+==================
845+
846+Introduction
847+------------
848
849 The unit agent manages a state machine workflow for the unit. For each
850 transition the agent records the current state of the unit and stores
851@@ -58,11 +53,8 @@
852 disconnected mode.
853
854
855-Relations
856-=========
857-
858-Unit Agent on Start
859-+++++++++++++++++++
860+Startup sequence
861+----------------
862
863 The following outlines the set of steps a unit agent executes when
864 starting up on a machine resource.
865@@ -103,8 +95,9 @@
866
867 - Establish watches as outlined below.
868
869-Unit Relation Observation
870-+++++++++++++++++++++++++
871+
872+Unit relation observation
873+-------------------------
874
875 Based on the relation type and the unit's service role, the unit agent
876 will establish will retrieve and establish watches on the other units
877@@ -140,8 +133,8 @@
878 relation-changed hook (type joined).
879
880
881-Watch Behavior
882-++++++++++++++
883+Watch behavior
884+--------------
885
886 - (w-1) if the service-role child watch fires with a delete event,
887 reestablish the watch, and execute the relation-changed hook (type
888
889=== renamed file 'docs/source/specifications/zookeeper-filesystem.rst' => 'docs/source/internals/zookeeper.rst'
890--- docs/source/specifications/zookeeper-filesystem.rst 2010-08-27 19:41:44 +0000
891+++ docs/source/internals/zookeeper.rst 2011-03-22 18:29:09 +0000
892@@ -1,5 +1,5 @@
893-ZooKeeper Filesystem
894-====================
895+ZooKeeper
896+=========
897
898 This document describes the reasoning behind Ensemble's use of ZooKeeper,
899 and also the structure and semantics used by Ensemble in the ZooKeeper
900
901=== removed file 'docs/source/notes.rst'
902--- docs/source/notes.rst 2010-08-03 20:14:13 +0000
903+++ docs/source/notes.rst 1970-01-01 00:00:00 +0000
904@@ -1,19 +0,0 @@
905-
906-
907-Refactoring Bootstrap. We need to initialize the zookeeper hierarchy with the
908-machine structure and appropriate acls prior to usage, which means switching
909-bootstrap to a connected model. In order to minimize bootstrap time while
910-connected to the console, we'll utilize customized EBS instances. To generate
911-an admin cli credentials for setting up the initial layout acls, we need to
912-modify the default config generation such that it generates a secret key
913-directly in the config.. if a config file already exists sans an admin key,
914-see if we can add a generated secret while preserving formatting.
915-
916-Provisioning Agent requires machine provider credentials. For the initial
917-provider support this requires that we transport EC2 Credentials to the
918-zookeeper structure. The AWS credentials are transferred along with the
919-machine provider config on bootstrap over the encrypted zookeper connection.
920-The AWS credentials can be spec'd in the config file or extracted directly
921-from the environment.
922-
923-
924
925=== removed file 'docs/source/overview.rst'
926--- docs/source/overview.rst 2010-07-23 12:19:42 +0000
927+++ docs/source/overview.rst 1970-01-01 00:00:00 +0000
928@@ -1,43 +0,0 @@
929-Overview
930-========
931-
932-This section provides a brief overview of the system. Without going
933-too much into detail, it outlines the most important aspects of the
934-system architecture.
935-
936-Managing Services
937------------------
938-
939-Whether services are stacked, internal or external, there are certain
940-characteristics that should apply:
941-
942-1. Services are simple to configure;
943-2. Services can be moved to any machine;
944-3. Services can be scaled both up or down;
945-4. Services can persist data in an external location;
946-5. Services can co-exist on the same machine;
947-6. Similar services are interchangeable;
948-
949-The implementation of those characteristics are the responsibility of
950-the formula that manages the service.
951-
952-Connecting Services
953--------------------
954-
955-Rather than focusing on the configuration of the individual service,
956-:term:`Ensemble` focuses on making services operate together. In the
957-general case, connecting two services simply requires pointing service
958-A to service B.
959-
960-If we don't care about the details of this :term:`service link`, the
961-system will decide a sensible implementation (e.g. TCP/IP on some port
962-with a suitable means of authentication). This is possible in
963-particular because of the virtualization technology which provides a
964-clean space for services to operate in. Risk of error is reduced and
965-security aspects can be addressed in a general way.
966-
967-By defining your system logically in terms of services and the links
968-between them, other components can attach themselves and add
969-value. For instance, we can ask the system to monitor all service
970-links for activity.
971-
972
973=== removed directory 'docs/source/specifications'
974=== removed file 'docs/source/specifications/environment.rst'
975--- docs/source/specifications/environment.rst 2010-08-02 21:59:18 +0000
976+++ docs/source/specifications/environment.rst 1970-01-01 00:00:00 +0000
977@@ -1,7 +0,0 @@
978-.. _environment:
979-
980-Environment
981-===========
982-
983-This document specifies the environment which is implicitly given by
984-the configuration of a machine provider and permanent storage.
985
986=== removed file 'docs/source/specifications/repository.rst'
987--- docs/source/specifications/repository.rst 2010-08-02 21:59:18 +0000
988+++ docs/source/specifications/repository.rst 1970-01-01 00:00:00 +0000
989@@ -1,7 +0,0 @@
990-.. _formula-repository:
991-
992-Formula Repository
993-==================
994-
995-A named collection of formulas; the name is used as a namespace to
996-keep track of the formula source.
997
998=== removed file 'docs/source/specifications/template.rst'
999--- docs/source/specifications/template.rst 2010-07-27 19:14:59 +0000
1000+++ docs/source/specifications/template.rst 1970-01-01 00:00:00 +0000
1001@@ -1,5 +0,0 @@
1002-Template
1003-========
1004-
1005-This is a specification template. It should not be included in release
1006-documentation.
1007
1008=== removed file 'docs/source/specs.rst'
1009--- docs/source/specs.rst 2010-07-27 19:14:59 +0000
1010+++ docs/source/specs.rst 1970-01-01 00:00:00 +0000
1011@@ -1,9 +0,0 @@
1012-Specifications
1013-==============
1014-
1015-This section details current specifications.
1016-
1017-.. toctree::
1018- :glob:
1019-
1020- specifications/*

Subscribers

People subscribed via source and target branches

to status/vote changes: