~hazmat/pyjuju/auto-magic-dependency-spec

« back to all changes in this revision

Viewing changes to docs/source/specifications/auto-dependency.rst

  • Committer: kapil.thangavelu at canonical
  • Date: 2011-03-17 15:40:43 UTC
  • Revision ID: kapil.thangavelu@canonical.com-20110317154043-9768dgifsqp8kuep
document dependency resolution algorithm

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Installing Dependencies
 
2
=======================
 
3
 
 
4
One of the key features for ease of use when utilizing in ensemble is
 
5
the ability to have it fetch and deploy formulas from remote
 
6
repositories with dependency resolution. Ie. invoking::
 
7
 
 
8
 ensemble deploy wordpress
 
9
 
 
10
Will lookup a formula named wordpress in the configured remote formula
 
11
repositories, and should pick up any required interfaces of wordpress
 
12
and satisfy those dependencies within the environment if they don't
 
13
already exist.
 
14
 
 
15
This last part is key, as it embodies ensemble moniker as a network
 
16
enabled apt, where dependency resolution of installed packages is
 
17
satisifed by services available within the local network/environment.
 
18
 
 
19
Ensemble allows for multiple formula repositories to be utilized when
 
20
searching for formulas, unlike apt where multiple repositories are
 
21
overlayed into a single global namespace, ensemble provides for
 
22
each repository as an independent namespace. ie. Once a package is 
 
23
installed from a repository, it will not be upgraded automatically
 
24
by a newer version in a different repository. Updates will only
 
25
be detected against its origin repository, unless explicitly modified
 
26
by the user.
 
27
 
 
28
Dependencies are not looked up directly by formula name, but by
 
29
interface names. In the example above wordpress requires something
 
30
providing the mysql interface. Ensemble will first attempt to satisfy
 
31
this dependency by examining the services already deployed within the
 
32
environment to determine if any of them provide the required
 
33
interface.
 
34
 
 
35
If the interface dependency cannot be satisified from the local
 
36
environment, the repository of the formula which specified the
 
37
dependency will be utilized.  So in the case of deploying a wordpress
 
38
formula, the repository that contains the wordpress formula would be
 
39
searched next for a formula that provides the required dependency.
 
40
 
 
41
If the required dependencies are not found in this repository,
 
42
ensemble fallbacks to its repository lookup algorithm, searching each
 
43
repository in turn for the dependency. The repository lookup algorithm
 
44
can be configured by the user in their environment configuration. It
 
45
defaults to searching any command line specified formula directories
 
46
or repositories, and then the central ubuntu formula repositories.
 
47
 
 
48
 
 
49