aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKubi <jean.gaoliang@huawei.com>2016-11-17 07:45:00 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-11-17 07:45:00 +0000
commiteeeca4f0cdeff152ec061bb9b40ae305547c027e (patch)
treea124f0ec08330a2706ac63e0f052b8bc40ed6334
parent1e132a317acdca7202f009c4d16898705b277665 (diff)
parent02e9da46ba3eed7e4552a30030000459fb56b7da (diff)
Merge "Yardstick installation unified (pip/setup)"
-rw-r--r--docker/Dockerfile2
-rw-r--r--docs/userguide/07-installation.rst36
-rwxr-xr-xinstall.sh40
-rw-r--r--requirements.txt79
-rwxr-xr-xsetup.py31
5 files changed, 126 insertions, 62 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 5387babff..fba6e2067 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -57,7 +57,7 @@ RUN git clone https://gerrit.opnfv.org/gerrit/releng ${RELENG_REPO_DIR}
# install yardstick + dependencies
RUN cd ${YARDSTICK_REPO_DIR} && easy_install -U pip
-RUN cd ${YARDSTICK_REPO_DIR} && pip install -r tests/ci/requirements.txt
+RUN cd ${YARDSTICK_REPO_DIR} && pip install -r requirements.txt
RUN cd ${YARDSTICK_REPO_DIR} && pip install .
ADD http://download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64-disk.img /home/opnfv/images/
diff --git a/docs/userguide/07-installation.rst b/docs/userguide/07-installation.rst
index fc68d3931..09d36bf25 100644
--- a/docs/userguide/07-installation.rst
+++ b/docs/userguide/07-installation.rst
@@ -75,47 +75,13 @@ If you choose to use the Ubuntu 14.04 Docker image, You can pull the Ubuntu
Installing Yardstick framework
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-Install dependencies:
-
-::
-
- sudo apt-get update && sudo apt-get install -y \
- wget \
- git \
- sshpass \
- qemu-utils \
- kpartx \
- libffi-dev \
- libssl-dev \
- python \
- python-dev \
- python-virtualenv \
- libxml2-dev \
- libxslt1-dev \
- python-setuptools
-
-Create a python virtual environment, source it and update setuptools:
-
-::
-
- virtualenv ~/yardstick_venv
- source ~/yardstick_venv/bin/activate
- easy_install -U setuptools
-
Download source code and install python dependencies:
::
git clone https://gerrit.opnfv.org/gerrit/yardstick
cd yardstick
- python setup.py install
-
-A Youtube video tutorial on this installation mode is available
-at: http://www.youtube.com/watch?v=4S4izNolmR0
-
-.. image:: http://img.youtube.com/vi/4S4izNolmR0/0.jpg
- :alt: http://www.youtube.com/watch?v=4S4izNolmR0
- :target: http://www.youtube.com/watch?v=4S4izNolmR0
+ ./install.sh
Installing Yardstick using Docker
diff --git a/install.sh b/install.sh
new file mode 100755
index 000000000..80fc1e523
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,40 @@
+# install tools
+apt-get update && apt-get install -y \
+ wget \
+ expect \
+ curl \
+ git \
+ sshpass \
+ qemu-utils \
+ kpartx \
+ libffi-dev \
+ libssl-dev \
+ python \
+ python-dev \
+ libxml2-dev \
+ libxslt1-dev \
+ python-setuptools && \
+ easy_install -U setuptools
+
+apt-get -y autoremove && apt-get clean
+
+
+# fit for arm64
+source_file=/etc/apt/sources.list
+sed -i -e 's/^deb \([^/[]\)/deb [arch=amd64] \1/g' "${source_file}"
+sed -i -e 's/^deb-src /# deb-src /g' "${source_file}"
+
+sub_source_file=/etc/apt/sources.list.d/yardstick.list
+touch "${sub_source_file}"
+echo -e "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ trusty main universe multiverse restricted
+deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main universe multiverse restricted
+deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ trusty-security main universe multiverse restricted
+deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ trusty-proposed main universe multiverse restricted" > "${sub_source_file}"
+echo "vm.mmap_min_addr = 0" > /etc/sysctl.d/mmap_min_addr.conf
+dpkg --add-architecture arm64
+apt-get install -y qemu-user-static libc6:arm64
+
+# install yardstick + dependencies
+easy_install -U pip
+pip install -r requirements.txt
+pip install .
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 000000000..4d1a16993
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,79 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+appdirs==1.4.0
+Babel==2.2.0
+backport-ipaddress==0.1
+cliff==2.0.0
+cmd2==0.6.8
+coverage==4.1b2
+debtcollector==1.3.0
+ecdsa==0.13
+extras==0.0.3
+fixtures==1.4.0
+flake8==2.5.4
+funcsigs==0.4
+functools32==3.2.3.post2
+futures==3.0.5
+iso8601==0.1.11
+Jinja2==2.8
+jsonpatch==1.13
+jsonpointer==1.10
+jsonschema==2.5.1
+keystoneauth1==2.3.0
+linecache2==1.0.0
+lxml==3.5.0
+MarkupSafe==0.23
+mccabe==0.4.0
+mock==1.3.0
+monotonic==1.0
+msgpack-python==0.4.7
+netaddr==0.7.18
+netifaces==0.10.4
+nose==1.3.7
+openstacksdk==0.8.1
+os-client-config==1.16.0
+oslo.config==3.9.0
+oslo.i18n==3.4.0
+oslo.serialization==2.4.0
+oslo.utils==3.7.0
+paramiko==1.16.0
+pbr==1.8.1
+pep8==1.7.0
+positional==1.0.1
+prettytable==0.7.2
+pycrypto==2.6.1
+pyflakes==1.0.0
+pyparsing==2.1.0
+pyrsistent==0.11.12
+python-cinderclient==1.6.0
+python-glanceclient==2.0.0
+python-heatclient==1.0.0
+python-keystoneclient==2.3.1
+python-mimeparse==1.5.1
+python-neutronclient==4.1.1
+python-novaclient==3.3.0
+python-openstackclient==2.2.0
+python-subunit==1.2.0
+python-swiftclient==3.0.0
+pytz==2015.7
+PyYAML==3.11
+requests==2.9.1
+requestsexceptions==1.1.3
+scp==0.10.2
+simplejson==3.8.2
+six==1.10.0
+stevedore==1.12.0
+testrepository==0.0.20
+testtools==2.0.0
+traceback2==1.4.0
+unicodecsv==0.14.1
+unittest2==1.1.0
+warlock==1.2.0
+wrapt==1.10.6
diff --git a/setup.py b/setup.py
index 9bf656bac..6a89d6368 100755
--- a/setup.py
+++ b/setup.py
@@ -32,28 +32,6 @@ setup(
]
},
url="https://www.opnfv.org",
- install_requires=["backport_ipaddress", # remove with python3
- "coverage>=3.6",
- "flake8",
- "Jinja2>=2.6",
- "lxml",
- "PyYAML>=3.10",
- "pbr<2.0,>=1.3",
- "python-openstackclient>=2.1.0",
- "python-glanceclient>=0.12.0",
- "python-heatclient>=0.2.12",
- "python-keystoneclient>=0.11.1",
- "python-neutronclient>=2.3.9",
- "python-novaclient>=2.24.1",
- "mock>=1.0.1", # remove with python3
- "paramiko",
- "netifaces",
- "scp",
- "six",
- "testrepository>=0.0.18",
- "testtools>=1.4.0",
- "nose"
- ],
extras_require={
'plot': ["matplotlib>=1.4.2"]
},
@@ -63,8 +41,9 @@ setup(
'yardstick-plot=yardstick.plot.plotter:main [plot]'
],
},
- scripts=['tools/yardstick-img-modify',
- 'tools/yardstick-img-lxd-modify',
- 'tools/yardstick-img-dpdk-modify'
- ]
+ scripts=[
+ 'tools/yardstick-img-modify',
+ 'tools/yardstick-img-lxd-modify',
+ 'tools/yardstick-img-dpdk-modify'
+ ]
)