Running horizon/dashboard from git

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Below are some steps to get openstack horizon (aka dashboard) kinda running.
I'm still having issues with talking to nova, hopefully its just a small
config problem.

Assumes we are starting from a setup similar to
http://fedoraproject.org/wiki/Getting_started_with_OpenStack_Nova

# Not sure if it's required, but this is how I was running
sudo setenforce 0
sudo service iptables stop

# First we need to set up keystone, since horizon requires it.
sudo yum install -y openstack-keystone
# Clear any previous keystone config
sudo rm /var/lib/keystone/keystone.sqlite
sudo systemctl start openstack-keystone.service

# These steps are derived from
# http://keystone.openstack.org/configuringservices.html
# Assumes that openstack, keystone, and dashboard are all on localhost

sudo keystone-manage service add nova compute "Nova Compute Service"
sudo keystone-manage service add glance image "Glance Image Service"
sudo keystone-manage service add keystone identity "Keystone Identity Service"

sudo keystone-manage endpointTemplates add RegionOne nova \
http://localhost:8774/v1.1/ \
http://localhost:8774/v1.1/ \
http://localhost:8774/v1.1/ \
1 1

sudo keystone-manage endpointTemplates add RegionOne glance \
http://localhost:9292/v1.1/ \
http://localhost:9292/v1.1/ \
http://localhost:9292/v1.1/ \
1 1

sudo keystone-manage endpointTemplates add RegionOne keystone \
http://localhost:5000/v2.0 \
http://localhost:35357/v2.0 \
http://localhost:5000/v2.0 \
1 1

sudo keystone-manage user add admin admin
sudo keystone-manage user add demo demo

sudo keystone-manage tenant add admin
sudo keystone-manage tenant add demo

sudo keystone-manage role add Admin
sudo keystone-manage role grant Admin admin admin
sudo keystone-manage token add 999888777666 admin admin 2015-02-05T00:00

sudo keystone-manage role add Member
sudo keystone-manage role grant Member demo demo
sudo keystone-manage role grant Admin admin demo

sudo keystone-manage endpoint add demo nova
sudo keystone-manage endpoint add demo glance
sudo keystone-manage endpoint add demo identity

sudo keystone-manage endpoint add admin nova
sudo keystone-manage endpoint add admin glance
sudo keystone-manage endpoint add admin identity


# Checkout horizon (aka dashboard)
git clone git://github.com/openstack/horizon.git horizon.git
cd horizon.git
git branch --track diablo remotes/origin/stable/diablo
git checkout diablo

# Now we set up a local environment with all the required dashboard
# dependencies, without polluting our system configuration. dashboard
# supplies tools for this but some tweaks are needed.
sudo yum install -y bzr python-coverage
cd openstack-dashboard
edit tools/pip-requires, comment out the quantum git URL
    (reason: https://bugs.launchpad.net/horizon/+bug/888385)
python tools/install_venv.py

# Manually install quantum into the virtual environment
git clone https://github.com/openstack/quantum.git quantum.git
cd quantum.git/common
../../tools/with_venv.sh python setup.py install
cd ../client
../../tools/with_venv.sh python setup.py install
cd ../..

# Run unit tests. Currently looks like 2 tests are failing with a glance
# import issue: 'module' object has no attribute 'Error'
./run_tests.sh

# No unexpected failures, great! Let's configure the dashboard
cd openstack-dashboard

# needed by glance imports but wasn't installed automatically
./tools/with_venv.sh pip --verbose install --environment .dashboard-venv/ pycrypto

# Actually run the dashboard
./tools/with_venv.sh python dashboard/manage.py runserver syncdb
./tools/with_venv.sh python dashboard/manage.py runserver 127.0.0.1:9000
firefox 127.0.0.1:9000
# should see a login page, accounts are demo:demo or admin:admin
log in with admin:admin, it should work!

# If openstack-nova-api isn't running, you will see and error like:
Unable to get usage info: [Errno 111] Connection refused

# If nova-api is running, on log in there will be an error like:
Unable to get usage info: This error may be caused by a misconfigured nova url
in keystone's service catalog, or by missing openstackx extensions in nova.
See the dashboard README.

# Not required, but easy to setup the django debugging toolbar
./tools/with_venv.sh pip --verbose install --environment .dashboard-venv/
django-debug-toolbar

add the following to local/local_settings.py
INTERNAL_IPS = ('127.0.0.1',)
DEBUG_TOOLBAR_CONFIG = {
    "INTERCEPT_REDIRECTS" : False,
}

# Configure nova to use openstackx admin extension
# According to README at:
https://github.com/openstack/horizon/blob/stable/diablo/openstack-dashboard/README
git clone git://github.com/cloudbuilders/openstackx.git /tmp/openstackx
cd /tmp/openstackx
git branch --track diablo remotes/origin/diablo
git checkout diablo
Set --osapi_extensions_path=/tmp/openstackx/extensions in /etc/nova/nova.conf
sudo systemctl restart openstack-nova-api.service
restart dashboard, login

# Hmm, didn't change anything? Let's try and configure nova to use
# keystone according to instructions at
#
http://keystone.openstack.org/configuringservices.html#setting-up-openstack-users
git clone git://github.com/openstack/keystone.git /tmp/keystone
Add --api_paste_config=/tmp/keystone/examples/paste/nova-api-paste.ini to
/etc/nova/nova.conf
sudo systemctl restart openstack-nova-api.service
restart dashboard, login

# Something changed... error is now:
Unable to get usage info: 401 Unauthorized This server could not verify that
you are authorized to access the document you requested. Either you supplied
the wrong credentials (e.g., bad password), or your browser does not
understand how to supply the credentials required.


And that's all I've got for now. The error messages don't prevent poking
at some of the UI, but nothing useful like instances are listed.
I'd like to find some simple way to test that nova and keystone are
working together, so if anyone has ideas that would be appreciated.

Thanks,
Cole
_______________________________________________
cloud mailing list
cloud@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/cloud



[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Big List of Linux Books]     [Yosemite News]     [Linux Apps]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]

  Powered by Linux