Update app-catalog commands

This commit updates the App Catalog manifest to execute the proper
commands for generating static and compressed content such that the
content  will appear in the install directory as and when expected.

Change-Id: I130878728ce3a1ae06e9823fcd3db1aa1fa5285d
This commit is contained in:
Christopher Aedo 2015-11-25 15:21:02 -08:00
parent e5b4919277
commit 8329ddc278
2 changed files with 16 additions and 13 deletions

View File

@ -101,34 +101,34 @@ class apps_site (
}
exec { 'install-app_catalog' :
command => "/usr/local/bin/pip install ${root_dir}",
command => "/usr/local/bin/pip install --upgrade ${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',
require => Exec['install-app_catalog'],
content => template('apps_site/local_settings.erb'),
require => Vcsrepo[$root_dir],
}
file { "${install_dir}/web/static/CACHE":
ensure => directory,
owner => 'www-data',
group => 'www-data',
mode => '0755',
require => Vcsrepo[$root_dir],
file { "${install_dir}/manage.py":
ensure => present,
source => "${root_dir}/manage.py",
require => Exec['install-app_catalog'],
}
exec { 'collect-static' :
command => "/usr/bin/python ${root_dir}/manage.py collectstatic --noinput",
refreshonly => true,
subscribe => Vcsrepo[$root_dir],
require => File["${install_dir}/web/static/CACHE"],
command => "/usr/bin/python ${install_dir}/manage.py collectstatic --noinput",
subscribe => File["${install_dir}/manage.py"],
}
exec { 'python-compress' :
command => "/usr/bin/python ${install_dir}/manage.py compress --force",
subscribe => File["${install_dir}/manage.py"],
}
exec { 'make_assets_json' :

View File

@ -1,3 +1,6 @@
ASSETS_FILE = '<%= @root_dir %>/openstack_catalog/web/api/v1/assets'
STATIC_ROOT = '<%= @install_dir %>/web/static'
ALLOWED_HOSTS = ['*']
DEBUG = False
COMPRESS_ENABLED = True
COMPRESS_OFFLINE = True