← Back to team overview

openstack team mailing list archive

FW: dashboard in oneric

 

Below are the things I did trying to install Dashboard using Essex2 code (after I successfully installed Nova and Glance from their Essex2 PPAs, and Keystone from its Essex2 source code on the same server).

I hope that any of the Dashboard developers can provide instructions on how to install Dashboard from a milestone-release source code (Essex2 or Essex3) while using MySQL for DB and Apache2 as the web server, AND NOT by using virtual-env + sqlite.

 

  

Thank you very much again for help and if you have time to answer my question it would be great.

 

George

 

 

Installed Horizon first:

cd /usr/local/src

wget https://github.com/openstack/horizon/zipball/essex-2

unzip essex-2

cd openstack-horizon-e7d7643/

cd horizon/

python setup.py build

python setup.py install

 

 

Installed Dashboard:

 

cd openstack-dashboard/

cp local/local_settings.py.example local/local_settings.py 

vi local/local_settings.py  and here I changed:

 

import os

DEBUG = True

TEMPLATE_DEBUG = DEBUG

PROD = False

USE_SSL = False

LOCAL_PATH = os.path.dirname(os.path.abspath(__file__))

DATABASES = {

    'default': {

        'ENGINE': 'django.db.backends.mysql',

        'NAME': 'horizon',

        'USER': 'horizon',

        'PASSWORD': 'horizonpass',

        'HOST': '127.0.0.1',

        'default-character-set': 'utf8'

    }

}

CACHE_BACKEND = 'locmem://'

EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'

HORIZON_CONFIG = {

    'dashboards': ('nova', 'syspanel', 'settings',),

    'default_dashboard': 'nova',

    'user_home': 'dashboard.views.user_home',

}

OPENSTACK_HOST = "127.0.0.1"

OPENSTACK_KEYSTONE_URL = "http://localhost:5000/v2.0/"; <http://localhost:5000/v2.0/> 

OPENSTACK_KEYSTONE_ADMIN_URL = "http://localhost:35357/v2.0"; <http://localhost:35357/v2.0> 

OPENSTACK_KEYSTONE_DEFAULT_ROLE = "Member"

OPENSTACK_ADMIN_TOKEN = "999888777666"

SWIFT_PAGINATE_LIMIT = 1000

QUANTUM_ENABLED = False

QUANTUM_URL = '%s'  % OPENSTACK_HOST

QUANTUM_PORT = '9696'

QUANTUM_TENANT = '1234'

QUANTUM_CLIENT_VERSION='0.1'

COMPUTE_HOST_RAM_GB = 16

 

cd /usr/local/src/openstack-horizon-e7d7643/openstack-dashboard

python setup.py build

python setup.py install

 

Created a horizon DB:

mysql -uroot -ppass -e 'CREATE DATABASE horizon;'

echo "GRANT ALL ON horizon.* TO 'horizon'@'%' IDENTIFIED BY 'horizonpass'; FLUSH PRIVILEGES;" | mysql -uroot -ppass

 

Installed Apache:

apt-get install apache2 libapache2-mod-wsgi

 

mkdir /usr/local/src/openstack-horizon-e7d7643/openstack-dashboard/.blackhole

 

Created the Apache config:

cat /etc/apache2/sites-enabled/000-default 

<VirtualHost *:80>

    WSGIScriptAlias / /usr/local/src/openstack-horizon-e7d7643/openstack-dashboard/dashboard/wsgi/django.wsgi

    WSGIDaemonProcess horizon user=www-data group=www-data processes=3 threads=10

    SetEnv APACHE_RUN_USER www-data

    SetEnv APACHE_RUN_GROUP www-data

    WSGIProcessGroup horizon

 

    DocumentRoot /usr/local/src/openstack-horizon-e7d7643/openstack-dashboard/.blackhole

    Alias /media /usr/local/src/openstack-horizon-e7d7643/openstack-dashboard/dashboard/static

    Alias /vpn /opt/stack/vpn

 

    <Directory />

        Options FollowSymLinks

        AllowOverride None

    </Directory>

 

    <Directory /usr/local/src/openstack-horizon-e7d7643/openstack-dashboard/>

        Options Indexes FollowSymLinks MultiViews

        AllowOverride None

        Order allow,deny

        allow from all

    </Directory>

 

    ErrorLog /var/log/apache2/error.log

    LogLevel warn

    CustomLog /var/log/apache2/access.log combined

