Skip to content

Commit

Permalink
Unifies the project packaging into one set of modules.
Browse files Browse the repository at this point in the history
There are no longer two separate projects living inside the horizon
repository. There is a single project now with a single setup.py,
single README, etc.

The openstack-dashboard/dashboard django project is now named
"openstack_dashboard" and lives as an example project in the
topmost horizon directory.

The "horizon/horizon" directory has been bumped up a level and now
is directly on the path when the root horizon directory is on
your python path.

Javascript media which the horizon module directly relies upon
now ships in the horizon/static dir rather than
openstack-dashboard/dashboard/static.

All the corresponding setup, installation, build, and env scripts
have been updated accordingly.

Implements blueprint unified-packaging.

Change-Id: Ieed8e3c777432cd046c3e0298869a9428756ab62
  • Loading branch information
gabrielhurley committed Feb 29, 2012
1 parent fca0b64 commit 052aa55
Show file tree
Hide file tree
Showing 452 changed files with 194 additions and 2,510 deletions.
6 changes: 2 additions & 4 deletions .gitignore
Expand Up @@ -8,10 +8,8 @@ coverage.xml
pep8.txt
pylint.txt
reports
horizon/horizon.egg-info
.horizon-venv
openstack-dashboard/local/dashboard_openstack.sqlite3
openstack-dashboard/local/local_settings.py
horizon.egg-info
openstack_dashboard/local/local_settings.py
docs/build/
docs/source/sourcecode
.venv
File renamed without changes.
75 changes: 47 additions & 28 deletions README.rst
@@ -1,17 +1,12 @@
OpenStack Dashboard (Horizon)
-----------------------------
=============================
Horizon (OpenStack Dashboard)
=============================

The OpenStack Dashboard is a Django based reference implementation of a web
based management interface for OpenStack.

It is based on the ``horizon`` module, which is designed to be a generic Django
app that can be re-used in other projects.

For more information about how to get started with the OpenStack Dashboard,
view the README file in the openstack-dashboard folder.

For more information about working directly with ``horizon``, see the
README file in the ``horizon`` folder.
Horizon is a Django-based project aimed at providing a complete OpenStack
Dashboard along with an extensible framework for building new dashboards
from reusable components. The ``openstack_dashboard`` module is a reference
implementation of a Django site that uses the ``horizon`` app to provide
web-based interactions with the various OpenStack projects.

For release management:

Expand All @@ -25,38 +20,62 @@ For issue tracking:

* https://bugs.launchpad.net/horizon

Getting Started
===============

For local development, first create a virtualenv for the project.
In the ``tools`` directory there is a script to create one for you:

$ python tools/install_venv.py

Alternatively, the ``run_tests.sh`` script will also install the environment
for you and then run the full test suite to verify everything is installed
and functioning correctly.

Now that the virtualenv is created, you need to configure your local
environment. To do this, create a ``local_settings.py`` file in the ``local/``
directory. There is a ``local_settings.py.example`` file there that may be
used as a template.

If all is well you should able to run the development server locally:

$ tools/with_venv.sh manage.py runserver

or, as a shortcut::

$ ./run_tests.sh --runserver


Settings Up OpenStack
=====================

Project Structure and Testing:
------------------------------
The recommended tool for installing and configuring the core OpenStack
components is `Devstack`_. Refer to their documentation for getting
Nova, Keystone, Glance, etc. up and running.

This project is a bit different from other OpenStack projects in that it has
two very distinct components underneath it: ``horizon``, and
``openstack-dashboard``.
.. _Devstack: http://devstack.org/

The ``horizon`` directory holds the generic libraries and components that can
be used in any Django project.

The ``openstack-dashboard`` directory contains a reference Django project that
uses ``horizon``.
Development
===========

For development, both pieces share an environment which (by default) is
built with the ``tools/install_venv.py`` script. That script creates a
virtualenv and installs all the necessary packages.
For development, start with the getting started instructions above.
Once you have a working virtualenv and all the necessary packages, read on.

If dependencies are added to either ``horizon`` or ``openstack-dashboard``,
they should be added to ``tools/pip-requires``.

The ``run_tests.sh`` script invokes tests and analyses on both of these
components in its process, and is what Jenkins uses to verify the
components in its process, and it is what Jenkins uses to verify the
stability of the project. If run before an environment is set up, it will
ask if you wish to install one.

To run the tests::
To run the unit tests::

$ ./run_tests.sh

Building Contributor Documentation
----------------------------------
==================================

This documentation is written by contributors, for contributors.

Expand Down
18 changes: 7 additions & 11 deletions docs/source/conf.py
Expand Up @@ -15,14 +15,12 @@
import os

BASE_DIR = os.path.dirname(os.path.abspath(__file__))
HORIZON_DIR = os.path.abspath(os.path.join(BASE_DIR, "..", "..", "horizon"))
DASHBOARD_DIR = os.path.abspath(os.path.join(BASE_DIR, "..", "..", "openstack-dashboard"))
ROOT = os.path.abspath(os.path.join(BASE_DIR, "..", ".."))

sys.path.insert(0, HORIZON_DIR)
sys.path.insert(0, DASHBOARD_DIR)
sys.path.insert(0, ROOT)

# This is required for ReadTheDocs.org, but isn't a bad idea anyway.
os.environ['DJANGO_SETTINGS_MODULE'] = 'dashboard.settings'
os.environ['DJANGO_SETTINGS_MODULE'] = 'openstack_dashboard.settings'

import horizon.version

Expand All @@ -37,8 +35,6 @@ def find_autodoc_modules(module_name, sourcedir):
for root, dirs, files in os.walk("."):
for filename in files:
if filename.endswith(".py"):
# root = ./dashboard/test/unit
# filename = base.py
# remove the pieces of the root
elements = root.split(os.path.sep)
# replace the leading "." with the module name
Expand All @@ -53,10 +49,10 @@ def find_autodoc_modules(module_name, sourcedir):
return modlist

RSTDIR = os.path.abspath(os.path.join(BASE_DIR, "sourcecode"))
SRCS = {'horizon': HORIZON_DIR,
'dashboard': DASHBOARD_DIR}
SRCS = {'horizon': ROOT,
'openstack_dashboard': ROOT}

EXCLUDED_MODULES = ('horizon.tests', 'dashboard.tests',)
EXCLUDED_MODULES = ('horizon.tests', 'openstack_dashboard.tests',)
CURRENT_SOURCES = {}

if not(os.path.exists(RSTDIR)):
Expand Down Expand Up @@ -118,7 +114,7 @@ def find_autodoc_modules(module_name, sourcedir):
# Delete auto-generated .rst files for sources which no longer exist
for directory, subdirs, files in list(os.walk(RSTDIR)):
for old_file in files:
if old_file not in CURRENT_SOURCES[directory]:
if old_file not in CURRENT_SOURCES.get(directory, []):
print "Removing outdated file for %s" % old_file
os.remove(os.path.join(directory, old_file))

Expand Down
176 changes: 0 additions & 176 deletions horizon/LICENSE

This file was deleted.

30 changes: 0 additions & 30 deletions horizon/README

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 052aa55

Please sign in to comment.