我要评分
获取效率
正确性
完整性
易理解

Installing and Configuring Nova (Controller Node)

Perform the following operations on the controller node.

  1. Install components.
    1
    yum -y install openstack-nova-api openstack-nova-conductor openstack-nova-novncproxy openstack-nova-scheduler
    
  2. Configure Nova.
    1. Open the /etc/nova/nova.conf file.
      vi /etc/nova/nova.conf
    2. Press i to enter the insert mode and perform the following configurations.
      1. Enable compute and metadata APIs, configure RabbitMQ message queue access, and enable the network service.
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        [DEFAULT] 
        enabled_apis = osapi_compute,metadata 
        transport_url = rabbit://openstack:PASSWORD@controller 
        my_ip = 192.168.100.120 
        use_neutron = true 
        firewall_driver = nova.virt.firewall.NoopFirewallDriver 
        allow_resize_to_same_host = true
         
        [filter_scheduler]
        enabled_filters=RetryFilter,AvailabilityZoneFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter
        

        Replace my_ip with the OpenStack management IP address of the controller node in Table 3.

        Replace PASSWORD with the OpenStack password 123456 described in Installing RabbitMQ.

      1. Configure database access.
        1
        2
        3
        4
        5
        [api_database] 
        connection = mysql+pymysql://nova:PASSWORD@controller/nova_api
        
        [database] 
        connection = mysql+pymysql://nova:PASSWORD@controller/nova
        

        Replace PASSWORD with the password of the nova user described in Creating the Nova Database.

      1. Configure Identity service access.
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        [api] 
        auth_strategy = keystone
        
        [keystone_authtoken]
        auth_url = http://controller:5000/v3 
        memcached_servers = controller:11211 
        auth_type = password 
        project_domain_name = Default 
        user_domain_name = Default 
        project_name = service 
        username = nova 
        password = PASSWORD
        

        Replace PASSWORD with the password of the nova user described in Creating the Nova Database.

      1. In the /etc/nova/nova.conf file, enable the metadata agent and set the password in the [neutron] section.
         1
         2
         3
         4
         5
         6
         7
         8
         9
        10
        11
        12
        [neutron] 
        url = http://controller:9696 
        auth_url = http://controller:5000 
        auth_type = password 
        project_domain_name = default 
        user_domain_name = default 
        region_name = RegionOne 
        project_name = service 
        username = neutron 
        password = PASSWORD
        service_metadata_proxy = true 
        metadata_proxy_shared_secret = PASSWORD
        

        Replace PASSWORD with the password of the neutron user described in Creating the Neutron Database.

      1. Configure the VNC proxy to use the management IP address of the controller node.
        1
        2
        3
        4
        5
        6
        7
        [vnc] 
        enabled = true 
        server_listen = $my_ip 
        server_proxyclient_address = $my_ip 
        novncproxy_host=0.0.0.0 
        novncproxy_port=6080 
        novncproxy_base_url=http://192.168.100.120:6080/vnc_auto.html
        

        Replace 192.168.100.120 with the actual management IP address of the controller node.

      1. Configure the location of the Image service API.
        1
        2
        [glance] 
        api_servers = http://controller:9292
        
      1. Configure the lock path.
        1
        2
        [oslo_concurrency] 
        lock_path = /var/lib/nova/tmp
        
      1. Configure the access to the Placement service.
        1
        2
        3
        4
        5
        6
        7
        8
        9
        [placement] 
        region_name = RegionOne 
        project_domain_name = Default 
        project_name = service 
        auth_type = password 
        user_domain_name = Default 
        auth_url = http://controller:5000/v3 
        username = placement 
        password = PASSWORD
        

        Replace PASSWORD with the password of the placement user described in Creating the Placement Database.

      1. Populate the nova-api database.
        1
        2
        3
        4
        su -s /bin/sh -c "nova-manage api_db sync" nova 
        su -s /bin/sh -c "nova-manage cell_v2 map_cell0" nova 
        su -s /bin/sh -c "nova-manage cell_v2 create_cell --name=cell1 --verbose" nova 
        su -s /bin/sh -c "nova-manage db sync" nova
        
      1. Check whether cell 0 and cell 1 are correctly registered.
        1
        su -s /bin/sh -c "nova-manage cell_v2 list_cells" nova
        

      2. Enable the compute service and configure it to start as the system boots.
        1
        2
        3
        4
        5
        systemctl enable openstack-nova-api.service openstack-nova-scheduler.service \
        openstack-nova-conductor.service openstack-nova-novncproxy.service
        
        systemctl start openstack-nova-api.service openstack-nova-scheduler.service \
        openstack-nova-conductor.service openstack-nova-novncproxy.service
        
    3. Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.