Refactoring and changing savanna documentation

* Add info on how-to install httpie
* Cosmetic refactoring
* Various minor changes

Partially implements blueprint docs-for-v02

Change-Id: Ie8ea1ab5e0c744b262b5341ab88d965a3d8a7707
This commit is contained in:
Sergey Reshetnyak 2013-07-09 20:24:11 +04:00
parent 3b17811a75
commit 15c9b519cf
10 changed files with 218 additions and 199 deletions

View File

@ -22,57 +22,57 @@ Now we are going to setup development environment for Savanna on your OS.
On OS X Systems:
.. sourcecode:: bash
.. sourcecode:: console
# we actually need pip, which is part of python package
brew install python
pip install virtualenv tox
# we actually need pip, which is part of python package
$ brew install python
$ pip install virtualenv tox
On Ubuntu:
.. sourcecode:: bash
.. sourcecode:: console
sudo apt-get install python-dev python-virtualenv
sydo pip install tox
$ sudo apt-get install python-dev python-virtualenv
$ sudo pip install tox
On Fedora-based distributions (e.g., Fedora/RHEL/CentOS/Scientific Linux):
.. sourcecode:: bash
.. sourcecode:: console
sudo yum install python-devel python-virtualenv
sudo pip install tox
$ sudo yum install python-devel python-virtualenv
$ sudo pip install tox
2. Grab the code from GitHub:
.. sourcecode:: bash
.. sourcecode:: console
git clone git://github.com/stackforge/savanna.git
cd savanna
$ git clone git://github.com/stackforge/savanna.git
$ cd savanna
3. Prepare virtual environment:
.. sourcecode:: console
tools/install_venv
$ tools/install_venv
4. Create config file from default template:
.. sourcecode:: console
cp ./etc/savanna/savanna.conf.sample ./etc/savanna/savanna.conf
$ cp ./etc/savanna/savanna.conf.sample ./etc/savanna/savanna.conf
5. Look through the savanna.conf and change parameters which default values do not suite you.
Set ``os_auth_host`` to the address of your VM with DevStack.
.. note::
Config file can be specified for ``savanna-api`` command using ``--config-file`` flag.
Config file can be specified for ``savanna-api`` command using ``--config-file`` flag.
6. To start Savanna call:
.. sourcecode:: console
tox -evenv -- savanna-api --config-file etc/savanna/savanna.conf -d
$ tox -evenv -- savanna-api --config-file etc/savanna/savanna.conf -d
Setup local OpenStack dashboard with Savanna plugin
@ -82,4 +82,4 @@ Setup local OpenStack dashboard with Savanna plugin
:maxdepth: 1
../horizon/dev.environment.guide
../horizon/dev.environment.guide

View File

@ -8,9 +8,9 @@ For all the code in Savanna we have a rule - it should pass `PEP 8`_.
To check your code against PEP 8 run:
.. sourcecode:: bash
.. sourcecode:: console
tox -e pep8
$ tox -e pep8
.. note::
For more details on coding guidelines see file ``HACKING.rst`` in the root of Savanna repo.
@ -27,9 +27,9 @@ test suite up-to-date with any submitted code changes.
Savanna's suite of unit tests can be executed in an isolated environment
with `Tox`_. To execute the unit tests run the following from the root of Savanna repo:
.. sourcecode:: bash
.. sourcecode:: console
tox -e py27
$ tox -e py27
Documentation Guidelines
@ -40,22 +40,22 @@ The documentation in docstrings should follow the `PEP 257`_ conventions
More specifically:
1. Triple quotes should be used for all docstrings.
2. If the docstring is simple and fits on one line, then just use
one line.
3. For docstrings that take multiple lines, there should be a newline
after the opening quotes, and before the closing quotes.
4. `Sphinx`_ is used to build documentation, so use the restructured text
markup to designate parameters, return values, etc. Documentation on
the sphinx specific markup can be found here:
1. Triple quotes should be used for all docstrings.
2. If the docstring is simple and fits on one line, then just use
one line.
3. For docstrings that take multiple lines, there should be a newline
after the opening quotes, and before the closing quotes.
4. `Sphinx`_ is used to build documentation, so use the restructured text
markup to designate parameters, return values, etc. Documentation on
the sphinx specific markup can be found here:
To build documentation execute. You will find html pages at ``doc/build/html``:
.. sourcecode:: bash
.. sourcecode:: console
tox -e docs
$ tox -e docs
.. note::
@ -65,4 +65,4 @@ To build documentation execute. You will find html pages at ``doc/build/html``:
.. _PEP 8: http://www.python.org/dev/peps/pep-0008/
.. _PEP 257: http://www.python.org/dev/peps/pep-0257/
.. _Tox: http://tox.testrun.org/
.. _Sphinx: http://sphinx.pocoo.org/markup/index.html
.. _Sphinx: http://sphinx.pocoo.org/markup/index.html

