openstack安装笔记 nova (未完成)(七)

编辑 /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:nova@172.16.21.233/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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值