
We want to display the hits for all queues and for just the gate queue. A parameter was added to elastic-recheck-graph to support this, and a second patch updates the web page to give the gate queue only option. This patch updates the usage of elastic-recheck-gate. Related elastic-recheck patchs: * I9217a2ceedf86ffe04851084df78238384fccd51 * I23ed8d945c9517221622e1ca215c80539bb07bbd Change-Id: Iac51aeaf152f50f8b9a064cd249b0920bef824df
155 lines
4.7 KiB
Puppet
155 lines
4.7 KiB
Puppet
# Copyright 2013 Hewlett-Packard Development Company, L.P.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
#
|
|
# Class to install and configure an instance of the elastic-recheck
|
|
# service.
|
|
#
|
|
class elastic_recheck (
|
|
) {
|
|
|
|
# For all static page generation scripts we want to run them
|
|
# both on a cron schedule (see elastic_recheck::cron) and on
|
|
# any commit. So we need to define commands in a way that
|
|
# we can trigger an exec here, as well as on cron.
|
|
$recheck_state_dir = '/var/lib/elastic-recheck'
|
|
$graph_all_cmd = 'elastic-recheck-graph /opt/elastic-recheck/queries -o all-new.json && mv all-new.json all.json'
|
|
$graph_gate_cmd = 'elastic-recheck-graph /opt/elastic-recheck/queries -o gate-new.json -q gate && mv gate-new.json gate.json'
|
|
$uncat_cmd = 'elastic-recheck-uncategorized -d /opt/elastic-recheck/queries -t /usr/local/share/elastic-recheck/templates -o uncategorized-new.html && mv uncategorized-new.html uncategorized.html'
|
|
|
|
group { 'recheck':
|
|
ensure => 'present',
|
|
}
|
|
|
|
user { 'recheck':
|
|
ensure => present,
|
|
home => '/home/recheck',
|
|
shell => '/bin/bash',
|
|
gid => 'recheck',
|
|
require => Group['recheck'],
|
|
}
|
|
|
|
vcsrepo { '/opt/elastic-recheck':
|
|
ensure => latest,
|
|
provider => git,
|
|
revision => 'master',
|
|
source => 'https://git.openstack.org/openstack-infra/elastic-recheck',
|
|
}
|
|
|
|
exec { 'run_er_graph_all':
|
|
command => "er_safe_run.sh ${graph_all_cmd}",
|
|
path => '/usr/local/bin:/usr/bin:/bin/',
|
|
cwd => $recheck_state_dir,
|
|
user => 'recheck',
|
|
refreshonly => true,
|
|
require => File['/usr/local/bin/er_safe_run.sh'],
|
|
subscribe => Vcsrepo['/opt/elastic-recheck'],
|
|
}
|
|
|
|
exec { 'run_er_graph_gate_only':
|
|
command => "er_safe_run.sh ${graph_gate_cmd}",
|
|
path => '/usr/local/bin:/usr/bin:/bin/',
|
|
cwd => $recheck_state_dir,
|
|
user => 'recheck',
|
|
refreshonly => true,
|
|
require => File['/usr/local/bin/er_safe_run.sh'],
|
|
subscribe => Vcsrepo['/opt/elastic-recheck'],
|
|
}
|
|
|
|
exec { 'run_er_uncat':
|
|
command => "er_safe_run.sh ${uncat_cmd}",
|
|
path => '/usr/local/bin:/usr/bin:/bin/',
|
|
cwd => $recheck_state_dir,
|
|
user => 'recheck',
|
|
refreshonly => true,
|
|
require => File['/usr/local/bin/er_safe_run.sh'],
|
|
subscribe => Vcsrepo['/opt/elastic-recheck'],
|
|
}
|
|
|
|
include pip
|
|
exec { 'install_elastic-recheck' :
|
|
command => 'pip install /opt/elastic-recheck',
|
|
path => '/usr/local/bin:/usr/bin:/bin/',
|
|
refreshonly => true,
|
|
subscribe => Vcsrepo['/opt/elastic-recheck'],
|
|
require => Class['pip'],
|
|
}
|
|
|
|
file { '/usr/local/bin/er_safe_run.sh':
|
|
ensure => present,
|
|
source => 'puppet:///modules/elastic_recheck/er_safe_run.sh',
|
|
mode => '0755',
|
|
owner => 'root',
|
|
group => 'root',
|
|
}
|
|
|
|
file { '/var/run/elastic-recheck':
|
|
ensure => directory,
|
|
mode => '0755',
|
|
owner => 'recheck',
|
|
group => 'recheck',
|
|
require => User['recheck'],
|
|
}
|
|
|
|
file { '/var/lib/elastic-recheck':
|
|
ensure => directory,
|
|
mode => '0755',
|
|
owner => 'recheck',
|
|
group => 'recheck',
|
|
require => User['recheck'],
|
|
}
|
|
|
|
file { '/var/log/elastic-recheck':
|
|
ensure => directory,
|
|
mode => '0755',
|
|
owner => 'recheck',
|
|
group => 'recheck',
|
|
require => User['recheck'],
|
|
}
|
|
|
|
file { '/etc/elastic-recheck':
|
|
ensure => directory,
|
|
mode => '0755',
|
|
owner => 'recheck',
|
|
group => 'recheck',
|
|
require => User['recheck'],
|
|
}
|
|
|
|
file { '/etc/elastic-recheck/logging.config':
|
|
ensure => present,
|
|
mode => '0640',
|
|
owner => 'recheck',
|
|
group => 'recheck',
|
|
source => 'puppet:///modules/elastic_recheck/logging.config',
|
|
require => File['/etc/elastic-recheck'],
|
|
}
|
|
|
|
file { '/etc/elastic-recheck/recheckwatchbot.yaml':
|
|
ensure => present,
|
|
mode => '0640',
|
|
owner => 'recheck',
|
|
group => 'recheck',
|
|
source => 'puppet:///modules/elastic_recheck/recheckwatchbot.yaml',
|
|
require => File['/etc/elastic-recheck'],
|
|
}
|
|
|
|
file { '/etc/elastic-recheck/queries':
|
|
ensure => link,
|
|
target => '/opt/elastic-recheck/queries',
|
|
require => [
|
|
Vcsrepo['/opt/elastic-recheck'],
|
|
File['/etc/elastic-recheck'],
|
|
],
|
|
}
|
|
}
|