summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/Makefile6
-rwxr-xr-xbuild/docker/runcontext2
-rw-r--r--build/f_isoroot/Makefile12
-rw-r--r--deploy/common.py4
-rwxr-xr-x[-rw-r--r--]deploy/deploy.py1
-rwxr-xr-x[-rw-r--r--]deploy/reap.py28
-rw-r--r--deploy/templates/hardware_environment/conf/linux_foundation_lab/pod2/dea.yaml24
-rw-r--r--docs/build-instructions.rst21
8 files changed, 78 insertions, 20 deletions
diff --git a/build/Makefile b/build/Makefile
index 6e7041dc0..85da6eb29 100644
--- a/build/Makefile
+++ b/build/Makefile
@@ -22,7 +22,13 @@ export ISOSRC = file:$(shell pwd)/fuel-7.0.iso
export ISOCACHE = $(shell pwd)/$(shell basename $(ISOSRC))
export PRODNO = "OPNFV_BGS"
export REVSTATE = "P0000"
+
+ifdef BUILD_FUEL_PLUGINS
+$(warning Overriding plugin build selection to $(BUILD_FUEL_PLUGINS))
+export NEWISO = $(shell pwd)/release/unofficial-opnfv-${REVSTATE}.iso
+else
export NEWISO = $(shell pwd)/release/opnfv-${REVSTATE}.iso
+endif
# Note! Invoke with "make REVSTATE=RXXXX all" to make release build!
# Invoke with ICOCACHE=/full/path/to/iso if cached ISO is in non-standard location.
diff --git a/build/docker/runcontext b/build/docker/runcontext
index f9065a01f..b442deeed 100755
--- a/build/docker/runcontext
+++ b/build/docker/runcontext
@@ -111,7 +111,7 @@ if [ -n "$CACHEBASE" ]; then
fi
fi
-RUN_CONTEXT_OPT="--cidfile $CID_FILE --privileged=true --rm -e HOME=$HOME -e CACHEDEBUG -e CACHETRANSPORT -e CACHEMAXAGE -e CACHEBASE -u $USER_ID:$GROUP_ID -w $PWD -v $GITROOT:$GITROOT $CACHEMOUNT"
+RUN_CONTEXT_OPT="--cidfile $CID_FILE --privileged=true --rm -e HOME=$HOME -e CACHEDEBUG -e CACHETRANSPORT -e CACHEMAXAGE -e CACHEBASE -e BUILD_FUEL_PLUGINS -u $USER_ID:$GROUP_ID -w $PWD -v $GITROOT:$GITROOT $CACHEMOUNT"
# Passing "debug" puts up an interactive bash shell
if [ "$1" == "debug" ]; then
diff --git a/build/f_isoroot/Makefile b/build/f_isoroot/Makefile
index 84c17c0e3..a03134156 100644
--- a/build/f_isoroot/Makefile
+++ b/build/f_isoroot/Makefile
@@ -8,7 +8,17 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-SUBDIRS = f_kscfg f_bootstrap f_repobuild f_odlpluginbuild f_qemupluginbuild f_ovs-nsh-dpdk-pluginbuild f_onosfwpluginbuild
+# Add Fuel plugin build targets here
+PLUGINS = f_odlpluginbuild f_qemupluginbuild f_ovs-nsh-dpdk-pluginbuild f_onosfwpluginbuild
+
+# If the BUILD_FUEL_PLUGINS environment variable is set, only build the plugins
+# indicated therein.
+ifdef BUILD_FUEL_PLUGINS
+SUBDIRS = f_kscfg f_bootstrap f_repobuild $(BUILD_FUEL_PLUGINS)
+$(warning Overriding plugin build selection to $(BUILD_FUEL_PLUGINS))
+else
+SUBDIRS = f_kscfg f_bootstrap f_repobuild $(PLUGINS)
+endif
SUBCLEAN = $(addsuffix .clean,$(SUBDIRS))
.PHONY: all
diff --git a/deploy/common.py b/deploy/common.py
index 17fd2174a..ccd43d79a 100644
--- a/deploy/common.py
+++ b/deploy/common.py
@@ -39,10 +39,12 @@ LOG.addHandler(out_handler)
os.chmod(LOGFILE, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)
def exec_cmd(cmd, check=True):
+ nul_f = open(os.devnull, 'w')
process = subprocess.Popen(cmd,
stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT,
+ stderr=nul_f,
shell=True)
+ nul_f.close()
response = process.communicate()[0].strip()
return_code = process.returncode
if check:
diff --git a/deploy/deploy.py b/deploy/deploy.py
index 4e209a932..8a4bfc40a 100644..100755
--- a/deploy/deploy.py
+++ b/deploy/deploy.py
@@ -1,3 +1,4 @@
+#!/usr/bin/python
###############################################################################
# Copyright (c) 2015 Ericsson AB and others.
# szilard.cserey@ericsson.com
diff --git a/deploy/reap.py b/deploy/reap.py
index 51e7cb658..72bfcee4c 100644..100755
--- a/deploy/reap.py
+++ b/deploy/reap.py
@@ -1,3 +1,4 @@
+#!/usr/bin/python
###############################################################################
# Copyright (c) 2015 Ericsson AB and others.
# szilard.cserey@ericsson.com
@@ -73,9 +74,9 @@ DHA_2 = '''
# which may not be correct - please adjust as needed.
'''
-DISKS = {'fuel': '30G',
- 'controller': '30G',
- 'compute': '30G'}
+DISKS = {'fuel': '50G',
+ 'controller': '60G',
+ 'compute': '50G'}
class Reap(object):
@@ -102,6 +103,12 @@ class Reap(object):
exec_cmd('fuel %s --env %s --download --dir %s'
% (config_type, self.env_id, self.temp_dir))
+ def download_node_config(self, nodeid):
+ log('Download node %s config for environment %s to %s'
+ % (nodeid, self.env_id,self.temp_dir))
+ exec_cmd('fuel deployment --node-id %s --env %s --default --dir %s'
+ % (nodeid, self.env_id, self.temp_dir))
+
def write(self, file, text, newline=True):
mode = 'a' if os.path.isfile(file) else 'w'
with open(file, mode) as f:
@@ -153,7 +160,6 @@ class Reap(object):
real_node_ids = [node[N['id']] for node in node_list]
real_node_ids.sort()
min_node = real_node_ids[0]
-
interfaces = {}
transformations = {}
dea_nodes = []
@@ -170,6 +176,7 @@ class Reap(object):
'role': roles}
dha_node = {'id': node_id}
if_name, mac = self.reap_interface(real_node_id, interfaces)
+ log('reap transformation for node %s' % real_node_id)
tr_name = self.reap_transformation(real_node_id, roles,
transformations)
dea_node.update(
@@ -213,6 +220,11 @@ class Reap(object):
network_file = ('%s/network_%s.yaml'
% (self.temp_dir, self.env_id))
network = self.read_yaml(network_file)
+
+ # ha_compact not understood by Fuel when deploying...OD
+ if self.env[E['mode']] == 'ha_compact':
+ self.env[E['mode']] = 'ha'
+
env = {'environment':
{'name': self.env[E['name']],
'mode': self.env[E['mode']],
@@ -290,7 +302,13 @@ class Reap(object):
self.write(self.dha_file,
DHA_1.format(date=date, comment=self.comment))
self.get_env()
- self.download_config('deployment')
+
+ # Need to download deployment with explicit node ids
+ node_list = parse(exec_cmd('fuel node'))
+ real_node_ids = [node[N['id']] for node in node_list]
+ real_node_ids.sort()
+ self.download_node_config(','.join(real_node_ids))
+
self.download_config('settings')
self.download_config('network')
diff --git a/deploy/templates/hardware_environment/conf/linux_foundation_lab/pod2/dea.yaml b/deploy/templates/hardware_environment/conf/linux_foundation_lab/pod2/dea.yaml
index 64362793f..6e0105dbb 100644
--- a/deploy/templates/hardware_environment/conf/linux_foundation_lab/pod2/dea.yaml
+++ b/deploy/templates/hardware_environment/conf/linux_foundation_lab/pod2/dea.yaml
@@ -114,8 +114,8 @@ transformations_2:
bridge: br-mesh
name: eth0.302
network:
- management_vip: 192.168.0.2
- management_vrouter_vip: 192.168.0.1
+ management_vip: 192.168.1.2
+ management_vrouter_vip: 192.168.1.1
networking_parameters:
base_mac: fa:16:3e:00:00:00
configuration_template: null
@@ -160,13 +160,13 @@ network:
vlan_start: null
name: public
vlan_start: null
- - cidr: 192.168.0.0/24
+ - cidr: 192.168.1.0/24
gateway: null
ip_ranges:
- - - 192.168.0.1
- - 192.168.0.254
+ - - 192.168.1.1
+ - 192.168.1.254
meta:
- cidr: 192.168.0.0/24
+ cidr: 192.168.1.0/24
configurable: true
map_priority: 2
name: management
@@ -180,13 +180,13 @@ network:
vlan_start: 101
name: management
vlan_start: 300
- - cidr: 192.168.1.0/24
+ - cidr: 192.168.0.0/24
gateway: null
ip_ranges:
- - - 192.168.1.1
- - 192.168.1.254
+ - - 192.168.0.1
+ - 192.168.0.254
meta:
- cidr: 192.168.1.0/24
+ cidr: 192.168.0.0/24
configurable: true
map_priority: 2
name: storage
@@ -234,7 +234,7 @@ network:
public_vrouter_vip: 172.30.10.65
vips:
management:
- ipaddr: 192.168.0.2
+ ipaddr: 192.168.1.2
namespace: haproxy
network_role: mgmt/vip
node_roles:
@@ -248,7 +248,7 @@ network:
- controller
- primary-controller
vrouter:
- ipaddr: 192.168.0.1
+ ipaddr: 192.168.1.1
namespace: vrouter
network_role: mgmt/vip
node_roles:
diff --git a/docs/build-instructions.rst b/docs/build-instructions.rst
index 08b560375..aa8077e6e 100644
--- a/docs/build-instructions.rst
+++ b/docs/build-instructions.rst
@@ -34,6 +34,10 @@ Version history
| 2015-10-23 | 1.1.1 | Stefan Berg | Added instructions |
| | | (Ericsson AB) | for proxy builds |
+--------------------+--------------------+--------------------+----------------------+
+| 2015-12-03 | 1.2.0 | Stefan Berg | Added instructions |
+| | | (Ericsson AB) | for plugin build |
+| | | | selection |
++--------------------+--------------------+--------------------+----------------------+
Introduction
============
@@ -210,6 +214,23 @@ Configure your build environment
Select the versions of the components you want to build by editing the fuel/build/config.mk file.
+Non official build: Selecting which plugins to build
+----------------------------------------------------
+In order to cut the build time for unofficial builds (made by an
+individual developer locally), the selection if which Fuel plugins to
+build (if any) can be done by environment variable
+"BUILD_FUEL_PLUGINS" prior to building.
+
+Only the plugin targets from fuel/build/f_isoroot/Makefile that are
+specified in the environment variable will then be built. In order to
+completely disable the building of plugins, the environment variable
+is set to " ". When using this functionality, the resulting iso file
+will be prepended with the prefix "unofficial-" to clearly indiciate
+that this is not a full build.
+
+This method of plugin selection is not meant to be used from within
+Gerrit!
+
Low level build method using make
---------------------------------
The low level method is based on Make: