290112011 发表于 2018-6-1 08:18:39

openstack学习笔记十一 Nova

  计算节点   跑虚拟机
# yuminstallopenstack-nova.noarch      openstack-nova-api.noarchopenstack-nova-conductor.noarch
openstack-nova-novncproxy.noarch   openstack-nova-scheduler.noarchopenstack-nova-console.noarch   ##控制节点
# yum installopenstack-nova-compute.noarch##计算节点
keystoneuser-create--namenova--passhequan
keystoneuser-role-add --user   nova--role admin--tenantservices
keystoneservice-create--namenova --type compute--descriptionnova

| 7708b5c40aec4cf3b59d6d84596a5f6b |    nova    |   compute    |   Openstack Compute Service    |
| 017bdbf9f335436cbd7f65fe74089b28 |nova_ec2|   ec2      |          EC2 Service         |
| 4f7b60427d304fd89658f4f8c23dd708 |   novav3   |computev3   |Openstack Compute Service v3|
+----------------------------------+-----------+-------------------------------------------------+-------------------------------------------------+--------------------------------------------+----------------------------------+
|                id                |   region|                  publicurl                  |                   internalurl                   |                  adminurl                  |            service_id            |
+----------------------------------+-----------+-------------------------------------------------+-------------------------------------------------+--------------------------------------------+----------------------------------+
| 0bda7145ebc944a99112c53e97362fa1 | RegionOne |    http://115.29.107.17:8774/v2/%(tenant_id)s   |    http://115.29.107.17:8774/v2/%(tenant_id)s   | http://115.29.107.17:8774/v2/%(tenant_id)s | 7708b5c40aec4cf3b59d6d84596a5f6b |
| 731be711c3be4497b57c8751ce111986 | RegionOne |   http://115.29.107.17:8773/services/Cloud    |   http://115.29.107.17:8773/services/Cloud    |http://115.29.107.17:8773/services/Admin| 017bdbf9f335436cbd7f65fe74089b28 |
| 7ec9cb12959f4bedb7e0757c79b636fd | RegionOne |             http://127.0.0.1:8774/v3            |             http://127.0.0.1:8774/v3            |          http://127.0.0.1:8774/v3          | 4f7b60427d304fd89658f4f8c23dd708 |

keystoneendpoint-create --service-id    --publicul ''--internalurl '' --adminurl ''
openstack-db--init --servicenova --password hequan --root 123456

# ls -ld /var/log/nova/
drwxr-x--- 2 nova root 4096 7月23 00:08 /var/log/nova/
# chown nova.nova/var/log/nova/-R
# mv nova.conf nova.conf.bak
# systemctl   list-unit-files | grep nova
openstack-nova-api.service                  enabled
openstack-nova-cert.service                   enabled
openstack-nova-compute.service                enabled
openstack-nova-conductor.service            enabled
openstack-nova-console.service                disabled
openstack-nova-consoleauth.service            enabled
openstack-nova-metadata-api.service         disabled
openstack-nova-novncproxy.service             enabled
openstack-nova-scheduler.service            enabled
openstack-nova-xvpvncproxy.service            disabled
vncserver_proxyclient_address=115.29.107.17##改成本机的IP  

  

  vim nova.conf
  


internal_service_availability_zone=internal
default_availability_zone=nova
novncproxy_host=0.0.0.0
novncproxy_port=6080
notify_api_faults=False
state_path=/var/lib/nova
report_interval=10
enabled_apis=ec2,osapi_compute,metadata
ec2_listen=0.0.0.0
ec2_listen_port=8773
ec2_workers=1
osapi_compute_listen=0.0.0.0
osapi_compute_listen_port=8774
osapi_compute_workers=1
metadata_listen=0.0.0.0
metadata_listen_port=8775
metadata_workers=1
compute_manager=nova.compute.manager.ComputeManager
service_down_time=60
rootwrap_config=/etc/nova/rootwrap.conf
volume_api_class=nova.volume.cinder.API
auth_strategy=keystone
use_forwarded_for=False
heal_instance_info_cache_interval=60
reserved_host_memory_mb=512
cpu_allocation_ratio=16.0
ram_allocation_ratio=1.5
network_api_class=nova.network.neutronv2.api.API
default_floating_pool=public
force_snat_range =0.0.0.0/0
metadata_host=115.29.107.17
dhcp_domain=novalocal
security_group_api=neutron
scheduler_default_filters=RetryFilter,AvailabilityZoneFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,CoreFilter
scheduler_driver=nova.scheduler.filter_scheduler.FilterScheduler
compute_driver=libvirt.LibvirtDriver
vif_plugging_is_fatal=True   ##修改False如果有报错   实例执行请求失败
vif_plugging_timeout=300   ## 修改为0
firewall_driver=nova.virt.firewall.NoopFirewallDriver
force_raw_images=True
debug=False
verbose=True
log_dir=/var/log/nova
use_syslog=False
syslog_log_facility=LOG_USER
use_stderr=True
notification_topics=notifications
rpc_backend=rabbit
amqp_durable_queues=False
sql_connection=mysql://nova:hequan@115.29.107.17/nova
image_service=nova.image.glance.GlanceImageService
lock_path=/var/lib/nova/tmp
osapi_volume_listen=0.0.0.0
vncserver_proxyclient_address=115.29.107.17##修改本机地址
vnc_keymap=en-us
vnc_enabled=True
vncserver_listen=0.0.0.0
novncproxy_base_url=http://115.29.107.17:6080/vnc_auto.html




catalog_info=volumev2:cinderv2:publicURL






api_servers=115.29.107.17:9292






auth_uri=http://115.29.107.17:5000/v2.0
identity_uri=http://115.29.107.17:35357
admin_user=nova
admin_password=hequan
admin_tenant_name=services

virt_type=qemu
inject_password=False
inject_key=False
inject_partition=-1
live_migration_uri=qemu+tcp://nova@%s/system
cpu_mode=none
vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver




service_metadata_proxy=True
metadata_proxy_shared_secret =hequan
url=http://115.29.107.17:9696
admin_username=neutron
admin_password=hequan
admin_tenant_name=services
region_name=RegionOne
admin_auth_url=http://115.29.107.17:5000/v2.0
auth_strategy=keystone
ovs_bridge=br-int
extension_sync_interval=600
timeout=30
default_tenant_id=default





kombu_reconnect_delay=1.0
rabbit_host=115.29.107.17
rabbit_port=5672
rabbit_hosts=115.29.107.17:5672
rabbit_use_ssl=False
rabbit_userid=guest
rabbit_password=guest
rabbit_virtual_host=/
rabbit_ha_queues=False
heartbeat_timeout_threshold=0
heartbeat_rate=2













enabled=False  


  

# nova-manage service list
# novahost-list
+---------------+-------------+----------+
| host_name   | service   | zone   |
+---------------+-------------+----------+
| hequan.lol    | consoleauth | internal |
| hequan.lol    | scheduler   | internal |
| hequan.lol    | conductor   | internal |
| hequan.lol    | compute   | nova   |
| hequan.lol    | cert      | internal |
# systemctl is-activelibvirtd.service
active  

  
页: [1]
查看完整版本: openstack学习笔记十一 Nova