Merge "Update OSTF to use ostf.conf instead of params"
This commit is contained in:
commit
646e52b7a3
@ -1,16 +1,18 @@
|
||||
class nailgun::ostf(
|
||||
$pip_opts,
|
||||
$production,
|
||||
$venv = '/opt/fuel_plugins/ostf',
|
||||
$dbuser = 'ostf',
|
||||
$dbpass = 'ostf',
|
||||
$dbname = 'ostf',
|
||||
$dbhost = '127.0.0.1',
|
||||
$dbport = '5432',
|
||||
$dbengine = 'postgresql+psycopg2',
|
||||
$host = '127.0.0.1',
|
||||
$port = '8777',
|
||||
$logfile = '/var/log/ostf.log',
|
||||
$venv = '/opt/fuel_plugins/ostf',
|
||||
$dbuser = 'ostf',
|
||||
$dbpass = 'ostf',
|
||||
$dbname = 'ostf',
|
||||
$dbhost = '127.0.0.1',
|
||||
$dbport = '5432',
|
||||
$nailgun_host = '127.0.0.1',
|
||||
$nailgun_port = '8000',
|
||||
$dbengine = 'postgresql+psycopg2',
|
||||
$host = '127.0.0.1',
|
||||
$port = '8777',
|
||||
$logfile = '/var/log/ostf.log',
|
||||
){
|
||||
package{'libevent-devel':}
|
||||
package{'openssl-devel':}
|
||||
@ -30,11 +32,10 @@ class nailgun::ostf(
|
||||
|
||||
exec {'ostf-init':
|
||||
command => "/usr/bin/ostf-server \
|
||||
--host=${host} --port=${port} --log_file=${logfile} \
|
||||
--dbpath '${dbengine}://${dbuser}:${dbpass}@${dbhost}:${dbport}/${dbname}' \
|
||||
--after-initialization-environment-hook || /bin/true",
|
||||
require => [
|
||||
Package["fuel-ostf"],
|
||||
File["/etc/ostf/ostf.conf"],
|
||||
],
|
||||
before => Class['nailgun::supervisor'],
|
||||
}
|
||||
@ -77,10 +78,8 @@ class nailgun::ostf(
|
||||
nailgun::venv::pip { "${venv}_ostf":
|
||||
package => 'fuel-ostf',
|
||||
}
|
||||
exec {'ostf-init':
|
||||
exec {'ostf-init2':
|
||||
command => "$venv/bin/ostf-server \
|
||||
--host=${host} --port=${port} --log_file=${logfile} \
|
||||
--dbpath '${dbengine}://${dbuser}:${dbpass}@${dbhost}:${dbport}/${dbname}' \
|
||||
--after-initialization-environment-hook || /bin/true",
|
||||
require => [
|
||||
Postgresql::Db[$dbname],
|
||||
@ -97,4 +96,15 @@ class nailgun::ostf(
|
||||
content => template('nailgun/supervisor/ostf.conf.erb'),
|
||||
require => Package['supervisor'],
|
||||
}
|
||||
file { '/etc/ostf/':
|
||||
ensure => directory,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0750',
|
||||
}
|
||||
file { '/etc/ostf/ostf.conf':
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
content => template('nailgun/ostf.conf.erb'),
|
||||
}
|
||||
}
|
||||
|
9
deployment/puppet/nailgun/templates/ostf.conf.erb
Normal file
9
deployment/puppet/nailgun/templates/ostf.conf.erb
Normal file
@ -0,0 +1,9 @@
|
||||
[adapter]
|
||||
server_host = <%= @host %>
|
||||
server_port = <%= @port %>
|
||||
dbpath = <%= @dbengine %>://<%= @dbuser %>:<%= @dbpass %>@<%= @dbhost %>/<%= @dbname %>
|
||||
lock_dir = /var/lock
|
||||
nailgun_host = <%= @nailgun_host %>
|
||||
nailgun_port = <%= @nailgun_port %>
|
||||
log_file = <%= @logfile %>
|
||||
after_init_hook = False
|
@ -1,5 +1,5 @@
|
||||
[program:ostf]
|
||||
command=<%= @ostf_env %>/bin/ostf-server --host=<%= @host %> --port=8777 --log_file=<%= @logfile %> --dbpath <%= @dbengine %>://<%= @dbuser %>:<%= @dbpass %>@<%= @dbhost %>:<%= @dbport %>/<%= @dbname %>
|
||||
command=/usr/bin/ostf-server
|
||||
process_name=%(program_name)s
|
||||
numprocs=1
|
||||
numprocs_start=0
|
||||
|
Loading…
Reference in New Issue
Block a user