9
Snappy Ubuntu Core is a new rendition of Ubuntu with transactional updates — a
10
minimal server image with the same libraries as today’s Ubuntu, but
9
Snappy Ubuntu Core is a new rendition of Ubuntu with transactional updates - a
10
minimal server image with the same libraries as today's Ubuntu, but
11
11
applications are provided through a simpler mechanism.
13
13
Snappy apps and Ubuntu Core itself can be upgraded atomically and rolled back
19
A .snap package for the Ubuntu Core system contains all its
19
A `.snap` package for the Ubuntu Core system contains all its
20
20
dependencies. This has a couple of advantages over traditional deb or
21
21
rpm based dependency handling, the most important being that a
22
22
developer can always be assured that there are no regressions triggered by
23
23
changes to the system underneath their app.
25
25
Snapcraft makes bundling these dependencies easy by allowing you to
26
specify them as “parts” in the snapcraft.yaml file.
26
specify them as "parts" in the `snapcraft.yaml` file.
30
A central aspect of a snapcraft recipe is a “part”. A part is a piece
30
A central aspect of a snapcraft recipe is a "part". A part is a piece
31
31
of software or data that the snap package requires to work or to
32
32
build other parts. Each part is managed by a snapcraft plugin and parts
33
33
are usually independent of each other.
48
48
The first is that each part is pulled. This step will download
49
49
content, e.g. checkout a git repository or download a binary component
50
like the Java SDK. Snapcraft will create a parts/ directory with
51
sub-directories like parts/part-name/src for each part that contains
50
like the Java SDK. Snapcraft will create a `parts/` directory with
51
sub-directories like `parts/part-name/src` for each part that contains
52
52
the downloaded content.
56
The next step is that each part is built in its parts/part-name/build
57
directory and installs itself into parts/part-name/install.
56
The next step is that each part is built in its `parts/part-name/build`
57
directory and installs itself into `parts/part-name/install`.
61
61
After the build of each part the parts are combined into a single
62
directory tree that is called the “staging area”. It can be found
63
under the ./stage directory.
62
directory tree that is called the "staging area". It can be found
63
under the `./stage` directory.
65
This ./stage directory is useful for building outside code that isn’t in the
66
snapcraft.yaml recipe against the snap contents. For example, you might build a
67
local project against the libraries in ./stage by running
65
This `./stage` directory is useful for building outside code that isn't in the
66
`snapcraft.yaml` recipe against the snap contents. For example, you might build a
67
local project against the libraries in `./stage` by running
68
68
`snapcraft shell make`. Though in general, you are encouraged to add even local
69
69
projects to snapcraft.yaml with a local `source:` path.
73
The snap step moves the data into a ./snap directory. It contains only
73
The snap step moves the data into a `./snap` directory. It contains only
74
74
the content that will be put into the final snap package, unlike the staging
75
75
area which may include some development files not destined for your package.
77
77
The Snappy metadata information about your project will also now be placed in
80
This ./snap directory is useful for inspecting what is going into your snap
81
and to make any final post-processing on snapcraft’s output.
80
This `./snap` directory is useful for inspecting what is going into your snap
81
and to make any final post-processing on snapcraft's output.
85
The final step builds a snap package out of the snap directory. This .snap file
85
The final step builds a snap package out of the `snap` directory. This `.snap` file
86
86
can be uploaded to the Ubuntu Store and published directly to Snappy users.
90
90
After introducing the key concept of snapcraft it is probably a good
91
time to look at the tutorial in docs/tutorial.md to see how it works
91
time to look at [the tutorial](tutorial.md) to see how it works
92
92
for an example project.