No longer build index page in puppet-ptgbot

Index page used to be shipped and configured in the
puppet-ptgbot module itself. Now it is provided by the
ptgbot itself and is dynamically generated from JSON
data the same way the PTG schedule page is.

This avoids the need to update puppet-ptgbot at every
event to update the links on that page. They can now be
dynamically provided using the ~fetchdb command.

Depends-On: https://review.openstack.org/626907
Change-Id: Id5c84cf3d2fcff0e772764e40dea64c1383a85bc
This commit is contained in:
Thierry Carrez 2018-12-21 15:40:04 +01:00
parent 9f6f4decbc
commit 278c6493d7
2 changed files with 21 additions and 34 deletions

View File

@ -5,9 +5,6 @@ class ptgbot(
$password,
$channel,
$vhost_name,
$venuemap = 'https://www.openstack.org/assets/ptg/Denver-map.pdf',
$pads = 'https://wiki.openstack.org/wiki/PTG/Stein/Etherpads',
$cityguide = 'https://wiki.openstack.org/wiki/PTG/Stein/CityGuide',
) {
include ::pip
@ -96,12 +93,15 @@ class ptgbot(
}
file { '/var/lib/ptgbot/www/index.html':
ensure => present,
content => template('ptgbot/index.html.erb'),
group => 'root',
mode => '0444',
owner => 'root',
require => File['/var/lib/ptgbot/www'],
ensure => present,
group => 'ptgbot',
mode => '0444',
owner => 'root',
replace => true,
require => [File['/var/lib/ptgbot/www'],
User['ptgbot']],
source => '/opt/ptgbot/html/index.html',
subscribe => Vcsrepo['/opt/ptgbot'],
}
file { '/var/lib/ptgbot/www/ptg.html':
@ -164,6 +164,18 @@ class ptgbot(
subscribe => Vcsrepo['/opt/ptgbot'],
}
file { '/var/lib/ptgbot/www/index.js':
ensure => present,
group => 'ptgbot',
mode => '0444',
owner => 'root',
replace => true,
require => [File['/var/lib/ptgbot/www'],
User['ptgbot']],
source => '/opt/ptgbot/html/index.js',
subscribe => Vcsrepo['/opt/ptgbot'],
}
file { '/var/lib/ptgbot/www/jquery-1.9.1.min.js':
ensure => present,
group => 'ptgbot',

View File

@ -1,25 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Quick PTG Resources</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="bootstrap-3.3.7.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<body>
<div class="container">
<h2>Quick PTG Resources</h2>
<p>Follow links to useful sites for the OpenStack Project Teams Gathering.</p>
<ul>
<li><a href="https://www.openstack.org/ptg/">event details, overall schedule, travel info, FAQs</a></li>
<li><a href="ptg.html">current/next topics and room schedule</a></li>
<li><a href="<%= @venuemap %>">Venue map</a></li>
<li><a href="<%= @pads %>">complete index of team etherpads</a></li>
<li><a href="https://git.openstack.org/cgit/openstack/ptgbot/tree/README.rst">instructions for interacting with the IRC bot</a></li>
<li><a href="<%= @cityguide %>">local guide to sights, food and booze to consult and add to</a></li>
</ul>
</div>
</body>
</html>