Skip to content

Commit

Permalink
doc: import chapters from aptly.info
Browse files Browse the repository at this point in the history
  • Loading branch information
neolynx committed Nov 17, 2024
1 parent 88f4afd commit c8cf59c
Show file tree
Hide file tree
Showing 8 changed files with 121 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/Database.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Aptly Database Operations
<div>

Manage aptly’s internal metadata database and package pool.
</div>
80 changes: 80 additions & 0 deletions docs/Files.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,84 @@
# File Operations
<div>
Upload package files temporarily to aptly service. These files
could be added to local repositories using [local repositories API](/doc/api/repos).

All uploaded files are stored under `<rootDir>/upload` directory (see [configuration](/doc/configuration)).
This directory would be created automatically if it doesn't exist.

Uploaded files are grouped by directories to support concurrent uploads from multiple
package sources. Local repos add API can operate on directory (adding all files from directory) or
on individual package files. By default, all successfully added package files would be removed.

### List Directories

`GET /api/files`

List all directories.

Response: list of directory names.

Example:

$ curl http://localhost:8080/api/files
["aptly-0.9"]

### Upload File(s)

`POST /api/files/:dir`

Parameter `:dir` is upload directory name. Directory would be created if it doesn't exist.

Any number of files can be uploaded in one call, aptly would preserve filenames. No check is performed
if existing uploaded would be overwritten.

Response: list of uploaded files as `:dir/:file`.

Example:

$ curl -X POST -F file=@aptly_0.9~dev+217+ge5d646c_i386.deb http://localhost:8080/api/files/aptly-0.9
["aptly-0.9/aptly_0.9~dev+217+ge5d646c_i386.deb"]

### List Files in Directory

`GET /api/files/:dir`

Returns list of files in directory.

Response: list of filenames.

HTTP Errors:

Code | Description
----------|-------------------------
404 | directory doesn't exist

Example:

$ curl http://localhost:8080/api/files/aptly-0.9
["aptly_0.9~dev+217+ge5d646c_i386.deb"]


### Delete Directory

`DELETE /api/files/:dir`

Deletes all files in upload directory and directory itself.

Example:

$ curl -X DELETE http://localhost:8080/api/files/aptly-0.9
{}

### Delete File in Directory

`DELETE /api/files/:dir/:file`

Delete single file in directory.

Example:

$ curl -X DELETE http://localhost:8080/api/files/aptly-0.9/aptly_0.9~dev+217+ge5d646c_i386.deb
{}

</div>
26 changes: 26 additions & 0 deletions docs/Graph.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,30 @@
# Dependency Graph
<div>
aptly generates graph showing dependencies between mirrors, local repositories,
snapshots and published repositories.


Command graph generates graph of dependencies:

* between snapshots and mirrors (what mirror was used to create each snapshot)
* between snapshots and local repos (what local repo was used to create snapshot)
* between snapshots (pulling, merging, etc.)
* between snapshots, local repos and published repositories (how snapshots were published).

Graph is rendered to PNG file using graphviz package.

Usage:

$ aptly graph

Flags:

- `-format="png"`: graph output format, could be anything graphviz supports, e.g. `png`, `pdf`, `svg`, ...
- `-output=""`: specify output filename, default is to open result in viewer
- `-layout="horizontal"`: change between a `horizontal` and a `vertical` graph layout.

Example:

<a href="../../../img/graphfull.png"><img src="../../../img/graph.png" alt="Example graph from aptly graph (horizontal)" class="img-responsive"></a>

</div>
2 changes: 2 additions & 0 deletions docs/Mirrors.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Repository Mirrors
<div>
aptly allows to create mirrors of remote Debian repositories, HTTP, HTTPS and FTP repositories are supported.

Mirrors are created with [`aptly mirror create`](/doc/aptly/mirror/create/) command, mirror contents are downloaded with [`aptly mirror update`](/doc/aptly/mirror/update/) command. Mirror could be updated at any moment. In order to preserve current mirror state, [create snapshot](/doc/aptly/snapshot/create/) of the mirror. Snapshot could be published or used to build other snapshots.
</div>

2 changes: 1 addition & 1 deletion docs/Packages.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Packages
<div>

Perform operations on the whole collection of packages in apty database.
</div>

6 changes: 6 additions & 0 deletions docs/Repos.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Repositories
<div>
Local repository is a collection of packages (most usually custom packages created internally).
Packages could be added to local repository at any moment, removed, moved or copied between repos.
Multiple versions of the same package could be added to the repository.
In order to capture current repository state, [create snapshot](/doc/aptly/snapshot/create/).

Local repositories could be published either [directly](/doc/aptly/publish/repo/)
or from [snapshot](/doc/aptly/publish/snapshot).
</div>

7 changes: 1 addition & 6 deletions docs/Snapshots.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
# Repository and Mirror Snapshots
<div>
Snapshot is a fixed state of remote repository mirror or local repository. Internally snapshot is list of references to packages.
Snapshot is immutable, i.e. it can't be changed since it has been created. Snapshots could be [merged](/doc/aptly/snapshot/merge/),
[filtered](/doc/aptly/snapshot/pull/),
individual packages could be [pulled](/doc/aptly/snapshot/pull/), snapshot could be
[verified](/doc/aptly/snapshot/verify/) for missing dependencies. Finally, snapshots could be
[published as repositories](/doc/aptly/publish/snapshot)
Snapshot is a fixed state of remote repository mirror or local repository. Internally snapshot is list of references to packages. Snapshot is immutable, i.e. it can’t be changed since it has been created. Snapshots could be merged, filtered, individual packages could be pulled, snapshot could be verified for missing dependencies. Finally, snapshots could be published as repositories.
</div>
4 changes: 4 additions & 0 deletions docs/Tasks.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Background Tasks
<div>
An aptly task is a sequence of multiple aptly commands run within a single aptly thread.

For example, a task could be to [create a new repository](/doc/aptly/repo/create), [add packages to it](/doc/aptly/repo/add), [create a snapshot](/doc/aptly/snapshot/create) and [serve it](/doc/aptly/serve).

Four commands can be now run in a single command.
</div>

0 comments on commit c8cf59c

Please sign in to comment.