Page MenuHomePhabricator

Use MaxMind DB in piwik geo-location
Closed, ResolvedPublic

Description

Via puppet we should copy the maxmmind db into the misc Matomo subdirectory

This is a real good first bug for a junior SRE

Event Timeline

mforns moved this task from Incoming to Operational Excellence on the Analytics board.

@Nuria: A good first task is a self-contained, non-controversial task with a clear approach. It should be well-described with pointers to help a completely new contributor. Given the current short task description (no links to documentation, no explanation what all these terms mean, no info which code base this is about or where the code base is located) I'm removing the good first task tag. Please add details what exactly has to happen where and how for a new contributor, and then add back the good first task project tag. Thanks a lot in advance!

@Aklapper the description is too generic, what we meant was "good first task for new Analytics SREs" since we are onboarding two very soon. We'll avoid using the tag sorry!

  • For an entry level task this probably needs to happen in labs first

Change 626481 had a related patch set uploaded (by Razzi; owner: Razzi):
[operations/puppet@production] Add geoip::data::puppet to profile::piwik::instance

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

Let's make sure to test this is working once deployed, what does our data on piwik say? http://piwik.wikimedia.org

Change 627577 had a related patch set uploaded (by Razzi; owner: Razzi):
[operations/puppet@production] profile::piwik::webserver: Add geoip data to Matomo

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

Change 627577 merged by Elukey:
[operations/puppet@production] profile::piwik::webserver: Add geoip data to Matomo

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

Change 626481 merged by Elukey:
[operations/puppet@production] Add geoip::data::puppet to profile::piwik::instance

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

After merging the second change this was the output:

Notice: /Stage[main]/Geoip::Data::Puppet/File[/usr/share/matomo/misc/GeoIP.dat]/ensure: defined content as '{md5}995a730183f160290ed8289c47370bf5'
Notice: /Stage[main]/Geoip::Data::Puppet/File[/usr/share/matomo/misc/GeoIP2-City.mmdb]/ensure: defined content as '{md5}a4fb0591977df10a0d89376773917140'
Notice: /Stage[main]/Geoip::Data::Puppet/File[/usr/share/matomo/misc/GeoIP2-Connection-Type.mmdb]/ensure: defined content as '{md5}a39126c5f3104bbef529952732a08a63'
Notice: /Stage[main]/Geoip::Data::Puppet/File[/usr/share/matomo/misc/GeoIP2-Country.mmdb]/ensure: defined content as '{md5}6d439338330793f2d63c97461d8becbc'
Notice: /Stage[main]/Geoip::Data::Puppet/File[/usr/share/matomo/misc/GeoIP2-ISP.mmdb]/ensure: defined content as '{md5}584cb3187861004cad1f57f45d90b1a9'
Notice: /Stage[main]/Geoip::Data::Puppet/File[/usr/share/matomo/misc/GeoIPASNum.dat]/ensure: defined content as '{md5}d5672dde5cd81286aaaf87ab7defc690'
Notice: /Stage[main]/Geoip::Data::Puppet/File[/usr/share/matomo/misc/GeoIPASNumv6.dat]/ensure: defined content as '{md5}e60631f5f91ca2da15c092e378f275e9'
Notice: /Stage[main]/Geoip::Data::Puppet/File[/usr/share/matomo/misc/GeoIPCity.dat]/ensure: defined content as '{md5}0bd3859ad2c599e7033430cf68f4c6d7'
Notice: /Stage[main]/Geoip::Data::Puppet/File[/usr/share/matomo/misc/GeoIPNetSpeed.dat]/ensure: defined content as '{md5}6c1c98bf79b333f77168c7d5105f8d1d'
Notice: /Stage[main]/Geoip::Data::Puppet/File[/usr/share/matomo/misc/GeoIPNetSpeedCell.dat]/ensure: defined content as '{md5}2e2d9cb9aea70da9eeda92702baa25a1'
Notice: /Stage[main]/Geoip::Data::Puppet/File[/usr/share/matomo/misc/GeoIPRegion.dat]/ensure: defined content as '{md5}264a2818599d65ac0d6254808ba22365'
Notice: /Stage[main]/Geoip::Data::Puppet/File[/usr/share/matomo/misc/GeoIPv6.dat]/ensure: defined content as '{md5}043a59361de6dfd9b6cde077f07d28db'
Notice: /Stage[main]/Geoip::Data::Puppet/File[/usr/share/matomo/misc/GeoLite.dat]/ensure: defined content as '{md5}0701a01cb50cec28c5ff643912bf05e3'
Notice: /Stage[main]/Geoip::Data::Puppet/File[/usr/share/matomo/misc/GeoLite2-City.mmdb]/ensure: defined content as '{md5}ab00b342809f695016810418905b5646'
Notice: /Stage[main]/Geoip::Data::Puppet/File[/usr/share/matomo/misc/GeoLiteCity.dat]/ensure: defined content as '{md5}5c29a58ef988fdd4359c814287ff6c0b'
Notice: /Stage[main]/Geoip::Data::Puppet/File[/usr/share/matomo/misc/GeoLiteCityv6.dat]/ensure: defined content as '{md5}e5f41164a659cf1dc67f63a65cdfb0f9'
Notice: /Stage[main]/Geoip::Data::Puppet/File[/usr/share/matomo/misc/composer/build-xhprof.sh]/mode: mode changed '0755' to '0644'
Notice: /Stage[main]/Geoip::Data::Puppet/File[/usr/share/matomo/misc/composer/clean-xhprof.sh]/mode: mode changed '0755' to '0644'
Notice: /Stage[main]/Geoip::Data::Puppet/File[/usr/share/matomo/misc/cron/archive.sh]/mode: mode changed '0755' to '0644'
Notice: /Stage[main]/Geoip::Data::Puppet/File[/usr/share/matomo/misc/user]/group: group changed 'www-data' to 'root'
Notice: /Stage[main]/Geoip::Data::Puppet/File[/usr/share/matomo/misc/user]/mode: mode changed '0775' to '0755'

So we don't really want this, we have to fix it somehow.

The change was reverted, we have a couple of ideas about how to proceed, new patches will follow.

Change 627878 had a related patch set uploaded (by Razzi; owner: Razzi):
[operations/puppet@production] Add types to profile::analytics classes

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

Change 627903 had a related patch set uploaded (by Razzi; owner: Razzi):
[operations/puppet@production] Add types to profile::analytics classes

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

Change 627903 abandoned by Razzi:
[operations/puppet@production] Add types to profile::analytics classes

Reason:
Duplicate of https://gerrit.wikimedia.org/r/c/operations/puppet/ /627878

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

Change 627878 merged by Ottomata:
[operations/puppet@production] Add types to profile::analytics classes

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

Change 628146 had a related patch set uploaded (by Razzi; owner: Razzi):
[operations/puppet@production] Add MaxMind data files to Matomo /misc directory

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

Change 628146 merged by Razzi:
[operations/puppet@production] Add MaxMind data files to Matomo /misc directory

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

Change 628164 had a related patch set uploaded (by Razzi; owner: Razzi):
[operations/puppet@production] profile::piwik::instance: actually copy Maxmind data files

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

Change 628164 merged by Razzi:
[operations/puppet@production] profile::piwik::instance: actually copy Maxmind data files

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

This is done and configured on Matomo: https://piwik.wikimedia.org

@Nuria could you please check that everything is working as expected?

piwik seems to be reading this well and i can see files on nuria@matomo1002:/usr/share/matomo/misc, closing