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

OpenStack Juno系列之计算节点搭建

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

OpenStack Juno系列之计算节点搭建

nova-compute安装配置

--------------------

apt-get install nova-compute sysfsutils

编辑配置文件

vi /etc/nova/nova.conf

[DEFAULT]

verbose = True

rpc_backend = rabbit

rabbit_host = controller

rabbit_password = RABBIT_PASS

auth_strategy = keystone

my_ip = MANAGEMENT_INTERFACE_IP_ADDRESS  此处为控制节点管理地址10.0.0.31

vnc_enabled = True

vncserver_listen = 0.0.0.0

vncserver_proxyclient_address = MANAGEMENT_INTERFACE_IP_ADDRESS   此处为控制节点管理地址10.0.0.31

novncproxy_base_url = http://controller:6080/vnc_auto.html

[keystone_authtoken]

auth_uri = http://controller:5000/v2.0

identity_uri = http://controller:35357

admin_tenant_name = service

admin_user = nova

admin_password = NOVA_PASS

[glance]

host = controller

查看机器是否支持虚拟化如果返回是0那说明不支持虚拟化则在配置文件里面修改为 QEMU

egrep -c '(vmx|svm)' /proc/cpuinfo 

编辑配置文件

vi /etc/nova/nova-compute.conf

[libvirt]

virt_type = kvm

重启服务

service nova-compute restart

删除默认数据库

rm -f /var/lib/nova/nova.sqlite

执行下变量验证nova服务是否搭建成功

source admin-openrc.sh

nova service-list

+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+

| Id | Binary           | Host       | Zone     | Status  | State | Updated_at                 | Disabled Reason |

+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+

| 1  | nova-conductor   | controller | internal | enabled | up    | 2014-09-16T23:54:02.000000 | -               |

| 2  | nova-consoleauth | controller | internal | enabled | up    | 2014-09-16T23:54:04.000000 | -               |

| 3  | nova-scheduler   | controller | internal | enabled | up    | 2014-09-16T23:54:07.000000 | -               |

| 4  | nova-cert        | controller | internal | enabled | up    | 2014-09-16T23:54:00.000000 | -               |

| 5  | nova-compute     | compute1   | nova     | enabled | up    | 2014-09-16T23:54:06.000000 | -               |

+----+------------------+------------+----------+---------+-------+----------------------------+-----------------+

查看镜像

nova p_w_picpath-list

-------------------

配置计算节点网络

-------------------

配置转发

vi /etc/sysctl.conf

net.ipv4.conf.all.rp_filter=0

net.ipv4.conf.default.rp_filter=0

sysctl -p

安装neuron

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

vi /etc/neutron/neutron.conf 

[DEFAULT]

verbose = True

rpc_backend = rabbit

rabbit_host = controller

rabbit_password = RABBIT_PASS

auth_strategy = keystone

core_plugin = ml2

service_plugins = router

allow_overlapping_ips = True

[keystone_authtoken]

auth_uri = http://controller:5000/v2.0

identity_uri = http://controller:35357

admin_tenant_name = service

admin_user = neutron

admin_password = NEUTRON_PASS

编辑ml2配置文件

vi /etc/neutron/plugins/ml2/ml2_conf.ini

[ml2]

...

type_drivers = flat,gre

tenant_network_types = gre

mechanism_drivers = openvswitch

[ml2_type_gre]

...

tunnel_id_ranges = 1:1000

[securitygroup]

...

enable_security_group = True

enable_ipset = True

firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver

[ovs]

...

local_ip = INSTANCE_TUNNELS_INTERFACE_IP_ADDRESS

tunnel_type = gre

enable_tunneling = True

重启服务

service openvswitch-switch restart

编辑nova配置

vi  /etc/nova/nova.conf

[DEFAULT]

...

network_api_class = nova.network.neutronv2.api.API

security_group_api = neutron

linuxnet_interface_driver = nova.network.linux_net.LinuxOVSInterfaceDriver

firewall_driver = nova.virt.firewall.NoopFirewallDriver

[neutron]

...

url = http://controller:9696

auth_strategy = keystone

admin_auth_url = http://controller:35357/v2.0

admin_tenant_name = service

admin_username = neutron

admin_password = NEUTRON_PASS

重启服务

service nova-compute restart

service neutron-plugin-openvswitch-agent restart

查看是否搭建成功

$ source admin-openrc.sh

$ neutron agent-list

+--------------------------------------+--------------------+---------+-------+----------------+---------------------------+

| id                                   | agent_type         | host    | alive | admin_state_up | binary                    |

+--------------------------------------+--------------------+---------+-------+----------------+---------------------------+

...

| a5a49051-05eb-4b4f-bfc7-d36235fe9131 | Open vSwitch agent | compute1 | :-)   | True           | neutron-openvswitch-agent |

+--------------------------------------+--------------------+---------+-------+----------------+---------------------------+

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

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

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

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

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