Rewrite install of fuel-plugin-builder framework

Allow installing fuel-plugin-builder from pip package
Closes-bug: #1583927

Change-Id: I630918184af6f573629dfa64b0f95a2871da12ca
(cherry picked from commit 871c63918c)
This commit is contained in:
Vladimir Jigulin 2016-10-11 13:42:47 +03:00
parent 457b27d967
commit d3bcbfcb65
2 changed files with 13 additions and 10 deletions

View File

@ -32,6 +32,7 @@ from fuelweb_test.helpers.regenerate_repo import regenerate_ubuntu_repo
from fuelweb_test.helpers import replace_repos
from fuelweb_test.helpers.ssh_manager import SSHManager
from fuelweb_test.settings import MASTER_IS_CENTOS7
from fuelweb_test.settings import FUEL_PLUGIN_BUILDER_FROM_GIT
from fuelweb_test.settings import FUEL_PLUGIN_BUILDER_REPO
from fuelweb_test.settings import FUEL_USE_LOCAL_NTPD
from fuelweb_test.settings import KEYSTONE_CREDS
@ -531,20 +532,20 @@ class FuelPluginBuilder(BaseActions):
def fpb_install(self):
"""
Installs fuel plugin builder from sources
in nailgun container on master node
Installs fuel plugin builder on master node
:return: nothing
"""
fpb_cmd = """bash -c 'yum -y install git tar createrepo \
rpm dpkg-devel dpkg-dev rpm-build python-pip;
git clone {0};
cd fuel-plugins;
python setup.py sdist;
cd dist;
pip install *.tar.gz'""".format(FUEL_PLUGIN_BUILDER_REPO)
rpms = "createrepo dpkg-devel dpkg-dev rpm-build python-pip"
fpb_package = "fuel-plugin-builder"
if FUEL_PLUGIN_BUILDER_FROM_GIT:
rpms += " tar git"
fpb_package = "git+{}".format(FUEL_PLUGIN_BUILDER_REPO)
self.execute_in_container(fpb_cmd, self.container, 0)
self.execute_in_container("yum -y install {}".format(rpms),
self.container, 0)
self.execute_in_container("pip install {}".format(fpb_package),
self.container, 0)
def fpb_create_plugin(self, name, package_version=PLUGIN_PACKAGE_VERSION):
"""

View File

@ -477,6 +477,8 @@ TIMESTAT_PATH_YAML = os.environ.get(
'TIMESTAT_PATH_YAML', os.path.join(
LOGS_DIR, 'timestat_{}.yaml'.format(time.strftime("%Y%m%d"))))
FUEL_PLUGIN_BUILDER_FROM_GIT = get_var_as_bool('FUEL_PLUGIN_BUILDER_FROM_GIT',
False)
FUEL_PLUGIN_BUILDER_REPO = 'https://github.com/openstack/fuel-plugins.git'
###############################################################################