</VirtualHost>

 

 

Synced the DB and HERE I RECEIVED ERRORS caused by not reading the local_settings.py file (I think)

 

root@redundant:/usr/local/src/openstack-horizon-e7d7643/openstack-dashboard# dashboard/manage.py syncdb

ERROR:root:No module named local.local_settings

Traceback (most recent call last):

  File "/usr/local/src/openstack-horizon-e7d7643/openstack-dashboard/dashboard/settings.py", line 126, in <module>

    from local.local_settings import *

ImportError: No module named local.local_settings

ERROR:root:No module named local.local_settings

Traceback (most recent call last):

  File "/usr/local/src/openstack-horizon-e7d7643/openstack-dashboard/dashboard/../dashboard/settings.py", line 126, in <module>

    from local.local_settings import *

ImportError: No module named local.local_settings

Traceback (most recent call last):

  File "dashboard/manage.py", line 38, in <module>

    execute_manager(settings)

  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 438, in execute_manager

    utility.execute()

  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 379, in execute

    self.fetch_command(subcommand).run_from_argv(self.argv)

  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 191, in run_from_argv

    self.execute(*args, **options.__dict__)

  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 220, in execute

    output = self.handle(*args, **options)

  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 351, in handle

    return self.handle_noargs(**options)

  File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/syncdb.py", line 56, in handle_noargs

    cursor = connection.cursor()

  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/dummy/base.py", line 15, in complain

    raise ImproperlyConfigured("You haven't set the database ENGINE setting yet.")

django.core.exceptions.ImproperlyConfigured: You haven't set the database ENGINE setting yet.

 

 

 

root@redundant:/usr/local/src/openstack-horizon-e7d7643/openstack-dashboard# ll local

total 24

drwxr-xr-x 2 root root 4096 2012-01-30 14:55 ./

drwxr-xr-x 9 root root 4096 2012-01-27 23:51 ../

-rw-r--r-- 1 root root    0 2012-01-30 14:37 __init__.py

-rw-r--r-- 1 root root 3549 2012-01-30 14:55 local_settings.py

-rw-r--r-- 1 root root 1407 2012-01-30 14:24 local_settings.pyc

-rw-r--r-- 1 root root 3872 2012-01-27 23:49 local_settings.py_changed

-rw-r--r-- 1 root root 3541 2011-12-14 16:27 local_settings.py.example

 

 

I even touched the "/usr/local/src/openstack-horizon-e7d7643/openstack-dashboard/local/ __init__.py" to refresh its timestamp because I read this might be an issue.

 

If I try to import the "local" module it seems to not be available:

>>> import local

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

ImportError: No module named local

 

These are the existing Python paths:

 

>>> import sys

>>> import pprint

>>> pprint.pprint(sys.path)

['',

 '/usr/local/lib/python2.7/dist-packages/keystone-2012.1-py2.7.egg',

 '/usr/local/lib/python2.7/dist-packages',

 '/usr/local/lib/python2.7/dist-packages/virtualenv-1.7-py2.7.egg',

 '/usr/local/lib/python2.7/dist-packages/MySQL_python-1.2.3-py2.7-linux-x86_64.egg',

 '/usr/local/lib/python2.7/dist-packages/horizon-2012.1-py2.7.egg',

 '/usr/local/lib/python2.7/dist-packages/openstack_dashboard-0.4-py2.7.egg',

 '/usr/local/lib/python2.7/dist-packages/python_keystoneclient-2012.1-py2.7.egg',

 '/usr/lib/python2.7',

 '/usr/lib/python2.7/plat-linux2',

 '/usr/lib/python2.7/lib-tk',

 '/usr/lib/python2.7/lib-old',

 '/usr/lib/python2.7/lib-dynload',

 '/usr/local/lib/python2.7/dist-packages',

 '/usr/lib/python2.7/dist-packages',

 '/usr/lib/python2.7/dist-packages/PIL',

 '/usr/lib/python2.7/dist-packages/gtk-2.0',

 '/usr/lib/pymodules/python2.7']

 

