Installing OpenStack on Debian Wheezy single node

Installing OpenStack on Debian Wheezy single node

Installing OpenStack on Debian Wheezy single node

 

In this article i will describe step by step how to do Installing OpenStack on Debian Wheezy single node
 

 

The First thing you need to do is adding the necessary repositories to your /etc/apt/sources.list

deb http://cdn.debian.net/debian/ wheezy main contrib non-free
deb-src http://cdn.debian.net/debian/ wheezy main contrib non-free
deb http://cdn.debian.net/debian/ sid main contrib non-free
deb-src http://cdn.debian.net/debian/ sid main contrib non-free

deb http://security.debian.org/ wheezy/updates main contrib non-free
deb-src http://security.debian.org/ wheezy/updates main contrib non-free

deb http://cdn.debian.net/debian/ squeeze-updates main contrib non-free
deb-src http://cdn.debian.net/debian/ squeeze-updates main main contrib non-free

Then upgrade your repositories by running:

apt-get update && apt-get upgrade -y

After this install the needed packages from new added repositories:

apt-get install mysql-server rabbitmq-server
apt-get install memcached keystone python-keystone python-keystoneclient euca2ools
apt-get install nova-api nova-api-metadata nova-cert nova-common nova-compute nova-compute-kvm nova-console nova-network nova-objectstore nova-scheduler nova-volume nova-xvpvncproxy glance glance-api glance-common glance-registry python-glance
apt-get install python-nova python-novaclient openstack-dashboard openstack-dashboard-apache python-openstack-common
apt-get install iscsitarget iscsitarget-dkms

enable iscsi by editing /etc/default/iscsitarget value:

ISCSITARGET_ENABLE=true

and create a lvm volume for your nova instances with right path of your empty second disk/partition:

pvcreate /dev/sdb
vgcreate nova-volumes /dev/sdb

in mysql config /etc/mysql/my.cnf edit your address binding value to:

bind-address = 127.0.0.1

configure your network interfaces in /etc/network/interfaces:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 5.0.0.2
netmask 255.255.255.255
gateway 5.0.0.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 8.8.8.8 8.8.4.4
dns-search bcnx.de

allow-hotplug eth1
iface eth1 inet manual
up ifconfig $IFACE 0.0.0.0 up
up ifconfig $IFACE promisc
down ifconfig $IFACE down

Safe your /etc/nova/nova.conf and replace it with following:

[DEFAULT]
logdir=/var/log/nova
state_path=/var/lib/nova
lock_path=/var/lock/nova
root_helper=sudo nova-rootwrap
dhcpbridge_flagfile=/etc/nova/nova.conf
dhcpbridge=/usr/bin/nova-dhcpbridge
dhcp-hostsfile=/var/lib/nova/networks/nova-br100.conf
api_paste_config=/etc/nova/api-paste.ini
multi_host=false
auth_strategy=keystone
service_down_time=60
sql_connection=mysql://nova:yourMYSQLpassword@localhost/nova
iscsi_helper=ietadm
iscsi_ip_address=172.16.100.1
iscsi_ip_prefix=172.16.100.1
volume_group=nova-volumes
allow_admin_api=true
use_deprecated_auth=false
scheduler_driver=nova.scheduler.simple.SimpleScheduler
rabbit_host=localhost
rabbit_port=5672
rabbit_virtual_host=/
rabbit_userid=openstack_rabbit_user
rabbit_password=replaceWithKeyFromSavedConfig
s3_host=127.0.0.1
ec2_host=127.0.0.1
cc_host=127.0.0.1
# Dmz & metadata things
dmz_cidr=169.254.169.254/32
ec2_dmz_host=169.254.169.254
metadata_host=169.254.169.254
nova_url=http://127.0.0.1:8774/v1.1/
glance_api_servers=127.0.0.1:9292
image_service=nova.image.glance.GlanceImageService
ec2_url=http://127.0.0.1:8773/services/Cloud
keystone_ec2_url=http://127.0.0.1:5000/v2.0/ec2tokens
connection_type=libvirt
libvirt_type=kvm
libvirt_use_virtio_for_bridges=true
start_guests_on_host_boot=true
#resume_guests_state_on_host_boot=true
# vnc specific configuration
novnc_enabled=true
novncproxy_base_url=http://5.0.0.2:6080/vnc_auto.html
vncserver_proxyclient_address=127.0.0.1
vncserver_listen=127.0.0.1
# network specific settings
network_manager=nova.network.manager.FlatDHCPManager
public_interface=eth0
flat_interface=eth1
flat_network_bridge=br100
fixed_range=172.16.100.0/24
floating_range=5.0.0.0/24
network_size=256
listen-address=172.16.100.1
flat_network_dhcp_start=172.16.100.2
flat_injected=false
force_dhcp_release=true
# one week lease time
dhcp_lease_time=604800
# two week disassociate timeout
fixed_ip_disassociate_timeout=1209600
use_ipv6=false allow_same_net_traffic=true
#dns_server=8.8.4.4
remove_unused_base_images=true
use_usb_tablet=false
max_cores=128
cpu_allocation_ratio=16.0
quota_cores=128
quota_instances=500
quota_floating_ips=1000
quota_metadata_items=300
quota_security_group_rules=200
quota_security_groups=200
quota_volumes=100
skip_isolated_core_check=true
service_down_time=60
verbose=false
superuser_roles=admin

add your fixed network to database:

nova-manage network create private --fixed_range_v4=172.16.100.0/24 --network_size=256

and then your public ip range:

nova-manage floating create --ip_range=5.0.0.0/24

to use the nova api command line add this to your .bashrc in your home directory:

export OS_TENANT_NAME=openstack
export OS_USERNAME=admin
export OS_PASSWORD=REPLACEwithyourPASSWORD
export OS_AUTH_URL="http://127.0.0.1:5000/v2.0/"
export OS_AUTH_STRATEGY=keystone
export SERVICE_TOKEN=REPLACEwithyourADMINtoken
export SERVICE_ENDPOINT=http://127.0.0.1:35357/v2.0/
export S3_URL="http://127.0.0.1:3333"

and restart your system/services.
after this check if your openstack services running properly:

nova-manage service list

Finally you need to create your tenants, user, roles and endpoints.
I am not going to refer to it in this post.
Create the service users like described here: Configuring Service
or here: Identity management

Rating: 5.0/5. From 1 vote.
Please wait...
Anonymous

Jules

Jules is the owner and author of ISPIRE.ME. He's a Linux System Engineer, Tech fanatic and an Open Source fan.

You may also like...

2 Responses

  1. yy_y_ja_jp yy_y_ja_jp says:

    Adding
    deb http://cdn.debian.net/debian/ sid main contrib non-free
    and running
    apt-get update && apt-get upgrade -y
    will make the installation sid, not wheezy.
    Probably you don’t need this because all the packages you want (listed in the commands ‘apt-get install …’) are available in wheezy.

    No votes yet.
    Please wait...
    • Jules Jules says:

      Hi,

      the reason why i’m doing this is because the wheezy release has some nasty bugs on openstack dashboard.
      the latest SID branches solved these bugs. surely you can took out the wheezy repo url but thus will break your apt cache if you have previously installed wheezy builds/packages.

      Greets
      Jules

      No votes yet.
      Please wait...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Translate »