Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F8395375
service.pp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
service.pp
View Options
# == Class grafana::service
#
# This class is meant to be called from grafana
# It ensure the service is running
#
class
grafana
::
service
{
case
$::grafana::install_method
{
'docker'
:
{
$container
=
{
'grafana'
=>
$::grafana::container_params,
}
$defaults
=
{
image
=>
"${::grafana::params::docker_image}:${::grafana::version}"
,
ports
=>
$::grafana::params::docker_ports,
}
create_resources
(
docker
::
run
,
$container,
$defaults)
}
'package'
,
'repo'
:
{
service
{
$::grafana::service_name:
ensure
=>
running
,
enable
=>
true
,
subscribe
=>
Package
[
$::grafana::package_name],
}
}
'archive'
:
{
$service_path
=
"${::grafana::install_dir}/bin/${::grafana::service_name}"
$service_config
=
"${::grafana::install_dir}/conf/custom.ini"
if
!
defined
(
Service
[
$::grafana::service_name]){
service
{
$::grafana::service_name:
ensure
=>
running
,
provider
=>
base
,
binary
=>
"su - grafana -c '${service_path} -config=${service_config} -homepath=${::grafana::install_dir} web &'"
,
hasrestart
=>
false
,
hasstatus
=>
false
,
status
=>
"ps -ef | grep ${::grafana::service_name} | grep -v grep"
,
}
}
}
default
:
{
fail
(
"Installation method ${::grafana::install_method} not supported"
)
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Jun 4 2025, 7:38 PM (10 w, 2 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3280995
Attached To
R142 puppet-puppet-grafana
Event Timeline
Log In to Comment