I even copied the local_settings.py somewhere Python should see it:

cp /usr/local/src/openstack-horizon-e7d7643/openstack-dashboard/local/local_settings.py /usr/local/lib/python2.7/local/local_settings.py

 

But I still cannot import it:

>>> import local.local_settings

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

ImportError: No module named local.local_settings

 

 

 

________________________________

From: openstack-bounces+george.mihaiescu=q9.com@xxxxxxxxxxxxxxxxxxx [mailto:openstack-bounces+george.mihaiescu=q9.com@xxxxxxxxxxxxxxxxxxx] On Behalf Of Eric Dodemont
Sent: Saturday, January 28, 2012 5:05 AM
To: openstack@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Openstack] dashboard in oneric

 

I have installed OpenStack Diablo (version 2011.3.1 released January 20, 2012) on Linux Ubuntu Oneiric (11.10), including a working version of the essex-dev dashboard (Horizon).
 
By installing the development version of the dashboard, you can manage almost everything, including:
 
- In the project panel: instances, volumes, floating IPs, security groups, images, and instance snapshots.
- In the admin panel: instances, services, flavors, images, tenants (projects), users, and quotas.
 
In both panels, you also have status and usage information.

Versions and installation methods:
 
* Version 2011.3.1 (stable/diablo) for:
 
- Nova (ppa/deb packages)
- Glance (ppa/deb packages)
- Keystone (ppa/deb packages)
 
* Version 2012.1-dev (dev/essex) for:
 
- Dashboard (git/source package)

You can find the detailed procedure to install Nova/Glance/Keystone/Horizon on Ubuntu Oneiric here:

Install Your Own OpenStack Cloud - Diablo Version 2011.3.1 with Keystone and Horizon
http://dodeeric.wordpress.com/2012/01/24/install-your-own-openstack-cloud-diablo-edition-2011-3-1-with-keystone-and-horizon

Bellow the part concerning the installation of the dashboard:

Install the dashboard:
 
Get the dashboard source from Github, version essex-2-46-g580ecc2 (dev/essex):

# cd /usr/local/
# wget https://github.com/openstack/horizon/tarball/580ecc20bc04fdb74e1a8416feddcc84de745cd6
# mv 580ecc20bc04fdb74e1a8416feddcc84de745cd6 horizon-e2-46-g580ecc2.tar.gz
# tar -xzvf horizon-e2-46-g580ecc2.tar.gz
# mv openstack-horizon-580ecc2 horizon-e2-46-g580ecc2 

Install some required packages:

# aptitude install python-django python-setuptools python-dev 

Adapt the configuration file:

# cd /usr/local/horizon-e2-46-g580ecc2/openstack-dashboard/local/
# cp local_settings.py.example local_settings.py
# vi local_settings.py 

And adapt two parameters as follow:

OPENSTACK_HOST = "node1"
QUANTUM_ENABLED = False 

Install a Python virtual environment:

# cd /usr/local/horizon-e2-46-g580ecc2/openstack-dashboard/tools/
# easy_install virtualenv 

Install the dashboard in the virtual environment (that will take some time):

# python install_venv.py 

The install should finish with the following messages (if not, start the install again):

Installing horizon module in development mode...
OpenStack Dashboard development environment setup is complete.
To activate the virtualenv for the extent of your current shell session you can run:
$ source .dashboard-venv/bin/activate 

