Exercise: Repository Management
Create Aptly repositories and add multiple Debian packages to them with the same and different endpoints.
Task
In this exercise, you are required to create and serve Aptly repositories containing two packages that we provide to you in the code editor below.
Note: We have already installed aptly for you in the code editor below. We have given you root access in the code editor so you don’t have to type sudo before each command.
Subtask I: Create private key
- Generate a private GnuPG key.
Subtask II: Manage the first repository
-
Create an Aptly repository named
first-repo
. -
Add the package
my-first-package_0.1_amd64.deb
to thefirst-repo
repository. -
Create a snapshot of the
first-repo
repository namedfirst-repo-v01
, and publish it by specifyingpackages1
as an endpoint.
Subtask III: Manage the second repository
-
Create another Aptly repository named
second-repo
. -
First, add the package
my-first-package_0.1_amd64.deb
to thesecond-repo
repository. -
Create a snapshot called
second-repo-v01
of this repository and publish it usingpackages2
as an endpoint. -
Now, add the package
my-second-package_0.1_amd64.deb
to the same repository. -
Create a snapshot of the repository named
second-repo-v02
and publish it by specifying the same endpoint.
Subtask IV: Serve the repositories
- You can serve the repository by starting an HTTP server using the following command. (This is not recommended for production use.)
aptly serve
Get hands-on with 1400+ tech skills courses.