为OpenStack添加计算节点:
------------------------
计算节点需要安装的软件
------------------------
1.NTP服务器
安装:apt-get –y install ntp
配置:/etc/ntp.conf中写入server 10.21.3.83(主同步节点的ip)
重启:/etc/init.d/ntp restart
2.安装KVM和libvirt
安装:apt-get install -y kvm libvirt-bin pm-utils
配置:
编辑 /etc/libvirt/qemu.conf ,添加下面内容
cgroup_device_acl = [ "/dev/null", "/dev/full", "/dev/zero", "/dev/random", "/dev/urandom", "/dev/ptmx", "/dev/kvm", "/dev/kqemu", "/dev/rtc", "/dev/hpet","/dev/net/tun", ]
允许迁移,编辑 /etc/libvirt/libvirtd.conf, 去掉这三行的注释
listen_tls = 0 listen_tcp = 1 auth_tcp = "none"
编辑 /etc/init/libvirt-bin.conf
env libvirtd_opts="-d -l"
编辑 /etc/default/libvirt-bin
libvirtd_opts="-d -l"
重启:service libvirt-bin restart
3.安装Openvswitch
-------------------------------------------------------------------------
安装Nova-compute和quantum-openvswitch-agent
-------------------------------------------------------------------------
直接从10.21.3.83中拷出nova,quantum的源代码,安装setup.py(貌似不需要client)
启动:nova-compute --config-file=/etc/nova/nova.conf
quantum-openvswitch-agent --config-file=/etc/quantum/ovs_quantum_plugin.ini
启动完成后,能在nova-manage service list里看到新加的计算节点
------------
debug
------------
1.安装nova以及quantum需要提前安装 build-essential, python-dev(缺少,则会报错),python-pyparsing(缺少,会报:SyntaxError: invalid syntax错误)
2.错误:Connection reset by peer-----解决:安装 python-cmd2
3.错误:No module named libvirt--------解决:安装 python-libvirt
4.错误:No module named mysql--------解决:安装python-mysqldb
5.错误:ImportERR: cannot import name sqlsoup-----解决:使用sqlalchemy0.7.9版本
修改原:sqlalchemy.ext import sqlsoup-----新:sqlalchemy.ext.sqlsoup import SqlSoup
--------------
参考资料
--------------
陈沙克日志:http://www.chenshake.com/openstack-folsom-install-guide-vlan-mode/