Docs changes

Change-Id: Id18c19ed5089a306bbac263a07d7f6e162e43052
This commit is contained in:
Ilya Pekelny 2013-06-27 13:48:06 +03:00
parent 276fd091e3
commit 88e5651c2a
7 changed files with 130 additions and 92 deletions

View File

@ -28,7 +28,7 @@ we can add in your own distribution support.
are bootstrapping rhel (and how we are detecting rhel) for an example.
**conf/distros**
This set of yaml files contains defintions for what packages,
This set of yaml files contains definitions for what packages,
what pip to package mappings and what code entrypoints are used
when setting up a given component. The critical key here is the
``platform_pattern`` key which is used as a regular expression to

View File

@ -123,6 +123,3 @@ Anvil is designed to have the following set of software components:
(if the component supports this concept) as well as which distribution the persona supports (if
there is a desire to restrict a given persona to a given distribution this field can be
used to accomplish that goal).

View File

@ -5,6 +5,11 @@
Examples
========
Pre-installing
--------------
See [Getting started! pre-setup] [gs] section to make the right preparation.
Bootstrapping
-------------
@ -151,3 +156,4 @@ Uninstalling
:linenos:
[gs]: /en/latest/topics/gettingstarted.html#pre-setup

View File

@ -5,63 +5,97 @@
Features
========
- A set of configuration files (in yaml format) that shows common/component/distribution configurations.
- Supports the following *actions* on the various `OpenStack`_ components.
Configurations
--------------
* **Installing**:
A set of configuration files (in yaml format) that shows common/component/distribution configurations.
All the yaml configuration files could be found in:
* conf/templates/keystone/
* conf/components/
* conf/distros/
* subdirectories of conf/personas/
Installing
----------
* Automatically downloading source from git and performing tag/branch checkouts.
* Automatically verifying and translating requirement files to known `pypi`_/rpm packages.
* Automatically installing and building missing dependencies (`pypi`_ and rpm) for you.
* Automatically configuring the needed files, symlinks, adjustments, and any patches.
* **Starting**: starting of the components sub-programs with
the needed configuration via the common `daemon`_ model.
Testing
-------
Automatically running each component unit tests.
Starting
--------
Starting of the components sub-programs with the needed configuration via the common `daemon`_ model.
* Also creates a ``pid``, ``stderr`` and ``stdout`` file set for debugging/examination.
* Trace files could be found in $HOME/openstack/<component>/traces/
* **Stopping**: stopping of the previously started components.
* **Uninstalling**: getting you back to an initial 'clean' state.
Stopping
--------
Stopping of the previously started components.
Uninstalling
------------
Getting you back to an initial 'clean' state:
* Removing installed configuration.
* Undoing of installed files/directories.
* Removing of packages installed.
* **Testing**: automatically running each components unit tests.
* **Packaging**: creating a basic set of packages that matches the components selected.
Packaging
---------
- Supports automatic injection of dependencies and creation of a ``changelog`` from git history.
* Ceating a basic set of packages that matches the components selected.
* Supports automatic injection of dependencies and creation of a ``changelog`` from git history.
* **Status**: checking the status of the running components sub-programs
Status
------
- Supports **dry-run** mode (to see what *would* happen).
- Written in **python** so it matches the style of other `OpenStack`_ components.
- **Code decoupling** (thus encouraging re-use by others)
* Checking the status of the running components sub-programs
Dry run
-------
``dry_run`` satisfied with any action it turns verbose and all modifying the outside world calls (running external commands, kill, mkdir ......) are not executing.
Pythonic
--------
Written in **python** so it matches the style of other `OpenStack`_ components.
Code decoupling
---------------
(thus encouraging re-use by others)
* Components & actions are isolated as individual classes.
* Supports installation *personas* that define what is to be installed, thus
decoupling the 'what' from the 'how'.
* Supports installation personas that define what is to be installed, thus decoupling the 'what' from the 'how'.
- **Install/start/stop... resumption** so that when you install you can ``ctrl+c`` and resume later (where applicable).
- Extensive **logging** (and debug mode)
Resumption
----------
* All commands executed are logged, all configuration files read/written (and so on).
Install/start/stop resumption so that when you install you can ``ctrl+c`` and resume later (where applicable).
- **Package tracking and building**
Extensive logging
-----------------
* Creation of a single rpm of your installation.
* All commands executed are logged in standard output, all configuration files read/written (and so on).
* Debug mode could be activate with ``-v`` option
* This freezes what is needed
for that release to a known set of packages and dependencies.
Package tracking and building
-----------------------------
* Creation of a single rpm of your installation. This freezes what is needed for that release to a known set of packages and dependencies.
* Automatically building and/or including all needed dependencies.
* Includes application of your distributions native packages (when applicable).
.. _epel: http://fedoraproject.org/wiki/EPEL
.. _forking: http://users.telenet.be/bartl/classicperl/fork/all.html
.. _screen: http://www.manpagez.com/man/1/screen/
.. _upstart: http://upstart.ubuntu.com/
.. _OpenStack: http://openstack.org/
.. _pypi: http://pypi.python.org/pypi
.. _daemon: http://en.wikipedia.org/wiki/Daemon_(computing)

