Page MenuHomePhabricator

Create a resources for installing components
Closed, ResolvedPublic

Description

I have seen the following patterne a few times. We should try and abstract this in a resource to anable more DRY like code

apt::pin { 'facter3-stretch':
    pin      => 'release c=component/facter3',
    priority => '1002',
    before   => Package['facter'],
}
package { 'facter':
    ensure  => present,
    require => [ Apt::Repository['component-facter3'], Exec['apt_update_facter']],
}
exec {'apt_update_facter':
    command     => '/usr/bin/apt-get update',
    refreshonly => true,
}

Details

Related Gerrit Patches:

Event Timeline

jbond triaged this task as Medium priority.Dec 10 2019, 9:38 AM
jbond created this task.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 10 2019, 9:38 AM

One implementation note: The priority is somewhat dependent on the use case and should probably be abstracted away: Everything which arrives from standard Debian repos has priority=1000 and the main component enabled by default uses priority=1001. So this could set priority=1001 by default unless something like "$replaces_existing_component => true" or similar is enabled which then picks priority=1002.

I am trying to triage, this seems like an internal "nice to have" feature, like T178575 but not something that probably requires immediate action. Maybe it should have lower priority in the context of Operations, but will not touch it if @jbond plans to work on it soon.

jbond lowered the priority of this task from Medium to Low.Dec 12 2019, 6:21 PM

I am trying to triage, this seems like an internal "nice to have" feature, like T178575 but not something that probably requires immediate action. Maybe it should have lower priority in the context of Operations, but will not touch it if @jbond plans to work on it soon.

agreed have updated the priority to low

Change 560458 had a related patch set uploaded (by Muehlenhoff; owner: Muehlenhoff):
[operations/puppet@production] Add a define to install a package from a repository component (WIP)

https://gerrit.wikimedia.org/r/560458

Change 560458 merged by Muehlenhoff:
[operations/puppet@production] Add a define to install a package from a repository component

https://gerrit.wikimedia.org/r/560458

jbond closed this task as Resolved.Fri, Feb 14, 2:31 PM