Feature #7125

Write a Puppet class to manage a Tails mirror

Added by sajolida 2014-04-26 11:58:00 . Updated 2015-12-01 15:25:53 .

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Infrastructure
Target version:
Start date:
2014-04-26
Due date:
% Done:

100%

Feature Branch:
feature/7125-manage-mirror
Type of work:
Sysadmin
Blueprint:

Starter:
1
Affected tool:
Deliverable for:

Description

It would be great to turn the instructions for HTTP mirror operators into a Puppet class (preferably using nginx).

This would help anyone to set up their mirror and to keep its configuration up-to-date without too much effort, as long as they’re fine with using Puppet.

This class should live in our tails Puppet module.


Files


Subtasks


History

#1 Updated by intrigeri 2014-04-26 12:25:35

  • Description updated
  • Assignee deleted (intrigeri)
  • Priority changed from Normal to Low
  • Starter changed from No to Yes

#2 Updated by sajolida 2014-08-31 06:38:04

  • Category changed from Infrastructure to 214

#3 Updated by espiv 2014-12-29 00:17:28

Add mirror class

Creates necessary configuration files for nginx/apache2 and adds a new cron entry for syncing.

Doesn’t really handle packages/services for nginx/apache2…these should probably live in another class.

#4 Updated by intrigeri 2014-12-29 09:24:01

  • Assignee set to intrigeri
  • QA Check set to Ready for QA

#5 Updated by BitingBird 2015-01-04 18:53:49

  • Category changed from 214 to Infrastructure

#6 Updated by intrigeri 2015-01-19 12:44:25

  • Target version set to Tails_1.3

Thanks, and sorry for the delay. I’ll try to review your proposed patch shortly!

#7 Updated by intrigeri 2015-01-21 10:22:25

  • Status changed from Confirmed to In Progress

#8 Updated by intrigeri 2015-02-08 17:21:44

  • Assignee changed from intrigeri to espiv
  • % Done changed from 0 to 50
  • QA Check changed from Ready for QA to Dev Needed
  • Feature Branch set to puppet-tails:feature/7125-manage-mirror

Sorry again for the delay. I finally took time to look at the proposed patch. Then I’ve pushed lots of small improvements to the feature/7125-manage-mirror branch in our puppet-tails Git repo. Untested, sorry — I don’t actually manage any Tails mirror.

Remaining concerns:

  • The nginx virtual host template disables logging, while the Apache 2 one doesn’t. How about we make this consistent (in one way or the other), and perhaps even configurable?
  • Why not add a dependency on Service['nginx'] in tails::mirror::nginx, and same for Apache 2?
  • tails::mirror::{apache2,nginx}.pp are so similar that I wonder if they should not be simply merged into tails::mirror (which would get rid of the ::params hack btw), that could have the web server name as a class parameter. What do you think?
  • Once we merge this branch, we’ll need to point to this Puppet code from our contribute/how/mirror documentation. Are you interested in preparing a branch (against the master branch of our primary Git repo) that implements this?

#9 Updated by intrigeri 2015-02-10 14:24:31

  • Target version changed from Tails_1.3 to Tails_1.3.2

#10 Updated by BitingBird 2015-03-30 23:43:58

  • Target version changed from Tails_1.3.2 to Tails_1.4

This won’t be fixed in this release -> postponing.

#11 Updated by BitingBird 2015-05-09 03:29:56

  • Target version changed from Tails_1.4 to Tails_1.4.1

Postponing

#12 Updated by intrigeri 2015-07-03 01:02:54

  • Assignee deleted (espiv)
  • Priority changed from Low to Normal
  • Target version deleted (Tails_1.4.1)

Seems like espiv folks won’t come back to it => anyone interested in giving a hand with Tails sysadmin, please take it :)

Raising priority since most of the work has been done, and it would be sad not to see it completed.

#13 Updated by espiv 2015-07-25 15:47:25

Hello there,

sorry for not replying earlier. Here is a patch which refactors mirror class according to intrigeri’s last comments. This class has been tested both for nginx and apache2 in Debian wheezy 7.8. The patch must be applied against feature/7125-manage-mirror branch.

