summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md127
1 files changed, 73 insertions, 54 deletions
diff --git a/README.md b/README.md
index 5f6a109..9405bd8 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,6 @@
* [Classes](#classes)
* [apt](#apt)
* [apt::apticron](#apt-apticron)
- * [apt::cron::download](#apt-cron-download)
* [apt::cron::dist_upgrade](#apt-cron-dist_upgrade)
* [apt::dist_upgrade](#apt-dist_upgrade)
* [apt::dist_upgrade::initiator](#apt-dist_upgrade-initiator)
@@ -23,12 +22,13 @@
* [apt::preseeded_package](#apt-preseeded_package)
* [apt::sources_list](#apt-sources_list)
* [apt::key](#apt-key)
- * [apt::key::plain](#apt-key-plain)
+ * [`apt::key::plain`](#apt-key-plain)
* [apt::upgrade_package](#apt-upgrade_package)
* [Resources](#ressources)
* [File\['apt_config'\]](#fileapt_config)
* [Exec\['apt_updated'\]](#execapt_updated)
* [Tests](#tests)
+ * [Acceptance Tests](#acceptance-tests)
* [Licensing](#licensing)
@@ -49,6 +49,13 @@ Ubuntu support is lagging behind but not absent either.
## Upgrade Notice<a name="upgrade-notice"></a>
+ * The `$apt_cron_hours` global variable is deprecated.
+ Use `apt::cron::dist_upgrade`'s `cron_hours` parameter instead.
+
+ * The default value of the `$repos` parameter was removed since the logic is
+ now in the `apt::params` class. If you have explicitly set `$repos` to
+ 'auto' in your manifests, you should remove this.
+
* The `disable_update` parameter has been removed. The main apt class
defaults to *not* run an `apt-get update` on every run anyway so this
parameter seems useless.
@@ -72,17 +79,16 @@ Ubuntu support is lagging behind but not absent either.
instantiating the class with those variables instead. For example, if you
had the following in your manifests:
- $apt_debian_url = 'http://localhost:9999/debian/'
- $apt_use_next_release = true
- include apt
+ $apt_debian_url = 'http://localhost:9999/debian/'
+ $apt_use_next_release = true
+ include apt
you will need to remove the variables, and the include and instead do
the following:
- class {
- 'apt':
- debian_url => 'http://localhost:9999/debian/',
- use_next_release => true;
+ class { 'apt':
+ debian_url => 'http://localhost:9999/debian/',
+ use_next_release => true;
}
previously, you could manually set `$lsbdistcodename` which would enable forced
@@ -94,26 +100,24 @@ Ubuntu support is lagging behind but not absent either.
you to trigger upgrades:
include apt::dist_upgrade
- class {
- 'apt':
- codename => 'wheezy',
- notify => Exec['apt_dist-upgrade'];
+ class { 'apt':
+ codename => 'wheezy',
+ notify => Exec['apt_dist-upgrade'];
}
* the `apticron` class has been moved to a parameterized class. if you were
including this class before, you will need to move to instantiating the
class instead. For example, if you had the following in your manifests:
- $apticron_email = 'foo@example.com'
- $apticron_notifynew = '1'
- ... any $apticron_* variables
- include apticron
+ $apticron_email = 'foo@example.com'
+ $apticron_notifynew = '1'
+ ... any $apticron_* variables
+ include apticron
you will need to remove the variables, and the include and instead do the
following:
- class {
- 'apt::apticron':
+ class { 'apt::apticron':
email => 'foo@example.com',
notifynew => '1';
}
@@ -123,16 +127,15 @@ Ubuntu support is lagging behind but not absent either.
to move to instantiating the class with those variables instead. For example,
if you had the following in your manifests:
- $apt_listchanges_email = 'foo@example.com'
- ... any $apt_listchanges_* variables
- include apt::listchanges
+ $apt_listchanges_email = 'foo@example.com'
+ ... any $apt_listchanges_* variables
+ include apt::listchanges
you will need to remove the variables, and the include and instead do the
following:
- class {
- 'apt::listchanges':
- email => 'foo@example.com';
+ class { 'apt::listchanges':
+ email => 'foo@example.com';
}
* the `apt::proxy_client` class has been moved to a paramterized class. if you
@@ -140,18 +143,17 @@ Ubuntu support is lagging behind but not absent either.
to move to instantiating the class with those variables instead. For example,
if you had the following in your manifests:
- $apt_proxy = 'http://proxy.domain'
- $apt_proxy_port = 666
- include apt::proxy_client
+ $apt_proxy = 'http://proxy.domain'
+ $apt_proxy_port = 666
+ include apt::proxy_client
you will need to remove the variables, and the include and instead do the
following:
- class {
- 'apt::proxy_client':
- proxy => 'http://proxy.domain',
- port => '666';
- }
+ class { 'apt::proxy_client':
+ proxy => 'http://proxy.domain',
+ port => '666';
+ }
# Requirements<a name="requirements"></a>
@@ -204,7 +206,7 @@ Example usage:
### use_lts
If this variable is set to true the CODENAME-lts sources (such as
- squeeze-lts) are added.
+ wheezy-lts) are added.
By default this is false for backward compatibility with older
versions of this module.
@@ -212,7 +214,7 @@ Example usage:
### use_volatile
If this variable is set to true the CODENAME-updates sources (such as
- squeeze-updates) are added.
+ wheezy-updates) are added.
By default this is false for backward compatibility with older
versions of this module.
@@ -234,11 +236,11 @@ Example usage:
By default this is false for backward compatibility with older
versions of this module.
-### debian_url, security_url, backports_url, volatile_url
+### debian_url, security_url, volatile_url
These variables allow to override the default APT mirrors respectively
used for the standard Debian archives, the Debian security archive,
- the Debian official backports and the Debian Volatile archive.
+ and the Debian Volatile archive.
### ubuntu_url
@@ -321,30 +323,20 @@ Example usage:
}
-## apt::cron::download<a name="apt-cron-download"></a>
+## apt::cron::dist_upgrade<a name="apt-cron-dist_upgrade"></a>
-This class sets up `cron-apt` so that it downloads upgradable packages, does not
-actually do any upgrade and emails when the output changes.
+This class sets up cron-apt so that it dist-upgrades the system and
+emails when upgrades are performed.
`cron-apt` defaults to run at 4 AM. You may want to set the
-`$apt_cron_hours` variable before you include the class: its value will
+`$cron_hours` class parameter before you include the class: its value will
be passed as the "hours" parameter of a cronjob. Example:
# Run cron-apt every three hours
- $apt_cron_hours = '*/3'
+ class { 'apt::cron::dist_upgrade': cron_hours => '*/3' }
Note that the default 4 AM cronjob won't be disabled.
-
-## apt::cron::dist_upgrade<a name="apt-cron-dist_upgrade"></a>
-
-This class sets up cron-apt so that it dist-upgrades the system and
-emails when upgrades are performed.
-
-See [apt::cron::download](#apt-cron-download) above if you need to run `cron-apt` more often
-than once a day.
-
-
## apt::dist_upgrade<a name="apt-dist_upgrade"></a>
This class provides the `Exec['apt_dist-upgrade']` resource that
@@ -356,6 +348,11 @@ classes may inherit from this one and add to its subscription list
using the plusignment (`+>`) operator. A real-world example can be
seen in the `apt::dist_upgrade::initiator` source.
+Parameters:
+
+ * timeout: specified in seconds; the maximum time the `dist-upgrade`
+ command should take. If the command takes longer than the timeout,
+ the command is considered to have failed and will be stopped.
## apt::dist_upgrade::initiator<a name="apt-dist_upgrade-initiator"></a>
@@ -481,7 +478,7 @@ A way to add pinning information to files in `/etc/apt/preferences.d/`
Examples:
apt::preferences_snippet { 'irssi-plugin-otr':
- release => 'squeeze-backports',
+ release => 'jessie-backports',
priority => 999,
}
@@ -563,7 +560,7 @@ use `apt::key::plain`.
The `.gpg` extension is compulsory for `apt` to pickup the key properly.
-## apt::key::plain<a name="apt-key-plain"></a>
+## `apt::key::plain`<a name="apt-key-plain"></a>
Deploys a secure apt OpenPGP key. This usually accompanies the
sources.list snippets above for third party repositories. For example,
@@ -640,11 +637,33 @@ To run pupept rspec tests:
bundle install --path vendor/bundle
bundle exec rake spec
+Verbose Output:
+
+ bundle exec rake spec SPEC_OPTS='--format documentation'
+
Using different facter/puppet versions:
FACTER_GEM_VERSION=1.6.10 PUPPET_GEM_VERSION=2.7.23 bundle install --path vendor/bundle
bundle exec rake spec
+## Acceptance Tests<a name="acceptance-tests"></a>
+
+At the moment, we use [beaker together with docker](https://github.com/puppetlabs/beaker/blob/master/docs/Docker-Support.md)
+to do acceptance testing.
+Be sure to have a recent docker version installed.
+
+List configured nodesets:
+
+ bundle exec rake beaker_nodes
+
+Run tests on default node (Debian Jessie):
+
+ bundle exec rake beaker
+
+Run different nodeset:
+
+ BEAKER_set="debian-8-x86_64-docker" bundle exec rspec spec/acceptance/*_spec.rb
+
# Licensing<a name="licensing"></a>