diff options
| author | Amy Fong <amy.fong@windriver.com> | 2014-04-08 11:52:38 -0400 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2014-04-10 14:38:56 -0400 |
| commit | 7f2b6ebfc0d2e4d2b8c8e6d3208a2cae435d0eeb (patch) | |
| tree | 48a42db440207178364a9f9d9a38e1a073166d42 /meta-openstack/recipes-devtools/python/python-horizon_git.bb | |
| parent | f72e9d29b18bb4c6ca076f1e729b6572e4928d4d (diff) | |
| download | meta-cloud-services-7f2b6ebfc0d2e4d2b8c8e6d3208a2cae435d0eeb.tar.gz | |
Enable python-horizon to run from apache.
- modify python-horizon to install files needed for horizon/apache
- add apache configuration file (openstack-dashboard-apache.conf) to setup a
virtual host running from port 80 to run the mod_wsgi/openstack-dashboard app
- add horizon-apache and apache2 to controller task list
- Note: local_settings.py differs from the one in examples in two ways:
1. LOCAL_PATH = "/usr/share/openstack-dashboard/openstack_dashboard/static"
since the apache app runs as daemon, we neeed to specify a path where
daemon has write permissions
2. configure python-horizon/apache to use memcached. (see CACHES)
Signed-off-by: Amy Fong <amy.fong@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-horizon_git.bb')
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-horizon_git.bb | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-horizon_git.bb b/meta-openstack/recipes-devtools/python/python-horizon_git.bb index c3e167f..153f4d4 100644 --- a/meta-openstack/recipes-devtools/python/python-horizon_git.bb +++ b/meta-openstack/recipes-devtools/python/python-horizon_git.bb | |||
| @@ -27,12 +27,14 @@ DEPENDS_${PN} += "python-django \ | |||
| 27 | python-pbr \ | 27 | python-pbr \ |
| 28 | " | 28 | " |
| 29 | 29 | ||
| 30 | PR = "r1" | 30 | PR = "r2" |
| 31 | SRCNAME = "horizon" | 31 | SRCNAME = "horizon" |
| 32 | 32 | ||
| 33 | SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=stable/havana \ | 33 | SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=stable/havana \ |
| 34 | file://horizon.init \ | 34 | file://horizon.init \ |
| 35 | file://fix_bindir_path.patch \ | 35 | file://fix_bindir_path.patch \ |
| 36 | file://openstack-dashboard-apache.conf \ | ||
| 37 | file://local_settings.py \ | ||
| 36 | " | 38 | " |
| 37 | 39 | ||
| 38 | SRCREV="b2259b352fd1e00a269b8275afa8093223598235" | 40 | SRCREV="b2259b352fd1e00a269b8275afa8093223598235" |
| @@ -68,9 +70,25 @@ do_install_append() { | |||
| 68 | # mv ${D}${datadir}/bin ${DASHBOARD_DIR}/bin | 70 | # mv ${D}${datadir}/bin ${DASHBOARD_DIR}/bin |
| 69 | 71 | ||
| 70 | cp run_tests.sh ${HORIZON_CONF_DIR} | 72 | cp run_tests.sh ${HORIZON_CONF_DIR} |
| 73 | |||
| 74 | # the following are setup required for horizon-apache | ||
| 75 | install -d ${D}/usr/share/openstack-dashboard | ||
| 76 | cp -a ${S}/openstack_dashboard ${D}/usr/share/openstack-dashboard/ | ||
| 77 | cp ${S}/manage.py ${D}/usr/share/openstack-dashboard | ||
| 78 | |||
| 79 | install -D -m 644 ${WORKDIR}/local_settings.py \ | ||
| 80 | ${D}/etc/openstack-dashboard/local_settings.py | ||
| 81 | ln -fs /etc/openstack-dashboard/local_settings.py \ | ||
| 82 | ${D}/usr/share/openstack-dashboard/openstack_dashboard/local/local_settings.py | ||
| 83 | |||
| 84 | install -D -m 644 ${WORKDIR}/openstack-dashboard-apache.conf \ | ||
| 85 | ${D}/etc/apache2/conf.d/openstack-dashboard-apache.conf | ||
| 86 | sed -i -e 's#%PYTHON_SITEPACKAGES%#${PYTHON_SITEPACKAGES_DIR}#' ${D}/etc/apache2/conf.d/openstack-dashboard-apache.conf | ||
| 87 | |||
| 88 | ln -fs openstack_dashboard/static ${D}/usr/share/openstack-dashboard/static | ||
| 71 | } | 89 | } |
| 72 | 90 | ||
| 73 | PACKAGES += "${SRCNAME}-tests ${SRCNAME}" | 91 | PACKAGES += "${SRCNAME}-tests ${SRCNAME} ${SRCNAME}-apache" |
| 74 | 92 | ||
| 75 | FILES_${PN} = "${libdir}/*" | 93 | FILES_${PN} = "${libdir}/*" |
| 76 | 94 | ||
| @@ -81,6 +99,12 @@ FILES_${SRCNAME} = "${bindir}/* \ | |||
| 81 | ${datadir}/* \ | 99 | ${datadir}/* \ |
| 82 | " | 100 | " |
| 83 | 101 | ||
| 102 | FILES_${SRCNAME}-apache = "/etc/apache2 \ | ||
| 103 | /etc/openstack-dashboard/ \ | ||
| 104 | /usr/share/openstack-dashboard/ \ | ||
| 105 | /var/lib/openstack-dashboard \ | ||
| 106 | " | ||
| 107 | |||
| 84 | RDEP_ARCH_VAR = "" | 108 | RDEP_ARCH_VAR = "" |
| 85 | RDEP_ARCH_VAR_arm = "nodejs" | 109 | RDEP_ARCH_VAR_arm = "nodejs" |
| 86 | RDEP_ARCH_VAR_i686 = "nodejs" | 110 | RDEP_ARCH_VAR_i686 = "nodejs" |
| @@ -113,3 +137,11 @@ RDEPENDS_${SRCNAME} = "${PN}" | |||
| 113 | INITSCRIPT_PACKAGES = "${SRCNAME}" | 137 | INITSCRIPT_PACKAGES = "${SRCNAME}" |
| 114 | INITSCRIPT_NAME_${SRCNAME} = "horizon" | 138 | INITSCRIPT_NAME_${SRCNAME} = "horizon" |
| 115 | INITSCRIPT_PARAMS_${SRCNAME} = "${OS_DEFAULT_INITSCRIPT_PARAMS}" | 139 | INITSCRIPT_PARAMS_${SRCNAME} = "${OS_DEFAULT_INITSCRIPT_PARAMS}" |
| 140 | |||
| 141 | RDEPENDS_${SRCNAME}-apache = "\ | ||
| 142 | apache2 \ | ||
| 143 | mod-wsgi \ | ||
| 144 | python-lesscpy \ | ||
| 145 | memcached \ | ||
| 146 | python-memcached \ | ||
| 147 | " | ||
