Paul Belanger 81920e9582 Migrate to puppet-httpd module
puppet-httpd is the openstack-infra version of puppetlabs-apache
(0.0.4) release.

This patchset will remove the puppetlabs-apache namespace from -infra
allowing for possible future patchsets to use newer puppetlabs-apache
modules.

Change-Id: Ieaabcd9f6fbb4556c8f30e87245fceb7ef539d2e
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-07-16 10:53:08 -04:00

70 lines
1.9 KiB
Puppet

# == Class: apps_site
#
class apps_site (
$vhost_name = $::fqdn,
$root_dir = '/opt/apps_site',
$serveradmin = "webmaster@${::domain}",
$commit = 'master',
) {
if !defined(Package['git']) {
package { 'git':
ensure => present
}
}
vcsrepo { $root_dir:
ensure => latest,
provider => git,
revision => $commit,
source => 'https://git.openstack.org/stackforge/apps-catalog.git',
require => [
Package['git'],
]
}
include ::httpd
::httpd::vhost { $vhost_name:
port => 80,
docroot => "${root_dir}/openstack_catalog/web",
priority => '50',
template => 'apps_site/vhost.erb',
vhost_name => $vhost_name,
}
a2mod { 'headers':
ensure => present
}
if ! defined(Package['python-yaml']) {
package { 'python-yaml':
ensure => present,
}
}
exec { 'make_glance_json' :
command => "python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout)' < ${root_dir}/openstack_catalog/web/static/glance_images.yaml > ${root_dir}/openstack_catalog/web/static/glance_images.json",
path => '/usr/local/bin:/usr/bin:/bin',
refreshonly => true,
subscribe => Vcsrepo[$root_dir],
}
exec { 'make_heat_json' :
command => "python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout)' < ${root_dir}/openstack_catalog/web/static/heat_templates.yaml > ${root_dir}/openstack_catalog/web/static/heat_templates.json",
path => '/usr/local/bin:/usr/bin:/bin',
refreshonly => true,
subscribe => Vcsrepo[$root_dir],
}
exec { 'make_murano_json' :
command => "python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout)' < ${root_dir}/openstack_catalog/web/static/murano_apps.yaml > ${root_dir}/openstack_catalog/web/static/murano_apps.json",
path => '/usr/local/bin:/usr/bin:/bin',
refreshonly => true,
subscribe => Vcsrepo[$root_dir],
}
}