Dzahn has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/342163 )
Change subject: planet: convert to profile/role-structure ...................................................................... planet: convert to profile/role-structure Convert from role/module to profile/role/module structure, trying to follow the new puppet coding style guide. [https://wikitech.wikimedia.org/wiki/Puppet_coding] Change-Id: If15d461a46499bcf906af068e668f0b99d3b0d70 --- M manifests/site.pp A modules/profile/manifests/planet/venus.pp M modules/role/manifests/planet/venus.pp 3 files changed, 232 insertions(+), 224 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/63/342163/1 diff --git a/manifests/site.pp b/manifests/site.pp index ff00393..f327b30 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2354,9 +2354,7 @@ # virtual machines hosting https://wikitech.wikimedia.org/wiki/Planet.wikimedia.org node /^planet[12]001\.(eqiad|codfw)\.wmnet$/ { - role(planet::venus) - - interface::add_ip6_mapped { 'main': interface => 'eth0', } + role('planet_server') } # LDAP servers relied on by OIT for mail diff --git a/modules/profile/manifests/planet/venus.pp b/modules/profile/manifests/planet/venus.pp new file mode 100644 index 0000000..be1c32e --- /dev/null +++ b/modules/profile/manifests/planet/venus.pp @@ -0,0 +1,226 @@ +# sets up a planet RSS feed aggregator (planet-venus aka planet 2.0) +# +# $planet_domain_name: domain name used, e.g. wikimedia.org or wmflabs.org +# +# $planet_meta_link: protocol-relative link to a meta or index page for all planets +# +# $planet_http_proxy: since we are on a private IP now we need to proxy to fetch external URLs +# +# $planet_active_dc: set to the currently active DC. feed updates are only running here. +# +# $planet_languages: translated strings for the UI in various languages +# list all planet languages and translations for index.html.tmpl here. +# configurations, directories and cronjobs are auto-created from this hash. +# +class profile::planet::venus ( + $planet_domain_name = hiera('planet_domain_name'), + $planet_meta_link = 'meta.wikimedia.org/wiki/Planet_Wikimedia' + $planet_http_proxy = "http://url-downloader.${::site}.wikimedia.org:8080" + $planet_active_dc = 'eqiad' + $planet_languages = { + ar => { + 'subscribe' => 'اشترك', + 'subscriptions' => 'الاشتراكات', + 'lastupdated' => 'اخر تحديث', + 'alltimesutc' => '،كافة الأوقات مبينة بالتوقيت العالمي المنسق', + 'poweredby' => 'بدعم من', + 'wikimedia' => 'ويكيميديا', + 'planetarium' => 'بلانيتاريوم', + }, + bg => { + 'subscribe' => 'Абониране', + 'subscriptions' => 'Абонамент', + 'lastupdated' => 'за последно са актуализирани', + 'alltimesutc' => 'All times are UTC.', + 'poweredby' => 'работи по софтуера на', + 'wikimedia' => 'Уикимедия', + 'planetarium' => 'планетарий', + }, + ca => { + 'subscribe' => 'Subscriure\'s', + 'subscriptions' => 'Subscripcions', + 'lastupdated' => 'Última actualització', + 'alltimesutc' => 'Tots els temps són UTC.', + 'poweredby' => 'Basat en', + 'wikimedia' => 'Wikimedia', + 'planetarium' => 'Planetari', + }, + cs => { + 'subscribe' => 'Přihlásit odběr', + 'subscriptions' => 'Odběry', + 'lastupdated' => 'Poslední aktualizace', + 'alltimesutc' => 'Všechny časy jsou v UTC.', + 'poweredby' => 'Provozováno na', + 'wikimedia' => 'Wikimedia', + 'planetarium' => 'Planetárium', + }, + de => { + 'subscribe' => 'Abonnieren', + 'subscriptions' => 'Teilnehmer', + 'lastupdated' => 'Zuletzt aktualisiert', + 'alltimesutc' => 'Alle Zeiten sind UTC.', + 'poweredby' => 'Betrieben mit', + 'wikimedia' => 'Wikimedia', + 'planetarium' => 'Planetarium', + }, + en => { + 'subscribe' => 'Subscribe', + 'subscriptions' => 'Subscriptions', + 'lastupdated' => 'Last updated', + 'alltimesutc' => 'All times are UTC.', + 'poweredby' => 'Powered by', + 'wikimedia' => 'Wikimedia', + 'planetarium' => 'Planetarium', + }, + es => { + 'subscribe' => 'Suscribirse', + 'subscriptions' => 'Suscripciones', + 'lastupdated' => 'Última actualización', + 'alltimesutc' => 'Las horas mostradas son en UTC.', + 'poweredby' => 'Impulsado por', + 'wikimedia' => 'Wikimedia', + 'planetarium' => 'Planetario', + }, + fr => { + 'subscribe' => 'S\'abonner', + 'subscriptions' => 'Abonnements', + 'lastupdated' => 'Dernière mise à jour', + 'alltimesutc' => 'Les heures sont notées en UTC (GMT).', + 'poweredby' => 'Propulsé par', + 'wikimedia' => 'Wikimédia', + 'planetarium' => 'Planetarium', + }, + gmq => { + 'subscribe' => 'Abonnér', + 'subscriptions' => 'Abonnementer', + 'lastupdated' => 'Senest opdateret', + 'alltimesutc' => 'Alle tider är UTC.', + 'poweredby' => 'Drivs af', + 'wikimedia' => 'Wikimedia', + 'planetarium' => 'Planetarium', + }, + id => { + 'subscribe' => 'Berlangganan', + 'subscriptions' => 'Langganan', + 'lastupdated' => 'Terakhir diperbarui', + 'alltimesutc' => 'Waktu dalam UTC.', + 'poweredby' => 'Dimotori oleh', + 'wikimedia' => 'Wikimedia', + 'planetarium' => 'Planetarium', + }, + it => { + 'subscribe' => 'Abbonati', + 'subscriptions' => 'Sottoscrizioni', + 'lastupdated' => 'Last updated', + 'alltimesutc' => 'Tutti gli orari sono UTC.', + 'poweredby' => 'Reso possibile da', + 'wikimedia' => 'Wikimedia', + 'planetarium' => 'Planetarium', + }, + ja => { + 'subscribe' => '購読する', + 'subscriptions' => '登録されているブログ', + 'lastupdated' => '最終更新日時', + 'alltimesutc' => '時刻はすべてUTC表記です。', + 'poweredby' => 'Powered by', + 'wikimedia' => 'ウィキメディア', + 'planetarium' => 'プラネタリウム', + }, + pl => { + 'subscribe' => 'Subskrybuj', + 'subscriptions' => 'Subskrypcje', + 'lastupdated' => 'Ostatnia zmiana', + 'alltimesutc' => 'Wszystkie czasy podane w UTC.', + 'poweredby' => 'Witryna napędzana przez', + 'wikimedia' => 'Wikimedia', + 'planetarium' => 'Planetarium', + }, + pt => { + 'subscribe' => 'Subscrever', + 'subscriptions' => 'Subcrições', + 'lastupdated' => 'Última actualização', + 'alltimesutc' => 'Todos os horários estão em UTC.', + 'poweredby' => 'Alimentado por', + 'wikimedia' => 'Wikimedia', + 'planetarium' => 'Planetário', + }, + ro => { + 'subscribe' => 'Abonare', + 'subscriptions' => 'Abonări', + 'lastupdated' => 'Ultima actualizare', + 'alltimesutc' => 'Toate orele sunt în UTC.', + 'poweredby' => 'Motorizat de', + 'wikimedia' => 'Wikimedia', + 'planetarium' => 'Planetariu', + + }, + ru => { + 'subscribe' => 'Подписаться', + 'subscriptions' => 'Подписки', + 'lastupdated' => 'Последнее обновление', + 'alltimesutc' => 'Часовой пояс: UTC.', + 'poweredby' => 'Работает на', + 'wikimedia' => 'Викимедиа', + 'planetarium' => 'Планетарий', + + }, + sq => { + 'subscribe' => 'Abonoj', + 'subscriptions' => 'Abonimet', + 'lastupdated' => 'Last updated', + 'alltimesutc' => 'All times are UTC.', + 'poweredby' => 'Mundësuar nga', + 'wikimedia' => 'Wikimedia', + 'planetarium' => 'Planetarium', + + }, + sr => { + 'subscribe' => 'Prati', + 'subscriptions' => 'Blogovi', + 'lastupdated' => 'Poslednje ažurirano', + 'alltimesutc' => 'Sva vremena su u UTC.', + 'poweredby' => 'Pokreće', + 'wikimedia' => 'Vikimedija', + 'planetarium' => 'Planetarijum', + + }, + uk => { + 'subscribe' => 'Підписатися', + 'subscriptions' => 'Підписалися', + 'lastupdated' => 'Обновлено', + 'alltimesutc' => 'Весь час в UTC.', + 'poweredby' => 'Створено за допомогою', + 'wikimedia' => 'Вікімедіа', + 'planetarium' => 'Планетарій', + }, + zh => { + 'subscribe' => '訂閱', + 'subscriptions' => '收錄', + 'lastupdated' => '最近更新', + 'alltimesutc' => '所有時間以UTC為準', + 'poweredby' => 'Powered by', + 'wikimedia' => '維基媒體', + 'planetarium' => '天文館', + }, + } +) { + + system::role { 'role::planet::venus': description => 'Planet (venus) weblog aggregator' } + + class {'::planet': + planet_domain_name => $planet_domain_name, + planet_languages => $planet_languages, + planet_meta_link => $planet_meta_link, + planet_http_proxy => $planet_http_proxy, + planet_active_dc => $planet_active_dc + } + + # firewalling + include ::base::firewall + ferm::service { 'planet-http': + proto => 'tcp', + port => '80', + } + +} + diff --git a/modules/role/manifests/planet/venus.pp b/modules/role/manifests/planet/venus.pp index 4c7f489..84b58a2 100644 --- a/modules/role/manifests/planet/venus.pp +++ b/modules/role/manifests/planet/venus.pp @@ -1,224 +1,8 @@ -# planet RSS feed aggregator 2.0 (planet-venus) -class role::planet::venus { +# server running a planet RSS feed aggregator +class role::planet_server { - include ::base::firewall + include standard + include profile::planet::venus - system::role { 'role::planet::venus': description => 'Planet (venus) weblog aggregator' } - - $planet_domain_name= hiera('planet_domain_name', 'wikimedia.org') - - # List all planet languages and translations for - # index.html.tmpl here. Configurations, directories and - # cronjobs are auto-created from this hash. - $planet_languages = { - ar => { - 'subscribe' => 'اشترك', - 'subscriptions' => 'الاشتراكات', - 'lastupdated' => 'اخر تحديث', - 'alltimesutc' => '،كافة الأوقات مبينة بالتوقيت العالمي المنسق', - 'poweredby' => 'بدعم من', - 'wikimedia' => 'ويكيميديا', - 'planetarium' => 'بلانيتاريوم', - }, - bg => { - 'subscribe' => 'Абониране', - 'subscriptions' => 'Абонамент', - 'lastupdated' => 'за последно са актуализирани', - 'alltimesutc' => 'All times are UTC.', - 'poweredby' => 'работи по софтуера на', - 'wikimedia' => 'Уикимедия', - 'planetarium' => 'планетарий', - }, - ca => { - 'subscribe' => 'Subscriure\'s', - 'subscriptions' => 'Subscripcions', - 'lastupdated' => 'Última actualització', - 'alltimesutc' => 'Tots els temps són UTC.', - 'poweredby' => 'Basat en', - 'wikimedia' => 'Wikimedia', - 'planetarium' => 'Planetari', - }, - cs => { - 'subscribe' => 'Přihlásit odběr', - 'subscriptions' => 'Odběry', - 'lastupdated' => 'Poslední aktualizace', - 'alltimesutc' => 'Všechny časy jsou v UTC.', - 'poweredby' => 'Provozováno na', - 'wikimedia' => 'Wikimedia', - 'planetarium' => 'Planetárium', - }, - de => { - 'subscribe' => 'Abonnieren', - 'subscriptions' => 'Teilnehmer', - 'lastupdated' => 'Zuletzt aktualisiert', - 'alltimesutc' => 'Alle Zeiten sind UTC.', - 'poweredby' => 'Betrieben mit', - 'wikimedia' => 'Wikimedia', - 'planetarium' => 'Planetarium', - }, - en => { - 'subscribe' => 'Subscribe', - 'subscriptions' => 'Subscriptions', - 'lastupdated' => 'Last updated', - 'alltimesutc' => 'All times are UTC.', - 'poweredby' => 'Powered by', - 'wikimedia' => 'Wikimedia', - 'planetarium' => 'Planetarium', - }, - es => { - 'subscribe' => 'Suscribirse', - 'subscriptions' => 'Suscripciones', - 'lastupdated' => 'Última actualización', - 'alltimesutc' => 'Las horas mostradas son en UTC.', - 'poweredby' => 'Impulsado por', - 'wikimedia' => 'Wikimedia', - 'planetarium' => 'Planetario', - }, - fr => { - 'subscribe' => 'S\'abonner', - 'subscriptions' => 'Abonnements', - 'lastupdated' => 'Dernière mise à jour', - 'alltimesutc' => 'Les heures sont notées en UTC (GMT).', - 'poweredby' => 'Propulsé par', - 'wikimedia' => 'Wikimédia', - 'planetarium' => 'Planetarium', - }, - gmq => { - 'subscribe' => 'Abonnér', - 'subscriptions' => 'Abonnementer', - 'lastupdated' => 'Senest opdateret', - 'alltimesutc' => 'Alle tider är UTC.', - 'poweredby' => 'Drivs af', - 'wikimedia' => 'Wikimedia', - 'planetarium' => 'Planetarium', - }, - id => { - 'subscribe' => 'Berlangganan', - 'subscriptions' => 'Langganan', - 'lastupdated' => 'Terakhir diperbarui', - 'alltimesutc' => 'Waktu dalam UTC.', - 'poweredby' => 'Dimotori oleh', - 'wikimedia' => 'Wikimedia', - 'planetarium' => 'Planetarium', - }, - it => { - 'subscribe' => 'Abbonati', - 'subscriptions' => 'Sottoscrizioni', - 'lastupdated' => 'Last updated', - 'alltimesutc' => 'Tutti gli orari sono UTC.', - 'poweredby' => 'Reso possibile da', - 'wikimedia' => 'Wikimedia', - 'planetarium' => 'Planetarium', - }, - ja => { - 'subscribe' => '購読する', - 'subscriptions' => '登録されているブログ', - 'lastupdated' => '最終更新日時', - 'alltimesutc' => '時刻はすべてUTC表記です。', - 'poweredby' => 'Powered by', - 'wikimedia' => 'ウィキメディア', - 'planetarium' => 'プラネタリウム', - }, - pl => { - 'subscribe' => 'Subskrybuj', - 'subscriptions' => 'Subskrypcje', - 'lastupdated' => 'Ostatnia zmiana', - 'alltimesutc' => 'Wszystkie czasy podane w UTC.', - 'poweredby' => 'Witryna napędzana przez', - 'wikimedia' => 'Wikimedia', - 'planetarium' => 'Planetarium', - }, - pt => { - 'subscribe' => 'Subscrever', - 'subscriptions' => 'Subcrições', - 'lastupdated' => 'Última actualização', - 'alltimesutc' => 'Todos os horários estão em UTC.', - 'poweredby' => 'Alimentado por', - 'wikimedia' => 'Wikimedia', - 'planetarium' => 'Planetário', - }, - ro => { - 'subscribe' => 'Abonare', - 'subscriptions' => 'Abonări', - 'lastupdated' => 'Ultima actualizare', - 'alltimesutc' => 'Toate orele sunt în UTC.', - 'poweredby' => 'Motorizat de', - 'wikimedia' => 'Wikimedia', - 'planetarium' => 'Planetariu', - - }, - ru => { - 'subscribe' => 'Подписаться', - 'subscriptions' => 'Подписки', - 'lastupdated' => 'Последнее обновление', - 'alltimesutc' => 'Часовой пояс: UTC.', - 'poweredby' => 'Работает на', - 'wikimedia' => 'Викимедиа', - 'planetarium' => 'Планетарий', - - }, - sq => { - 'subscribe' => 'Abonoj', - 'subscriptions' => 'Abonimet', - 'lastupdated' => 'Last updated', - 'alltimesutc' => 'All times are UTC.', - 'poweredby' => 'Mundësuar nga', - 'wikimedia' => 'Wikimedia', - 'planetarium' => 'Planetarium', - - }, - sr => { - 'subscribe' => 'Prati', - 'subscriptions' => 'Blogovi', - 'lastupdated' => 'Poslednje ažurirano', - 'alltimesutc' => 'Sva vremena su u UTC.', - 'poweredby' => 'Pokreće', - 'wikimedia' => 'Vikimedija', - 'planetarium' => 'Planetarijum', - - }, - uk => { - 'subscribe' => 'Підписатися', - 'subscriptions' => 'Підписалися', - 'lastupdated' => 'Обновлено', - 'alltimesutc' => 'Весь час в UTC.', - 'poweredby' => 'Створено за допомогою', - 'wikimedia' => 'Вікімедіа', - 'planetarium' => 'Планетарій', - }, - zh => { - 'subscribe' => '訂閱', - 'subscriptions' => '收錄', - 'lastupdated' => '最近更新', - 'alltimesutc' => '所有時間以UTC為準', - 'poweredby' => 'Powered by', - 'wikimedia' => '維基媒體', - 'planetarium' => '天文館', - }, - } - - # protocol-relative link to a meta or index page for all planets - $planet_meta_link = 'meta.wikimedia.org/wiki/Planet_Wikimedia' - - # since we are on a private IP now we need to proxy to fetch external URLs - $planet_http_proxy = "http://url-downloader.${::site}.wikimedia.org:8080" - - # set to the currently active DC. feed updates are only running here. - $planet_active_dc = 'eqiad' - - # the 'planet' class from modules/planet/init.pp does the setup - class {'::planet': - planet_domain_name => $planet_domain_name, - planet_languages => $planet_languages, - planet_meta_link => $planet_meta_link, - planet_http_proxy => $planet_http_proxy, - planet_active_dc => $planet_active_dc - } - - ferm::service { 'planet-http': - proto => 'tcp', - port => '80', - } - + interface::add_ip6_mapped { 'main': interface => 'eth0', } } - -- To view, visit https://gerrit.wikimedia.org/r/342163 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If15d461a46499bcf906af068e668f0b99d3b0d70 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn <dz...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits