Custom Search

Tuesday, March 26, 2013

How to Setup OpenStack Horizon Development Environment

How to Setup OpenStack Horizon Development Environment  

1)
Clone horizon git repo
#git clone https://github.com/openstack/horizon.git

2)
Create Virtualenv and install dependencies
#cd horizon
#python tools/install_venv.py


3)
Horizon development environment setup is complete.
To activate the virtualenv for the extent of your current shell session you can run:
$ source .venv/bin/activate

4)
Start Server
#python manage.py runserver
Development server is running at http://127.0.0.1:8000/


5)
To fix error : AttributeError: 'Settings' object has no attribute 'OPENSTACK_KEYSTONE_URL'

#cp openstack_dashboard/local/
local_settings.py.example openstack_dashboard/local/local_settings.py

6)
Restart Server
#python manage.py runserver
Development server is running at http://127.0.0.1:8000/

7)
To fix error : FilterError: /usr/bin/env: node: No such file or directory
http://www.cloudbase.it/howto-solve-devstack-dashboard-node-error/

Install node
#sudo apt-get install node-less

On Ubuntu 12.10 you will also need nodejs-legacy:
#sudo apt-get install nodejs-legacy

Restart Server
#python manage.py runserver
Development server is running at http://127.0.0.1:8000/

8)
To fix error : "An error occurred authenticating. Please try again later."

Openstack Nova doesn't installed and running on this machine, that is why getting error "An error occurred authenticating. Please try again later." That is, non of openstack services running on this machine

If you have an Openstack server with services are running, then you can specify IP of that server in Openstack_dashboard/local/local_settings.py
For example:
OPENSTACK_HOST = "192.168.12.222"
Then restart server. After that horizon will connect to openstack Nova running on 192.168.12.222.


9)
Goto openstack_dashboard/local/local_settings.py
Then change the openstack host

OPENSTACK_HOST = "192.168.12.222"

Restart Server
#python manage.py runserver
Development server is running at http://127.0.0.1:8000/

5 comments:

  1. Setting up a Horizon development environment
    http://docs.openstack.org/developer/horizon/quickstart.html

    ReplyDelete
  2. Hi, i'd like to use swift with horizon BUT without needing nova and glance installed, is that possible? How complicated would it be to modifie horizon this way?

    Great article, thanks!

    ReplyDelete
  3. Hi, i'd like to use swift with horizon BUT without needing nova and glance installed, is that possible? How complicated would it be to modifie horizon this way?

    Great article, thanks!

    ReplyDelete
  4. A professional advice is always appreciated when needed and I have bookmarked your article.
    node.js development services

    ReplyDelete