Puppet Class: query_service::deploy::scap
- Defined in:
- modules/query_service/manifests/deploy/scap.pp
Overview
SPDX-License-Identifier: Apache-2.0 the query service package is managed by scap
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'modules/query_service/manifests/deploy/scap.pp', line 3
class query_service::deploy::scap(
String $deploy_user,
String $username,
String $deploy_name,
Stdlib::Absolutepath $package_dir,
) {
# Deployment
scap::target { 'wdqs/wdqs':
service_name => "${deploy_name}-blazegraph",
deploy_user => $deploy_user,
additional_services_names => ["${deploy_name}-updater", "${deploy_name}-categories"],
manage_user => true,
}
# These paths are used by the scap promotion process for wdqs/wdqs, and
# thus must be made available prior to installing the package.
File['/var/log/query_service'] -> Package['wdqs/wdqs']
File["/etc/${deploy_name}/vars.yaml"] -> Package['wdqs/wdqs']
File['/etc/query_service'] -> Package['wdqs/wdqs']
$git_deploy_dir = '/srv/deployment/wdqs/wdqs'
if $package_dir != $git_deploy_dir {
file { $package_dir:
ensure => link,
target => $git_deploy_dir,
owner => $username,
group => 'wikidev',
mode => '0775',
require => Scap::Target['wdqs/wdqs'],
}
} else {
# This is to have file resource on $package_dir in any case
file { $package_dir:
ensure => present,
owner => $deploy_user,
group => $deploy_user,
require => Scap::Target['wdqs/wdqs'],
}
}
}
|