2012-03-30 13:26:11 -07:00
|
|
|
|
.. _getting-started:
|
|
|
|
|
|
|
|
|
|
===============
|
|
|
|
|
Getting Started
|
|
|
|
|
===============
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Simple setup!
|
|
|
|
|
=============
|
|
|
|
|
|
2013-02-23 07:11:02 +00:00
|
|
|
|
Made to be as simple as possible, but not too simple.
|
2012-03-30 13:26:11 -07:00
|
|
|
|
|
|
|
|
|
Prerequisites
|
|
|
|
|
=============
|
|
|
|
|
|
2012-08-28 12:16:59 -07:00
|
|
|
|
RTFM
|
|
|
|
|
----
|
|
|
|
|
|
|
|
|
|
Read the great documentation for developers/admins at
|
|
|
|
|
|
|
|
|
|
- http://docs.openstack.org/developer/
|
|
|
|
|
- http://docs.openstack.org/
|
|
|
|
|
|
|
|
|
|
This will vastly help you understand what the
|
2013-06-01 18:21:52 -07:00
|
|
|
|
configurations and options do when ANVIL configures them.
|
2012-08-28 12:16:59 -07:00
|
|
|
|
|
2012-03-30 13:26:11 -07:00
|
|
|
|
Linux
|
|
|
|
|
-----
|
|
|
|
|
|
2013-06-01 18:21:52 -07:00
|
|
|
|
One of the tested distributions.
|
2012-03-30 13:26:11 -07:00
|
|
|
|
|
2013-06-01 18:21:52 -07:00
|
|
|
|
- RHEL 6.2+
|
|
|
|
|
- CentOS 6.2+
|
|
|
|
|
- Oracle Enteprise Linux 6.2+
|
|
|
|
|
|
|
|
|
|
You can get CentOS 6.2+ (**64-bit** is preferred) from https://www.centos.org/
|
2012-03-30 13:26:11 -07:00
|
|
|
|
|
|
|
|
|
Networking
|
|
|
|
|
----------
|
|
|
|
|
|
|
|
|
|
**Important!**
|
|
|
|
|
--------------
|
|
|
|
|
|
2012-08-28 12:16:59 -07:00
|
|
|
|
Since networking can affect how your cloud runs please check out this link:
|
2012-03-30 13:26:11 -07:00
|
|
|
|
|
2012-05-24 18:12:43 -07:00
|
|
|
|
http://docs.openstack.org/trunk/openstack-compute/admin/content/configuring-networking-on-the-compute-node.html
|
2012-03-30 13:26:11 -07:00
|
|
|
|
|
|
|
|
|
Check out the root article and the sub-chapters there to understand more
|
|
|
|
|
of what these settings mean.
|
|
|
|
|
|
2012-08-28 12:16:59 -07:00
|
|
|
|
**This is typically one of the hardest aspects of OpenStack to configure and get right!**
|
2012-03-30 13:26:11 -07:00
|
|
|
|
|
|
|
|
|
--------------
|
|
|
|
|
|
2012-08-28 12:16:59 -07:00
|
|
|
|
The following settings in ``conf/components/nova.yaml`` are an example of settings that will
|
|
|
|
|
affect the configuration of your compute nodes network.
|
2012-03-30 13:26:11 -07:00
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
2012-08-28 12:16:59 -07:00
|
|
|
|
flat_network_bridge: br100
|
|
|
|
|
flat_interface: eth0
|
|
|
|
|
public_interface: eth0
|
|
|
|
|
fixed_range: 10.0.0.0/24
|
|
|
|
|
fixed_network_size: 256
|
|
|
|
|
floating_range: 172.24.4.224/28
|
|
|
|
|
test_floating_pool: test
|
|
|
|
|
test_floating_range: 192.168.253.0/29
|
2012-03-30 13:26:11 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Installation
|
|
|
|
|
============
|
|
|
|
|
|
|
|
|
|
Pre-setup
|
|
|
|
|
---------
|
|
|
|
|
|
2012-08-17 14:44:07 -07:00
|
|
|
|
Since RHEL requires a `tty`_ to perform ``sudo`` commands we need
|
2012-03-30 13:26:11 -07:00
|
|
|
|
to disable this so ``sudo`` can run without a `tty`_. This seems needed
|
|
|
|
|
since nova and other components attempt to do ``sudo`` commands. This
|
2012-08-17 14:44:07 -07:00
|
|
|
|
isn’t possible in RHEL unless you disable this (since those
|
2012-08-28 12:16:59 -07:00
|
|
|
|
instances won’t have a `tty`_).
|
2012-03-30 13:26:11 -07:00
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
|
|
$ sudo visudo
|
|
|
|
|
|
|
|
|
|
Then comment out line:
|
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
|
|
Default requiretty
|
|
|
|
|
|
|
|
|
|
Also disable selinux:
|
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
|
|
$ sudo vi /etc/sysconfig/selinux
|
|
|
|
|
|
2013-06-01 18:21:52 -07:00
|
|
|
|
Change *SELINUX=enforcing* to *SELINUX=disabled* then reboot.
|
2012-03-30 13:26:11 -07:00
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
|
|
$ sudo reboot
|
|
|
|
|
|
2012-05-18 16:43:49 -07:00
|
|
|
|
Also to avoid qemu errors please follow the solution @ https://bugs.launchpad.net/anvil/+bug/985786
|
2012-08-22 17:55:30 -07:00
|
|
|
|
which will ensure that the ``qemu`` user can write to your instances directory. If needed edit ``conf/components/nova.yaml``
|
|
|
|
|
and also adjust the ``instances_path`` option.
|
2012-05-18 16:43:49 -07:00
|
|
|
|
|
2012-08-22 17:55:30 -07:00
|
|
|
|
This can be typically solved by running the following (and then updating the ``instances_path`` option)
|
2012-05-30 10:53:36 -07:00
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
|
|
$ sudo mkdir -pv /home/openstack
|
|
|
|
|
$ sudo chmod -R a+rwx /home/openstack
|
|
|
|
|
|
2012-08-28 12:16:59 -07:00
|
|
|
|
Also as documented at http://docs.openstack.org/essex/openstack-compute/admin/content/qemu.html#fixes-rhel-qemu
|
2013-06-01 18:21:52 -07:00
|
|
|
|
please run the following (**after** installation).
|
2012-08-28 12:16:59 -07:00
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
|
|
$ setsebool -P virt_use_execmem on
|
|
|
|
|
$ sudo ln -s /usr/libexec/qemu-kvm /usr/bin/qemu-system-x86_64
|
|
|
|
|
$ sudo service libvirtd restart
|
2012-05-30 10:53:36 -07:00
|
|
|
|
|
2012-03-30 13:26:11 -07:00
|
|
|
|
|
2012-04-11 16:56:23 -07:00
|
|
|
|
Get git!
|
|
|
|
|
--------
|
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
|
|
$ sudo yum install git -y
|
|
|
|
|
|
|
|
|
|
|
2012-03-30 13:26:11 -07:00
|
|
|
|
Download
|
|
|
|
|
--------
|
|
|
|
|
|
2012-05-02 21:19:41 -07:00
|
|
|
|
We’ll grab the latest version of ANVIL via git:
|
2012-03-30 13:26:11 -07:00
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
2013-04-27 13:15:04 -07:00
|
|
|
|
$ git clone git://github.com/stackforge/anvil.git
|
2012-03-30 13:26:11 -07:00
|
|
|
|
|
2013-06-03 10:34:03 -07:00
|
|
|
|
|
2012-03-30 13:26:11 -07:00
|
|
|
|
Configuration
|
|
|
|
|
-------------
|
|
|
|
|
|
2012-08-28 12:16:59 -07:00
|
|
|
|
Any configuration to be updated should now be done.
|
2012-03-30 13:26:11 -07:00
|
|
|
|
|
2012-08-28 12:16:59 -07:00
|
|
|
|
Please edit the corresponding files in ``conf/components/`` or ``conf/components/personas``
|
|
|
|
|
to fit your desired configuration of nova/glance and the other OpenStack components.
|
2012-03-30 13:39:03 -07:00
|
|
|
|
|
2012-08-28 12:16:59 -07:00
|
|
|
|
If you are using a ``FlatManager`` and RH/Fedora then you might want to read and follow:
|
2012-05-29 16:43:18 -07:00
|
|
|
|
|
|
|
|
|
http://www.techotopia.com/index.php/Creating_an_RHEL_5_KVM_Networked_Bridge_Interface
|
2013-04-27 13:15:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Pre-installing
|
2013-06-01 18:21:52 -07:00
|
|
|
|
--------------
|
2013-04-27 13:15:04 -07:00
|
|
|
|
|
|
|
|
|
In order to ensure that anvil will have its correct dependencies you need to first run the
|
|
|
|
|
bootstrapping code that will setup said dependencies for your operating system.
|
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
|
|
sudo ./smithy --bootstrap
|
|
|
|
|
|
2013-06-01 18:21:52 -07:00
|
|
|
|
Preparing
|
|
|
|
|
---------
|
|
|
|
|
|
|
|
|
|
Now prepare *OpenStacks* components by running the following:
|
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
|
|
./smithy -a prepare
|
|
|
|
|
|
|
|
|
|
You should see a corresponding OpenStack repositories getting downloaded using
|
|
|
|
|
git, python setups occurring and configuration files being written as well as
|
2013-06-28 11:15:23 -07:00
|
|
|
|
source rpm packages being built and a repository setup from those components (if you
|
|
|
|
|
desire more informational output add a ``-v`` to that command).
|
|
|
|
|
|
|
|
|
|
Building
|
|
|
|
|
--------
|
|
|
|
|
|
|
|
|
|
Now build *OpenStacks* components by running the following:
|
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
|
|
sudo ./smithy -a build
|
|
|
|
|
|
|
|
|
|
You should see a corresponding OpenStack components and dependencies at this
|
|
|
|
|
stage being packaged into rpm files and two repositories being setup for you.
|
|
|
|
|
One will be the dependencies that the OpenStack components need to run and the
|
|
|
|
|
other will be the OpenStack components themselves.
|
2013-06-01 18:21:52 -07:00
|
|
|
|
|
2012-03-30 13:39:03 -07:00
|
|
|
|
Installing
|
|
|
|
|
----------
|
|
|
|
|
|
|
|
|
|
Now install *OpenStacks* components by running the following:
|
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
2012-08-17 14:44:07 -07:00
|
|
|
|
sudo ./smithy -a install
|
2012-03-30 13:39:03 -07:00
|
|
|
|
|
|
|
|
|
You should see a set of distribution packages and/or pips being
|
2013-06-01 18:21:52 -07:00
|
|
|
|
installed and configuration files being written as ANVIL figures out how to
|
|
|
|
|
install your desired components from the prepared packages built in the last
|
2013-06-03 10:34:03 -07:00
|
|
|
|
step (if you desire more informational output add a ``-v`` to that command).
|
2012-03-30 13:39:03 -07:00
|
|
|
|
|
2012-08-22 18:12:26 -07:00
|
|
|
|
Testing
|
2012-08-22 17:55:30 -07:00
|
|
|
|
----------
|
|
|
|
|
|
|
|
|
|
Now (if you choose) you can run each *OpenStack* components unit tests by running the following:
|
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
|
|
sudo ./smithy -a test
|
|
|
|
|
|
|
|
|
|
You should see a set of unit tests being ran (ideally with zero failures).
|
|
|
|
|
|
2012-03-30 13:39:03 -07:00
|
|
|
|
Starting
|
|
|
|
|
--------
|
|
|
|
|
|
|
|
|
|
Now that you have installed *OpenStack* you can now start your
|
|
|
|
|
*OpenStack* components by running the following.
|
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
2012-08-17 14:44:07 -07:00
|
|
|
|
sudo ./smithy -a start
|
2012-03-30 13:39:03 -07:00
|
|
|
|
|
|
|
|
|
|
2013-06-01 18:21:52 -07:00
|
|
|
|
Check horizon (if applicable)
|
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2012-03-30 13:39:03 -07:00
|
|
|
|
|
|
|
|
|
Once that occurs you should be able to go to your hosts ip with a web
|
|
|
|
|
browser and view horizon which can be logged in with the user ``admin``
|
2013-06-01 18:21:52 -07:00
|
|
|
|
and the password you entered when prompted for.
|
2012-03-30 13:39:03 -07:00
|
|
|
|
|
|
|
|
|
If you see a login page and can access horizon then:
|
|
|
|
|
|
|
|
|
|
``Congratulations. You did it!``
|
|
|
|
|
|
|
|
|
|
Command line tools
|
|
|
|
|
~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
2012-05-02 21:19:41 -07:00
|
|
|
|
In your ANVIL directory:
|
2012-03-30 13:39:03 -07:00
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
2012-08-30 21:07:29 -07:00
|
|
|
|
source /etc/anvil/install.rc
|
2012-03-30 13:39:03 -07:00
|
|
|
|
|
|
|
|
|
This should set up the environment variables you need to run OpenStack
|
|
|
|
|
CLI tools:
|
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
|
|
nova <command> [options] [args]
|
|
|
|
|
nova-manage <command> [options] [args]
|
|
|
|
|
keystone <command> [options] [args]
|
|
|
|
|
glance <command> [options] [args]
|
|
|
|
|
....
|
|
|
|
|
|
|
|
|
|
If you desire to use eucalyptus tools (ie `euca2ools`_) which use the
|
|
|
|
|
EC2 apis run the following to get your EC2 certs:
|
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
2013-06-01 18:21:52 -07:00
|
|
|
|
./tools/euca.sh $OS_USERNAME $OS_TENANT_NAME
|
2012-03-30 13:39:03 -07:00
|
|
|
|
|
|
|
|
|
It broke?
|
|
|
|
|
~~~~~~~~~
|
|
|
|
|
|
2012-08-17 14:44:07 -07:00
|
|
|
|
First run the following to check the status of each component.
|
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
|
|
sudo ./smithy -a status
|
|
|
|
|
|
|
|
|
|
If you do not see all green status then you should run the following and see
|
|
|
|
|
if any of the ``stderr`` and ``stdout`` files will give you more information
|
|
|
|
|
about what is occuring
|
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
|
|
sudo ./smithy -a status --show
|
|
|
|
|
|
|
|
|
|
This will dump out those files (truncated to not be to verbose) so that anything
|
|
|
|
|
peculaliar can be seen. If nothing can be then go to the installation directory (typically ``~/openstack``)
|
|
|
|
|
and check the ``traces`` directory of each component and check if anything looks fishy.
|
2012-03-30 13:39:03 -07:00
|
|
|
|
|
|
|
|
|
Stopping
|
|
|
|
|
--------
|
|
|
|
|
|
|
|
|
|
Once you have started *OpenStack* services you can stop them by running
|
|
|
|
|
the following:
|
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
2012-08-17 14:44:07 -07:00
|
|
|
|
sudo ./smithy -a stop
|
2012-03-30 13:39:03 -07:00
|
|
|
|
|
|
|
|
|
You should see a set of stop actions happening and ``stderr`` and
|
|
|
|
|
``stdout`` and ``pid`` files being removed (if you desire more
|
|
|
|
|
informational output add a ``-v`` or a ``-vv`` to that command). This
|
|
|
|
|
ensures the above a daemon that was started is now killed. A good way to
|
|
|
|
|
check if it killed everything correctly is to run the following.
|
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
|
|
sudo ps -elf | grep python
|
|
|
|
|
sudo ps -elf | grep apache
|
|
|
|
|
|
|
|
|
|
There should be no entries like ``nova``, ``glance``, ``apache``,
|
|
|
|
|
``httpd``. If there are then the stop may have not occurred correctly.
|
|
|
|
|
If this is the case run again with a ``-v`` or a ``-vv`` or check the
|
|
|
|
|
``stderr``, ``stdout``, ``pid`` files for any useful information on what
|
|
|
|
|
is happening.
|
|
|
|
|
|
|
|
|
|
Uninstalling
|
|
|
|
|
------------
|
|
|
|
|
|
|
|
|
|
Once you have stopped (if you have started it) *OpenStack* services you
|
|
|
|
|
can uninstall them by running the following:
|
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
2012-08-17 14:44:07 -07:00
|
|
|
|
sudo ./smithy -a uninstall
|
2012-03-30 13:39:03 -07:00
|
|
|
|
|
|
|
|
|
You should see a set of packages, configuration and directories, being
|
|
|
|
|
removed (if you desire more informational output add a ``-v`` or a
|
|
|
|
|
``-vv`` to that command). On completion the directory specified at
|
|
|
|
|
~/openstack be empty.
|
|
|
|
|
|
|
|
|
|
Issues
|
|
|
|
|
======
|
|
|
|
|
|
2012-05-04 16:31:49 -07:00
|
|
|
|
Please report issues/bugs to https://launchpad.net/anvil. Much appreciated!
|
2012-03-30 13:26:11 -07:00
|
|
|
|
|
2012-03-30 13:39:03 -07:00
|
|
|
|
.. _euca2ools: http://open.eucalyptus.com/wiki/Euca2oolsGuide
|
|
|
|
|
.. _PID: http://en.wikipedia.org/wiki/Process_identifier
|
2012-03-30 13:42:52 -07:00
|
|
|
|
.. _tty: http://linux.die.net/man/4/tty
|
2012-05-31 15:38:19 -04:00
|
|
|
|
.. _apache: https://httpd.apache.org/
|