Google
  Web www.spinics.net

Running horizon/dashboard from git (round 2)

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


So I got horizon working from git last week. Here's steps if anyone wants to
give it a spin. This uses nova, glance, and keystone from get, so a
prerequisite here is that no packaged versions are already running.

I'm not sure if running all this from git is a requirement or not, but since
horizon won't likely ever be packaged for f16 I figured I'd try and use the
code that is closest to what horizon will eventually be packaged against.

(and now that I try and reproduce the steps, I'm actually getting some horizon
errors. Seems to be causde by some change in nova in the past week, see end of
the mail for details.)

Again, as a precursor, set selinux to permissive and disable the firewall :)

# Get keystone from git and run it
git clone git://github.com/openstack/keystone.git
cd keystone
python tools/install_venv.py
(optionally enable 'debug' and 'verbose' in ./etc/keystone.conf)

# Set up keystone configuration (doesn't require daemon running)
sudo bin/keystone-manage database sync

# Tenants
sudo bin/keystone-manage tenant add admin
sudo bin/keystone-manage tenant add demo

# Users
sudo bin/keystone-manage user add admin admin
sudo bin/keystone-manage user add demo admin

# Roles
sudo bin/keystone-manage role add Admin
sudo bin/keystone-manage role add Member
sudo bin/keystone-manage role grant Admin admin admin
sudo bin/keystone-manage role grant Member demo demo
sudo bin/keystone-manage role grant Admin admin demo
sudo bin/keystone-manage role grant Admin admin

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

# endpointTemplates
sudo bin/keystone-manage endpointTemplates add RegionOne \
    nova \
    http://127.0.0.1:8774/v1.1/%tenant_id% \
    http://127.0.0.1:8774/v1.1/%tenant_id% \
    http://127.0.0.1:8774/v1.1/%tenant_id% \
    1 1
sudo bin/keystone-manage endpointTemplates add RegionOne \
    glance \
    http://127.0.0.1:9292/v1 \
    http://127.0.0.1:9292/v1 \
    http://127.0.0.1:9292/v1 \
    1 1
sudo bin/keystone-manage endpointTemplates add RegionOne \
    keystone \
    http://127.0.0.1:5000/v2.0 \
    http://127.0.0.1:35357/v2.0 \
    http://127.0.0.1:5000/v2.0 \
    1 1

# Tokens
sudo bin/keystone-manage token add 999888777666 admin admin 2015-02-05T00:00

# Run the daemon
sudo ./tools/with_venv.sh bin/keystone --config-file etc/keystone.conf


# Now let's do glance
git clone git://github.com/openstack/glance.git
cd glance
python tools/install_venv.py
enable the line after 'NOTE: use the following pipeline for keystone'

# Run glance
sudo ./tools/with_venv.sh bin/glance-api --config-file etc/glance-api.conf
sudo ./tools/with_venv.sh bin/glance-registry --config-file
etc/glance-registry.conf


# Clone devstack, we are going to need some files from here
git clone git://github.com/cloudbuilders/devstack.git

# Run nova from git
git clone git://github.com/openstack/nova.git
cd nova
python tools/install_venv.py

# Set up nova keystone integration
cp etc/nova/api-paste.ini .
cat ../devstack/files/nova-api-paste.ini >> api-paste.ini
sed -i -e "s/%SERVICE_TOKEN%/999888777666/" api-paste.ini

# Have nova use openstackx admin API plugin, required for a lot of
# horizon functionality
git clone git://github.com/cloudbuilders/openstackx.git
ln -s openstackx/extensions extensions

# This will be where our nova instance stores state
mkdir -p /tmp/nova-local/instances

# Make a local nova.conf with required changes. Drop it in the top level
# 'nova' dir and the daemons will use it automatically. This is basically
# the f16 nova.conf with the state directories change to /tmp/nova-local
# and some added bits to use the openstackx extension

$ cat nova.conf
--logdir=/tmp/nova-local
--state_path=/tmp/nova-local
--lock_path=/tmp/nova-local
--dhcpbridge=/usr/bin/nova-dhcpbridge
--dhcpbridge_flagfile=nova.conf
--injected_network_template=/usr/share/nova/interfaces.template
--libvirt_xml_template=/usr/share/nova/libvirt.xml.template
--vpn_client_template=/usr/share/nova/client.ovpn.template
--credentials_template=/usr/share/nova/novarc.template
--network_manager=nova.network.manager.FlatDHCPManager
--iscsi_helper=tgtadm
--api_paste_config=api-paste.ini
--osapi_extension=nova.api.openstack.v2.contrib.standard_extensions
--osapi_extension=extensions.admin.Admin

# Set up the nova db
sudo ./tools/with_venv.sh bin/nova-manage db sync

# Run all the nova services (requires many different terminal tabs :) )
sudo ./tools/with_venv.sh bin/nova-api
sudo ./tools/with_venv.sh bin/nova-network
sudo ./tools/with_venv.sh bin/nova-objectstore
sudo ./tools/with_venv.sh bin/nova-compute
sudo ./tools/with_venv.sh bin/nova-scheduler
sudo ./tools/with_venv.sh bin/nova-volume

# At this point, go through the openstack F16 quickstart to setup a VM for
# this nova instance

# Finally lets try horizon
git clone git://github.com/openstack/horizon.git
cd horizon
python ./tools/install_venv.py
cp openstack-dashboard/local/local_settings.py.example
openstack-dashboard/local/local_settings.py
set QUANTUM_ENABLED=False in openstack-dashboard/local/local_settings.py
./tools/with_venv.sh python openstack-dashboard/manage.py runserver:9000

firefox localhost:9000
login with admin:admin

And that should work! ... Or at least it did, as of nova commit
8b79dae67ca2686780d3e3b5863d0578264e92a5 on Jan 4. However with current up to
date nova I'm getting errors like:

Error: Unable to get usage info: Malformed request url

in horizon. There is a recent nova bug filed with a similar error but I'm not
sure if it's the issue I'm currently hitting:

https://bugs.launchpad.net/nova/+bug/915151

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



[Older Fedora Users Mail]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Maintainers]     [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]     [Fedora Triage]     [Deep Creek Hot Springs]     [Coolkey]     [Yum Users]     [Tux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [Linux Apps]     [KDE Users]     [Fedora Tools]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]

Powered by Linux

Google
  Web www.spinics.net