researchcloud-items

Installation scripts for SURF ResearchCloud catalog components

View the Project on GitHub UtrechtUniversity/researchcloud-items

Playbook aptly

back to index

Summary

Installs Aptly, the “Swiss army knife for Debian repository management”, and uses it to serve apt repositories on the workspace, as defined by the user.

Requires

Description

This component:

  1. installs Aptly.
  2. uses Aptly to create apt repositories, as defined by the user (see Variables).
  3. uses Aptly to add packages to the created repositories, as defined by the user (see Variables).
  4. uses nginx to serve the apt repositories from the workspace.
    • repositories are served under the /apt/ location (e.g. https://<workspace_fqdn>/apt/dists/...)

To publish repositories, Aptly must have access to a valid GPG Keypair. This component:

To add packages to repositories, the component creates the script /usr/local/bin/aptly_add_packages.sh. The script is run once when this component is executed, but you can also use it at any later time to add more packages to the repositories defined by this component. See the aptly_add role for documentation.

Variables

Aptly repositories

aptly_repositories: String of YAML dict objects (one on every newline) defining repositories to be created. Example:

{name: jammy, distribution: jammy, label: test, state: present, components: [main, experimental], architectures: [amd64, arm64]}
{name: focal, distribution: focal, label: test, state: present, components: [main, experimental], architectures: [amd64]}

This creates repositories for two distributions (jammy and focal), each with two ‘components’ (channels, in this case main and experimental). The focal repo will contain only amd64 packages, while the jammy repo also supports arm64. The name and label attributes are descriptive. For more info, compare the format of an apt repo.

Aptly packages

aptly_packages: String of YAML dict objects (one on every newline) defining directories from which predefined repositories (see aptly_repositories) will be provisioned. Put your .deb packages in these directories to automatically add them to the repositories you have defined. Example:

{name: jammy, component: main, packages: /pkgs/jammy, architectures: [amd64, arm64]}
{name: focal, component: main, packages: /pkgs/focal, architectures: [amd64]}

This adds all .deb files /pkgs/jammy to the jammy-main channel, and all .deb files in /pkgs/focal to the focal-main channel.

Aptly general

GPG

When not setting the GPG keys as parameters (see above), these variables can be used to configure key generation on the workspace:

See also

Role aptly_add

Two external roles are used. See the README in their respective directories for documentation:

History

2023 Written by Dawa Ometto (Utrecht University)

back to index