Project

General

Profile

Feature #7763

Move our meeting reminder to Puppet

Added by sajolida almost 5 years ago. Updated about 2 months ago.

Status:
Confirmed
Priority:
Normal
Assignee:
Category:
Infrastructure
Target version:
-
Start date:
03/03/2015
Due date:
% Done:

100%

Feature Branch:
https://0xacab.org/muri/puppet-tails/tree/7763-meeting-reminder
Type of work:
Sysadmin
Blueprint:
Starter:
Affected tool:

Description

Our meeting reminder setup recipes should be generic, and live in the
(public) "tails" Puppet module, as a tails::meeting::reminder class,
I guess, that will install whatever is needed from Debian and from
your upstream Git repo (no, I won't ask for a Debian package ;)

Then, most of the config can be public as well, and can live in the
very same module. If there are additional private config bits, then
we'll put it into a dedicated private Puppet module.

See https://tails.boum.org/contribute/how/sysadmin/#index4h1 and
especially the "If you don't know Puppet" subsection. Focus on "1. Prepare configuration, scripts and whatever is needed".

Then, once we have this setup description info, intrigeri can translate it into Puppet.

lhf.yaml View (1.42 KB) sajolida, 03/05/2015 03:00 PM

monthly.yaml View (1.51 KB) sajolida, 03/05/2015 03:00 PM


Subtasks

Feature #8997: Write YAML files to describe the cronjob needed for each reminderResolved


Related issues

Related to Tails - Feature #7899: Automatically announce low-hanging fruit sessions Resolved 09/14/2014
Related to Tails - Feature #14725: Quarterly reminder to tails-project@ about sponsorship (from [misc]) Resolved 09/26/2017
Related to Tails - Feature #14507: Have the FT meeting reminder automatically avoid Fridays, Saturdays, and Sundays Resolved 08/30/2017

History

#1 Updated by intrigeri almost 5 years ago

  • Description updated (diff)

(Publishing private email without seeking the author's consent first feels wrong enough, no need to keep the meta part of it..)

#2 Updated by sajolida almost 5 years ago

  • Priority changed from Normal to Elevated
  • Parent task deleted (#7523)

#3 Updated by sajolida over 4 years ago

  • Assignee deleted (sajolida)

I won't learn Puppet and do that I'm sorry...

#4 Updated by intrigeri over 4 years ago

  • Assignee set to sajolida
  • QA Check set to Info Needed

No problem! May you please share your existing code and configuration somewhere, so that we don't start from scratch?

#5 Updated by sajolida over 4 years ago

  • Assignee deleted (sajolida)
  • QA Check deleted (Info Needed)

Cron configuration:

MAILTO=sajolida@pimienta.org
LANG=en_US.UTF-8
0 0 15 * *      MONTHLY=$(date --date="$(date '+\%Y-\%m-03 +1 month')" +\%F) ; ruby $HOME/meeting/meeting.rb --locale en_US.UTF-8 --template $HOME/monthly.eml --date $MONTHLY --subject "Tails contributors meeting: $(date --date=$MONTHLY '+\%A \%B \%d')" --from sajolida@pimienta.org --to "tails-dev@boum.org tails-project@boum.org tails-ux@boum.org tails-l10n@boum.org" 
0 0 1 * *       MONTHLY=$(date --date="$(date '+\%Y-\%m-03')" +\%F) ; ruby $HOME/meeting/meeting.rb --locale en_US.UTF-8 --template $HOME/monthly.eml --date $MONTHLY --subject "Tails contributors meeting: $(date --date=$MONTHLY '+\%A \%B \%d')" --from sajolida@pimienta.org --to "tails-dev@boum.org tails-project@boum.org tails-ux@boum.org tails-l10n@boum.org" 

Needed packages:

  • ruby-liquid

Upstream repo:

https://un.poivron.org/~sajolida/meeting.git

Email template:

The next Tails contributors meeting is scheduled for:

    {{ date }}
        #tails-dev on irc.oftc.net
         9 pm in Paris
         8 pm in London
         3 pm in New-York
        12 pm in San Francisco

Every one interested in contributing to Tails is welcome.

Feel free to propose and prepare discussion topics. Either:

  - Raise them in this thread so that others can ask details and prepare the
    discussion too.

  - Update the blueprint of the agenda:

    https://tails.boum.org/blueprint/monthly_meeting/

  - Make sure that the discussion tickets that you want to treat during the
    meeting are well detailed on Redmine.

If you want to get involved but don't know yet how, please introduce
yourself during the meeting, and be sure to tell us what you are
interested in.

The meeting might not be the most adequate time and place to properly
introduce newcomers to the development process, but at least it should
be a fine place to know each others, and schedule a better
suited event.

#6 Updated by sajolida over 4 years ago

  • Related to Feature #7899: Automatically announce low-hanging fruit sessions added

#7 Updated by Dr_Whax over 4 years ago

so it isn't forgotten:

should be mostly a generic class, a config class, and a define. the generic class does vcsrepo. the define does cron. the config class uses the define as many times as needed (until we put that into hiera, hopefully). or something.

#8 Updated by Dr_Whax over 4 years ago

  • Assignee set to Dr_Whax

#9 Updated by intrigeri over 4 years ago

  • Target version set to Tails_1.4

Let's set a deadline, and if not done by then, I think bertagaz or I should take over (it could be considered as a part of the daily sysadmin duty shifts).

#10 Updated by sajolida over 4 years ago

We could use YAML files (see attachments) to have Puppet generate the corresponding cron jobs. Ideally such files would be hosted in a dedicated public Git repo.

Notes:

  • $DATE in the subject must be replaced by the "date" attribute.
  • In the "date" attribute I left the \ escaping for cron. So the command don't run fine if copy-pasted from there.

#11 Updated by intrigeri over 4 years ago

Note to the implementer: these YAML files are here as examples of what the Hiera configuration could be, if we decide to go this way to configure these cronjobs, as opposed to Puppet code in our manifests. This doesn't block the initial implementation (only what I called the "config class" might be replaced by bits of Hiera, I think).

#12 Updated by intrigeri about 4 years ago

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

Postponing.

DrWhax: IIRC you took this ticket as a potentially nice way to get deeper into Puppet, right? If you need help from me, feel free to ask. I've no idea what Puppet experience you had time to grab in the last 6 months, so please point me to whatever Puppet bits you wrote or modified, and to whatever bits of Puppet documentation / books / tutorial you've read, so that I can adjust the help I'll provide accordingly. IIRC your other, more involved Puppet tasks are approaching, so the earlier you're up to speed, the better :)

#13 Updated by BitingBird about 4 years ago

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

#14 Updated by intrigeri almost 4 years ago

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

Postponing one last time. If not done in the next release cycle, I guess that someone else (e.g. bertagaz or I as part of our sysadmin shifts) will need to take over.

#15 Updated by bertagaz almost 4 years ago

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

#16 Updated by Dr_Whax almost 4 years ago

  • Assignee deleted (Dr_Whax)
  • Target version changed from Tails_1.7 to 2016

#17 Updated by intrigeri almost 3 years ago

  • Target version deleted (2016)

#18 Updated by sajolida almost 2 years ago

  • Related to Feature #14725: Quarterly reminder to tails-project@ about sponsorship (from [misc]) added

#19 Updated by u over 1 year ago

  • Related to Feature #14507: Have the FT meeting reminder automatically avoid Fridays, Saturdays, and Sundays added

#20 Updated by muri 7 months ago

  • Assignee set to muri

#21 Updated by muri 4 months ago

  • Assignee changed from muri to intrigeri
  • Feature Branch set to https://0xacab.org/muri/puppet-tails/tree/7763-meeting-reminder

Ok, so... I feel like I've forgotten everything I knew about puppet. Didn't even know there were data types! I tried my best to create something on https://0xacab.org/muri/puppet-tails/tree/7763-meeting-reminder. I have created on class that should install the script and added one definition for the cronjob, which requires the class. I'm not sure if it makes sense to review it or if it would be better to be written by someone with more puppet skillset. @intrigeri i've set you as assignee, maybe you can take a short look (but no hurry whatsoever...)

#22 Updated by intrigeri 3 months ago

  • Assignee changed from intrigeri to muri

Thanks!

In the class:

  • I'll skip everything that's about managing a clone of the script's repo until we reach a conclusion on #14507#note-41. Moving the code to puppet-tails.git would allow us to get rid of big parts of the code here (and incidentally, the parts on which I would have more comments).
  • I think $user should not default to $title, which does not make sense for a class. I propose tails_meeting_reminder.

In the defined resource:

  • Please use long option names (e.g. --from) in the command line, for better readability.
  • We need to deploy the template, likely via the Puppet file server.
  • We should validate $fromemailaddress and items in $addresses.
  • The command should find the path of the script and the value of user via ${tails::meeting::...} instead of hard-coding it.
  • I think the cron resource can simply require => Class['::tails::meeting']. I'm not sure what require => [Tails::Meeting['tails_meetingscript']] means (maybe nothing Puppet would understand? :)

#23 Updated by muri about 2 months ago

  • Assignee changed from muri to intrigeri

Hi,

intrigeri wrote:

Thanks!

In the class:

  • I'll skip everything that's about managing a clone of the script's repo until we reach a conclusion on #14507#note-41. Moving the code to puppet-tails.git would allow us to get rid of big parts of the code here (and incidentally, the parts on which I would have more comments).

Oke, as mentioned in #14507 I've now moved the code into the files directory of the puppet module and in turn removed all the stuff related to the vcs module

  • I think $user should not default to $title, which does not make sense for a class. I propose tails_meeting_reminder.

done

In the defined resource:

  • Please use long option names (e.g. --from) in the command line, for better readability.

done

  • We need to deploy the template, likely via the Puppet file server.

done

  • We should validate $fromemailaddress and items in $addresses.

done

  • The command should find the path of the script and the value of user via ${tails::meeting::...} instead of hard-coding it.

I'm not sure how to access variables from the class above- should I create arguments user and path in tails::meeting for that?

  • I think the cron resource can simply require => Class['::tails::meeting']. I'm not sure what require => [Tails::Meeting['tails_meetingscript']] means (maybe nothing Puppet would understand? :)

done

I tried to find out how to test the module locally, but I failed. I guess it should somehow work with puppet apply --modulepath=/path/to/tails/modules, which works basically, but it complains that it doesn't find Stdlib::Absolutepath although I have installed puppet-module-puppetlabs-stdlib. Setting --modulepath=/usr/share/puppet/modules.available/puppetlabs-stdlib:/path/to/tails/modules doesn't help.

Also available in: Atom PDF