Update doc

This commit is contained in:
Uggla 2016-04-06 20:30:08 +02:00
parent c85f2a56f0
commit dbf6a0a530
3 changed files with 71 additions and 44 deletions

View File

@ -1,13 +1,13 @@
python-redfish
==============
This repository will be used to house the Redfish python library, a reference
This repository will be used to house the python-redfish library, a reference
implementation to enable Python developers to communicate with the Redfish API
(http://www.dmtf.org/standards/redfish).
NOTE::
DRAFT - WORK IN PROGRESS
STATUS: Work in progress, ready for proof of concept.
The current Redfish specification revision is 1.0.0 - Note that the mockup
is still at version 0.99.0a and may not reflect what the standard provides
@ -34,7 +34,7 @@ for build and test automation::
pbconf # Project builder file to build rpm/deb packages for
# distributions
redfish/ # The redfish library itself
redfish/tests/ # Python redfish unit test suite
redfish/tests/ # python-redfish unit test suite
redfish-client # Client tool to manage redfish devices
Requirements
@ -49,6 +49,8 @@ are discouraged due to security.
Python requirements are listed in requirements.txt; additional requirements for
running the unit test suite are listed in test-requirements.txt.
Note: Running tests requires Docker engine.
Note: The program was tested with Python 2.7.10 and 3.4.2 however it might work
as well with all Python 3 releases.
@ -57,9 +59,9 @@ Get the sources
The sources are available on github and can be retrieved using::
git clone https://github.com/uggla/python-redfish
git clone https://github.com/bcornec/python-redfish
As python redefish is currently in heavy development we recommend to checkout the devel branch using::
As python-redfish is currently in heavy development we recommend to checkout the devel branch using::
cd python-redfish
git checkout devel

View File

@ -2,22 +2,36 @@
Installation
============
Using pip
---------
Use::
The following instructions are ordered by ease of use, and our project recommendations.
sudo pip install python-redfish
Pip will install :
Using rpm packages
------------------
1. The library and all dependencies into prefix/lib/pythonX.Y/site-packages directory
2. Redfish client master conf file into prefix/etc/redfish_client.conf
Unless if prefix = '/usr', in that case force configuration file to be in /etc
There is currently no official Linux distribution packages.
3. Data file (templates) into prefix/share/redfish-client/templates
The upstream project provides packages for a limited set of Linux distributions.
Point 2 and 3 above need root access to your system. If you don't have root
access on your system, please follow `Using pip and virtualenv`_ section.
There are available at ftp://ftp.project-builder.org
As an example for Fedora 23 use the following:
As root get the repo file::
cd /etc/yum.repos.d && wget ftp://ftp.project-builder.org/fedora/23/x86_64/python-redfish.repo
Install using dnf::
dnf install python-redfish
..
Using deb package
-----------------
This installation in not yet possible due to missing deb package dependencies. We are working on it.
In the meantime we recommend to use `Using pip`_ or `Using pip and virtualenv`_.
Using pip and virtualenv
@ -51,29 +65,47 @@ Using pip and virtualenv
All files are installed under your virtualenv.
Using the sources
Using pip
---------
Use::
sudo pip install python-redfish
Pip will install :
1. The library and all dependencies into prefix/lib/pythonX.Y/site-packages directory
2. redfish-client conf file into prefix/etc/redfish-client.conf.
If prefix = '/usr' then force the configuration file to be in /etc
3. Data files (templates) into prefix/share/redfish-client/templates
Point 2 and 3 above need root access to your system. If you don't have root
access on your system, please follow `Using pip and virtualenv`_ section.
Using source code
-----------------
#. Follow `get the sources <http://pythonhosted.org/python-redfish/readme.html#get-the-sources>`_ section to retrieve the sources.
#. Install from the source using::
#. Follow `get the source code <http://pythonhosted.org/python-redfish/readme.html#get-the-sources>`_ section to retrieve it.
#. Install from the source code using::
python setup.py install --prefix="/usr/local"
Using rpm package
-----------------
Building your own rpm packages
------------------------------
There is currently no oficial packages for distributions.
However part of the sources there is a mechanism to buil rpm or deb packages for distributions.
Inside the project tree there is a mechanism to build rpm packages for distributions.
The mechanism is based on `project builder <http://www.project-builder.org/>`_ tool.
#. Follow `get the sources <http://pythonhosted.org/python-redfish/readme.html#get-the-sources>`_ section to retrieve the sources.
#. Follow `get the source code <http://pythonhosted.org/python-redfish/readme.html#get-the-sources>`_ section to retrieve it.
#. Download project builder for your distribution from ftp://ftp.project-builder.org.
#. Clone the project to your own github account.
#. Create a .pbrc with the following content, replace "/wokspace/python/redfish" and "uggla" with your own directory and account::
#. Create a .pbrc with the following content, replace "/workspace/python/redfish" and "uggla" with your own directory and account::
[uggla@ugglalaptop ~]$ cat .pbrc
$ cat .pbrc
pbdefdir python-redfish = $ENV{'HOME'}/workspace
pbconfdir python-redfish = $ENV{'HOME'}/workspace/python-redfish/pbconf
pbconfurl python-redfish = git+ssh://git@github.com:uggla/python-redfish.git
@ -91,18 +123,9 @@ The mechanism is based on `project builder <http://www.project-builder.org/>`_ t
rpm -Uvh python-redfish/build/RPMS/python-redfish-devel20160213182552.rpm
#. Follow `get the sources <http://pythonhosted.org/python-redfish/readme.html#get-the-sources>`_ section to retrieve the sources.
Using deb package
-----------------
This installation in not yet possible due to missing deb package dependencies. We are working on it.
In the meantime we recommend to use `Using pip`_ or `Using pip and virtualenv`_.
=====================================
Host configuration file configuration
=====================================
============================
Inventory file configuration
============================
#. Verify redfish-client is working correclty::
@ -116,12 +139,14 @@ Host configuration file configuration
redfish-client config showall
Note: The inventory file is created in $HOME/.redfish
===================
Mockup installation
===================
#. Follow `get the sources <http://pythonhosted.org/python-redfish/readme.html#get-the-sources>`_ section to retrieve the sources.
#. Install docker using your distribution packages or the docker `procedure <https://docs.docker.com/engine/installation/>`_ (docker provide more recent packages for ubuntu)::
#. Follow `get the source code <http://pythonhosted.org/python-redfish/readme.html#get-the-sources>`_ section to retrieve it.
#. Install docker using your distribution packages or the docker `procedure <https://docs.docker.com/engine/installation/>`_ (docker provides more recent packages)::
dnf install docker
systemctl enable docker.service
@ -132,7 +157,7 @@ Mockup installation
#. Run ./buildImage.sh and ./run-redfish-simulator.sh
#. Check that a container is running and listening on port 8000::
(pypi)[uggla@ugglalaptop dmtf]$ docker ps
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9943ff1d4d93 redfish-simulator:latest "/bin/sh -c /tmp/redf" 3 weeks ago Up 2 days 0.0.0.0:8000->80/tcp redfish-simulator
#. Try to connect using a navigator to http://localhost:8000 the following screen should apear.

View File

@ -8,13 +8,13 @@ redfish module tests
Tests are not functional for the redfish module yet.
refish-client tests
-------------------
redfish-client tests
--------------------
#. Create your development environment following `Developer setup <develsetup.html>`_.
#. Install docker using the `procedure <https://docs.docker.com/engine/installation/>`_.
#. Ensure you can use docker with your current user.
#. Jump into redfish-python directory containing the sources.
#. Jump into python-redfish directory containing the sources.
#. Depending of your distribution, you may have to upgrade setuptools::
pip install --upgrade setuptools