fuel-library/deployment/puppet/nailgun/examples/nginx-only.pp
Ivan Suzdal aaa2ca3561 Enable nginx service inside nginx container
Blueprint: master-on-centos7

Compatible with CentOS6 master node

Change-Id: If35f7e568b7074a83ddaea2a2fa7c7cd50a2e50b
2015-11-24 18:55:37 +00:00

68 lines
1.5 KiB
Puppet

$fuel_settings = parseyaml($astute_settings_yaml)
if $::fuel_settings['PRODUCTION'] {
$production = $::fuel_settings['PRODUCTION']
}
else {
$production = 'docker'
}
if $fuel_settings['SSL'] {
$force_https = $fuel_settings['SSL']['force_https']
} else {
$force_https = undef
}
$env_path = "/usr"
$staticdir = "/usr/share/nailgun/static"
# this replaces removed postgresql version fact
$postgres_default_version = '9.3'
$centos_repos =
[
{
"id" => "nailgun",
"name" => "Nailgun",
"url" => "\$tree"
},
]
$ostf_host = $::fuel_settings['ADMIN_NETWORK']['ipaddress']
$keystone_host = $::fuel_settings['ADMIN_NETWORK']['ipaddress']
$nailgun_host = $::fuel_settings['ADMIN_NETWORK']['ipaddress']
$repo_root = "/var/www/nailgun"
case $::osfamily {
'RedHat': {
if ($production == 'docker') and ($::operatingsystemrelease =~ /^7.*/) {
$service_enabled = true
} else {
$service_enabled = false
}
}
default: { $service_enabled = false }
}
node default {
Exec {path => '/usr/bin:/bin:/usr/sbin:/sbin'}
class {'docker::container': }
class { 'nailgun::nginx':
production => $production,
staticdir => $staticdir,
templatedir => $staticdir,
logdumpdir => $logdumpdir,
ostf_host => $ostf_host,
keystone_host => $keystone_host,
nailgun_host => $nailgun_host,
repo_root => $repo_root,
service_enabled => $service_enabled,
ssl_enabled => true,
force_https => $force_https,
}
}