Activate the virtual environment:

# cd /usr/local/horizon-e2-46-g580ecc2/openstack-dashboard/.dashboard-venv/bin/
# source activate 

Create the SQLite DB with its tables:

# cd /usr/local/horizon-e2-46-g580ecc2/openstack-dashboard/dashboard/
# ./manage.py syncdb 

You will see the following messages:

Creating tables ...
Creating table django_session
Installing custom SQL ...
Installing indexes ...
No fixtures found. 

Install Openstackx diablo (extention for nova-api diablo):

# cd /usr/local/
# wget https://github.com/cloudbuilders/openstackx/tarball/rcb_v1.1
# mv rcb_v1.1 openstackx-diablo.tar.gz
# tar -xzvf openstackx-diablo.tar.gz
# mv cloudbuilders-openstackx-53fd616 openstackx-diablo 

Adapt the nova.conf file as follow:

# vi /etc/nova/nova.conf 

And add the following parameter:

--osapi_extensions_path=/usr/local/openstackx-diablo/extensions 

Launch the Dashboard on port tcp/8000:

# cd /usr/local/horizon-e2-46-g580ecc2/openstack-dashboard/dashboard/
# ./manage.py runserver 0.0.0.0:8000 

You will see the following messages:

Django version 1.3.1, using settings 'dashboard.settings'
Development server is running at http://0.0.0.0:8000/
Quit the server with CONTROL-C. 
You can now access the Dashboard with a web browser at the address: http://localhost:8000 or http://node1:8000 or http://192.168.1.201:8000
 
To be able to connect on the console of the instances via VNC, you need to install the nova-vncproxy package and the noVNC software (it is a slightly modified version of noVNC which can work with the nova-vnc-proxy).
 
Install nova-vncproxy:

# aptitude install nova-vncproxy 

nova-vncproxy will not start automatically: it gives the following error:
INFO nova.wsgi [-] Starting TCP server /usr/bin/nova-vncproxy on 0.0.0.0:843
CRITICAL nova [-] [Errno 13] Permission denied 
Start it manually in a screen with root:

# nova-vncproxy 

Install noVNC:

# cd /var/lib/nova/
# git clone https://github.com/openstack/noVNC.git 

Adapt the nova.conf file as follow:

# vi /etc/nova/nova.conf 

And add this parameter:

--vncproxy_url=http://node1:6080 


On 24/01/2012 00:17, Debo Dutta (dedutta) wrote: 

FWIW I ran the old devstack and it worked (with horizon). Out of the box except for some UI issues (horizon!) and with quantum

 

debo

 

From: openstack-bounces+dedutta=cisco.com@xxxxxxxxxxxxxxxxxxx [mailto:openstack-bounces+dedutta=cisco.com@xxxxxxxxxxxxxxxxxxx] On Behalf Of Denmat
Sent: Monday, January 23, 2012 2:25 PM
Cc: openstack
Subject: Re: [Openstack] dashboard in oneric

 

FWIW, I got horizon/keystone from devstack working on a separate host to my Ubuntu ppa openstack host.  Couldn't get them on the one host due to python libs getting installed to different locations.

 

Den


