openstack安装(22)

2021-05-07 17:59:22 浏览数 (1)

[root@controller ~]# yum install -y openstack-nova-api openstack-nova-cert openstack-nova-conductor openstack-nova-console openstack-nova-novncproxy openstack-nova-scheduler python-novaclient #安装软件包

root@controller neutron]# grep "^[a-z]" -B 1 /etc/nova/nova.conf #编辑/etc/nova/nova.conf文件

[DEFAULT]

rpc_backend = rabbit # #配置 RabbitMQ消息队列访问

auth_strategy = keystone # #配置认证服务访问

my_ip = 192.168.1.101 #配置 my_ip使用控制节点的管理接口的IP地址

network_api_class = nova.network.neutronv2.api.API #启用网络服务支持

security_group_api = neutron

linuxnet_interface_driver = nova.network.linux_net.NeutronLinuxBridgeInterfaceDrive

firewall_driver = nova.virt.firewall.NoopFirewallDrive

enabled_apis=osapi_compute,metadata #禁用EC2 API

verbose = True

[database]

connection = mysql://nova:123456@controller/nova #配置数据库访问

[glance]

host = controller #配置镜像服务的位置,域名如果无法解析也可以IP地址

[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 = 123456

[neutron] #配置计算使用网络访问参数,启用元数据代理和配置secret

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 = 123456

service_metadata_proxy = True #启用元数据代理和配置元数据共享密码

metadata_proxy_shared_secret = 123456 #自定义,与/etc/neutron/metadata_agent.ini文件中一致即可

[oslo_concurrency]

lock_path = /var/lib/nova/tmp #配置锁路径

[oslo_messaging_rabbit] #配置 RabbitMQ消息队列访问

rabbit_host = controlle

rabbit_userid = openstack

rabbit_password = 123456

[vnc] #配置VNC代理使用控制节点的管理IP地址

vncserver_listen = $my_ip

vncserver_proxyclient_address = $my_ip

[root@controller ~]# su -s /bin/sh -c "nova-manage db sync" nova #同步Compute 数据库,忽略告警信息

[root@controller yum.repos.d]# tail /var/log/nova/nova-manage.log

2018-02-04 20:26:52.552 21752 INFO migrate.versioning.api [-] 297 -> 298...

2018-02-04 20:26:52.663 21752 INFO migrate.versioning.api [-] done

2018-02-04 20:26:52.664 21752 INFO migrate.versioning.api [-] 298 -> 299...

2018-02-04 20:26:52.740 21752 INFO migrate.versioning.api [-] done

2018-02-04 20:26:52.740 21752 INFO migrate.versioning.api [-] 299 -> 300...

2018-02-04 20:26:52.931 21752 INFO migrate.versioning.api [-] done

2018-02-04 20:26:52.931 21752 INFO migrate.versioning.api [-] 300 -> 301...

2018-02-04 20:26:53.217 21752 INFO migrate.versioning.api [-] done

2018-02-04 20:26:53.218 21752 INFO migrate.versioning.api [-] 301 -> 302...

2018-02-04 20:26:53.230 21752 INFO migrate.versioning.api [-] done

[root@controller ~]# systemctl enable openstack-nova-api.service openstack-nova-cert.service openstack-nova-consoleauth.service openstack-nova-scheduler.service openstack-nova-conductor.service openstack-nova-novncproxy.service #启动 Compute 服务并将其设置为随系统启动

[root@controller ~]# systemctl start openstack-nova-api.service openstack-nova-cert.service openstack-nova-consoleauth.service openstack-nova-scheduler.service openstack-nova-conductor.service openstack-nova-novncproxy.service

0 人点赞