Cheers

#14 Updated by espiv 2015-07-25 16:06:09

Another commit: use ensure_resource for Service resource in case it’s already declared elsewhere.

#15 Updated by intrigeri 2015-08-03 04:58:02

Hi! Should we start reviewing/commenting/merging the additional patches you’ve recently sent, or should we instead wait for more?

#16 Updated by espiv 2015-08-03 13:58:37

  • QA Check changed from Dev Needed to Ready for QA

Hi intrigeri,

yes, above posted commits should be reviewed. Sorry, we didn’t explicitly said that. If/when puppet code is reviewd and is merged we shall also write the respective wiki documentation as requested before.

cheers

#17 Updated by intrigeri 2015-08-03 14:17:54

  • Assignee changed from espiv to intrigeri

Great news, you rock :)

#18 Updated by intrigeri 2015-08-09 00:21:14

  • Target version set to Tails_1.6

#19 Updated by intrigeri 2015-08-25 03:15:01

  • Assignee changed from intrigeri to espiv
  • % Done changed from 50 to 60
  • QA Check changed from Ready for QA to Dev Needed

espiv wrote:
> yes, above posted commits should be reviewed.

Merged! Added a commit on top to disable ETag headers.

> If/when puppet code is reviewd and is merged we shall also write the respective wiki documentation as requested before.

Yes, please :)

#20 Updated by bertagaz 2015-09-23 01:24:33

  • Target version changed from Tails_1.6 to Tails_1.7

#21 Updated by espiv 2015-11-17 11:02:29

  • Target version changed from Tails_1.7 to Tails_1.8

#22 Updated by espiv 2015-11-29 14:37:05

Hello,

sorry for the delay. Please find attached a commit against git-tails.immerda.ch/tails master branch, that contains documentation on how to set up a Tails HTTP mirror using puppet.

We decided to not document puppet in a separate page, but rather extend the tails.boum.org/contribute/how/mirror/ page. Thus the HTTP section was split in two, the manual and the puppet way. Furthermore a info frame was added in the ‘big picture section’ informing the reader about the ‘puppet’ documentation following the ‘manual’. Otherwise the pre-existing HTTP sections were left intact.

Please let us know for any changes we should make either in the content or the representation.

Cheers

#23 Updated by espiv 2015-11-29 14:39:22

  • QA Check changed from Dev Needed to Ready for QA

#24 Updated by intrigeri 2015-11-30 01:57:30

  • Assignee changed from espiv to intrigeri

#25 Updated by intrigeri 2015-12-01 13:29:16

  • Assignee changed from intrigeri to espiv
  • % Done changed from 60 to 80
  • Feature Branch changed from puppet-tails:feature/7125-manage-mirror to feature/7125-manage-mirror

Excellent! I’ve imported your patch in a Git branch (feature/7125-manage-mirror in the main Tails Git repo i.e. https://git-tails.immerda.ch/tails/), and pushed a few commits on top. Can you please review the result? If you’re OK with it I’ll go ahead and merge it! :)

#26 Updated by espiv 2015-12-01 13:42:09

  • Assignee changed from espiv to intrigeri

Thanks for your commits, they look good. You may as well merge the branch in master. Cheers!

#27 Updated by intrigeri 2015-12-01 15:22:00

> Thanks for your commits, they look good. You may as well merge the branch in master. Cheers!

Done, woohoo! Thanks a lot for your contribution to Tails :)

Are you interested in tackling another Tails sysadmin task? If yes, please get in touch with me over email (intrigeri@boum.org), and think about: same size, something harder? Same skillset, something else?

#28 Updated by intrigeri 2015-12-01 15:24:16

  • Status changed from In Progress to Resolved
  • % Done changed from 80 to 100

Applied in changeset commit:41a9f72ca2df37e0e49e7f18e23759e4355ce37a.

#29 Updated by intrigeri 2015-12-01 15:25:53

  • Assignee deleted (intrigeri)
  • QA Check changed from Ready for QA to Pass