Skip to content

Repository files navigation

mirror

Table of Contents

  1. Description
  2. Reference
  3. Limitations

Description

This module is used to configure a server to act as a apt mirror for externaly managed packages. It also configueres files and folders neccesary to manage an internal repo. The module makes an assumption that repos will be mirrored in three stages(dev, stage and prod). Three vhosts will be created for each of theses domains and a cron job is created to migrate files between the directory structrues such that dev.$mirror\_domain will have files no older then a week, stage will have files aged between one and two weeks and prod will have files between two and three weeks. The following specific actions are preformed

  • add /etc/apt/mirror.list which lists all repos that this server will mirror
  • add /usr/local/bin/mirror.sh script used to mirror files
  • create cron job to run the above script
  • create folders needed for repos and link files to the approprite vhost directories
  • create files neccessary for signing local repos
  • create directory structre for local repo

Reference

Classes

Mirror

  • respos (Hash, Required): A hash of repositories this server will mirror
  • archives (Hash, Required): A hash of local repositories to configuer
  • mirror_base (Stdlib::Absolutepath, Default: /var/spool/apt-mirror): The path where mirror files will be created
  • nginx_base (Stdlib::Absolutepath, Default: /usr/share/nginx): The path where nginx web roots exist
  • mirror_domain (Stdlib::Host, Default: mirror.dns.icann.org): the domain used for the stages subdomains

Types

Mirror::Repo

Used to define a repository to mirror

  • uri (Stdlob::HTTPUrl): the uri where the upstream repo exists
  • distros (Array[String]): an array of dirstros to mirror e.g. trusty, xenial
  • components (Array[String]): An array of components to use e.g. main
  • i386 (Boolean): by default we only mirror the deb files set this to true to also mirror deb-i386
  • nginx_name (Optional[String]): by default nginx needs the link to the domain name, however wqhe we have multiple repos under the same domain we can have problems. this parameters is a bit of a hack to ensure a consistent name and is moslty used for ppa.launchpad.net and should be set to ppa for respos on that site

Mirror::Archive

used to define a local repository archive

  • distros (Array[String]): an array of dirstros to mirror e.g. trusty, xenial
  • archs (Array[String]): An array of architectures to use e.g. amd64
  • components (Array[String]): An array of components to use e.g. main
  • description (String): A description of the repo

Limitations

This module does not manage the web server

About

puppet module to set up apt mirror

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages