From 68836f4b353eb540771aabb956fcbcd52b51439e Mon Sep 17 00:00:00 2001 From: Radomir Dopieralski Date: Thu, 2 Jan 2014 11:44:13 +0100 Subject: [PATCH] Update installation instructions Make the installation instructions use the pluggable dashboard configuration. No more creating symlinks. Change-Id: I2a93bbfde1b014cb5217be65164fbab9a17fefd9 --- _50_tuskar.py.example | 11 +++++++++++ docs/install.rst | 32 ++++++++------------------------ local_settings.py.example | 33 --------------------------------- 3 files changed, 19 insertions(+), 57 deletions(-) create mode 100644 _50_tuskar.py.example diff --git a/_50_tuskar.py.example b/_50_tuskar.py.example new file mode 100644 index 000000000..a56b2e652 --- /dev/null +++ b/_50_tuskar.py.example @@ -0,0 +1,11 @@ +from tuskar_ui import exceptions + +DASHBOARD = 'infrastructure' +ADD_INSTALLED_APPS = [ + 'tuskar_ui.infrastructure', +] +ADD_EXCEPTIONS = { + 'recoverable': exceptions.RECOVERABLE, + 'not_found': exceptions.NOT_FOUND, + 'unauthorized': exceptions.UNAUTHORIZED, +} diff --git a/docs/install.rst b/docs/install.rst index fe4307b18..b89057269 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -64,20 +64,13 @@ Begin by cloning the horizon and tuskar-ui repositories: git clone git://github.com/openstack/horizon.git git clone git://github.com/openstack/tuskar-ui.git -Go into horizon and create a symlink to the tuskar-ui code: - -:: +Go into ``horizon`` and install a virtual environment for your setup:: cd horizon - ln -s ../tuskar-ui/tuskar_ui - -Then, install a virtual environment for your setup: - -:: - python tools/install_venv.py -Next, run ``run_tests.sh`` to have pip install dependencies: + +Next, run ``run_tests.sh`` to have pip install Horizon dependencies: :: @@ -100,23 +93,14 @@ editor. You will want to customize several settings: - ``TUSKAR_ENDPOINT_URL`` should point to the Tuskar server you configured. It normally runs on port 8585. -Final setup ------------ +Install Tuskar-UI with all dependencies in your virtual environment:: -Now that your configuration is in order, it's time to set up a couple -other things. + tools/with_venv.sh pip install -r ../tuskar-ui/requirements.txt + tools/with_venv.sh pip install -e ../tuskar-ui/ -First, activate your virtual environment: +And enable it in Horizon:: -:: - - source .venv/bin/activate - -tuskar-ui introduces one additional dependency - python-tuskarclient: - -:: - - pip install git+http://github.com/openstack/python-tuskarclient.git + cp ../tuskar-ui/_50_tuskar.py.example openstack_dashboard/local/enabled/_50_tuskar.py Starting the app ---------------- diff --git a/local_settings.py.example b/local_settings.py.example index 1e57b471d..b46a4a50a 100644 --- a/local_settings.py.example +++ b/local_settings.py.example @@ -47,39 +47,6 @@ TEMPLATE_DEBUG = DEBUG # valid options would be "AUTO", "VNC" or "SPICE" # CONSOLE_TYPE = "AUTO" -# Default OpenStack Dashboard configuration. -HORIZON_CONFIG = { - 'dashboards': ('project', 'settings', 'admin', 'infrastructure',), - 'default_dashboard': 'project', - 'user_home': 'openstack_dashboard.views.get_user_home', - 'ajax_queue_limit': 10, - 'auto_fade_alerts': { - 'delay': 3000, - 'fade_duration': 1500, - 'types': ['alert-success', 'alert-info'] - }, - 'help_url': "http://docs.openstack.org", - 'exceptions': {'recoverable': exceptions.RECOVERABLE, - 'not_found': exceptions.NOT_FOUND, - 'unauthorized': exceptions.UNAUTHORIZED}, -} - -INSTALLED_APPS = ( - 'openstack_dashboard', - 'django.contrib.contenttypes', - 'django.contrib.auth', - 'django.contrib.sessions', - 'django.contrib.messages', - 'django.contrib.staticfiles', - 'django.contrib.humanize', - 'compressor', - 'horizon', - 'openstack_dashboard.dashboards.project', - 'openstack_dashboard.dashboards.admin', - 'openstack_dashboard.dashboards.settings', - 'openstack_auth', - 'tuskar_ui.infrastructure', -) # Specify a regular expression to validate user passwords. # HORIZON_CONFIG["password_validator"] = { # "regex": '.*',