Nova计算节点安装配置
openstack pike 安装 目录汇总 http://www.cnblogs.com/elvi/p/7613861.html
## Nova计算节点安装配置 #基本配置: #关闭selinux、防火墙 #更换阿里源、升级、重启、时间同步 #hostname,hosts配置 #安装OpenStack源 # computer01 安装配置 ######################################## yum install python-openstackclient openstack-selinux -y yum install python-openstackclient python2-PyMySQL -y #OpenStack客户端 yum install openstack-utils -y #openstack工具 #安装Nova yum install -y openstack-nova-compute yum install -y python-openstackclient openstack-selinux #安装Neutron yum install -y openstack-neutron-linuxbridge ebtables ipset ######################################## #备份默认配置 cp /etc/nova/nova.conf{,.bak} cp /etc/neutron/neutron.conf{,.bak} cp /etc/neutron/plugins/ml2/linuxbridge_agent.ini{,bak} #设置Nova实例路径(磁盘镜像文件) Vdir=/date/nova VHD=$Vdir/instances mkdir -p $VHD chown -R nova:nova $Vdir Netname=ens37 #网卡名 IP=192.168.58.31 #使用QEMU或KVM ,KVM硬件加速需要硬件支持,虚拟机使用 qemu #[[ `egrep -c '(vmx|svm)' /proc/cpuinfo` = 0 ]] && { Kvm=qemu; } || { Kvm=kvm; } Kvm=qemu echo "使用 $Kvm" VncProxy=10.2.1.10 #VNC代理地址vip # #nova配置 #egrep -v '^$|#' /etc/nova/nova.conf echo '# [DEFAULT] instances_path='$VHD' enabled_apis = osapi_compute,metadata transport_url = rabbit://openstack:openstack@controller:5673 my_ip = '$IP' use_neutron = True firewall_driver = nova.virt.firewall.NoopFirewallDriver cpu_allocation_ratio = 4 [api_database] connection = mysql+pymysql://nova:nova@controller/nova_api [database] connection = mysql+pymysql://nova:nova@controller/nova [api] auth_strategy = keystone [keystone_authtoken] auth_uri = http://controller:5000 auth_url = http://controller:35357 memcached_servers = controller:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = nova password = nova [vnc] enabled = true vncserver_listen = 0.0.0.0 vncserver_proxyclient_address = $my_ip novncproxy_base_url = http://'$VncProxy':6080/vnc_auto.html [glance] api_servers = http://controller:9292 [oslo_concurrency] lock_path = /var/lib/nova/tmp [placement] os_region_name = RegionOne project_domain_name = Default project_name = service auth_type = password user_domain_name = Default auth_url = http://controller:35357/v3 username = placement password = placement [libvirt] virt_type = '$Kvm' [neutron] url = http://controller:9696 auth_url = http://controller:35357 auth_type = password project_domain_name = default user_domain_name = default region_name = RegionOne project_name = service username = neutron password = neutron #'>/etc/nova/nova.conf #----------------------------------------- #neutron配置 echo '# [DEFAULT] auth_strategy = keystone transport_url = rabbit://openstack:openstack@controller:5673 [keystone_authtoken] auth_uri = http://controller:5000 auth_url = http://controller:35357 memcached_servers = controller:11211 auth_type = password project_domain_id = default user_domain_id = default project_name = service username = neutron password = neutron [oslo_concurrency] lock_path = /var/lib/neutron/tmp #'>/etc/neutron/neutron.conf # # bprovider:网卡名 echo ' [linux_bridge] physical_interface_mappings = provider:'$Netname' [securitygroup] enable_security_group = true firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver [vxlan] enable_vxlan = false # local_ip = 10.2.1.21 # l2_population = true #'>/etc/neutron/plugins/ml2/linuxbridge_agent.ini #启动 systemctl enable libvirtd.service openstack-nova-compute.service neutron-linuxbridge-agent.service systemctl restart libvirtd.service openstack-nova-compute.service neutron-linuxbridge-agent.service # # CPU倍数 #cpu_allocation_ratio=4.0