On 24/01/2012, at 9:00, Joshua Harlow <harlowja@xxxxxxxxxxxxx> wrote:

	You should be able to use the newer devstack v2 to get horizon up and running.
	
	I haven't tested it to well but I think it will do it.
	
	https://github.com/yahoo/Openstack-Devstack2
	
	./stack -c horizon -a install -d $HOME/youropenstackplace (will install all of horizons dependencies also)
	
	./stack -c horizon -a start -d $HOME/youropenstackplace (should start horizon + dependencies, haven't messed around with this yet, might need a little work)
	
	-Josh
	
	On 1/23/12 12:37 PM, "Paras pradhan" <pradhanparas@xxxxxxxxx> wrote:

	I have seen folks at openstack IRC who could get it working but all
	packages from github. I have tried several options and the problem is
	related with openstackx. I run diablo from ubuntu repo and its working
	fine. Somebody told me that the dashboard / keystone at ubuntu is
	broken . I could run dashboard and keystone that I checkout from
	horizon. I could login in with errors but looks its really impossible
	to fix (at least to me) the openstackx issue.
	
	
	If anyone has working dashboard with diablo from Oneric please share
	how they handle the issues with openstackx
	Paras
	
	
	On Mon, Jan 23, 2012 at 1:25 PM, Vishvananda Ishaya
	<vishvananda@xxxxxxxxx> wrote:
	> Dashboard requires keystone, so I don't know if this is possible without a
	> lot of hacking.
	>
	> Vish
	>
	> On Jan 23, 2012, at 10:56 AM, Jorge Luiz Correa wrote:
	>
	> Well, I tried to install from Ubuntu (Oneiric) repos but just could get it
	> working without keystone. So, in this case, I couldn't use horizon (requires
	> keystone).
	>
	> Trying to use the dashboard from repos, it didn't work.
	>
	> Currently, I'm running Diablo from ubuntu repos without dashboard, just
	> command line tools to manage the cloud (euca2ools).
	>
	> Regards.
	>
	> On Mon, Jan 23, 2012 at 4:26 PM, Paras pradhan <pradhanparas@xxxxxxxxx>
	> wrote:
	>>
	>> Has anyone recently able to run dashboard/horizon in Ubuntu Oneric. If
	>> yes which one should I use? dashboard from ubuntu or horizon src from
	>> github?
	>>
	>> Thanks
	>> Paras.
	>>
	>> _______________________________________________
	>> Mailing list: https://launchpad.net/~openstack <https://launchpad.net/%7Eopenstack> 
	>> Post to     : openstack@xxxxxxxxxxxxxxxxxxx
	>> Unsubscribe : https://launchpad.net/~openstack <https://launchpad.net/%7Eopenstack> 
	>> More help   : https://help.launchpad.net/ListHelp
	>
	>
	>
	>
	> --
	> - MSc. Correa, J.L.
	>
	> _______________________________________________
	> Mailing list: https://launchpad.net/~openstack <https://launchpad.net/%7Eopenstack> 
	> Post to     : openstack@xxxxxxxxxxxxxxxxxxx
	> Unsubscribe : https://launchpad.net/~openstack <https://launchpad.net/%7Eopenstack> 
	> More help   : https://help.launchpad.net/ListHelp
	>
	>
	>
	> _______________________________________________
	> Mailing list: https://launchpad.net/~openstack <https://launchpad.net/%7Eopenstack> 
	> Post to     : openstack@xxxxxxxxxxxxxxxxxxx
	> Unsubscribe : https://launchpad.net/~openstack <https://launchpad.net/%7Eopenstack> 
	> More help   : https://help.launchpad.net/ListHelp
	>
	
	_______________________________________________
	Mailing list: https://launchpad.net/~openstack <https://launchpad.net/%7Eopenstack> 
	Post to     : openstack@xxxxxxxxxxxxxxxxxxx
	Unsubscribe : https://launchpad.net/~openstack <https://launchpad.net/%7Eopenstack> 
	More help   : https://help.launchpad.net/ListHelp

	_______________________________________________
	Mailing list: https://launchpad.net/~openstack <https://launchpad.net/%7Eopenstack> 
	Post to     : openstack@xxxxxxxxxxxxxxxxxxx
	Unsubscribe : https://launchpad.net/~openstack <https://launchpad.net/%7Eopenstack> 
	More help   : https://help.launchpad.net/ListHelp





_______________________________________________
Mailing list: https://launchpad.net/~openstack <https://launchpad.net/%7Eopenstack> 
Post to     : openstack@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~openstack <https://launchpad.net/%7Eopenstack> 
More help   : https://help.launchpad.net/ListHelp

 

 


Follow ups