PageRenderTime 327ms CodeModel.GetById 33ms RepoModel.GetById 0ms app.codeStats 0ms

/doc/source/runnova/getting.started.rst

https://github.com/gabrielhurley/nova
ReStructuredText | 168 lines | 124 code | 44 blank | 0 comment | 0 complexity | 48e468b3540ca6260adb2211988b09d3 MD5 | raw file
  1. ..
  2. Copyright 2010-2011 United States Government as represented by the
  3. Administrator of the National Aeronautics and Space Administration.
  4. All Rights Reserved.
  5. Licensed under the Apache License, Version 2.0 (the "License"); you may
  6. not use this file except in compliance with the License. You may obtain
  7. a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  11. WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  12. License for the specific language governing permissions and limitations
  13. under the License.
  14. Getting Started with Nova
  15. =========================
  16. This code base is continually changing, so dependencies also change. If you
  17. encounter any problems, see the :doc:`../community` page.
  18. The `contrib/nova.sh` script should be kept up to date, and may be a good
  19. resource to review when debugging.
  20. The purpose of this document is to get a system installed that you can use to
  21. test your setup assumptions. Working from this base installtion you can
  22. tweak configurations and work with different flags to monitor interaction with
  23. your hardware, network, and other factors that will allow you to determine
  24. suitability for your deployment. After following this setup method, you should
  25. be able to experiment with different managers, drivers, and flags to get the
  26. best performance.
  27. Dependencies
  28. ------------
  29. Related servers we rely on
  30. * **RabbitMQ**: messaging queue, used for all communication between components
  31. Optional servers
  32. * **OpenLDAP**: By default, the auth server uses the RDBMS-backed datastore by
  33. setting FLAGS.auth_driver to `nova.auth.dbdriver.DbDriver`. But OpenLDAP
  34. (or LDAP) could be configured by specifying `nova.auth.ldapdriver.LdapDriver`.
  35. There is a script in the sources (`nova/auth/slap.sh`) to install a very basic
  36. openldap server on ubuntu.
  37. * **ReDIS**: There is a fake ldap auth driver
  38. `nova.auth.ldapdriver.FakeLdapDriver` that backends to redis. This was
  39. created for testing ldap implementation on systems that don't have an easy
  40. means to install ldap.
  41. * **MySQL**: Either MySQL or another database supported by sqlalchemy needs to
  42. be avilable. Currently, only sqlite3 an mysql have been tested.
  43. Python libraries that we use (from pip-requires):
  44. .. literalinclude:: ../../../tools/pip-requires
  45. Other libraries:
  46. * **XenAPI**: Needed only for Xen Cloud Platform or XenServer support. Available
  47. from http://wiki.xensource.com/xenwiki/XCP_SDK or
  48. http://community.citrix.com/cdn/xs/sdks.
  49. External unix tools that are required:
  50. * iptables
  51. * ebtables
  52. * gawk
  53. * curl
  54. * kvm
  55. * libvirt
  56. * dnsmasq
  57. * vlan
  58. * open-iscsi and iscsitarget (if you use iscsi volumes)
  59. * aoetools and vblade-persist (if you use aoe-volumes)
  60. Nova uses cutting-edge versions of many packages. There are ubuntu packages in
  61. the nova-core trunk ppa. You can use add this ppa to your sources list on an
  62. ubuntu machine with the following commands::
  63. sudo apt-get install -y python-software-properties
  64. sudo add-apt-repository ppa:nova-core/trunk
  65. Recommended
  66. -----------
  67. * euca2ools: python implementation of aws ec2-tools and ami tools
  68. * build tornado to use C module for evented section
  69. Installation
  70. --------------
  71. You can install from packages for your particular Linux distribution if they are
  72. available. Otherwise you can install from source by checking out the source
  73. files from the `Nova Source Code Repository <http://code.launchpad.net/nova>`_
  74. and running::
  75. python setup.py install
  76. Configuration
  77. ---------------
  78. Configuring the host system
  79. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  80. Nova can be configured in many different ways. In this "Getting Started with Nova" document, we only provide what you need to get started as quickly as possible. For a more detailed description of system
  81. configuration, start reading through `Installing and Configuring OpenStack Compute <http://docs.openstack.org/openstack-compute/admin/content/ch03.html>`_.
  82. `Detailed instructions for creating a volume group are available <http://docs.openstack.org/openstack-compute/admin/content/ch05s07.html>`_, or use these quick instructions.
  83. * Create a volume group (you can use an actual disk for the volume group as
  84. well)::
  85. # This creates a 1GB file to create volumes out of
  86. dd if=/dev/zero of=MY_FILE_PATH bs=100M count=10
  87. losetup --show -f MY_FILE_PATH
  88. # replace /dev/loop0 below with whatever losetup returns
  89. # nova-volumes is the default for the --volume_group flag
  90. vgcreate nova-volumes /dev/loop0
  91. Configuring Nova
  92. ~~~~~~~~~~~~~~~~
  93. Configuration of the entire system is performed through python-gflags. The
  94. best way to track configuration is through the use of a flagfile.
  95. A flagfile is specified with the ``--flagfile=FILEPATH`` argument to the binary
  96. when you launch it. Flagfiles for nova are typically stored in
  97. ``/etc/nova/nova.conf``, and flags specific to a certain program are stored in
  98. ``/etc/nova/nova-COMMAND.conf``. Each configuration file can include another
  99. flagfile, so typically a file like ``nova-manage.conf`` would have as its first
  100. line ``--flagfile=/etc/nova/nova.conf`` to load the common flags before
  101. specifying overrides or additional options.
  102. To get a current comprehensive list of flag file options, run bin/nova-<servicename> --help, or refer to a static list at `Reference for Flags in nova.conf <http://docs.openstack.org/openstack-compute/admin/content/ch05s08.html>`_.
  103. A sample configuration to test the system follows::
  104. --verbose
  105. --nodaemon
  106. --auth_driver=nova.auth.dbdriver.DbDriver
  107. Running
  108. -------
  109. There are many parts to the nova system, each with a specific function. They
  110. are built to be highly-available, so there are may configurations they can be
  111. run in (ie: on many machines, many listeners per machine, etc). This part
  112. of the guide only gets you started quickly, to learn about HA options, see
  113. `Installing and Configuring OpenStack Compute <http://docs.openstack.org/openstack-compute/admin/content/ch03.html>`_.
  114. Launch supporting services
  115. * rabbitmq
  116. * redis (optional)
  117. * mysql (optional)
  118. * openldap (optional)
  119. Launch nova components, each should have ``--flagfile=/etc/nova/nova.conf``
  120. * nova-api
  121. * nova-compute
  122. * nova-objectstore
  123. * nova-volume
  124. * nova-scheduler