Make puppet provider for scap3
Closed, ResolvedPublic2 Story Points

Description

Determine what puppet changes need to happen to deploy something with scap3 that was previously deployed with the puppet trebuchet provider

thcipriani updated the task description. (Show Details)
thcipriani raised the priority of this task from to Normal.
thcipriani claimed this task.
thcipriani added a project: Scap.
thcipriani added subscribers: thcipriani, mmodell, dduvall, demon.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 18 2015, 6:09 PM
mmodell set Security to None.Oct 12 2015, 4:13 PM
mmodell edited a custom field.
thcipriani removed thcipriani as the assignee of this task.Nov 24 2015, 12:04 AM
thcipriani moved this task from Needs triage to Services improvements on the Scap board.

Change 262742 had a related patch set uploaded (by Thcipriani):
Puppet provider for scap3

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

thcipriani renamed this task from Make puppet trebuchet provider work with scap3 to Make puppet provider for scap3.Jan 11 2016, 6:56 PM
thcipriani added a subscriber: akosiaris.
thcipriani reassigned this task from thcipriani to mmodell.

Change 262742 had a related patch set uploaded (by Dduvall):
Puppet provider for scap3

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

mmodell added a comment.EditedFeb 7 2016, 11:25 PM

It looks like we can't use package_settings in the provider because that feature was added in puppet 3.5 and Trusty uses puppet 3.4.

I can think of two alternative ways to set the username for a given scap package:

  1. Pass the username in the package resource's install_options attribute
  2. Manage the top-level directory (/srv/deployment/{package}) with a regular File resource in puppet, and then have the package provider only deal with the subdirectories within /srv/deployment/{package}/*

@akosiaris & @dduvall: What do you guys think about these options? Or am I missing something with regards to the package_settings feature? Do we not need to support puppet versions < 3.5?

I tried to install the backport on my test instance (deploy.eqiad.wmflabs) but I got an error: https://github.com/ptomulik/puppet-backport_package_settings/issues/1

It looks like we can't use package_settings in the provider because that feature was added in puppet 3.5 and Trusty uses puppet 3.4.

I can think of two alternative ways to set the username for a given scap package:

  1. Pass the username in the package resource's install_options attribute
  2. Manage the top-level directory (/srv/deployment/{package}) with a regular File resource in puppet, and then have the package provider only deal with the subdirectories within /srv/deployment/{package}/*

    @akosiaris & @dduvall: What do you guys think about these options? Or am I missing something with regards to the package_settings feature? Do we not need to support puppet versions < 3.5?

Yes, we need to support versions <3.5. We use 3.4.3 right now. I 've developed the draft for the scap3 package provider on a jessie system which has 3.7, where it works just fine. I 've considered abusing install_options back then as well. It was mostly the fact that package_settings seemed easier to abuse due to the single hash argument it receivers according to the documentation whereas install_options receives an array of strings, hashes, etc. I think we should update the provider for that instead of backporting package_settings.

@akosiaris: I agree, the backport doesn't seem to work right and I can come up with something that uses install_options easily enough. Thanks for your feedback.

Ok I updated the patch at https://gerrit.wikimedia.org/r/#/c/262742/18, works on labs with some minor hacks to get around environment-related peculiarities.

@akosiaris said he'd give the patch one last review, after that I'll merge it and babysit patches for phab deployment as long as @mmodell is around.

Change 269560 had a related patch set uploaded (by 20after4):
scap::target to configure scap3 deployment repository and deploy-user.

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

greg edited projects, added scap2; removed Deployment-Systems.Feb 9 2016, 11:51 PM

Change 262742 merged by ArielGlenn:
Puppet provider for scap3

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

mmodell closed this task as Resolved.Feb 11 2016, 10:33 AM