#Under the database section
[DATABASE]
sql_connection =mysql://quantum:quantum@10.10.10.51/quantum
#Under the OVS section
[OVS]
tenant_network_type = gre
tunnel_id_ranges = 1:1000
enable_tunneling = True
#Firewall driver for realizing quantumsecurity group function
[SECURITYGROUP]
firewall_driver =quantum.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
编辑/etc/quantum/api-paste.ini
[filter:authtoken]
paste.filter_factory =keystoneclient.middleware.auth_token:filter_factory
auth_host = 10.10.10.51
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = quantum
admin_password = 123456
更新 /etc/quantum/quantum.conf:
[keystone_authtoken]
auth_host = 10.10.10.51
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = quantum
admin_password = 123456
signing_dir =/var/lib/quantum/keystone-signing
重启quantum 服务
service quantum-server restart
2.9. Nova
安装nova相关软件包
apt-get install -y nova-api nova-cert novncnova-consoleauth nova-scheduler nova-novncproxy nova-doc nova-conductor
修改 /etc/nova/api-paste.ini
[filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
auth_host = 10.10.10.51
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = nova
admin_password = 123456
signing_dirname =/tmp/keystone-signing-nova
# Workaround for https://bugs.launchpad.net/nova/+bug/1154809
auth_version = v2.0
修改/etc/nova/nova.conf
root@control:~# cat /etc/nova/nova.conf
[DEFAULT]
logdir=/var/log/nova
state_path=/var/lib/nova
lock_path=/run/lock/nova
verbose=True
api_paste_config=/etc/nova/api-paste.ini
compute_scheduler_driver=nova.scheduler.simple.SimpleScheduler
rabbit_host=10.10.10.51
nova_url=http://10.10.10.51:8774/v1.1/
sql_connection=mysql://nova:nova@10.10.10.51/nova
root_helper=sudo nova-rootwrap/etc/nova/rootwrap.conf
# Auth
use_deprecated_auth=false
auth_strategy=keystone
# Imaging service
glance_api_servers=10.10.10.51:9292
image_service=nova.image.glance.GlanceImageService
# Vnc configuration
novnc_enabled=true
novncproxy_base_url=http://172.16.10.200:6080/vnc_auto.html
novncproxy_port=6080
vncserver_proxyclient_address=10.10.10.51
vncserver_listen=0.0.0.0
# Network settings
network_api_class=nova.network.quantumv2.api.API
quantum_url=http://10.10.10.51:9696
quantum_auth_strategy=keystone
quantum_admin_tenant_name=service
quantum_admin_username=quantum
quantum_admin_password=123456
quantum_admin_auth_url=http://10.10.10.51:35357/v2.0
libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDriver
linuxnet_interface_driver=nova.network.linux_net.LinuxOVSInterfaceDriver
#If you want Quantum + Nova Security groups
firewall_driver=nova.virt.firewall.NoopFirewallDriver
security_group_api=quantum
#If you want Nova Security groups only,comment the two lines above and uncomment line -1-.
#-1-firewall_driver=nova.virt.libvirt.firewall.IptablesFirewallDriver
#Metadata
service_quantum_metadata_proxy = True
quantum_metadata_proxy_shared_secret =helloOpenStack
# Compute #
compute_driver=libvirt.LibvirtDriver
# Cinder #
volume_api_class=nova.volume.cinder.API
volume_driver=nova.volume.driver.ISCSIDriver
enabled_apis=ec2,osapi_compute,metadata
osapi_volume_listen_port=5900
volume_group = cinder-volumes
volume_name_template = volume-%s
iscsi_helper=tgtadm
#add or volum can not attach
iscsi_ip_address=10.10.10.51
初始化nova数据库
nova-manage db sync
重启nova相关服务
cd /etc/init.d/; for i in $( ls nova-* );do sudo service $i restart; done
检查nova相关服务启动情况
root@control:~# nova-manage service list
Binary Host Zone Status State Updated_At
nova-cert control internal enabled :-) 2013-10-28 09:56:13
nova-conductor control internal enabled :-) 2013-10-28 09:56:11
nova-consoleauth control internal enabled :-) 2013-10-28 09:56:11
nova-scheduler control internal enabled :-) 2013-10-28 09:56:13
nova-console control internal enabled :-) 2013-10-28 09:56:11
2.10. Cinder
安装cinder相关软件包
apt-get install -y cinder-apicinder-scheduler cinder-volume iscsitarget open-iscsi iscsitarget-dkms
配置iscsi服务
sed -i 's/false/true/g'/etc/default/iscsitarget
重启服务
service iscsitarget start
service open-iscsi start
配置/etc/cinder/api-paste.ini
[filter:authtoken]
paste.filter_factory =keystoneclient.middleware.auth_token:filter_factory
service_protocol = http
service_host = 10.10.10.51
service_port = 5000
auth_host = 10.10.10.51
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = cinder
admin_password = 123456
signing_dir = /var/lib/cinder
编辑/etc/cinder/cinder.conf
root@control:~# cat /etc/cinder/cinder.conf
[DEFAULT]
rootwrap_config = /etc/cinder/rootwrap.conf
api_paste_confg = /etc/cinder/api-paste.ini
#iscsi_helper = ietadm我这里使用的是默认的tgt服务
iscis_helper = tgtadm
volume_name_template = volume-%s
volume_group = cinder-volumes
verbose = True
auth_strategy = keystone
state_path = /var/lib/cinder
lock_path = /var/lock/cinder
volumes_dir = /var/lib/cinder/volumes
sql_connection =mysql://cinder:cinder@10.10.10.51/cinder
#RPC
rabbit_host = 10.10.10.51
rabbit_password = guest
issci_ip_prefix = 10.10.10
rpc_backend = cinder.openstack.common.rpc.impl_kombu
iscsi_ip_address = 10.10.10.51
#API
osapi_volume_extension =cinder.api.contrib.standard_extensions
初始化cinder数据库
cinder-manage db sync
创建卷组名字叫 cinder-volumes,虚拟机默认添加了2块硬盘
#pvcreate /dev/sdb
#vgcreate cinder-volumes /dev/sdb
重启cinder服务
cd /etc/init.d/; for i in $( ls cinder-* );do sudo service $i restart; done
确认cinder服务都在运行
cd /etc/init.d/; for i in $( ls cinder-* );do sudo service $i status; done
2.11. Horizon
安装horizon
apt-get install -y openstack-dashboardmemcached
如有必要可以删除Ubuntu主题
dpkg --purgeopenstack-dashboard-ubuntu-theme
重启Apache和memcached
service apache2 restart; service memcachedrestart
登陆OpenStack Dashboard
登陆用户名密码分别是admin,123456