View File

@ -83,7 +83,7 @@ instances wont have a `tty`_).
$ sudo visudo
Then comment out line:
Then comment out line
::
@ -95,32 +95,32 @@ Also disable selinux:
$ sudo vi /etc/sysconfig/selinux
Change *SELINUX=enforcing* to *SELINUX=disabled* then reboot.
Change `SELINUX=enforcing` to `SELINUX=disabled` then reboot.
::
$ sudo reboot
Also to avoid qemu errors please follow the solution @ https://bugs.launchpad.net/anvil/+bug/985786
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.
This can be typically solved by running the following (and then updating the ``instances_path`` option)
Create specifc user to isolate all the Anvil processes from root user
::
$ sudo mkdir -pv /home/openstack
$ sudo chmod -R a+rwx /home/openstack
$ sudo useradd <username>
$ sudo passwd <username>
Also as documented at http://docs.openstack.org/essex/openstack-compute/admin/content/qemu.html#fixes-rhel-qemu
please run the following (**after** installation).
Set user as sudoer
::
$ setsebool -P virt_use_execmem on
$ sudo ln -s /usr/libexec/qemu-kvm /usr/bin/qemu-system-x86_64
$ sudo service libvirtd restart
$ sudo visudo
Add `<username> ALL=(ALL) ALL`
Make all the rest of actions as <username> user
::
$ sudo su - <username>
Get git!
--------
@ -138,6 +138,8 @@ Well grab the latest version of ANVIL via git:
::
$ git clone git://github.com/stackforge/anvil.git
$ cd anvil
$ git fetch origin <stable/version>
Configuration
@ -145,8 +147,10 @@ Configuration
Any configuration to be updated should now be done.
Please edit the corresponding files in ``conf/components/`` or ``conf/components/personas``
Please edit the corresponding yaml files in ``conf/components/`` or ``conf/components/personas``
to fit your desired configuration of nova/glance and the other OpenStack components.
You can use ``-p <conf/components/required_file.yaml>`` option with following commands
to use configuration files.
If you are using a ``FlatManager`` and RH/Fedora then you might want to read and follow:
@ -204,6 +208,23 @@ You should see a set of distribution packages and/or pips being
installed and configuration files being written as ANVIL figures out how to
install your desired components from the prepared packages built in the last
step (if you desire more informational output add a ``-v`` to that command).
``-p`` option is actual too. You can specify conf file just like in ``prepare`` action.
Without specified conf file command will execute with conf/personas/in-a-box/basic.yaml
Also to avoid qemu errors please follow the solution @ https://bugs.launchpad.net/anvil/+bug/985786
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.
Also as documented at http://docs.openstack.org/essex/openstack-compute/admin/content/qemu.html#fixes-rhel-qemu
please run the following (**after** installation).
::
$ setsebool -P virt_use_execmem on # optional
$ sudo ln -s /usr/libexec/qemu-kvm /usr/bin/qemu-system-x86_64
$ sudo service libvirtd restart
Testing
----------

View File

@ -1,20 +0,0 @@
.. _solved-problems:
===============
Solved Problems
===============
MySQL user denied
-----------------
This seems common and can be fixed by running one of the steps at
http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html
The temporary folder for building (/tmp/XYZ) is not owned by your user!
-----------------------------------------------------------------------
This is a new feature of pip>=1.3 where it seems to incorrectly handle the SUDO
user. To get around this just remove the above directory and reactivate the
appropriate ANVIL command.
Issue @ https://github.com/pypa/pip/issues/982