设为首页 收藏本站
查看: 764|回复: 0

[经验分享] openstack私有云布署实践【11.2 计算nova

[复制链接]

尚未签到

发表于 2017-6-27 13:56:24 | 显示全部楼层 |阅读模式
这里我只使用compute1节点配置为示例,其它节点的配置基本是一样的,只是声明的管理IP不同而已

计算节点
# yum install openstack-nova-compute sysfsutils

修改配置文件
vi /etc/nova/nova.conf

[DEFAULT]
resume_guests_state_on_host_boot=True
rpc_backend = rabbit
auth_strategy = keystone
my_ip = 10.40.42.11

state_path=/home/local/nova


network_api_class = nova.network.neutronv2.api.API
security_group_api = neutron
linuxnet_interface_driver = nova.network.linux_net.NeutronLinuxBridgeInterfaceDriver
firewall_driver = nova.virt.firewall.NoopFirewallDriver

verbose = True

[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
auth_plugin = password
project_domain_id = default
user_domain_id = 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://controller:6080/vnc_auto.html

[glance]
host = controller

[oslo_concurrency]
lock_path = /var/lib/nova/tmp

[oslo_messaging_rabbit]
rabbit_host=controller
rabbit_userid = openstack
rabbit_password = openstack
rabbit_retry_interval=1
rabbit_retry_backoff=2
rabbit_max_retries=0
rabbit_durable_queues=true
rabbit_ha_queues=true

[neutron]
url = http://controller:9696
auth_url = http://controller:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
region_name = RegionOne
project_name = service
username = neutron
password = neutron


以上的紫色配置原本是要等配neutron时再加的,只是这里我提前贴出来了以便做全局维护,如果你们是新搭环境的话,这个紫色配置要等安装了neutron包再加

创建实例存放目录,以及赋权
mkdir -p /home/local/nova
cp -r /var/lib/nova/* /home/local/nova/
chown -R nova:nova /home/local/nova

启动服务已及加入开机自启
systemctl enable libvirtd.service openstack-nova-compute.service
systemctl restart libvirtd.service openstack-nova-compute.service

在其中一台kxcontroller上验证:

source admin-openrc.sh

# nova endpoints
有9个endpoints服务

# nova image-list

创建Zone州示例,在controller其中1台节点上,需要注意的是,当企业的服务器资源少的,不建议将计算节点分类,因为一旦分类并运行了虚拟机,该虚拟机的迁移,调整大小,只能在原zone区域内进行,无法跨区。

source admin-openrc.sh
查看状态
nova service-list
neutron agent-list
nova aggregate-list
nova availability-zone-list
定义zone
nova aggregate-create aggregate_dev  dev_zone
nova aggregate-create aggregate_stg   stg_zone
nova host-list
加入zone
nova aggregate-add-host aggregate_stg compute1
nova aggregate-add-host aggregate_stg compute2
nova aggregate-add-host aggregate_stg compute3
nova aggregate-add-host aggregate_stg compute4
nova aggregate-add-host aggregate_stg compute5
nova aggregate-add-host aggregate_stg compute6
nova aggregate-add-host aggregate_stg compute7




nova service-list
+----+------------------+-------------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary           | Host        | Zone     | Status  | State | Updated_at                 | Disabled Reason |
+----+------------------+-------------+----------+---------+-------+----------------------------+-----------------+
| 3  | nova-conductor   | controller1 | internal | enabled | up    | 2016-11-08T11:51:49.000000 | -               |
| 12 | nova-scheduler   | controller1 | internal | enabled | up    | 2016-11-08T11:51:53.000000 | -               |
| 18 | nova-consoleauth | controller1 | internal | enabled | up    | 2016-11-08T11:51:46.000000 | -               |
| 21 | nova-cert        | controller1 | internal | enabled | up    | 2016-11-08T11:51:46.000000 | -               |
| 24 | nova-conductor   | controller2 | internal | enabled | up    | 2016-11-08T11:51:52.000000 | -               |
| 45 | nova-consoleauth | controller2 | internal | enabled | up    | 2016-11-08T11:51:46.000000 | -               |
| 48 | nova-cert        | controller2 | internal | enabled | up    | 2016-11-08T11:51:46.000000 | -               |
| 51 | nova-scheduler   | controller2 | internal | enabled | up    | 2016-11-08T11:51:53.000000 | -               |
| 54 | nova-compute     | compute1    | stg_zone | enabled | up    | 2016-11-08T11:51:52.000000 | -               |
| 57 | nova-compute     | compute2    | stg_zone | enabled | up    | 2016-11-08T11:51:53.000000 | -               |
| 58 | nova-compute     | compute3    | stg_zone | enabled | up    | 2016-11-08T11:51:53.000000 | -               |
| 61 | nova-compute     | compute4    | stg_zone | enabled | up    | 2016-11-08T11:51:52.000000 | -               |
| 64 | nova-compute     | compute5    | stg_zone | enabled | up    | 2016-11-08T11:51:53.000000 | -               |
| 67 | nova-compute     | compute6    | stg_zone | enabled | up    | 2016-11-08T11:51:51.000000 | -               |
| 70 | nova-compute     | compute7    | stg_zone | enabled | up    | 2016-11-08T11:51:53.000000 | -               |
+----+------------------+-------------+----------+---------+-------+----------------------------+-----------------+

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-388688-1-1.html 上篇帖子: openstack私有云布署实践【11.1 计算nova 下篇帖子: openstack controller ha测试环境搭建记录(八)——配置nova(控制节点)
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表