summaryrefslogtreecommitdiffstats
path: root/apex/builders/overcloud_builder.py
diff options
context:
space:
mode:
authorRicardo Noriega <rnoriega@redhat.com>2018-07-27 11:29:41 +0200
committerRicardo Noriega <rnoriega@redhat.com>2018-08-02 16:10:53 +0200
commitc4b66d46770847e9090a06c4c2ec3e8266606282 (patch)
tree704dc9f02450146a4cbb1646c2e8c4168f38dfcb /apex/builders/overcloud_builder.py
parent31c91eafaf4ede17b057b9ae16df3821fe8c0aca (diff)
Enable BGPVPN for master deployments
- Injection of Quagga tarball via overcloud builder. - Extraction and installation of all related packages. - It uses SDNVPN artifact repository to download Quagga tarball, so there is only one source to test. - Modifies bgpvpn scenario files to use OS master branch, ODL master branch and containers. JIRA: APEX-627 Change-Id: Icdbc2853d9531048e23fd6d5e444bd68208d18fc Signed-off-by: Ricardo Noriega <rnoriega@redhat.com>
Diffstat (limited to 'apex/builders/overcloud_builder.py')
-rw-r--r--apex/builders/overcloud_builder.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/apex/builders/overcloud_builder.py b/apex/builders/overcloud_builder.py
index d6f03eb..b855645 100644
--- a/apex/builders/overcloud_builder.py
+++ b/apex/builders/overcloud_builder.py
@@ -15,6 +15,7 @@ import tarfile
import apex.builders.common_builder
from apex.common import constants as con
+from apex.common import utils as utils
from apex.common.exceptions import ApexBuildException
from apex.virtual import utils as virt_utils
@@ -64,6 +65,28 @@ def inject_opendaylight(odl_version, image, tmp_dir, uc_ip,
logging.info("OpenDaylight injected into {}".format(image))
+def inject_quagga(image, tmp_dir):
+ """
+ Downloads quagga tarball from artifacts.opnfv.org
+ and install it on the overcloud image on the fly.
+ :param image:
+ :param tmp_dir:
+ :return:
+ """
+ utils.fetch_upstream_and_unpack(tmp_dir,
+ os.path.split(con.QUAGGA_URL)[0] + "/",
+ [os.path.basename(con.QUAGGA_URL)])
+
+ virt_ops = [
+ {con.VIRT_UPLOAD: "{}/quagga-4.tar.gz:/root/".format(tmp_dir)},
+ {con.VIRT_RUN_CMD: "cd /root/ && tar xzf quagga-4.tar.gz"},
+ {con.VIRT_RUN_CMD: "cd /root/quagga;packages=$(ls |grep -vE 'debug"
+ "info|devel|contrib');yum -y install $packages"}
+ ]
+ virt_utils.virt_customize(virt_ops, image)
+ logging.info("Quagga injected into {}".format(image))
+
+
def build_dockerfile(service, tmp_dir, docker_cmds, src_image_uri):
"""
Builds docker file per service and stores it in a