Add ais-router service base
This commit is contained in:
parent
537f1cf595
commit
34df6f87cf
2 changed files with 24 additions and 4 deletions
|
@ -41,6 +41,10 @@ class streams::data_collector(
|
|||
sunet::misc::create_dir { "/opt/${cli_app_name}/logs/system/": owner => 'root', group => 'root', mode => '0755', }
|
||||
sunet::misc::create_dir { "/opt/${cli_app_name}/logs/runtime/": owner => 'root', group => 'root', mode => '0755', }
|
||||
|
||||
package { 'python3.11-venv':
|
||||
ensure => installed,
|
||||
}
|
||||
|
||||
file { "/opt/${cli_app_name}/ais_router.service":
|
||||
ensure => file,
|
||||
content => template('streams/data_collector/ais_router.service.erb')
|
||||
|
@ -82,7 +86,6 @@ class streams::data_collector(
|
|||
}
|
||||
|
||||
# Install Binary
|
||||
|
||||
# Remove old clone directory if it exists
|
||||
exec { 'cleanup_clone_dir':
|
||||
command => "rm -rf ${clone_dir}",
|
||||
|
@ -104,8 +107,6 @@ class streams::data_collector(
|
|||
require => Exec['download_datakeeper_binary'],
|
||||
}
|
||||
|
||||
# --------------------------------------------------------------
|
||||
|
||||
# Clone the repo
|
||||
exec { 'clone_repository':
|
||||
command => "git clone --depth=1 ${repo_url} ${clone_dir}",
|
||||
|
@ -151,4 +152,24 @@ class streams::data_collector(
|
|||
path => ['/bin', '/usr/bin'],
|
||||
require => Exec['copy_plugins'],
|
||||
}
|
||||
|
||||
## Start ais-router service
|
||||
file { '/etc/systemd/system/ais_router.service':
|
||||
ensure => file,
|
||||
content => template('streams/data_collector/ais_router.service.erb')
|
||||
}
|
||||
|
||||
# Reload systemd daemon when unit file changes
|
||||
exec { 'reload_systemd':
|
||||
command => '/bin/systemctl daemon-reexec',
|
||||
refreshonly => true,
|
||||
}
|
||||
|
||||
# TODO: Enable and start the service
|
||||
# service { 'ais_router':
|
||||
# ensure => running,
|
||||
# enable => true,
|
||||
# require => File['/etc/systemd/system/ais_router.service'],
|
||||
# subscribe => File['/etc/systemd/system/ais_router.service'],
|
||||
# }
|
||||
}
|
||||
|
|
|
@ -22,7 +22,6 @@ ReadWritePaths=/opt/<%= @cli_app_name %>/logs
|
|||
# NoNewPrivileges=true
|
||||
# PrivateTmp=true
|
||||
|
||||
|
||||
# Resource limits (optional)
|
||||
## LimitNOFILE=65536
|
||||
## TimeoutStartSec=30
|
||||
|
|
Loading…
Add table
Reference in a new issue