Update paths for production Apps site

This patch updates the paths to prevent puppet
from making changes to the location where the
git repo is checked out.

Change-Id: I41ac378d98e5e3423d6538fb7cf90323ca9d5ac6
This commit is contained in:
Christopher Aedo 2015-11-20 14:53:20 -08:00
parent 8fd856b594
commit e5b4919277
3 changed files with 16 additions and 15 deletions

View File

@ -3,6 +3,7 @@
class apps_site (
$vhost_name = $::fqdn,
$root_dir = '/opt/apps_site',
$install_dir = '/usr/local/lib/python2.7/dist-packages/openstack_catalog/',
$serveradmin = "webmaster@${::domain}",
$commit = 'master',
$ssl_cert_file_contents = undef,
@ -99,23 +100,23 @@ class apps_site (
}
}
file { "${root_dir}/openstack_catalog/local_settings.py":
exec { 'install-app_catalog' :
command => "/usr/local/bin/pip install ${root_dir}",
cwd => $root_dir,
refreshonly => true,
subscribe => Vcsrepo[$root_dir],
require => File["${install_dir}/local_settings.py"],
notify => Service['httpd'],
}
file { "${install_dir}/local_settings.py":
ensure => present,
mode => '0644',
content => template('apps_site/local_settings.erb'),
require => Vcsrepo[$root_dir],
}
exec { 'install-app_catalog' :
command => "/usr/local/bin/pip install ${root_dir}",
cwd => $root_dir,
refreshonly => true,
subscribe => Vcsrepo[$root_dir],
require => File["${root_dir}/openstack_catalog/local_settings.py"],
notify => Service['httpd'],
}
file { "${root_dir}/openstack_catalog/web/static/CACHE":
file { "${install_dir}/web/static/CACHE":
ensure => directory,
owner => 'www-data',
group => 'www-data',
@ -127,7 +128,7 @@ class apps_site (
command => "/usr/bin/python ${root_dir}/manage.py collectstatic --noinput",
refreshonly => true,
subscribe => Vcsrepo[$root_dir],
require => File["${root_dir}/openstack_catalog/web/static/CACHE"],
require => File["${install_dir}/web/static/CACHE"],
}
exec { 'make_assets_json' :

View File

@ -1,3 +1,3 @@
ASSETS_FILE = '<%= @root_dir %>/openstack_catalog/web/api/v1/assets'
STATIC_ROOT = '<%= @root_dir %>/openstack_catalog/web/static'
STATIC_ROOT = '<%= @install_dir %>/web/static'
COMPRESS_ENABLED = True

View File

@ -6,7 +6,7 @@
WSGIDaemonProcess appcatalog user=www-data group=www-data threads=5 python-path=/usr/lib/python2.7:/usr/lib/python2.7/plat-x86_64-linux-gnu:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload:/usr/local/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages
WSGIScriptAlias / /usr/local/lib/python2.7/dist-packages/openstack_catalog/wsgi.py
Alias /static/ <%= @root_dir %>/openstack_catalog/web/static/
Alias /static/ <%= @install_dir %>/web/static/
DocumentRoot <%= @docroot %>
<Directory />
@ -41,7 +41,7 @@
WSGIDaemonProcess appcatalogssl user=www-data group=www-data threads=5 python-path=/usr/lib/python2.7:/usr/lib/python2.7/plat-x86_64-linux-gnu:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload:/usr/local/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages
WSGIScriptAlias / /usr/local/lib/python2.7/dist-packages/openstack_catalog/wsgi.py
Alias /static/ <%= @root_dir %>/openstack_catalog/web/static/
Alias /static/ <%= @install_dir %>/web/static/
SSLEngine on
SSLProtocol All -SSLv2 -SSLv3