编辑 /etc/sysconfig/iptables 文件,将filter 中添加防火墙规则全部删掉。
• 重新启动防火墙 /etc/init.d/iptables restart
将epel-depends.repo icehouse.repo rabbitmq.repo rhel65.repo文件,拷贝到/etc/yum.repos.d/目录
导入KEY
rpm --import http://172.16.21.233/epel-depends/RPM-GPG-KEY-EPEL-6
rpm --import http://172.16.21.233/rhel65/RPM-GPG-KEY-redhat-release
rpm --import http://172.16.21.233/rabbitmq/rabbitmq-signing-key-public.asc
rpm --import http://172.16.21.233/rdo-icehouse-b3/RPM-GPG-KEY-RDO-Icehouse
配置OpenVswitch
chkconfig openvswitch on
service openvswitch start
ovs-vsctl add-br br-int (新建一个默认的桥接设备)
• 升级iproute和dnsmasq软件包
yum update -y iproute dnsmasq dnsmasq-utils
• 安装Nova
• 在计算节点上,安装Nova软件包
yum install -y openstack-nova openstack-utils python-kombu python-amqplib openstack-neutron-openvswitch dnsmasq-utils python-stevedore
切换到Controller控制节点,创建Nova数据库
mysql -u root -popenstack
CREATE DATABASE nova;
GRANT ALL ON nova.* TO 'nova'@'%' IDENTIFIED BY 'nova';
GRANT ALL ON nova.* TO 'nova'@'localhost' IDENTIFIED BY 'nova';
FLUSH PRIVILEGES;
在controller控制节点上,在Keystone里面创建compute服务和endpoint
keystone service-create --name compute --type compute --description "OpenStack Compute Service"
keystone endpoint-create --service compute --publicurl "http://172.16.21.232:8774/v2/%(tenant_id)s" --adminurl "http://172.16.21.232:8774/v2/%(tenant_id)s" --internalurl "http://172.16.21.232:8774/v2/%(tenant_id)s" --region beijing
keystone的service表加了一条数据
endpoint表加了3条数据
在compute计算节点上,修改NOVA的配置文件
openstack-config --set /etc/nova/nova.conf database connection mysql://nova:[email protected]/nova;
openstack-config --set /etc/nova/nova.conf DEFAULT rabbit_host 172.16.21.233;
openstack-config --set /etc/nova/nova.conf DEFAULT my_ip 172.16.21.232;
openstack-config --set /etc/nova/nova.conf DEFAULT vncserver_listen 0.0.0.0;
openstack-config --set /etc/nova/nova.conf DEFAULT vnc_enabled True
openstack-config --set /etc/nova/nova.conf DEFAULT vncserver_proxyclient_address 172.16.21.232;
openstack-config --set /etc/nova/nova.conf DEFAULT novncproxy_base_url http://172.16.21.232:6080/vnc_auto.html;
openstack-config --set /etc/nova/nova.conf DEFAULT auth_strategy keystone;
openstack-config --set /etc/nova/nova.conf DEFAULT rpc_backend nova.openstack.common.rpc.impl_kombu;
openstack-config --set /etc/nova/nova.conf DEFAULT glance_host 172.16.21.233;
openstack-config --set /etc/nova/nova.conf DEFAULT api_paste_config /etc/nova/api-paste.ini;
openstack-config --set /etc/nova/nova.conf keystone_authtoken auth_host 172.16.21.233;
openstack-config --set /etc/nova/nova.conf keystone_authtoken auth_port 5000;
openstack-config --set /etc/nova/nova.conf keystone_authtoken auth_protocol http;
openstack-config --set /etc/nova/nova.conf keystone_authtoken auth_version v2.0;
openstack-config --set /etc/nova/nova.conf keystone_authtoken admin_user admin;
openstack-config --set /etc/nova/nova.conf keystone_authtoken admin_tenant_name admin;
openstack-config --set /etc/nova/nova.conf keystone_authtoken admin_password openstack;
openstack-config --set /etc/nova/nova.conf DEFAULT enabled_apis ec2,osapi_compute,metadata;
openstack-config --set /etc/nova/nova.conf DEFAULT firewall_driver nova.virt.firewall.NoopFirewallDriver;
openstack-config --set /etc/nova/nova.conf DEFAULT network_manager nova.network.neutron.manager.NeutronManager;
openstack-config --set /etc/nova/nova.conf DEFAULT service_neutron_metadata_proxy True;
openstack-config --set /etc/nova/nova.conf DEFAULT neutron_metadata_proxy_shared_secret awcloud;
openstack-config --set /etc/nova/nova.conf DEFAULT network_api_class nova.network.neutronv2.api.API;
openstack-config --set /etc/nova/nova.conf DEFAULT neutron_use_dhcp True;
openstack-config --set /etc/nova/nova.conf DEFAULT neutron_url http://172.16.21.231:9696;
openstack-config --set /etc/nova/nova.conf DEFAULT neutron_admin_username admin;
openstack-config --set /etc/nova/nova.conf DEFAULT neutron_admin_password openstack;
openstack-config --set /etc/nova/nova.conf DEFAULT neutron_admin_tenant_name admin;
openstack-config --set /etc/nova/nova.conf DEFAULT neutron_region_name beijing;
openstack-config --set /etc/nova/nova.conf DEFAULT neutron_admin_auth_url http://172.16.21.233:5000/v2.0;
openstack-config --set /etc/nova/nova.conf DEFAULT neutron_auth_strategy keystone;
openstack-config --set /etc/nova/nova.conf DEFAULT security_group_api neutron;
openstack-config --set /etc/nova/nova.conf DEFAULT linuxnet_interface_driver nova.network.linux_net.LinuxOVSInterfaceDriver;
openstack-config --set /etc/nova/nova.conf libvirt vif_driver nova.virt.libvirt.vif.LibvirtGenericVIFDriver;
• 如果机器cpu不支持全虚拟化,需要修改 /etc/nova.conf
virt_type=kvm ===》 virt_type=qemu