View File

@ -16,19 +16,19 @@ Recommended settings:
**How to set fixed IP address for your VM**
1. Open file /Library/Preferences/VMware Fusion/vmnet8/dhcpd.conf
1. Open file ``/Library/Preferences/VMware Fusion/vmnet8/dhcpd.conf``
2. There is a block named "subnet". It might look like this:
.. sourcecode:: bash
.. sourcecode:: text
subnet 192.168.55.0 netmask 255.255.255.0 {
range 192.168.55.128 192.168.55.254;
3. You need to pick an IP address outside of that range. For example - 192.168.55.20.
3. You need to pick an IP address outside of that range. For example - ``192.168.55.20``
4. Copy VM MAC address from VM settings->Network->Advanced
5. Append the following block to file dhcpd.conf (don't forget to replace VM_HOSTNAME and VM_MAC_ADDRESS with actual values):
5. Append the following block to file ``dhcpd.conf`` (don't forget to replace ``VM_HOSTNAME`` and ``VM_MAC_ADDRESS`` with actual values):
.. sourcecode:: bash
.. sourcecode:: text
host VM_HOSTNAME {
hardware ethernet VM_MAC_ADDRESS;
@ -37,7 +37,7 @@ Recommended settings:
6. Now quit all the VmWare Fusion applications and restart vmnet:
.. sourcecode:: bash
.. sourcecode:: console
$ sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --stop
$ sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --start
@ -52,12 +52,12 @@ Now we are going to install DevStack in VM we just created. So, connect to VM wi
1. Clone DevStack:
.. sourcecode:: bash
.. sourcecode:: console
sudo apt-get install git-core
git clone https://github.com/openstack-dev/devstack.git
$ sudo apt-get install git-core
$ git clone https://github.com/openstack-dev/devstack.git
2. Create file localrc in devstack directory with the following content:
2. Create file ``localrc`` in devstack directory with the following content:
.. sourcecode:: bash
@ -100,18 +100,21 @@ Now we are going to install DevStack in VM we just created. So, connect to VM wi
3. Start DevStack:
.. sourcecode:: bash
.. sourcecode:: console
./stack.sh
$ ./stack.sh
4. Once previous step is finished Devstack will print Horizon URL.
Navigate to this URL and login with login "admin" and password from localrc.
4. Once previous step is finished Devstack will print Horizon URL. Navigate to this URL and login with login "admin" and password from localrc.
5. Now we need to modify security rules. It will allow to connect to VMs directly from your host.
Navigate to project's "Admin" security tab and edit default Security Group rules:
5. Now we need to modify security rules. It will allow to connect to VMs directly from your host. Navigate to project's "Admin" security tab and edit default Security Group rules:
TCP, Port range 1-65535, CIDR, 0.0.0.0/0
ICMP, -1, -1, CIDR, 0.0.0.0/0
+-------------+-----------+---------+--------------+-----------+
| IP Protocol | From Port | To Port | Source Group | CIDR |
+=============+===========+=========+==============+===========+
| TCP | 1 | 65535 | CIDR | 0.0.0.0/0 |
+-------------+-----------+---------+--------------+-----------+
| ICMP | -1 | -1 | CIDR | 0.0.0.0/0 |
+-------------+-----------+---------+--------------+-----------+
6. Congratulations! You have OpenStack running in your VM and ready to launch VMs inside that VM :)

View File

@ -11,9 +11,9 @@ Building docs
You should run the following command to build docs locally.
.. sourcecode:: bash
.. sourcecode:: console
tox -e docs
$ tox -e docs
After it you can access builded docs in ``doc/build/`` directory, for example,
main page - ``doc/build/html/index.html``.
@ -21,14 +21,14 @@ main page - ``doc/build/html/index.html``.
For developers needs you can make docs building faster using the following
command :
.. sourcecode:: bash
.. sourcecode:: console
SPHINX_DEBUG=1 tox -e docs
$ SPHINX_DEBUG=1 tox -e docs
or to avoid savanna reinstallation to virtual env each time you want to rebuild
docs you can use the following command (it could be executed only after
running ``tox -e docs`` first time):
.. sourcecode:: bash
.. sourcecode:: console
SPHINX_DEBUG=1 .tox/docs/bin/python setup.py build_sphinx
$ SPHINX_DEBUG=1 .tox/docs/bin/python setup.py build_sphinx

View File

@ -17,27 +17,27 @@ This guide will help you to setup vanilla Hadoop cluster using
To use CLI tools, such as OpenStack's python clients, we should specify
environment variables with addresses and credentials. Let's mind that we have
keystone at ``127.0.0.1:5000`` with tenant ``admin``, credentials ``admin:nova``
and Savanna API at ``127.0.0.1:8080``. Here is a list of commands to set env:
and Savanna API at ``127.0.0.1:8386``. Here is a list of commands to set env:
.. sourcecode:: bash
.. sourcecode:: console
export OS_AUTH_URL=http://127.0.0.1:5000/v2.0/
export OS_TENANT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=nova
$ export OS_AUTH_URL=http://127.0.0.1:5000/v2.0/
$ export OS_TENANT_NAME=admin
$ export OS_USERNAME=admin
$ export OS_PASSWORD=nova
You can append these lines to the ``.bashrc`` and execute ``source .bashrc``.
Now you can get authentification token from OpenStack Keystone service.
.. sourcecode:: bash
.. sourcecode:: console
keystone token-get
$ keystone token-get
If authentication succeed, output will be as follows:
.. sourcecode:: bash
.. sourcecode:: console
+-----------+----------------------------------+
| Property | Value |
@ -51,10 +51,10 @@ If authentication succeed, output will be as follows:
Save ``tenant_id`` which is obviously your Tenant ID and ``id`` which is your
authentication token (X-Auth-Token):
.. sourcecode:: bash
.. sourcecode:: console
export AUTH_TOKEN="dd92e3cdb4e1462690cd444d6b01b746"
export TENANT_ID="62bd2046841e4e94a87b4a22aa886c13"
$ export AUTH_TOKEN="dd92e3cdb4e1462690cd444d6b01b746"
$ export TENANT_ID="62bd2046841e4e94a87b4a22aa886c13"
3. Upload image to Glance
@ -65,28 +65,28 @@ images yourself:
* Download and install pre-built image
.. sourcecode:: bash
.. sourcecode:: console
ssh user@hostname
curl http://savanna-files.mirantis.com/savanna-0.2-vanilla-hadoop-ubuntu.qcow2
glance image-create --name=savanna-0.2-vanilla-hadoop-ubuntu.qcow2\
--disk-format=qcow2 --container-format=bare < ./savanna-0.2-vanilla-hadoop-ubuntu.qcow2
$ ssh user@hostname
$ curl http://savanna-files.mirantis.com/savanna-0.2-vanilla-hadoop-ubuntu.qcow2
$ glance image-create --name=savanna-0.2-vanilla-hadoop-ubuntu.qcow2 \
--disk-format=qcow2 --container-format=bare < ./savanna-0.2-vanilla-hadoop-ubuntu.qcow2
* OR build image using :doc:`../userdoc/diskimagebuilder`.
Save image id. You can get image id from command ``glance image-list``:
.. sourcecode:: bash
.. sourcecode:: console
glance image-list --name vanilla_02_ubuntu.qcow2
> +--------------------------------------+-----------------------------------------+
> | ID | Name |
> +--------------------------------------+-----------------------------------------+
> | 3f9fc974-b484-4756-82a4-bff9e116919b | savanna-0.2-vanilla-hadoop-ubuntu.qcow2 |
> +--------------------------------------+-----------------------------------------+
$ glance image-list --name vanilla_02_ubuntu.qcow2
+--------------------------------------+-----------------------------------------+
| ID | Name |
+--------------------------------------+-----------------------------------------+
| 3f9fc974-b484-4756-82a4-bff9e116919b | savanna-0.2-vanilla-hadoop-ubuntu.qcow2 |
+--------------------------------------+-----------------------------------------+
export IMAGE_ID="3f9fc974-b484-4756-82a4-bff9e116919b"
$ export IMAGE_ID="3f9fc974-b484-4756-82a4-bff9e116919b"
4. Register image in Image Registry
@ -94,30 +94,36 @@ Save image id. You can get image id from command ``glance image-list``:
* Now we will actually start to interact with Savanna.
.. sourcecode:: bash
.. sourcecode:: console
export SAVANNA_URL="http://localhost:9000/v1.0/$TENANT_ID"
$ export SAVANNA_URL="http://localhost:8386/v1.0/$TENANT_ID"
* Install ``httpie`` REST client
.. sourcecode:: console
$ sudo pip install httpie
* Send POST request to Savanna API to register image with username ``ubuntu``.
.. sourcecode:: bash
.. sourcecode:: console
http $SAVANNA_URL/images/$IMAGE_ID X-Auth-Token:$AUTH_TOKEN\
'{ "username": "ubuntu" }'
$ http POST $SAVANNA_URL/images/$IMAGE_ID X-Auth-Token:$AUTH_TOKEN \
username=ubuntu
* Tag the image:
.. sourcecode:: bash
.. sourcecode:: console
http $SAVANNA_URL/images/$IMAGE_ID/tag X-Auth-Token:$AUTH_TOKEN\
'{ "tags": ["vanilla", "1.1.2", "ubuntu"] }'
$ http $SAVANNA_URL/images/$IMAGE_ID/tag X-Auth-Token:$AUTH_TOKEN \
tags:='["vanilla", "1.1.2", "ubuntu"]'
* Make sure that image is registered correctly:
.. sourcecode:: bash
.. sourcecode:: console
http $SAVANNA_URL/images X-Auth-Token:$AUTH_TOKEN
$ http $SAVANNA_URL/images X-Auth-Token:$AUTH_TOKEN
* Output should look like:
@ -176,7 +182,7 @@ following content:
.. sourcecode:: json
{
"name": "test-master-tmpl",
"name": "test-worker-tmpl",
"flavor_id": "2",
"plugin_name": "vanilla",
"hadoop_version": "1.1.2",
@ -185,21 +191,21 @@ following content:
Send POST requests to Savanna API to upload NodeGroup templates:
.. sourcecode:: json
.. sourcecode:: console
http $SAVANNA_URL/node-group-templates X-Auth-Token:$AUTH_TOKEN\
$ http $SAVANNA_URL/node-group-templates X-Auth-Token:$AUTH_TOKEN \
< ng_master_template_create.json
http $SAVANNA_URL/node-group-templates X-Auth-Token:$AUTH_TOKEN\
$ http $SAVANNA_URL/node-group-templates X-Auth-Token:$AUTH_TOKEN \
< ng_worker_template_create.json
You can list available NodeGroup templates by sending the following request to
Savanna API:
.. sourcecode:: bash
.. sourcecode:: console
http $SAVANNA_URL/node-group-templates X-Auth-Token:$AUTH_TOKEN
$ http $SAVANNA_URL/node-group-templates X-Auth-Token:$AUTH_TOKEN
Output should look like:
@ -279,9 +285,9 @@ following content:
Send POST request to Savanna API to upload Cluster template:
.. sourcecode:: bash
.. sourcecode:: console
http $SAVANNA_URL/cluster-templates X-Auth-Token:$AUTH_TOKEN\
$ http $SAVANNA_URL/cluster-templates X-Auth-Token:$AUTH_TOKEN \
< cluster_template_create.json
Save template id. For example ``ce897df2-1610-4caa-bdb8-408ef90561cf``.
@ -306,9 +312,9 @@ following content:
Send POST request to Savanna API to create and start the cluster:
.. sourcecode:: bash
.. sourcecode:: console
http $SAVANNA_URL/clusters X-Auth-Token:$AUTH_TOKEN\
$ http $SAVANNA_URL/clusters X-Auth-Token:$AUTH_TOKEN \
< cluster_create.json
@ -415,21 +421,21 @@ To check that your Hadoop installation works correctly:
* Go to NameNode via ssh:
.. sourcecode:: bash
.. sourcecode:: console
ssh ubuntu@172.24.4.225
$ ssh ubuntu@<namenode_ip>
* Switch to hadoop user:
.. sourcecode:: bash
.. sourcecode:: console
su hadoop
$ sudo su hadoop
* Go to hadoop home directory and run the simpliest MapReduce example:
.. sourcecode:: bash
.. sourcecode:: console
cd /usr/share/hadoop
hadoop jar hadoope-examples.jar pi 10 100
$ cd /usr/share/hadoop
$ hadoop jar hadoop-examples.jar pi 10 100
Congratulations! Now you have Hadoop cluster ready on the OpenStack cloud!
Congratulations! Now you have Hadoop cluster ready on the OpenStack cloud!

View File

@ -11,12 +11,12 @@ Running the tests
-----------------
Run the unit tests by doing:
.. sourcecode:: bash
.. sourcecode:: console
./tools/run_tests.sh
$ ./tools/run_tests.sh
.. rubric:: Footnotes
.. [#f1] See :doc:`jenkins`.
.. [#f1] See :doc:`jenkins`.

View File

@ -3,30 +3,30 @@ Savanna Horizon Plugin dev environment setup
1. Install prerequisites
.. sourcecode:: bash
.. sourcecode:: console
sudo apt-get update
sudo apt-get install git python-dev gcc python-setuptools python-virtualenv node-less
$ sudo apt-get update
$ sudo apt-get install git python-dev gcc python-setuptools python-virtualenv node-less
On Ubuntu 12.10 and higher you have to install the following lib as well:
.. sourcecode:: bash
.. sourcecode:: console
sudo apt-get install nodejs-legacy
$ sudo apt-get install nodejs-legacy
2. Checkout stable horizon from git `git@github.com:openstack/horizon.git` according to your version of OpenStack (stable/grizzly or stable/folsom) and install venv
2. Checkout stable horizon from git ``git@github.com:openstack/horizon.git`` according to your version of OpenStack (stable/grizzly or stable/folsom) and install venv
.. sourcecode:: bash
.. sourcecode:: console
python tools/install_venv.py
$ python tools/install_venv.py
3. Create local_settings.py file:
3. Create ``local_settings.py`` file:
.. sourcecode:: bash
.. sourcecode:: console
cp openstack_dashboard/local/local_settings.py.example openstack_dashboard/local/local_settings.py
$ cp openstack_dashboard/local/local_settings.py.example openstack_dashboard/local/local_settings.py
4. Open file openstack_dashboard/local/local_settings.py and uncomment strings:
4. Open file ``openstack_dashboard/local/local_settings.py`` and uncomment strings:
.. sourcecode:: python
@ -38,21 +38,21 @@ and set right value for variables:
.. sourcecode:: python
OPENSTACK_HOST = "your ip of controller"
SAVANNA_URL = "url for savanna (e.g. "http://localhost:8080/v1.0")"
SAVANNA_URL = "url for savanna (e.g. "http://localhost:8386/v1.0")"
5. Install savanna-dashboard module to horizon's venv:
.. sourcecode:: bash
.. sourcecode:: console
.venv/bin/python $SAVANNA_DASHBOARD_HOME/setup.py install
$ .venv/bin/python $SAVANNA_DASHBOARD_HOME/setup.py install
6. Create a symlink to
.. sourcecode:: bash
.. sourcecode:: console
ln -s $SAVANNA_DASHBOARD_HOME/savannadashboard .venv/lib/python2.7/site-packages/savannadashboard
$ ln -s $SAVANNA_DASHBOARD_HOME/savannadashboard .venv/lib/python2.7/site-packages/savannadashboard
7. In openstack_dashboard/settings.py add savanna to
7. In ``openstack_dashboard/settings.py`` add savanna to
.. sourcecode:: python
@ -69,9 +69,9 @@ and add savannadashboard to
8. Start horizon
.. sourcecode:: bash
.. sourcecode:: console
tools/with_venv.sh python manage.py runserver 0.0.0.0:8080
$ tools/with_venv.sh python manage.py runserver 0.0.0.0:8080
This will start horizon in debug mode. That means the logs will be written to console,
and if any exceptions happen, you will see the stack-trace rendered as a web-page.
@ -80,7 +80,7 @@ It is not recommended to use horizon in this mode for production.
9. Applying changes
If you have changed any `*.py` files in $SAVANNA_DASHBOARD_HOME directory,
If you have changed any ``*.py`` files in ``$SAVANNA_DASHBOARD_HOME`` directory,
horizon will notice that and reload automatically.
However changes made to non-python files may not be noticed,
so you have to start horizon again manually, as described in step 8.
so you have to start horizon again manually, as described in step 8.

View File

@ -1,61 +1,66 @@
Savanna Dashboard Setup
=======================
1 Setup prerequisites
1. Setup prerequisites
---------------------
1.1 OpenStack environment (Folsom or Grizzly version) installed.
1) OpenStack environment (Folsom or Grizzly version) installed.
1.2 Savanna REST API service installed, configured and running.
2) Savanna REST API service installed, configured and running.
1.3 Operating system, where OpenStack Dashboard service installed, has to be connected to internal OpenStack network.
3) Operating system, where OpenStack Dashboard service installed, has to be connected to internal OpenStack network.
2 Savanna Dashboard Installation
2. Savanna Dashboard Installation
--------------------------------
2.1 Go to your Horizons machine and install Savanna Dashboard:
1) Go to your Horizons machine and install Savanna Dashboard:
.. sourcecode:: bash
.. sourcecode:: console
sudo pip install savannadashboard
$ sudo pip install savannadashboard
..
This will install latest release of Savanna Dashboard. If you want to install master branch of Savanna Dashboard:
This will install latest release of Savanna Dashboard. If you want to install master branch of Savanna Dashboard:
.. sourcecode:: bash
.. sourcecode:: console
sudo pip install http://tarballs.openstack.org/savanna-dashboard/savanna-dashboard-master.tar.gz
$ sudo pip install 'http://tarballs.openstack.org/savanna-dashboard/savanna-dashboard-master.tar.gz'
2.2 Configure OpenStack Dashboard
2) Configure OpenStack Dashboard
In settings.py add savanna to
In ``settings.py`` add savanna to
.. sourcecode:: python
HORIZON_CONFIG = {
'dashboards': ('nova', 'syspanel', 'settings', 'savanna'),
..
and add savannadashboard to
and add savannadashboard to
.. sourcecode:: python
INSTALLED_APPS = (
'savannadashboard',
....
..
Note: settings.py file is located in /usr/share/openstack-dashboard by default.
Note: ``settings.py`` file is located in ``/usr/share/openstack-dashboard`` by default.
Also you have to specify **SAVANNA_URL** in local_settings.py
Also you have to specify **SAVANNA_URL** in local_settings.py
.. sourcecode:: python
SAVANNA_URL = "url for savanna (e.g. "http://localhost:8080/v1.0")"
SAVANNA_URL = "url for savanna (e.g. "http://localhost:8386/v1.0")"
..
Note: local_settings.py file is located in /usr/share/openstack-dashboard/local by default.
Note: ``local_settings.py`` file is located in ``/usr/share/openstack-dashboard/local`` by default.
2.3 Now all installations are done and apache web server can be restarted for the changes to take effect:
3) Now all installations are done and apache web server can be restarted for the changes to take effect:
.. sourcecode:: bash
.. sourcecode:: console
sudo service apache2 restart
$ sudo service apache2 restart
..
You can check that service has been started successfully. Go to Horizon URL and if installation is correct you'll be able to see the Savanna tab.
You can check that service has been started successfully. Go to Horizon URL and if installation is correct you'll be able to see the Savanna tab.

View File

@ -21,19 +21,20 @@ If you are still using Folsom you need to follow these steps:
new filter is not very important, you will use it only for configuration.
E.g. let it be ``${list_endpoints}``:
.. sourcecode:: bash
.. sourcecode:: cfg
[pipeline:main]
pipeline = catch_errors healthcheck cache ratelimit swift3 s3token
list_endpoints authtoken keystone proxy-server
pipeline = catch_errors healthcheck cache ratelimit swift3 s3token list_endpoints authtoken keystone proxy-server
..
The next thing you need to do here is to add the description of new filter:
The next thing you need to do here is to add the description of new filter:
.. sourcecode:: bash
.. sourcecode:: cfg
[filter:list_endpoints]
use = egg:swift#${list_endpoints}
# list_endpoints_path = /endpoints/
..
``list_endpoints_path`` is not mandatory and is "endpoints" by default.
This param is used for http-request construction. See details below.
@ -42,7 +43,7 @@ If you are still using Folsom you need to follow these steps:
``/usr/lib/python2.7/dist-packages/swift-1.7.4.egg-info/entry_points.txt``.
Add the following description to ``[paste.filter_factory]`` section:
.. sourcecode:: bash
.. sourcecode:: cfg
${list_endpoints} = swift.common.middleware.list_endpoints:filter_factory
@ -137,15 +138,15 @@ determined from tenant name from configs. Actually, account=tenant.
Let's run the job:
.. sourcecode:: bash
.. sourcecode:: console
hadoop distcp -D fs.swift.service.savanna.username=admin\
-D fs.swift.service.savanna.password=swordfish\
swift://integration.savanna/temp swift://integration.savanna/temp1
$ hadoop distcp -D fs.swift.service.savanna.username=admin \
-D fs.swift.service.savanna.password=swordfish \
swift://integration.savanna/temp swift://integration.savanna/temp1
After that just check if temp1 is created.
Limitations
-----------
**Note:** Please note that container name should be a valid URI.
**Note:** Please note that container name should be a valid URI.

View File

@ -10,58 +10,62 @@ Further steps describe Savanna installation into virtual environment. All steps
#1 do not require superuser privileges.
1. First you need to install `python-setuptools`, `python-virtualenv` and python headers using your
OS package manager. The python headers package name depends on OS. For Ubuntu it is `python-dev`,
for Red Hat - `python-devel` So for Ubuntu run :
1. First you need to install `python-setuptools`, `python-virtualenv` and python headers using your
OS package manager. The python headers package name depends on OS. For Ubuntu it is `python-dev`,
for Red Hat - `python-devel` So for Ubuntu run :
.. sourcecode:: bash
.. sourcecode:: console
sudo apt-get install python-setuptools python-virtualenv python-dev
$ sudo apt-get install python-setuptools python-virtualenv python-dev
..
For Red Hat:
For Red Hat:
.. sourcecode:: bash
.. sourcecode:: console
sudo yum install python-setuptools python-virtualenv python-devel
$ sudo yum install python-setuptools python-virtualenv python-devel
2. Setup virtual environment for Savanna:
2. Setup virtual environment for Savanna:
.. sourcecode:: bash
.. sourcecode:: console
virtualenv savanna-venv
$ virtualenv savanna-venv
3. You can install the latest Savanna release version from pypi:
3. You can install the latest Savanna release version from pypi:
.. sourcecode:: bash
.. sourcecode:: console
savanna-venv/bin/pip install savanna
$ savanna-venv/bin/pip install savanna
..
Or you can get Savanna archive from ``http://tarballs.openstack.org/savanna/`` and install it using pip:
Or you can get Savanna archive from `<http://tarballs.openstack.org/savanna/>`_ and install it using pip:
.. sourcecode:: bash
.. sourcecode:: console
savanna-venv/bin/pip install http://tarballs.openstack.org/savanna/savanna-master.tar.gz#egg=savanna
$ savanna-venv/bin/pip install 'http://tarballs.openstack.org/savanna/savanna-master.tar.gz#egg=savanna'
..
Note that savanna-master contains the latest changes and might not be stable at the moment.
We recommend browsing ``http://tarballs.openstack.org/savanna/`` and selecting the latest stable release.
Note that savanna-master contains the latest changes and might not be stable at the moment.
We recommend browsing `<http://tarballs.openstack.org/savanna/>`_ and selecting the latest stable release.
3. After installation you should create configuration file. Sample config file location
depends on your OS. For Ubuntu it is ``/usr/local/share/savanna/savanna.conf.sample``,
for Red Hat - ``/usr/share/savanna/savanna.conf.sample``. Below is an example for Ubuntu:
4. After installation you should create configuration file. Sample config file location
depends on your OS. For Ubuntu it is ``/usr/local/share/savanna/savanna.conf.sample``,
for Red Hat - ``/usr/share/savanna/savanna.conf.sample``. Below is an example for Ubuntu:
.. sourcecode:: bash
.. sourcecode:: console
mkdir savanna-venv/etc
cp savanna-venv/share/savanna/savanna.conf.sample savanna-venv/etc/savanna.conf
$ mkdir savanna-venv/etc
$ cp savanna-venv/share/savanna/savanna.conf.sample savanna-venv/etc/savanna.conf
4. To start Savanna call:
5. To start Savanna call:
.. sourcecode:: bash
.. sourcecode:: console
savanna-venv/bin/python savanna-venv/bin/savanna-api --config-file savanna-venv/etc/savanna.conf
$ savanna-venv/bin/python savanna-venv/bin/savanna-api --config-file savanna-venv/etc/savanna.conf
..
To get the list of all possible options run:
To get the list of all possible options run:
.. sourcecode:: bash
.. sourcecode:: console
savanna-venv/bin/python savanna-venv/bin/savanna-api --help
$ savanna-venv/bin/python savanna-venv/bin/savanna-api --help