From 4d1b6943cc53ca23ba825e35600b09a777b064ab Mon Sep 17 00:00:00 2001 From: Matthew Kassawara Date: Tue, 1 Jul 2014 19:17:34 +0000 Subject: [PATCH] Improved install guide nova compute section I improved the nova compute section of the installation guide as follows: 1) Restructured steps to improve flow/clarity and consistency with similar sections. 2) Adjusted titles. Most of these improvements incorporate changes approved for other patches associated with this blueprint. Co-Authored-By: Stephen Gordon Change-Id: I311a104b928549badec2a9ea4637f72bde084324 Implements: blueprint installation-guide-improvements --- doc/install-guide/ch_nova.xml | 2 +- .../section_nova-compute-install.xml | 217 +++++++++++++++++ doc/install-guide/section_nova-compute.xml | 229 ------------------ 3 files changed, 218 insertions(+), 230 deletions(-) create mode 100644 doc/install-guide/section_nova-compute-install.xml delete mode 100644 doc/install-guide/section_nova-compute.xml diff --git a/doc/install-guide/ch_nova.xml b/doc/install-guide/ch_nova.xml index b0d9e829e2..77ddc375e4 100644 --- a/doc/install-guide/ch_nova.xml +++ b/doc/install-guide/ch_nova.xml @@ -7,6 +7,6 @@ Add the Compute service - + diff --git a/doc/install-guide/section_nova-compute-install.xml b/doc/install-guide/section_nova-compute-install.xml new file mode 100644 index 0000000000..e3d343e8a4 --- /dev/null +++ b/doc/install-guide/section_nova-compute-install.xml @@ -0,0 +1,217 @@ +
+ Install and configure a compute node + This section describes how to install and configure the Compute + service on a compute node. The service supports several + hypervisors to + deploy instances or + VMs. For simplicity, + this configuration uses the + QEMU hypervisor + with the + KVM extension + on compute nodes that support hardware acceleration for virtual machines. + On legacy hardware, this configuration uses the generic QEMU hypervisor. + You can follow these instructions with minor modifications to horizontally + scale your environment with additional compute nodes. + + To install and configure the Compute hypervisor components + + Install the packages: + # apt-get install nova-compute + # yum install openstack-nova-compute + # zypper install openstack-nova-compute + + + Edit the /etc/nova/nova.conf file and + complete the following actions: + + + In the [database] section, configure + database access: + [database] +... +connection = mysql://nova:NOVA_DBPASS@controller/nova + Replace NOVA_DBPASS with the password + you chose for the Compute database. + + + In the [DEFAULT] section, configure + RabbitMQ message broker access: + [DEFAULT] +... +rpc_backend = rabbit +rabbit_host = controller +rabbit_password = RABBIT_PASS + Replace RABBIT_PASS with the password + you chose for the guest account in + RabbitMQ. + + + In the [keystone_authtoken] section, + configure Identity service access: + +[keystone_authtoken] +... +auth_uri = http://controller:5000/v2.0 +auth_host = controller +auth_port = 35357 +auth_protocol = http +admin_tenant_name = service +admin_user = nova +admin_password = NOVA_PASS + Replace NOVA_PASS with the password + you chose for the nova user in the Identity + service. + + + In the [DEFAULT] section, configure the + my_ip key: + [DEFAULT] +... +my_ip = MANAGEMENT_INTERFACE_IP_ADDRESS + Replace + MANAGEMENT_INTERFACE_IP_ADDRESS with + the IP address of the management network interface on your + first compute node, typically 10.0.0.31 in the + example + architecture. + + + In the [DEFAULT] section, enable and + configure remote console access: + [DEFAULT] +... +vnc_enabled = True +vncserver_listen = 0.0.0.0 +vncserver_proxyclient_address = MANAGEMENT_INTERFACE_IP_ADDRESS +novncproxy_base_url = http://controller:6080/vnc_auto.html + The server component listens on all IP addresses and the proxy + component only listens on the management interface IP address of + the compute node. The base URL indicates the location where you + can use a web browser to access remote consoles of instances + on this compute node. + Replace + MANAGEMENT_INTERFACE_IP_ADDRESS with + the IP address of the management network interface on your + first compute node, typically 10.0.0.31 in the + example + architecture. + + If the web browser to access remote consoles resides on a + host that cannot resolve the + controller hostname, you must replace + controller with the management + interface IP address of the controller node. + + + + In the [DEFAULT] section, configure the + location of the Image Service: + [DEFAULT] +... +glance_host = controller + + + + + + To install and configure the Compute hypervisor components + + Install the packages: + # apt-get install nova-compute + + + Respond to the prompts for + database management, + Identity service + credentials, + service endpoint + registration, and + message broker + credentials.. + + + + To finalize installation + + Determine whether your compute node supports hardware acceleration + for virtual machines: + $ egrep -c '(vmx|svm)' /proc/cpuinfo + If this command returns a value of + one or greater, your compute node supports + hardware acceleration which typically requires no additional + configuration. + If this command returns a value of zero, + your compute node does not support hardware acceleration and you must + configure libvirt to use QEMU instead of KVM. + + + Edit the [libvirt] + section in the + /etc/nova/nova-compute.conf + /etc/nova/nova.conf file as follows: + [libvirt] +... +virt_type = qemu + + On Ubuntu 12.04, kernels backported from newer releases may + not automatically load the KVM modules for hardware acceleration + when the compute node boots. In this case, launching an instance + will fail with the following message in the + /var/log/nova/nova-compute.log file: + libvirtError: internal error: no supported architecture for os type 'hvm' + As a workaround for this issue, you must add the appropriate + module for your compute node to the + /etc/modules file. + For systems with Intel processors: + # echo 'kvm_intel' >> /etc/modules + For systems with AMD processors: + # echo 'kvm_amd' >> /etc/modules + + + + + + Restart the Compute service: + # service nova-compute restart + + + Start the Compute service including its dependencies and configure + them to start automatically when the system boots: + + + For RHEL, CentOS, and compatible derivatives: + # service libvirtd start +# service messagebus start +# service openstack-nova-compute start +# chkconfig libvirtd on +# chkconfig messagebus on +# chkconfig openstack-nova-compute on + + + For Fedora: + # service libvirtd start +# service dbus start +# service openstack-nova-compute start +# chkconfig libvirtd on +# chkconfig dbus on +# chkconfig openstack-nova-compute on + + + # service libvirtd start +# chkconfig libvirtd on +# service openstack-nova-compute start +# chkconfig openstack-nova-compute on + + + By default, the Ubuntu packages create an SQLite database. + Because this configuration uses a SQL database server, you can + remove the SQLite database file: + # rm /var/lib/nova/nova.sqlite + + +
diff --git a/doc/install-guide/section_nova-compute.xml b/doc/install-guide/section_nova-compute.xml deleted file mode 100644 index 3558be4376..0000000000 --- a/doc/install-guide/section_nova-compute.xml +++ /dev/null @@ -1,229 +0,0 @@ -
- Configure a compute node - After you configure the Compute service on the controller - node, you must configure another system as a compute node. The - compute node receives requests from the controller node and hosts - virtual machine instances. You can run all services on a single - node, but the examples in this guide use separate systems. This - makes it easy to scale horizontally by adding additional Compute - nodes following the instructions in this section. - The Compute service relies on a hypervisor to run virtual - machine instances. OpenStack can use various hypervisors, but this - guide uses KVM. - - - Install the Compute packages: - # apt-get install nova-compute-kvm python-guestfs - When prompted to create a - supermin appliance, respond - yes. - - - To use the meta-packages and install other components on - your compute node, such as OpenStack Networking and Telemetry - agents, run this command: - # apt-get install openstack-compute-node - The controller node has the - openstack-proxy-node and - openstack-toaster meta-packages that - install openstack-proxy-node and - openstack-toaster at the same - time. - - - # yum install openstack-nova-compute - # zypper install openstack-nova-compute kvm openstack-utils - - - Respond to the prompts for database - management, [keystone_authtoken] settings, - RabbitMQ - credentials, and API endpoint registration. - - - For security reasons, the Linux kernel is not readable by - normal users which restricts hypervisor services such as qemu - and libguestfs. For details, see this bug. To make the current kernel readable, run: - -# dpkg-statoverride --update --add root root 0644 /boot/vmlinuz-$(uname -r) - To also enable this override for all future kernel updates, create the - file /etc/kernel/postinst.d/statoverride - containing:#!/bin/sh -version="$1" -# passing the kernel version is required -[ -z "${version}" ] && exit 0 -dpkg-statoverride --update --add root root 0644 /boot/vmlinuz-${version} - Remember to make the file executable: -# chmod +x /etc/kernel/postinst.d/statoverride - - - - Edit the - /etc/nova/nova.conf configuration file: - - # openstack-config --set /etc/nova/nova.conf database connection mysql://nova:NOVA_DBPASS@controller/nova -# openstack-config --set /etc/nova/nova.conf keystone_authtoken auth_uri http://controller:5000 -# openstack-config --set /etc/nova/nova.conf keystone_authtoken auth_host controller -# openstack-config --set /etc/nova/nova.conf keystone_authtoken auth_protocol http -# openstack-config --set /etc/nova/nova.conf keystone_authtoken auth_port 35357 -# openstack-config --set /etc/nova/nova.conf keystone_authtoken admin_user nova -# openstack-config --set /etc/nova/nova.conf keystone_authtoken admin_tenant_name service -# openstack-config --set /etc/nova/nova.conf keystone_authtoken admin_password NOVA_PASS - Edit the - /etc/nova/nova.conf configuration file and add these - lines to the appropriate sections: - [DEFAULT] -... -auth_strategy = keystone -... -[database] -# The SQLAlchemy connection string used to connect to the database -connection = mysql://nova:NOVA_DBPASS@controller/nova - -[keystone_authtoken] -auth_uri = http://controller:5000 -auth_host = controller -auth_port = 35357 -auth_protocol = http -admin_tenant_name = service -admin_user = nova -admin_password = NOVA_PASS - - - Configure the Compute service to use - the RabbitMQ message broker by setting these configuration - keys in the [DEFAULT] configuration group of - the /etc/nova/nova.conf file: - [DEFAULT] -... -rpc_backend = rabbit -rabbit_host = controller -rabbit_password = RABBIT_PASS - Configure the Compute service to use the RabbitMQ message broker - by setting these configuration keys: - # openstack-config --set /etc/nova/nova.conf \ - DEFAULT rpc_backend nova.rpc.impl_kombu -# openstack-config --set /etc/nova/nova.conf DEFAULT rabbit_host controller -# openstack-config --set /etc/nova/nova.conf DEFAULT rabbit_password RABBIT_PASS - - - - Configure Compute to provide remote console access to instances. - # openstack-config --set /etc/nova/nova.conf DEFAULT my_ip 10.0.0.31 -# openstack-config --set /etc/nova/nova.conf DEFAULT vnc_enabled True -# openstack-config --set /etc/nova/nova.conf DEFAULT vncserver_listen 0.0.0.0 -# openstack-config --set /etc/nova/nova.conf DEFAULT vncserver_proxyclient_address 10.0.0.31 -# openstack-config --set /etc/nova/nova.conf \ - DEFAULT novncproxy_base_url http://controller:6080/vnc_auto.html - Edit - /etc/nova/nova.conf and add the following - keys under the - [DEFAULT] - section: - [DEFAULT] -... -my_ip = 10.0.0.31 -vnc_enabled = True -vncserver_listen = 0.0.0.0 -vncserver_proxyclient_address = 10.0.0.31 -novncproxy_base_url = http://controller:6080/vnc_auto.html - - - Specify the host that runs the Image Service. Edit - /etc/nova/nova.conf file and add - these lines to the [DEFAULT] - section: - # openstack-config --set /etc/nova/nova.conf DEFAULT glance_host controller - [DEFAULT] -... -glance_host = controller - - - You must determine whether your system's processor and/or - hypervisor support hardware acceleration for virtual machines. - Run the following command: - $ egrep -c '(vmx|svm)' /proc/cpuinfo - If this command returns a value of - one or greater, your system supports hardware - acceleration which typically requires no additional configuration. - - If this command returns a value of zero, - your system does not support hardware acceleration and you must - configure libvirt to use QEMU instead of KVM. - - - Edit the [libvirt] section in the - /etc/nova/nova-compute.conf file to modify - this key: - [libvirt] -... -virt_type = qemu - - - Run the following command: - # openstack-config --set /etc/nova/nova.conf libvirt virt_type qemu - - - - On Ubuntu 12.04, kernels backported from newer releases may not - automatically load the KVM modules for hardware acceleration when - the system boots. In this case, launching an instance will fail - with the following message in the - /var/log/nova/nova-compute.log file: - libvirtError: internal error: no supported architecture for os type 'hvm' - As a workaround for this issue, you must add the appropriate - module for your system to the /etc/modules file. - - For systems with Intel processors, run the following command: - - # echo 'kvm_intel' >> /etc/modules - For systems with AMD processors, run the following command: - - # echo 'kvm_amd' >> /etc/modules - - - - Remove the SQLite database created by the packages: - # rm /var/lib/nova/nova.sqlite - - - Start the Compute service and - its dependencies. Configure them to start automatically when the system - boots. - Restart the Compute service: - # service nova-compute restart - - - For RHEL or CentOS: - # service libvirtd start -# service messagebus start -# service openstack-nova-compute start -# chkconfig libvirtd on -# chkconfig messagebus on -# chkconfig openstack-nova-compute on - - For Fedora: - # service libvirtd start -# service dbus start -# service openstack-nova-compute start -# chkconfig libvirtd on -# chkconfig dbus on -# chkconfig openstack-nova-compute on - - - # service libvirtd start -# service openstack-nova-compute start -# chkconfig libvirtd on -# chkconfig openstack-nova-compute on - - -