Skip to content

Aethylred/apaxage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Apaxage

The Apaxage puppet module creates an Apaxy themed package repository for both yum and apt.

Usage

The minimum installation required to get an apaxage yum repository working on the default document root of a web server:

include apaxy
class {'apaxage':
  manage_vhost  => true,
}
apaxage::repo::yum{'centos':}

Resources and Classes

The apaxage class

The apaxage class prepares the web server to host an apaxage themed package repository. The class can set up apaxy and createrepo underneath it's document root. The class does not manage the installation of Apache, but it can use apaxy to create an apache::vhost to manage the virtual host configuration file for the apaxage web site. Check the Apaxy Module documentation on creating custom vhost configurations.

Optionally, using apaxage to install apaxy can be disabled to allow for customised installations.

The apaxage class does not deploy any assets to the apaxage site (such as images or CSS stylesheets) outside what's deployed by apaxy. If custom images or other assets are required for the HTML fragments passed to the apaxage class, they will need to be deployed by other means (e.g. using file resources, or deploy a custom fork of apaxy).

Parameters

  • docroot: Sets the path to the document root where apaxage will be set up. Defaults to the default document root for the Puppetlabs Apache module which is OS and distribution depenent.
  • header_fragment: Inserts the string as a HTML fragment into the Apaxy header. Does nothing if the manage_apaxy parameter is not true.
  • footer_fragment: Inserts the string as a HTML fragment into the Apaxy footer. Does nothing if the manage_apaxy parameter is not true.
  • manage_vhost: If set to true, apaxage will set an apache::vhost resource to manage the Apaxage site. The default setting is true. If this is set to false the site vhost will have to be managed separately.
  • manage_apaxy: If set to true, apaxage will set up Apaxy on the document root with the Apaxage module. The default setting is true. If this is set to false then Apaxy will have to be managed separately.

The apaxage::repo::yum resource

This resource defines a yum repository as a sub directory of the apaxage site deployed by the apaxage class. It currently uses the createrepo module to create and maintain the repository.

Parameters

  • repository_dir: This specifies the directory to be used for the repository, it must be a subdirectory within the directory tree underneath an apaxage site defined by the apaxage class. The default is to create a subdirectory under the apaxage document root using the apaxage::repo::yum resource's name.
  • repo_cache_root_dir: Defines the directory where the yum repository data will be cached. The default is to use a subdirectory under /var/cache/apaxage.

The apaxage::mirror::rsync resource

This resource defines an rsync mirror, it relies on the repository being mirrored to manage the packages and set up the repository. This can take quite some time, and several puppet runs for the repository to be fully mirrored.

Parameters

  • source: This provides the source URI from where rsync will retrieve the data. Usually of the from rsync://example.org/path/to/dir. This parameter is required.
  • target: Sets the path that rsync will copy to. This path should be previously defined as a file resource. The default path is created from the apaxage class docroot parameter and the name given to this resource.
  • rsync_bin: Specifies a path to the rsync binary. Defaults to /usr/bin/rsync.
  • delete: Adds the --delete option to the rsync command
  • user: appends a user@ to the source URI.
  • recursive: Adds the r option to the rsync command to perform a recursive copy.
  • links: Adds the --links option to the rsync command to preserve symlinks.
  • hard_links: Adds the H option to the rsync command to preserve hard links.
  • copy_links: Adds the L option to the rsync command to transform symlinks to referant directory.
  • times: Adds the --times option to the rsync command to preserve timestamps.
  • timeout: Sets the timeout for the rsync operation, the default is 300 seconds (5 minutes).
  • exclude: Sets the--exclude= option which will exclude files that match this string.
  • include: Sets the --include= option which will include files that match the string, and over-rides excluded files.
  • exec_user: Sets the user to execute the rsync command as, the default is 'root'.

To Do

  • Make apt repositories work (which may require something to handle GPG/PGP keys)
  • Consider merging the repo management libraries into apaxage
  • Consider using a suitable rsync module to sync mirrors
  • Consider syncing mirrors with cron jobs

Dependencies

Attribution

The Apaxage module was written by Aaron Hicks 2013

puppet-blank

This module is derived from the puppet-blank module by Aaron Hicks (aethylred@gmail.com)

This module has been developed for the use with Open Source Puppet (Apache 2.0 license) for automating server & service deployment.

rspec-puppet-augeas

This module includes the Travis configuration to use rspec-puppet-augeas to test and verify changes made to files using the augeas resource available in Puppet. Check the rspec-puppet-augeas documentation for usage.

This will require a copy of the original input files to spec/fixtures/augeas using the same filesystem layout that the resource expects:

$ tree spec/fixtures/augeas/
spec/fixtures/augeas/
`-- etc
    `-- ssh
        `-- sshd_config

Gnu General Public License

GPL3

This file is part of the apaxage Puppet module.

The apaxage Puppet module is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The apaxage Puppet module is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with the apaxage Puppet module. If not, see http://www.gnu.org/licenses/.

About

A puppet module for setting up an Apaxy themed package repository for apt and yum

Resources

Stars

Watchers

Forks

Packages

No packages published