From add2745e070d16f6d9da84106097c3e847b01b84 Mon Sep 17 00:00:00 2001 From: jimmygc Date: Mon, 24 Apr 2017 10:43:27 +0800 Subject: [PATCH] Update outdated nova-conf-sample The sample uses lot of deprecated options, update this with a usable one. Change-Id: Ic11ddb5ac780430cbc2af3e80956daaca0219827 --- .../source/compute/nova-conf-samples.rst | 19 ++- doc/config-reference/source/compute/nova.conf | 130 +++++++++++------- 2 files changed, 90 insertions(+), 59 deletions(-) diff --git a/doc/config-reference/source/compute/nova-conf-samples.rst b/doc/config-reference/source/compute/nova-conf-samples.rst index 7bbb53a326..6e629159b5 100644 --- a/doc/config-reference/source/compute/nova-conf-samples.rst +++ b/doc/config-reference/source/compute/nova-conf-samples.rst @@ -12,13 +12,18 @@ Small, private cloud This example ``nova.conf`` file configures a small private cloud with cloud controller services, database server, and messaging -server on the same server. In this case, ``CONTROLLER_IP`` represents -the IP address of a central server, ``BRIDGE_INTERFACE`` represents -the bridge such as br100, the ``NETWORK_INTERFACE`` represents an -interface to your VLAN setup, and passwords are represented as -``DB_PASSWORD_COMPUTE`` for your Compute (nova) database password, -and ``RABBIT PASSWORD`` represents the password to your message -queue installation. +server on the same server. +In this case, +``CONTROLLER_IP`` represents the IP address of a central server. +And passwords are represented as: +``NOVA_DATABASE_PASSWD`` for your Compute (nova) database password, +``NOVA_API_DATABASE_PASSWD`` for your Compute (nova) API database +password, +``RABBIT_PASSWD`` represents the password to your message queue +installation, +``NOVA_PASSWORD`` for your Compute (nova) service password, +``NEUTRON_PASSWORD`` for your Networking (neutron) service password, +and ``METADATA_SECRET_KEY`` for your neutron metadata service secret key. .. literalinclude:: nova.conf :language: ini diff --git a/doc/config-reference/source/compute/nova.conf b/doc/config-reference/source/compute/nova.conf index 08e2c49c8b..240b0a12e0 100644 --- a/doc/config-reference/source/compute/nova.conf +++ b/doc/config-reference/source/compute/nova.conf @@ -1,74 +1,100 @@ [DEFAULT] - # LOGS/STATE -logdir=/var/log/nova -state_path=/var/lib/nova -lock_path=/var/lock/nova -rootwrap_config=/etc/nova/rootwrap.conf - -# SCHEDULER -compute_scheduler_driver=nova.scheduler.filter_scheduler.FilterScheduler - -# VOLUMES -# configured in cinder.conf +log_dir = /var/log/kolla/nova +use_forwarded_for = true +state_path = /var/lib/nova # COMPUTE -compute_driver=libvirt.LibvirtDriver -instance_name_template=instance-%08x -api_paste_config=/etc/nova/api-paste.ini +api_paste_config = /etc/nova/api-paste.ini +compute_driver = libvirt.LibvirtDriver +osapi_compute_listen = CONTROLLER_IP +osapi_compute_listen_port = 8774 +osapi_compute_workers = 5 +scheduler_max_attempts = 10 # COMPUTE/APIS: if you have separate configs for separate services # this flag is required for both nova-api and nova-compute -allow_resize_to_same_host=True +allow_resize_to_same_host = true -# APIS -osapi_compute_extension=nova.api.openstack.compute.contrib.standard_extensions -ec2_dmz_host=192.168.206.130 -s3_host=192.168.206.130 - -# RABBITMQ -rabbit_host=192.168.206.130 - -# GLANCE -image_service=nova.image.glance.GlanceImageService +# METADATA +metadata_workers = 5 +metadata_listen = CONTROLLER_IP +metadata_listen_port = 8775 # NETWORK -network_manager=nova.network.manager.FlatDHCPManager -force_dhcp_release=True -dhcpbridge_flagfile=/etc/nova/nova.conf -firewall_driver=nova.virt.libvirt.firewall.IptablesFirewallDriver -# Change my_ip to match each host -my_ip=192.168.206.130 -public_interface=eth0 -vlan_interface=eth0 -flat_network_bridge=br100 -flat_interface=eth0 +use_neutron = True +firewall_driver = nova.virt.firewall.NoopFirewallDriver +linuxnet_interface_driver = nova.network.linux_net.LinuxOVSInterfaceDriver +my_ip = CONTROLLER_IP + +# RABBITMQ +transport_url = rabbit://openstack:RABBIT_PASSWD@CONTROLLER_IP:5672 + +[conductor] +workers = 5 # NOVNC CONSOLE -novncproxy_base_url=http://192.168.206.130:6080/vnc_auto.html -# Change vncserver_proxyclient_address and vncserver_listen to match each compute host -vncserver_proxyclient_address=192.168.206.130 -vncserver_listen=192.168.206.130 +[vnc] +novncproxy_host = CONTROLLER_IP +novncproxy_port = 6080 +vncserver_listen = CONTROLLER_IP +vncserver_proxyclient_address = CONTROLLER_IP +novncproxy_base_url = http://CONTROLLER_IP:6080/vnc_auto.html -# AUTHENTICATION -auth_strategy=keystone -[keystone_authtoken] -auth_host = 127.0.0.1 -auth_port = 35357 -auth_protocol = http -admin_tenant_name = service -admin_user = nova -admin_password = nova -signing_dirname = /tmp/keystone-signing-nova +[oslo_concurrency] +lock_path = /var/lib/nova/tmp # GLANCE [glance] -api_servers=192.168.206.130:9292 +api_servers = http://CONTROLLER_IP:9292 +num_retries = 1 + +# NEUTRON +[neutron] +url = http://CONTROLLER_IP:9696 +metadata_proxy_shared_secret = METADATA_SECRET_KEY +service_metadata_proxy = true +auth_url = http://CONTROLLER_IP:35357/v3 +auth_type = password +project_domain_name = default +user_domain_id = default +project_name = service +username = neutron +password = NEUTRON_PASSWORD # DATABASE [database] -connection=mysql+pymysql://nova:yourpassword@192.168.206.130/nova +connection = mysql+pymysql://nova:NOVA_DATABASE_PASSWD@CONTROLLER_IP:3306/nova +max_pool_size = 50 +max_overflow = 1000 +max_retries = -1 + +# API DATABASE +[api_database] +connection = mysql+pymysql://nova_api:NOVA_API_DATABASE_PASSWD@CONTROLLER_IP:3306/nova_api +max_retries = -1 + +# KEYSTONE +[keystone_authtoken] +auth_uri = http://CONTROLLER_IP:5000 +auth_url = http://CONTROLLER_IP:35357 +auth_type = password +project_domain_id = default +user_domain_id = default +project_name = service +username = nova +password = NOVA_PASSWORD # LIBVIRT [libvirt] -virt_type=qemu +connection_uri = "qemu+tcp://CONTROLLER_IP/system" +virt_type = qemu + +[upgrade_levels] +compute = auto + +[oslo_messaging_notifications] +driver = noop + +[privsep_entrypoint] +helper_command = sudo nova-rootwrap /etc/nova/rootwrap.conf privsep-helper --config-file /etc/nova/nova.conf