前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >OpenStack icehouse系列之计算节点搭建

OpenStack icehouse系列之计算节点搭建

作者头像
DevinGeng
发布2019-04-09 17:33:03
6760
发布2019-04-09 17:33:03
举报
文章被收录于专栏:云+技术云+技术

OpenStack icehouse系列之计算节点搭建

我们接着上一篇博文OpenStack icehouse系列之网络节点搭建继续往下搭建下面是环境介绍

网络节点:ml2、openvswitch、DHCP、l3、metadata

控制节点:mysql、keystone、glance、nova、neutron、dashboard、cinder

计算节点:nova-compute、qemu-kvm、openvswitch、ml2

Compute setup (计算节点安装)

1.检查cpu是否支持kvm

apt-get install -y cpu-checker

kvm-ok

2.安装qemu-kvm

apt-get install -y kvm libvirt-bin pm-utils

3.安装nova服务

apt-get install -y nova-compute-kvm python-guestfs

4.使当前内核可读:

dpkg-statoverride  --update --add root root 0644 /boot/vmlinuz-$(uname -r)

5.覆盖新内核,创建/etc/kernel/postinst.d/statoverride

vi /etc/kernel/postinst.d/statoverride#!/bin/shversion="$1"# passing the kernel version is required[ -z "${version}" ] && exit 0dpkg-statoverride --update --add root root 0644 /boot/vmlinuz-${version}

6.给文件赋予权限

chmod +x /etc/kernel/postinst.d/statoverride

7.编辑/etc/nova/nova.conf

vi /etc/nova/nova.conf[DEFAULT]auth_strategy = keystonerpc_backend = rabbitrabbit_host = controllermy_ip = 10.0.0.31vnc_enabled = Truevncserver_listen = 0.0.0.0vncserver_proxyclient_address = 10.0.0.31novncproxy_base_url = http://controller:6080/vnc_auto.htmlglance_host = controllervif_plugging_is_fatal=falsevif_plugging_timeout=0 [database]connection = mysql://nova:NOVA_DBPASS@controller/nova [keystone_authtoken]auth_uri = http://controller:5000auth_host = controllerauth_port = 35357auth_protocol = httpadmin_tenant_name = serviceadmin_user = novaadmin_password = service_pass

8.删除nova原数据库

rm /var/lib/nova/nova.sqlite

9.重启nova-compute服务

service nova-compute restart

10.编辑/etc/sysctl.conf

vi /etc/sysctl.confnet.ipv4.ip_forward=1net.ipv4.conf.all.rp_filter=0net.ipv4.conf.default.rp_filter=0

11.更新下sysctl

sysctl -p

12.安装网络服务

apt-get install -y neutron-common neutron-plugin-ml2 neutron-plugin-openvswitch-agent

13.编辑/etc/neutron/neutron.conf

vi /etc/neutron/neutron.conf [DEFAULT]auth_strategy = keystonecore_plugin = ml2service_plugins = routerallow_overlapping_ips = True rpc_backend = neutron.openstack.common.rpc.impl_komburabbit_host = controller [keystone_authtoken]auth_uri = http://controller:5000auth_host = controllerauth_port = 35357auth_protocol = httpadmin_tenant_name = serviceadmin_user = neutronadmin_password = service_pass

14.编辑/etc/neutron/plugins/ml2/ml2_conf.ini

vi /etc/neutron/plugins/ml2/ml2_conf.ini [ml2]type_drivers = gretenant_network_types = gremechanism_drivers = openvswitch [ml2_type_gre]tunnel_id_ranges = 1:1000 [ovs]local_ip = 10.0.1.31tunnel_type = greenable_tunneling = True [securitygroup]firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriverenable_security_group = True

15.重启OVS服务

service openvswitch-switch restart

16.创建桥接

ovs-vsctl add-br br-int

17.编辑/etc/nova/nova.conf

vi /etc/nova/nova.conf [DEFAULT]network_api_class = nova.network.neutronv2.api.APIneutron_url = http://controller:9696neutron_auth_strategy = keystoneneutron_admin_tenant_name = serviceneutron_admin_username = neutronneutron_admin_password = service_passneutron_admin_auth_url = http://controller:35357/v2.0linuxnet_interface_driver = nova.network.linux_net.LinuxOVSInterfaceDriverfirewall_driver = nova.virt.firewall.NoopFirewallDriversecurity_group_api = neutron

18.编辑/etc/nova/nova-compute.conf

vi /etc/nova/nova-compute.conf [DEFAULT]compute_driver=libvirt.LibvirtDriver[libvirt]virt_type=qemu

19.重启nova-compute

service nova-compute restart

20.重启ovs agent服务

service neutron-plugin-openvswitch-agent restart

21.查看nova服务状态

nova-manage service list

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2014-10-15 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档