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. are bootstrapping rhel (and how we are detecting rhel) for an example.
**conf/distros** **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 what pip to package mappings and what code entrypoints are used
when setting up a given component. The critical key here is the when setting up a given component. The critical key here is the
``platform_pattern`` key which is used as a regular expression to ``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 (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 there is a desire to restrict a given persona to a given distribution this field can be
used to accomplish that goal). used to accomplish that goal).

View File

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

View File

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

View File

@ -83,7 +83,7 @@ instances wont have a `tty`_).
$ sudo visudo $ sudo visudo
Then comment out line: Then comment out line
:: ::
@ -95,32 +95,32 @@ Also disable selinux:
$ sudo vi /etc/sysconfig/selinux $ sudo vi /etc/sysconfig/selinux
Change *SELINUX=enforcing* to *SELINUX=disabled* then reboot. Change `SELINUX=enforcing` to `SELINUX=disabled` then reboot.
:: ::
$ sudo reboot $ sudo reboot
Also to avoid qemu errors please follow the solution @ https://bugs.launchpad.net/anvil/+bug/985786 Create specifc user to isolate all the Anvil processes from root user
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)
:: ::
$ sudo mkdir -pv /home/openstack $ sudo useradd <username>
$ sudo chmod -R a+rwx /home/openstack $ sudo passwd <username>
Also as documented at http://docs.openstack.org/essex/openstack-compute/admin/content/qemu.html#fixes-rhel-qemu Set user as sudoer
please run the following (**after** installation).
:: ::
$ setsebool -P virt_use_execmem on $ sudo visudo
$ sudo ln -s /usr/libexec/qemu-kvm /usr/bin/qemu-system-x86_64
$ sudo service libvirtd restart
Add `<username> ALL=(ALL) ALL`
Make all the rest of actions as <username> user
::
$ sudo su - <username>
Get git! Get git!
-------- --------
@ -138,6 +138,8 @@ Well grab the latest version of ANVIL via git:
:: ::
$ git clone git://github.com/stackforge/anvil.git $ git clone git://github.com/stackforge/anvil.git
$ cd anvil
$ git fetch origin <stable/version>
Configuration Configuration
@ -145,8 +147,10 @@ Configuration
Any configuration to be updated should now be done. 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. 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: 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 installed and configuration files being written as ANVIL figures out how to
install your desired components from the prepared packages built in the last 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). 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 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