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:
parent
acd978f40d
commit
7f28b15c53
|
@ -34,6 +34,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.helpers.utils import dict_merge
|
||||
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
|
||||
|
@ -351,20 +352,20 @@ class FuelPluginBuilder(BaseActions):
|
|||
"""
|
||||
def fpb_install(self):
|
||||
"""
|
||||
Installs fuel plugin builder from sources
|
||||
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.ssh_manager.execute_on_remote(ip=self.admin_ip, cmd=fpb_cmd)
|
||||
self.ssh_manager.check_call(self.admin_ip,
|
||||
"yum -y install {}".format(rpms))
|
||||
self.ssh_manager.check_call(self.admin_ip,
|
||||
"pip install {}".format(fpb_package))
|
||||
|
||||
def fpb_create_plugin(self, name, package_version=PLUGIN_PACKAGE_VERSION):
|
||||
"""
|
||||
|
|
|
@ -568,6 +568,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',
|
||||
True)
|
||||
FUEL_PLUGIN_BUILDER_REPO = 'https://github.com/openstack/fuel-plugins.git'
|
||||
|
||||
###############################################################################
|
||||
|
|
Loading…
Reference in New Issue