!1 Init the first release
From: @xiyuanwang Reviewed-by: @joec88 Signed-off-by: @joec88
This commit is contained in:
commit
43ede69383
36
0001-Do-not-set-COMPRESS_ENABLED-explicitly.patch
Normal file
36
0001-Do-not-set-COMPRESS_ENABLED-explicitly.patch
Normal file
@ -0,0 +1,36 @@
|
||||
From 63a568a42073647218dab3766fa88a73ecb8899e Mon Sep 17 00:00:00 2001
|
||||
From: Sumit Jamgade <sjamgade@suse.com>
|
||||
Date: Wed, 6 Feb 2019 14:55:10 +0100
|
||||
Subject: [PATCH] Do not set COMPRESS_ENABLED explicitly
|
||||
|
||||
it is always opposite of DEBUG[1].
|
||||
this also helps keep compressor OFF during test as test do not need
|
||||
static files
|
||||
|
||||
Any plugins needing compression can explicitly enable in its own
|
||||
local_settings
|
||||
|
||||
1-
|
||||
https://django-compressor.readthedocs.io/en/stable/settings/#django.conf.settings.COMPRESS_ENABLED
|
||||
|
||||
Change-Id: I9f3979da38cca677256799be8eb215a4ea32cf12
|
||||
---
|
||||
horizon/test/settings.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/horizon/test/settings.py b/horizon/test/settings.py
|
||||
index 5834cdd87..d93ba37ee 100644
|
||||
--- a/horizon/test/settings.py
|
||||
+++ b/horizon/test/settings.py
|
||||
@@ -126,7 +126,7 @@ STATICFILES_DIRS = settings_utils.get_xstatic_dirs(
|
||||
settings_utils.BASE_XSTATIC_MODULES, HORIZON_CONFIG
|
||||
)
|
||||
|
||||
-COMPRESS_ENABLED = True
|
||||
+COMPRESS_ENABLED = False
|
||||
COMPRESS_OFFLINE = False
|
||||
COMPRESS_ROOT = "/tmp/"
|
||||
COMPRESS_PARSER = 'compressor.parser.HtmlParser'
|
||||
--
|
||||
2.16.4
|
||||
|
||||
BIN
horizon-18.6.1.tar.gz
Normal file
BIN
horizon-18.6.1.tar.gz
Normal file
Binary file not shown.
87
openstack-dashboard.conf.sample
Normal file
87
openstack-dashboard.conf.sample
Normal file
@ -0,0 +1,87 @@
|
||||
#
|
||||
# OpenStack Horizon (Dashboard) Apache2 example configuration.
|
||||
#
|
||||
# Required Apache2 modules:
|
||||
# - mod_rewrite (If you use the port 80 -> 443 rewrite rule below)
|
||||
# - mod_ssl (If you enable the HTTPS vhost)
|
||||
#
|
||||
|
||||
<VirtualHost *:80>
|
||||
ServerName openstack-dashboard.example.com
|
||||
ServerAdmin webmaster@openstack-dashboard.example.com
|
||||
|
||||
ErrorLog /var/log/httpd/openstack-dashboard-error_log
|
||||
TransferLog /var/log/httpd/openstack-dashboard-access_log
|
||||
|
||||
WSGIScriptAlias / /var/lib/openstack-dashboard/openstack_dashboard/wsgi.py
|
||||
WSGIDaemonProcess horizon user=apache group=apache processes=3 threads=10
|
||||
WSGIApplicationGroup %{GLOBAL}
|
||||
WSGIProcessGroup horizon
|
||||
SetEnv APACHE_RUN_USER apache
|
||||
SetEnv APACHE_RUN_GROUP apache
|
||||
|
||||
DocumentRoot /var/lib/openstack-dashboard/
|
||||
Alias /media /var/lib/openstack-dashboard/media
|
||||
Alias /static /var/lib/openstack-dashboard/static
|
||||
|
||||
<Location /static>
|
||||
SetOutputFilter DEFLATE
|
||||
ExpiresActive On
|
||||
ExpiresDefault "access plus 1 month"
|
||||
</Location>
|
||||
|
||||
<Directory /var/lib/openstack-dashboard/>
|
||||
Options FollowSymLinks MultiViews
|
||||
AllowOverride None
|
||||
Require all granted
|
||||
</Directory>
|
||||
</VirtualHost>
|
||||
|
||||
|
||||
<IfDefine SSL>
|
||||
<IfDefine !NOSSL>
|
||||
|
||||
# Uncomment the following if you want to redirect all HTTP traffic to HTTPS.
|
||||
# Make sure to comment out the above <VirtualHost *:80>
|
||||
#RewriteEngine On
|
||||
#RewriteCond %{SERVER_PORT} ^80$
|
||||
#RewriteRule / https://%{HTTP_HOST}%{REQUEST_URI} [L,R]
|
||||
|
||||
<VirtualHost *:443>
|
||||
ServerName openstack-dashboard.example.com
|
||||
ServerAdmin webmaster@openstack-dashboard.example.com
|
||||
|
||||
ErrorLog /var/log/httpd/openstack-dashboard-error_log
|
||||
TransferLog /var/log/httpd/openstack-dashboard-access_log
|
||||
|
||||
SSLEngine On
|
||||
# Generate those certificates by running
|
||||
# (umask 377 ; /usr/bin/gensslcert -C openstack-dashboard -n $(hostname -fqdn))
|
||||
SSLCertificateFile /etc/httpd/ssl.crt/openstack-dashboard-server.crt
|
||||
SSLCertificateKeyFile /etc/httpd/ssl.key/openstack-dashboard-server.key
|
||||
|
||||
DocumentRoot /var/lib/openstack-dashboard/
|
||||
Alias /media /var/lib/openstack-dashboard/media
|
||||
Alias /static /var/lib/openstack-dashboard/static
|
||||
|
||||
<Location /static>
|
||||
ExpiresActive on
|
||||
ExpiresDefault "access plus 1 month"
|
||||
</Location>
|
||||
|
||||
<Location /static>
|
||||
SetOutputFilter DEFLATE
|
||||
ExpiresActive On
|
||||
ExpiresDefault "access plus 1 month"
|
||||
</Location>
|
||||
|
||||
<Directory /var/lib/openstack-dashboard/>
|
||||
Options FollowSymLinks MultiViews
|
||||
AllowOverride None
|
||||
Require all granted
|
||||
</Directory>
|
||||
</VirtualHost>
|
||||
|
||||
</IfDefine>
|
||||
</IfDefine>
|
||||
|
||||
224
openstack-horizon.spec
Normal file
224
openstack-horizon.spec
Normal file
@ -0,0 +1,224 @@
|
||||
%global http_dashboard_dir %{_datarootdir}/openstack-dashboard
|
||||
|
||||
Name: openstack-horizon
|
||||
Version: 18.6.1
|
||||
Release: 1
|
||||
Summary: OpenStack Dashboard (Horizon)
|
||||
License: ASL 2.0
|
||||
Group: Development/Languages/Python
|
||||
URL: https://wiki.openstack.org/OpenStackDashboard
|
||||
Source0: horizon-18.6.1.tar.gz
|
||||
Source1: openstack-dashboard.conf.sample
|
||||
# https://review.openstack.org/#/c/635159/
|
||||
Patch0: 0001-Do-not-set-COMPRESS_ENABLED-explicitly.patch
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gettext
|
||||
BuildRequires: openstack-macros
|
||||
BuildRequires: python3-Django
|
||||
BuildRequires: python3-pint
|
||||
BuildRequires: python3-XStatic
|
||||
BuildRequires: python3-XStatic-Angular
|
||||
BuildRequires: python3-XStatic-Angular-Bootstrap
|
||||
BuildRequires: python3-XStatic-Angular-FileUpload
|
||||
BuildRequires: python3-XStatic-Angular-Gettext
|
||||
BuildRequires: python3-XStatic-Angular-Schema-Form
|
||||
BuildRequires: python3-XStatic-Angular-lrdragndrop
|
||||
BuildRequires: python3-XStatic-Bootstrap-Datepicker
|
||||
BuildRequires: python3-XStatic-Bootstrap-SCSS
|
||||
BuildRequires: python3-XStatic-D3
|
||||
BuildRequires: python3-XStatic-Font-Awesome
|
||||
BuildRequires: python3-XStatic-Hogan
|
||||
BuildRequires: python3-XStatic-JQuery-Migrate
|
||||
BuildRequires: python3-XStatic-JQuery-TableSorter
|
||||
BuildRequires: python3-XStatic-JQuery-quicksearch
|
||||
BuildRequires: python3-XStatic-JSEncrypt
|
||||
BuildRequires: python3-XStatic-Jasmine
|
||||
BuildRequires: python3-XStatic-Rickshaw
|
||||
BuildRequires: python3-XStatic-Spin
|
||||
BuildRequires: python3-XStatic-bootswatch
|
||||
BuildRequires: python3-XStatic-jQuery
|
||||
BuildRequires: python3-XStatic-jquery-ui
|
||||
BuildRequires: python3-XStatic-mdi
|
||||
BuildRequires: python3-XStatic-objectpath
|
||||
BuildRequires: python3-XStatic-roboto-fontface
|
||||
BuildRequires: python3-XStatic-smart-table
|
||||
BuildRequires: python3-XStatic-termjs
|
||||
BuildRequires: python3-XStatic-tv4
|
||||
BuildRequires: python3-cinderclient
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-django-compressor
|
||||
BuildRequires: python3-django-debreach
|
||||
BuildRequires: python3-django-pyscss
|
||||
BuildRequires: python3-glanceclient
|
||||
BuildRequires: python3-keystoneclient
|
||||
BuildRequires: python3-mock
|
||||
BuildRequires: python3-netaddr
|
||||
BuildRequires: python3-neutronclient
|
||||
BuildRequires: python3-novaclient
|
||||
BuildRequires: python3-oslo-concurrency
|
||||
BuildRequires: python3-oslo-policy
|
||||
BuildRequires: python3-osprofiler
|
||||
BuildRequires: python3-pbr
|
||||
BuildRequires: python3-pytest
|
||||
BuildRequires: python3-swiftclient
|
||||
BuildRequires: python3-testtools
|
||||
|
||||
Requires: python3-horizon
|
||||
Requires: python3-openstack_auth
|
||||
Requires: httpd
|
||||
Requires: python3-mod_wsgi
|
||||
Requires(post): httpd-tools
|
||||
|
||||
Provides: openstack-horizon = %{version}-%{release}
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
The OpenStack dashboard provides administrators and users a graphical
|
||||
interface to access, provision and automate cloud-based resources. The
|
||||
extensible design makes it easy to plug in and expose third party
|
||||
products and services, such as billing, monitoring and additional
|
||||
management tools.
|
||||
|
||||
The dashboard is just one way to interact with OpenStack resources.
|
||||
Developers can automate access or build tools to manage their resources
|
||||
using the native OpenStack API or the EC2 compatibility API.
|
||||
|
||||
%package -n python3-horizon
|
||||
Summary: OpenStack Dashboard (Horizon) - Python Module
|
||||
Requires: python3-babel
|
||||
Requires: python3-django
|
||||
Requires: python3-pint
|
||||
Requires: python3-PyYAML
|
||||
Requires: python3-XStatic
|
||||
Requires: python3-XStatic-Angular
|
||||
Requires: python3-XStatic-Angular-Bootstrap
|
||||
Requires: python3-XStatic-Angular-FileUpload
|
||||
Requires: python3-XStatic-Angular-Gettext
|
||||
Requires: python3-XStatic-Angular-Schema-Form
|
||||
Requires: python3-XStatic-Angular-lrdragndrop
|
||||
Requires: python3-XStatic-Bootstrap-Datepicker
|
||||
Requires: python3-XStatic-Bootstrap-SCSS
|
||||
Requires: python3-XStatic-D3
|
||||
Requires: python3-XStatic-Font-Awesome
|
||||
Requires: python3-XStatic-Hogan
|
||||
Requires: python3-XStatic-JQuery-Migrate
|
||||
Requires: python3-XStatic-JQuery-TableSorter
|
||||
Requires: python3-XStatic-JQuery-quicksearch
|
||||
Requires: python3-XStatic-JSEncrypt
|
||||
Requires: python3-XStatic-Jasmine
|
||||
Requires: python3-XStatic-Rickshaw
|
||||
Requires: python3-XStatic-Spin
|
||||
Requires: python3-XStatic-bootswatch
|
||||
Requires: python3-XStatic-jQuery
|
||||
Requires: python3-XStatic-jquery-ui
|
||||
Requires: python3-XStatic-mdi
|
||||
Requires: python3-XStatic-objectpath
|
||||
Requires: python3-XStatic-roboto-fontface
|
||||
Requires: python3-XStatic-smart-table
|
||||
Requires: python3-XStatic-termjs
|
||||
Requires: python3-XStatic-tv4
|
||||
Requires: python3-cinderclient
|
||||
Requires: python3-django-babel
|
||||
Requires: python3-django-compressor
|
||||
Requires: python3-django-debreach
|
||||
Requires: python3-django-pyscss
|
||||
Requires: python3-futurist
|
||||
Requires: python3-glanceclient
|
||||
Requires: python3-heatclient
|
||||
Requires: python3-httplib2
|
||||
Requires: python3-iso8601
|
||||
Requires: python3-keystoneclient
|
||||
Requires: python3-netaddr
|
||||
Requires: python3-neutronclient
|
||||
Requires: python3-novaclient
|
||||
Requires: python3-oslo-concurrency
|
||||
Requires: python3-oslo-config
|
||||
Requires: python3-oslo-i18n
|
||||
Requires: python3-oslo-policy
|
||||
Requires: python3-oslo-serialization
|
||||
Requires: python3-oslo-utils
|
||||
Requires: python3-osprofiler
|
||||
Requires: python3-pbr
|
||||
Requires: python3-scss
|
||||
Requires: python3-pytz
|
||||
Requires: python3-semantic_version
|
||||
Requires: python3-six
|
||||
Requires: python3-swiftclient
|
||||
|
||||
%description -n python3-horizon
|
||||
The Python module horizon is the core component of the OpenStack
|
||||
dashboard.
|
||||
|
||||
%package -n python3-openstack_auth
|
||||
Summary: OpenStack Auth (Horizon) - Python Module
|
||||
|
||||
%description -n python3-openstack_auth
|
||||
The Python module OpenStack Auth provides Authentication mechanism
|
||||
for the OpenStack Dashboard (Horizon).
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n horizon-18.6.1
|
||||
%py_req_cleanup
|
||||
|
||||
# Fix manage.py shebang
|
||||
sed -i 's#%{_bindir}/env python#%{_bindir}/python3#' manage.py
|
||||
|
||||
%build
|
||||
# compile mo files before build
|
||||
pushd horizon
|
||||
python3 ../manage.py compilemessages
|
||||
popd
|
||||
pushd openstack_dashboard
|
||||
python3 ../manage.py compilemessages
|
||||
popd
|
||||
%{py3_build}
|
||||
|
||||
%install
|
||||
%{py3_install}
|
||||
|
||||
# Move openstack_dashboard files
|
||||
install -d -m 755 %{buildroot}%{http_dashboard_dir}
|
||||
mv %{buildroot}%{python3_sitelib}/openstack_dashboard/ %{buildroot}%{http_dashboard_dir}
|
||||
install -m 755 manage.py %{buildroot}%{http_dashboard_dir}/manage.py
|
||||
|
||||
# Create a local_settings.py
|
||||
mv %{buildroot}%{http_dashboard_dir}/openstack_dashboard/local/local_settings.py{.example,}
|
||||
|
||||
# create root and static files
|
||||
install -m 0755 -d %{buildroot}%{http_dashboard_dir}/static
|
||||
install -m 0755 -d %{buildroot}%{http_dashboard_dir}/media
|
||||
pushd %{buildroot}%{http_dashboard_dir}
|
||||
PYTHONPATH=%{buildroot}%{python3_sitelib} python3 manage.py collectstatic --noinput
|
||||
popd
|
||||
|
||||
# cleanup after manage.py run
|
||||
rm -v %{buildroot}%{http_dashboard_dir}/openstack_dashboard/local/.secret_key_store
|
||||
rm -v %{buildroot}%{http_dashboard_dir}/openstack_dashboard/local/*secret_key_store*
|
||||
|
||||
# Remove duplicate files
|
||||
rm -f %{buildroot}%{http_dashboard_dir}/openstack_dashboard/.eslintrc
|
||||
|
||||
install -D -m 644 %{SOURCE1} %{buildroot}%{apache_conf_dir}/openstack-dashboard.conf.sample
|
||||
|
||||
%files
|
||||
%doc README.rst
|
||||
%{http_dashboard_dir}
|
||||
%attr(0750, %{apache_user}, %{apache_group}) %{http_dashboard_dir}/openstack_dashboard/local
|
||||
%attr(0640, %{apache_user}, %{apache_group}) %{http_dashboard_dir}/openstack_dashboard/local/__init__.py*
|
||||
%config(noreplace) %attr(0640, %{apache_user}, %{apache_group}) %{http_dashboard_dir}/openstack_dashboard/local/local_settings.py*
|
||||
%attr(0770, root, %{apache_group}) %{http_dashboard_dir}/static/
|
||||
%attr(0770, root, %{apache_group}) %{http_dashboard_dir}/media/
|
||||
%{apache_conf_dir}/openstack-dashboard.conf.sample
|
||||
|
||||
%files -n python3-horizon
|
||||
%license LICENSE
|
||||
%{python3_sitelib}/horizon
|
||||
%{python3_sitelib}/horizon-*.egg-info
|
||||
|
||||
%files -n python3-openstack_auth
|
||||
%license LICENSE
|
||||
%{python3_sitelib}/openstack_auth
|
||||
|
||||
%changelog
|
||||
* Tus Feb 09 2020 wangxiyuan <wangxiyuan1007@gmail.com>
|
||||
- Init the first openstack victoria release
|
||||
Loading…
x
Reference in New Issue
Block a user