<commit_before>.. _getting-started:

===============
Getting Started
===============


Simple setup!
=============

Made to be as simple as possible, but not to simple.

Prerequisites
=============

Linux
-----

One of the tested Linux distributions (RHEL 6.2, Ubuntu 11.10, Fedora
16)

You can get Ubuntu 11.10 (**64-bit** is preferred) from
http://releases.ubuntu.com/11.10/

You can get RHEL 6.2 (**64-bit** is preferred) from
http://rhn.redhat.com/.

You can get Fedora 16 (**64-bit** is preferred) from
https://fedoraproject.org/get-fedora, so don’t worry if you do not have
a RHN subscription.

Networking
----------

**Important!**
--------------

Since networking can affect how your cloud runs please check out this
link:

http://docs.openstack.org/diablo/openstack-compute/admin/content/configuring-networking-on-the-compute-node.html

Check out the root article and the sub-chapters there to understand more
of what these settings mean.

**This is typically one of the hardest aspects of *OpenStack* to
configure and get right!**

--------------

ANVIL will configure the network in a identical manner to version
*1.0*. This means that the default network manager will be the
*FlatDHCPManager*. The following settings are relevant in configuring
your network.

::

     flat_network_bridge = ${FLAT_NETWORK_BRIDGE:-br100}
     flat_interface = ${FLAT_INTERFACE:-eth0}
     public_interface = ${PUBLIC_INTERFACE:-eth0}

The above settings will affect exactly which network interface is used
as the *source* interface which will be used as a network *bridge*.

::

    fixed_range = ${NOVA_FIXED_RANGE:-10.0.0.0/24}
    fixed_network_size = ${NOVA_FIXED_NETWORK_SIZE:-256} 
    floating_range = ${FLOATING_RANGE:-172.24.4.224/28}
    test_floating_pool = ${TEST_FLOATING_POOL:-test}
    test_floating_range = ${TEST_FLOATING_RANGE:-192.168.253.0/29}

The above settings will determine exactly how nova when running assigns
IP addresses. By default a single network is created using
*fixed\_range* with a network size specified by *fixed\_network\_size*.
Note the size here is *256* which is the number of addresses in the
*10.0.0.0/24* subnet (*32 - 24* bits is 8 bits or 256 addresses). The
floating pool is similar to fixed addresses (**TODO** describe this
more).

Installation
============

Pre-setup
---------

Since RHEL/Fedora requires a `tty`_ to perform ``sudo`` commands we need
to disable this so ``sudo`` can run without a `tty`_. This seems needed
since nova and other components attempt to do ``sudo`` commands. This
isn’t possible in RHEL/Fedora unless you disable this (since those
instances won’t have a `tty`_ ).

**For RHEL and Fedora 16:**

::

    $ sudo visudo 

Then comment out line:

::

    Default requiretty

Also disable selinux:

::

     $ sudo vi /etc/sysconfig/selinux

Change *SELINUX=enforcing* to *SELINUX=disabled* then it seems you need
to reboot.

::

     $ sudo reboot

**For Ubuntu:**

You are off the hook.

Users
-----

We need to add a admin user so that horizon can run under `apache`_.

**For Ubuntu:**

::

    $ apt-get install sudo -y
    $ sudo adduser horizon
    $ sudo adduser horizon admin

**For RHEL/Fedora 16:**

You are off the hook as long as your user has ``sudo`` access.

Get git!
--------

**For Ubuntu:**

::
<commit_msg>Update docs about instances directory issue<commit_after>.. _getting-started:

===============
Getting Started
===============


Simple setup!
=============

Made to be as simple as possible, but not to simple.

Prerequisites
=============

Linux
-----

One of the tested Linux distributions (RHEL 6.2, Ubuntu 11.10, Fedora
16)

You can get Ubuntu 11.10 (**64-bit** is preferred) from
http://releases.ubuntu.com/11.10/

You can get RHEL 6.2 (**64-bit** is preferred) from
http://rhn.redhat.com/.

You can get Fedora 16 (**64-bit** is preferred) from
https://fedoraproject.org/get-fedora, so don’t worry if you do not have
a RHN subscription.

Networking
----------

**Important!**
--------------

Since networking can affect how your cloud runs please check out this
link:

http://docs.openstack.org/diablo/openstack-compute/admin/content/configuring-networking-on-the-compute-node.html

Check out the root article and the sub-chapters there to understand more
of what these settings mean.

**This is typically one of the hardest aspects of *OpenStack* to
configure and get right!**

--------------

ANVIL will configure the network in a identical manner to version
*1.0*. This means that the default network manager will be the
*FlatDHCPManager*. The following settings are relevant in configuring
your network.

::

     flat_network_bridge = ${FLAT_NETWORK_BRIDGE:-br100}
     flat_interface = ${FLAT_INTERFACE:-eth0}
     public_interface = ${PUBLIC_INTERFACE:-eth0}

The above settings will affect exactly which network interface is used
as the *source* interface which will be used as a network *bridge*.

::

    fixed_range = ${NOVA_FIXED_RANGE:-10.0.0.0/24}
    fixed_network_size = ${NOVA_FIXED_NETWORK_SIZE:-256} 
    floating_range = ${FLOATING_RANGE:-172.24.4.224/28}
    test_floating_pool = ${TEST_FLOATING_POOL:-test}
    test_floating_range = ${TEST_FLOATING_RANGE:-192.168.253.0/29}

The above settings will determine exactly how nova when running assigns
IP addresses. By default a single network is created using
*fixed\_range* with a network size specified by *fixed\_network\_size*.
Note the size here is *256* which is the number of addresses in the
*10.0.0.0/24* subnet (*32 - 24* bits is 8 bits or 256 addresses). The
floating pool is similar to fixed addresses (**TODO** describe this
more).

Installation
============

Pre-setup
---------

Since RHEL/Fedora requires a `tty`_ to perform ``sudo`` commands we need
to disable this so ``sudo`` can run without a `tty`_. This seems needed
since nova and other components attempt to do ``sudo`` commands. This
isn’t possible in RHEL/Fedora unless you disable this (since those
instances won’t have a `tty`_ ).

**For RHEL and Fedora 16:**

::

    $ sudo visudo 

Then comment out line:

::

    Default requiretty

Also disable selinux:

::

     $ sudo vi /etc/sysconfig/selinux

Change *SELINUX=enforcing* to *SELINUX=disabled* then it seems you need
to 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 ``anvil.ini``
and also adjust the ``instances_path`` option (under the ``nova`` section).

**For Ubuntu:**

You are off the hook.

Users
-----

We need to add a admin user so that horizon can run under `apache`_.

**For Ubuntu:**

::

    $ apt-get install sudo -y
    $ sudo adduser horizon
    $ sudo adduser horizon admin

**For RHEL/Fedora 16:**

You are off the hook as long as your user has ``sudo`` access.

Get git!
--------

**For Ubuntu:**

::

{'fraction_non_alphanumeric': 0.12930784824790037, 'fraction_numerical': 0.026353895163625834, 'mean_word_length': 3.644922663080027, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 8, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7042614', 'n_tokens_mistral': 2320, 'n_tokens_neox': 2074, 'n_words': 834}