summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/docker/Dockerfile1
-rw-r--r--build/f_isoroot/f_qemupluginbuild/config.mk2
-rwxr-xr-xci/deploy.sh12
-rw-r--r--deploy/cloud/deploy.py29
-rw-r--r--deploy/cloud/deployment.py6
-rw-r--r--deploy/common.py4
-rw-r--r--deploy/config/labs/devel-pipeline/elx/fuel/config/dha.yaml5
-rw-r--r--deploy/config/plugins/fuel-bgpvpn_0.0.3.yaml22
-rw-r--r--deploy/dea.py8
-rw-r--r--deploy/deploy-config.py43
-rwxr-xr-xdeploy/deploy.py24
-rw-r--r--deploy/deploy_env.py14
-rw-r--r--deploy/dha_adapters/hardware_adapter.py5
-rw-r--r--deploy/dha_adapters/libvirt_adapter.py7
-rw-r--r--deploy/environments/execution_environment.py8
-rw-r--r--deploy/environments/libvirt_environment.py14
-rw-r--r--deploy/environments/virtual_fuel.py5
-rw-r--r--deploy/templates/ericsson/virtual_environment/noha/vms/compute.xml2
-rw-r--r--deploy/templates/ericsson/virtual_environment/noha/vms/controller.xml2
-rw-r--r--deploy/templates/ericsson/virtual_environment/noha/vms/fuel.xml2
-rw-r--r--deploy/templates/hardware_environment/vms/ericsson_montreal_lab/fuel.xml2
-rw-r--r--deploy/templates/hardware_environment/vms/fuel.xml2
-rw-r--r--deploy/templates/intel/virtual_environment/noha/vms/compute.xml2
-rw-r--r--deploy/templates/intel/virtual_environment/noha/vms/controller.xml2
-rw-r--r--deploy/templates/intel/virtual_environment/noha/vms/fuel.xml2
-rw-r--r--deploy/templates/virtual_environment/vms/compute.xml2
-rw-r--r--deploy/templates/virtual_environment/vms/controller.xml2
-rw-r--r--deploy/templates/virtual_environment/vms/fuel.xml4
-rw-r--r--deploy/templates/virtual_environment_noha/vms/compute.xml2
-rw-r--r--deploy/templates/virtual_environment_noha/vms/controller.xml2
-rw-r--r--deploy/templates/virtual_environment_noha/vms/fuel.xml3
-rw-r--r--docs/build-instruction.rst9
-rw-r--r--docs/conf.py28
-rw-r--r--docs/configguide/installerconfig.rst10
-rw-r--r--docs/index.rst22
-rw-r--r--docs/installation-instruction.rst5
-rw-r--r--docs/release-notes.rst21
-rwxr-xr-xprototypes/sfc_tacker/poc.tacker-up.sh68
38 files changed, 264 insertions, 139 deletions
diff --git a/build/docker/Dockerfile b/build/docker/Dockerfile
index b7ef6d3a7..44ba74790 100644
--- a/build/docker/Dockerfile
+++ b/build/docker/Dockerfile
@@ -13,6 +13,7 @@ FROM ubuntu:14.04
ENV http_proxy INSERT_HTTP_PROXY
ENV https_proxy INSERT_HTTPS_PROXY
ENV no_proxy INSERT_NO_PROXY
+ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
RUN apt-get install -y software-properties-common python-software-properties \
diff --git a/build/f_isoroot/f_qemupluginbuild/config.mk b/build/f_isoroot/f_qemupluginbuild/config.mk
index e9c435690..e4a7d393f 100644
--- a/build/f_isoroot/f_qemupluginbuild/config.mk
+++ b/build/f_isoroot/f_qemupluginbuild/config.mk
@@ -7,6 +7,6 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-QEMU_BRANCH=292b588b5fe444651cca92d7511383ac42253984
+QEMU_BRANCH=1eb8bf930e2ec6e64526e95fcb21124f7401a243
QEMU_REPO=https://review.openstack.org/openstack/fuel-plugin-qemu
QEMU_CHANGE=
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 2304d7296..7bd180ef1 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -38,6 +38,7 @@ OPTIONS:
-B PXE Bridge for booting of Fuel master
-d Dry-run
-f Deploy on existing Fuel master
+ -e Do not launch environment deployment
-F Do only create a Fuel master
-H No health check
-l Lab-name
@@ -59,6 +60,7 @@ Input parameters to the build script is:
-d Dry-run - Produces deploy config files (config/dea.yaml and
config/dha.yaml), but does not execute deploy
-f Deploy on existing Fuel master
+-e Do not launch environment deployment
-F Do only create a Fuel master
-H Do not run fuel built in health-check after successfull deployment
-l Lab name as defined in the configuration directory, e.g. lf
@@ -104,6 +106,7 @@ PXE_BRIDGE=''
NO_HEALTH_CHECK=''
USE_EXISTING_FUEL=''
FUEL_CREATION_ONLY=''
+NO_DEPLOY_ENVIRONMENT=''
STORAGE_DIR=''
DRY_RUN=0
#
@@ -113,7 +116,7 @@ DRY_RUN=0
############################################################################
# BEGIN of main
#
-while getopts "b:B:dfFHl:p:s:S:i:h" OPTION
+while getopts "b:B:dfFHl:p:s:S:i:h:e" OPTION
do
case $OPTION in
b)
@@ -139,6 +142,9 @@ do
F)
FUEL_CREATION_ONLY='-fo'
;;
+ e)
+ NO_DEPLOY_ENVIRONMENT='-nde'
+ ;;
H)
NO_HEALTH_CHECK='-nh'
;;
@@ -224,8 +230,8 @@ if [ $DRY_RUN -eq 0 ]; then
ISO=${SCRIPT_PATH}/ISO/image.iso
fi
# Start deployment
- echo "python deploy.py -s $STORAGE_DIR -b $PXE_BRIDGE $USE_EXISTING_FUEL $FUEL_CREATION_ONLY $NO_HEALTH_CHECK -dea ${SCRIPT_PATH}/config/dea.yaml -dha ${SCRIPT_PATH}/config/dha.yaml -iso $ISO"
- python deploy.py $STORAGE_DIR $PXE_BRIDGE $USE_EXISTING_FUEL $FUEL_CREATION_ONLY $NO_HEALTH_CHECK -dea ${SCRIPT_PATH}/config/dea.yaml -dha ${SCRIPT_PATH}/config/dha.yaml -iso $ISO
+ echo "python deploy.py -s $STORAGE_DIR -b $PXE_BRIDGE $USE_EXISTING_FUEL $FUEL_CREATION_ONLY $NO_HEALTH_CHECK $NO_DEPLOY_ENVIRONMENT -dea ${SCRIPT_PATH}/config/dea.yaml -dha ${SCRIPT_PATH}/config/dha.yaml -iso $ISO"
+ python deploy.py $STORAGE_DIR $PXE_BRIDGE $USE_EXISTING_FUEL $FUEL_CREATION_ONLY $NO_HEALTH_CHECK $NO_DEPLOY_ENVIRONMENT -dea ${SCRIPT_PATH}/config/dea.yaml -dha ${SCRIPT_PATH}/config/dha.yaml -iso $ISO
fi
popd > /dev/null
diff --git a/deploy/cloud/deploy.py b/deploy/cloud/deploy.py
index 679b0ad6f..e00934bd9 100644
--- a/deploy/cloud/deploy.py
+++ b/deploy/cloud/deploy.py
@@ -22,6 +22,7 @@ from common import (
check_file_exists,
commafy,
ArgParser,
+ log,
)
YAML_CONF_DIR = '/var/lib/opnfv'
@@ -29,9 +30,12 @@ YAML_CONF_DIR = '/var/lib/opnfv'
class Deploy(object):
- def __init__(self, dea_file, no_health_check):
+ def __init__(self, dea_file, no_health_check, deploy_timeout,
+ no_deploy_environment):
self.dea = DeploymentEnvironmentAdapter(dea_file)
self.no_health_check = no_health_check
+ self.deploy_timeout = deploy_timeout
+ self.no_deploy_environment = no_deploy_environment
self.macs_per_blade = {}
self.blades = self.dea.get_node_ids()
self.blade_node_dict = self.dea.get_blade_node_map()
@@ -42,8 +46,8 @@ class Deploy(object):
def assign_roles_to_cluster_node_ids(self):
self.node_roles_dict = {}
for blade, node in self.blade_node_dict.iteritems():
- if self.dea.get_node_role(blade):
- roles = commafy(self.dea.get_node_role(blade))
+ if self.dea.get_node_roles(blade):
+ roles = commafy(self.dea.get_node_roles(blade))
self.node_roles_dict[node] = (roles, blade)
def configure_environment(self):
@@ -59,8 +63,12 @@ class Deploy(object):
def deploy_cloud(self):
dep = Deployment(self.dea, YAML_CONF_DIR, self.env_id,
- self.node_roles_dict, self.no_health_check)
- dep.deploy()
+ self.node_roles_dict, self.no_health_check,
+ self.deploy_timeout)
+ if not self.no_deploy_environment:
+ dep.deploy()
+ else:
+ log('Configuration is done. Deployment is not launched.')
def deploy(self):
@@ -76,13 +84,22 @@ def parse_arguments():
parser.add_argument('-nh', dest='no_health_check', action='store_true',
default=False,
help='Don\'t run health check after deployment')
+ parser.add_argument('-dt', dest='deploy_timeout', action='store',
+ default=240, help='Deployment timeout (in minutes) '
+ '[default: 240]')
+ parser.add_argument('-nde', dest='no_deploy_environment',
+ action='store_true', default=False,
+ help=('Do not launch environment deployment'))
parser.add_argument('dea_file', action='store',
help='Deployment Environment Adapter: dea.yaml')
+
args = parser.parse_args()
check_file_exists(args.dea_file)
kwargs = {'dea_file': args.dea_file,
- 'no_health_check': args.no_health_check}
+ 'no_health_check': args.no_health_check,
+ 'deploy_timeout': args.deploy_timeout,
+ 'no_deploy_environment': args.no_deploy_environment}
return kwargs
diff --git a/deploy/cloud/deployment.py b/deploy/cloud/deployment.py
index 42bab09bb..306abf006 100644
--- a/deploy/cloud/deployment.py
+++ b/deploy/cloud/deployment.py
@@ -31,12 +31,13 @@ LIST_OF_CHAR_TO_BE_ESCAPED = ['[', ']', '"']
class Deployment(object):
def __init__(self, dea, yaml_config_dir, env_id, node_id_roles_dict,
- no_health_check):
+ no_health_check, deploy_timeout):
self.dea = dea
self.yaml_config_dir = yaml_config_dir
self.env_id = env_id
self.node_id_roles_dict = node_id_roles_dict
self.no_health_check = no_health_check
+ self.deploy_timeout = deploy_timeout
self.pattern = re.compile(
'\d\d\d\d-\d\d-\d\d\s\d\d:\d\d:\d\d')
@@ -96,7 +97,6 @@ class Deployment(object):
print(log_msg + '\n')
def run_deploy(self):
- WAIT_LOOP = 240
SLEEP_TIME = 60
LOG_FILE = 'cloud.log'
@@ -105,7 +105,7 @@ class Deployment(object):
% (self.env_id, LOG_FILE))
ready = False
- for i in range(WAIT_LOOP):
+ for i in range(int(self.deploy_timeout)):
env = parse(exec_cmd('fuel env --env %s' % self.env_id))
log('Environment status: %s' % env[0][E['status']])
r, _ = exec_cmd('tail -2 %s | head -1' % LOG_FILE, False)
diff --git a/deploy/common.py b/deploy/common.py
index cc418b59b..787a21a1d 100644
--- a/deploy/common.py
+++ b/deploy/common.py
@@ -133,8 +133,8 @@ def commafy(comma_separated_list):
def check_if_root():
- r = exec_cmd('whoami')
- if r != 'root':
+ uid = os.getuid()
+ if uid != 0:
err('You need be root to run this application')
diff --git a/deploy/config/labs/devel-pipeline/elx/fuel/config/dha.yaml b/deploy/config/labs/devel-pipeline/elx/fuel/config/dha.yaml
index e70d8ca82..851509871 100644
--- a/deploy/config/labs/devel-pipeline/elx/fuel/config/dha.yaml
+++ b/deploy/config/labs/devel-pipeline/elx/fuel/config/dha.yaml
@@ -36,3 +36,8 @@ disks:
fuel: 100G
controller: 100G
compute: 100G
+
+number_cpus:
+ # Entry is not mandatory! If it is left empty
+ # the default is 2 cpus per node
+ controller: 2
diff --git a/deploy/config/plugins/fuel-bgpvpn_0.0.3.yaml b/deploy/config/plugins/fuel-bgpvpn_0.0.3.yaml
new file mode 100644
index 000000000..adca822fc
--- /dev/null
+++ b/deploy/config/plugins/fuel-bgpvpn_0.0.3.yaml
@@ -0,0 +1,22 @@
+plugin-config-metadata:
+ title: BGPVPN fuel Plugin configuration template
+ version: 0.3
+ created: 08-Mar-16
+ comment: None
+
+bgpvpn:
+ metadata:
+ class: plugin
+ default: false
+ enabled: true
+ label: BGPVPN plugin
+ toggleable: true
+ versions:
+ - metadata:
+ always_editable: false
+ label: BGPVPN plugin
+ plugin_version: 0.8.0
+ restrictions:
+ - cluster:net_provider != 'neutron': Only neutron is supported by BGPVPN-plugin
+ weight: 90
+ weight: 70
diff --git a/deploy/dea.py b/deploy/dea.py
index b5b63f7cc..1ac048e06 100644
--- a/deploy/dea.py
+++ b/deploy/dea.py
@@ -65,9 +65,15 @@ class DeploymentEnvironmentAdapter(object):
if node['id'] == node_id and property_name in node:
return node[property_name]
- def get_node_role(self, node_id):
+ def get_node_roles(self, node_id):
return self.get_node_property(node_id, 'role')
+ def get_node_main_role(self, node_id, fuel_node_id):
+ if node_id == fuel_node_id:
+ return 'fuel'
+ roles = self.get_node_roles(node_id)
+ return 'controller' if 'controller' in roles else 'compute'
+
def get_node_ids(self):
node_ids = []
for node in self.dea_struct['nodes']:
diff --git a/deploy/deploy-config.py b/deploy/deploy-config.py
index a0a44c1ed..5351c1461 100644
--- a/deploy/deploy-config.py
+++ b/deploy/deploy-config.py
@@ -90,14 +90,51 @@ def sha_uri(uri):
sha1.update(data)
return sha1.hexdigest()
+def merge_fuel_plugin_version_list(list1, list2):
+ final_list = []
+ # When the plugin version in not there in list1 it will
+ # not be copied
+ for e_l1 in list1:
+ plugin_version = e_l1.get('metadata',
+ {'plugin_version', None}).get('plugin_version')
+ plugin_version_found = False
+ for e_l2 in list2:
+ if plugin_version == e_l2.get('metadata',
+ {'plugin_version',
+ None}).get('plugin_version'):
+ final_list.append(dict(mergedicts(e_l1, e_l2)))
+ plugin_version_found = True
+ if not plugin_version_found:
+ final_list.append(e_l1)
+ return final_list
+
+def merge_lists(list1, list2):
+ if list1 and list2:
+ if isinstance(list1[0], dict):
+ if 'plugin_version' in list1[0].get('metadata', {}):
+ return merge_fuel_plugin_version_list(list1, list2)
+ else:
+ raise Exception("Lists with dics inside are not merge able! "
+ "You have to code the merge them. "
+ "List1: %s; List2: %s"
+ % (list1, list2))
+ else:
+ return list2
+ elif list1:
+ return list1
+ else:
+ return list2
+
def mergedicts(dict1, dict2):
for k in set(dict1.keys()).union(dict2.keys()):
if k in dict1 and k in dict2:
if isinstance(dict1[k], dict) and isinstance(dict2[k], dict):
yield (k, dict(mergedicts(dict1[k], dict2[k])))
+ elif isinstance(dict1[k], list) and isinstance(dict2[k], list):
+ yield (k, merge_lists(dict1[k], dict2[k]))
else:
- # If one of the values is not a dict, you can't continue
- # merging it.
+ # If one of the values is not a dict nor a list,
+ # you can't continue merging it.
# Value from second dict overrides one in first and we move on.
yield (k, dict2[k])
elif k in dict1:
@@ -194,7 +231,7 @@ if deploy_scenario_conf["stack-extensions"]:
module_comments.append(str(module_conf['plugin-config-metadata']['comment']))
module_conf.pop('plugin-config-metadata')
final_dea_conf['settings']['editable'].update(module_conf)
- scenario_module_override_conf = module['module-config-override']
+ scenario_module_override_conf = module.get('module-config-override')
if scenario_module_override_conf:
dea_scenario_module_override_conf = {}
dea_scenario_module_override_conf['settings'] = {}
diff --git a/deploy/deploy.py b/deploy/deploy.py
index bf0b39d42..f86f2be12 100755
--- a/deploy/deploy.py
+++ b/deploy/deploy.py
@@ -61,7 +61,7 @@ class AutoDeploy(object):
def __init__(self, no_fuel, fuel_only, no_health_check, cleanup_only,
cleanup, storage_dir, pxe_bridge, iso_file, dea_file,
dha_file, fuel_plugins_dir, fuel_plugins_conf_dir,
- no_plugins):
+ no_plugins, deploy_timeout, no_deploy_environment):
self.no_fuel = no_fuel
self.fuel_only = fuel_only
self.no_health_check = no_health_check
@@ -75,6 +75,8 @@ class AutoDeploy(object):
self.fuel_plugins_dir = fuel_plugins_dir
self.fuel_plugins_conf_dir = fuel_plugins_conf_dir
self.no_plugins = no_plugins
+ self.deploy_timeout = deploy_timeout
+ self.no_deploy_environment = no_deploy_environment
self.dea = (DeploymentEnvironmentAdapter(dea_file)
if not cleanup_only else None)
self.dha = DeploymentHardwareAdapter(dha_file)
@@ -197,7 +199,8 @@ class AutoDeploy(object):
dep = CloudDeploy(self.dea, self.dha, self.fuel_conf['ip'],
self.fuel_username, self.fuel_password,
self.dea_file, self.fuel_plugins_conf_dir,
- WORK_DIR, self.no_health_check)
+ WORK_DIR, self.no_health_check, self.deploy_timeout,
+ self.no_deploy_environment)
return dep.deploy()
def setup_execution_environment(self):
@@ -223,7 +226,8 @@ class AutoDeploy(object):
self.install_fuel_master()
if not self.fuel_only:
return self.deploy_env()
- return True
+ # Exit status
+ return 0
def run(self):
check_if_root()
@@ -234,7 +238,9 @@ class AutoDeploy(object):
if self.cleanup:
self.cleanup_execution_environment()
return deploy_success
- return True
+ # Exit status
+ return 0
+
def check_bridge(pxe_bridge, dha_path):
with io.open(dha_path) as yaml_file:
@@ -313,6 +319,12 @@ def parse_arguments():
help='Fuel Plugins Configuration directory')
parser.add_argument('-np', dest='no_plugins', action='store_true',
default=False, help='Do not install Fuel Plugins')
+ parser.add_argument('-dt', dest='deploy_timeout', action='store',
+ default=240, help='Deployment timeout (in minutes) '
+ '[default: 240]')
+ parser.add_argument('-nde', dest='no_deploy_environment',
+ action='store_true', default=False,
+ help=('Do not launch environment deployment'))
args = parser.parse_args()
log(args)
@@ -338,7 +350,9 @@ def parse_arguments():
'dha_file': args.dha_file,
'fuel_plugins_dir': args.fuel_plugins_dir,
'fuel_plugins_conf_dir': args.fuel_plugins_conf_dir,
- 'no_plugins': args.no_plugins}
+ 'no_plugins': args.no_plugins,
+ 'deploy_timeout': args.deploy_timeout,
+ 'no_deploy_environment': args.no_deploy_environment}
return kwargs
diff --git a/deploy/deploy_env.py b/deploy/deploy_env.py
index 735ea66a3..aa861e102 100644
--- a/deploy/deploy_env.py
+++ b/deploy/deploy_env.py
@@ -34,7 +34,8 @@ BLADE_RESTART_TIMES = 3
class CloudDeploy(object):
def __init__(self, dea, dha, fuel_ip, fuel_username, fuel_password,
- dea_file, fuel_plugins_conf_dir, work_dir, no_health_check):
+ dea_file, fuel_plugins_conf_dir, work_dir, no_health_check,
+ deploy_timeout, no_deploy_environment):
self.dea = dea
self.dha = dha
self.fuel_ip = fuel_ip
@@ -48,6 +49,8 @@ class CloudDeploy(object):
self.fuel_plugins_conf_dir = fuel_plugins_conf_dir
self.work_dir = work_dir
self.no_health_check = no_health_check
+ self.deploy_timeout = deploy_timeout
+ self.no_deploy_environment = no_deploy_environment
self.file_dir = os.path.dirname(os.path.realpath(__file__))
self.ssh = SSHClient(self.fuel_ip, self.fuel_username,
self.fuel_password)
@@ -103,8 +106,13 @@ class CloudDeploy(object):
deploy_app = '%s/%s' % (self.work_dir, deploy_app)
dea_file = '%s/%s' % (self.work_dir, os.path.basename(self.dea_file))
with self.ssh as s:
- status = s.run('python %s %s %s' % (
- deploy_app, ('-nh' if self.no_health_check else ''), dea_file))
+ status = s.run('python %s %s %s %s %s' % (
+ deploy_app,
+ ('-nh' if self.no_health_check else ''),
+ ('-dt %s' %
+ self.deploy_timeout if self.deploy_timeout else ''),
+ ('-nde' if self.no_deploy_environment else ''),
+ dea_file))
return status
def check_supported_release(self):
diff --git a/deploy/dha_adapters/hardware_adapter.py b/deploy/dha_adapters/hardware_adapter.py
index 2cd5ab842..55bb4002e 100644
--- a/deploy/dha_adapters/hardware_adapter.py
+++ b/deploy/dha_adapters/hardware_adapter.py
@@ -58,3 +58,8 @@ class HardwareAdapter(object):
def get_disks(self):
return self.dha_struct['disks']
+
+ def get_number_cpus(self, role):
+ role_cpus_dict = self.dha_struct.get('number_cpus')
+ if role_cpus_dict:
+ return role_cpus_dict.get(role)
diff --git a/deploy/dha_adapters/libvirt_adapter.py b/deploy/dha_adapters/libvirt_adapter.py
index c65dab554..85913ac9e 100644
--- a/deploy/dha_adapters/libvirt_adapter.py
+++ b/deploy/dha_adapters/libvirt_adapter.py
@@ -95,9 +95,12 @@ class LibvirtAdapter(HardwareAdapter):
sources = disk.xpath('source')
for source in sources:
disk_file = source.get('file')
- disk_size = exec_cmd('ls -l %s' % disk_file).split()[4]
+ disk_size = exec_cmd('qemu-img info '
+ '%s |grep \"virtual size:\"'
+ % disk_file).split()[2]
delete(disk_file)
- exec_cmd('fallocate -l %s %s' % (disk_size, disk_file))
+ exec_cmd('qemu-img create -f qcow2 %s %s' % (disk_file,
+ disk_size))
def node_eject_iso(self, node_id):
vm_name = self.get_node_property(node_id, 'libvirtName')
diff --git a/deploy/environments/execution_environment.py b/deploy/environments/execution_environment.py
index 38e5bcdf7..c2e7a0b23 100644
--- a/deploy/environments/execution_environment.py
+++ b/deploy/environments/execution_environment.py
@@ -50,7 +50,7 @@ class ExecutionEnvironment(object):
for file in disk_files:
delete(file)
- def define_vm(self, vm_name, temp_vm_file, disk_path):
+ def define_vm(self, vm_name, temp_vm_file, disk_path, number_cpus):
log('Creating VM %s with disks %s' % (vm_name, disk_path))
with open(temp_vm_file) as f:
vm_xml = etree.parse(f)
@@ -60,10 +60,14 @@ class ExecutionEnvironment(object):
uuids = vm_xml.xpath('/domain/uuid')
for uuid in uuids:
uuid.getparent().remove(uuid)
+ if number_cpus:
+ vcpus = vm_xml.xpath('/domain/vcpu')
+ for vcpu in vcpus:
+ vcpu.text = str(number_cpus)
disks = vm_xml.xpath('/domain/devices/disk')
for disk in disks:
if (disk.get('type') == 'file' and
- disk.get('device') == 'disk'):
+ disk.get('device') == 'disk'):
sources = disk.xpath('source')
for source in sources:
disk.remove(source)
diff --git a/deploy/environments/libvirt_environment.py b/deploy/environments/libvirt_environment.py
index c8a2ef529..380262c7e 100644
--- a/deploy/environments/libvirt_environment.py
+++ b/deploy/environments/libvirt_environment.py
@@ -34,13 +34,9 @@ class LibvirtEnvironment(ExecutionEnvironment):
self.net_names = self.collect_net_names()
def create_storage(self, node_id, disk_path, disk_sizes):
- if node_id == self.fuel_node_id:
- disk_size = disk_sizes['fuel']
- else:
- roles = self.dea.get_node_role(node_id)
- role = 'controller' if 'controller' in roles else 'compute'
- disk_size = disk_sizes[role]
- exec_cmd('fallocate -l %s %s' % (disk_size, disk_path))
+ role = self.dea.get_node_main_role(node_id, self.fuel_node_id)
+ disk_size = disk_sizes[role]
+ exec_cmd('qemu-img create -f qcow2 %s %s' % (disk_path, disk_size))
def create_vms(self):
temp_dir = tempfile.mkdtemp()
@@ -53,9 +49,11 @@ class LibvirtEnvironment(ExecutionEnvironment):
check_file_exists(vm_template)
disk_path = '%s/%s.raw' % (self.storage_dir, vm_name)
self.create_storage(node_id, disk_path, disk_sizes)
+ number_cpus = self.dha.get_number_cpus(
+ self.dea.get_node_main_role(node_id, self.fuel_node_id))
temp_vm_file = '%s/%s' % (temp_dir, vm_name)
exec_cmd('cp %s %s' % (vm_template, temp_vm_file))
- self.define_vm(vm_name, temp_vm_file, disk_path)
+ self.define_vm(vm_name, temp_vm_file, disk_path, number_cpus)
delete(temp_dir)
def start_vms(self):
diff --git a/deploy/environments/virtual_fuel.py b/deploy/environments/virtual_fuel.py
index 89a82c078..62082185f 100644
--- a/deploy/environments/virtual_fuel.py
+++ b/deploy/environments/virtual_fuel.py
@@ -55,11 +55,12 @@ class VirtualFuel(ExecutionEnvironment):
disk_path = '%s/%s.raw' % (self.storage_dir, vm_name)
disk_sizes = self.dha.get_disks()
disk_size = disk_sizes['fuel']
- exec_cmd('fallocate -l %s %s' % (disk_size, disk_path))
+ number_cpus = self.dha.get_number_cpus('fuel')
+ exec_cmd('qemu-img create -f qcow2 %s %s' % (disk_path, disk_size))
temp_vm_file = '%s/%s' % (temp_dir, vm_name)
exec_cmd('cp %s %s' % (vm_template, temp_vm_file))
self.set_vm_nic(temp_vm_file)
- self.define_vm(vm_name, temp_vm_file, disk_path)
+ self.define_vm(vm_name, temp_vm_file, disk_path, number_cpus)
delete(temp_dir)
def setup_environment(self):
diff --git a/deploy/templates/ericsson/virtual_environment/noha/vms/compute.xml b/deploy/templates/ericsson/virtual_environment/noha/vms/compute.xml
index 063b23d98..6fb37432a 100644
--- a/deploy/templates/ericsson/virtual_environment/noha/vms/compute.xml
+++ b/deploy/templates/ericsson/virtual_environment/noha/vms/compute.xml
@@ -48,7 +48,7 @@
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='file' device='disk'>
- <driver name='qemu' type='raw'/>
+ <driver name='qemu' type='qcow2'/>
<source file='disk.raw'/>
<target dev='vda' bus='virtio'/>
</disk>
diff --git a/deploy/templates/ericsson/virtual_environment/noha/vms/controller.xml b/deploy/templates/ericsson/virtual_environment/noha/vms/controller.xml
index d30a95dcf..cf62fbce2 100644
--- a/deploy/templates/ericsson/virtual_environment/noha/vms/controller.xml
+++ b/deploy/templates/ericsson/virtual_environment/noha/vms/controller.xml
@@ -48,7 +48,7 @@
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='file' device='disk'>
- <driver name='qemu' type='raw'/>
+ <driver name='qemu' type='qcow2'/>
<source file='disk.raw'/>
<target dev='vda' bus='virtio'/>
</disk>
diff --git a/deploy/templates/ericsson/virtual_environment/noha/vms/fuel.xml b/deploy/templates/ericsson/virtual_environment/noha/vms/fuel.xml
index a693c96f9..31e84798b 100644
--- a/deploy/templates/ericsson/virtual_environment/noha/vms/fuel.xml
+++ b/deploy/templates/ericsson/virtual_environment/noha/vms/fuel.xml
@@ -56,7 +56,7 @@
<readonly/>
</disk>
<disk type='file' device='disk'>
- <driver name='qemu' type='raw'/>
+ <driver name='qemu' type='qcwo2'/>
<source file='disk.raw'/>
<target dev='vda' bus='virtio'/>
</disk>
diff --git a/deploy/templates/hardware_environment/vms/ericsson_montreal_lab/fuel.xml b/deploy/templates/hardware_environment/vms/ericsson_montreal_lab/fuel.xml
index 7d06f2d60..b55b16e5f 100644
--- a/deploy/templates/hardware_environment/vms/ericsson_montreal_lab/fuel.xml
+++ b/deploy/templates/hardware_environment/vms/ericsson_montreal_lab/fuel.xml
@@ -35,7 +35,7 @@
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='file' device='disk'>
- <driver name='qemu' type='raw'/>
+ <driver name='qemu' type='qcow2'/>
<target dev='vda' bus='virtio'/>
</disk>
<disk type='block' device='cdrom'>
diff --git a/deploy/templates/hardware_environment/vms/fuel.xml b/deploy/templates/hardware_environment/vms/fuel.xml
index e3e3f80bb..72c15b577 100644
--- a/deploy/templates/hardware_environment/vms/fuel.xml
+++ b/deploy/templates/hardware_environment/vms/fuel.xml
@@ -35,7 +35,7 @@
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='file' device='disk'>
- <driver name='qemu' type='raw'/>
+ <driver name='qemu' type='qcow2'/>
<target dev='vda' bus='virtio'/>
</disk>
<disk type='block' device='cdrom'>
diff --git a/deploy/templates/intel/virtual_environment/noha/vms/compute.xml b/deploy/templates/intel/virtual_environment/noha/vms/compute.xml
index 063b23d98..6fb37432a 100644
--- a/deploy/templates/intel/virtual_environment/noha/vms/compute.xml
+++ b/deploy/templates/intel/virtual_environment/noha/vms/compute.xml
@@ -48,7 +48,7 @@
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='file' device='disk'>
- <driver name='qemu' type='raw'/>
+ <driver name='qemu' type='qcow2'/>
<source file='disk.raw'/>
<target dev='vda' bus='virtio'/>
</disk>
diff --git a/deploy/templates/intel/virtual_environment/noha/vms/controller.xml b/deploy/templates/intel/virtual_environment/noha/vms/controller.xml
index d30a95dcf..cf62fbce2 100644
--- a/deploy/templates/intel/virtual_environment/noha/vms/controller.xml
+++ b/deploy/templates/intel/virtual_environment/noha/vms/controller.xml
@@ -48,7 +48,7 @@
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='file' device='disk'>
- <driver name='qemu' type='raw'/>
+ <driver name='qemu' type='qcow2'/>
<source file='disk.raw'/>
<target dev='vda' bus='virtio'/>
</disk>
diff --git a/deploy/templates/intel/virtual_environment/noha/vms/fuel.xml b/deploy/templates/intel/virtual_environment/noha/vms/fuel.xml
index a693c96f9..67cccbb1e 100644
--- a/deploy/templates/intel/virtual_environment/noha/vms/fuel.xml
+++ b/deploy/templates/intel/virtual_environment/noha/vms/fuel.xml
@@ -56,7 +56,7 @@
<readonly/>
</disk>
<disk type='file' device='disk'>
- <driver name='qemu' type='raw'/>
+ <driver name='qemu' type='qcow2'/>
<source file='disk.raw'/>
<target dev='vda' bus='virtio'/>
</disk>
diff --git a/deploy/templates/virtual_environment/vms/compute.xml b/deploy/templates/virtual_environment/vms/compute.xml
index fa4ef5d8d..f794b651a 100644
--- a/deploy/templates/virtual_environment/vms/compute.xml
+++ b/deploy/templates/virtual_environment/vms/compute.xml
@@ -21,7 +21,7 @@
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='file' device='disk'>
- <driver name='qemu' type='raw'/>
+ <driver name='qemu' type='qcow2'/>
<source file='disk.raw'/>
<target dev='vda' bus='virtio'/>
</disk>
diff --git a/deploy/templates/virtual_environment/vms/controller.xml b/deploy/templates/virtual_environment/vms/controller.xml
index 50950db17..44dd5b655 100644
--- a/deploy/templates/virtual_environment/vms/controller.xml
+++ b/deploy/templates/virtual_environment/vms/controller.xml
@@ -21,7 +21,7 @@
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='file' device='disk'>
- <driver name='qemu' type='raw'/>
+ <driver name='qemu' type='qcow2'/>
<source file='disk.raw'/>
<target dev='vda' bus='virtio'/>
</disk>
diff --git a/deploy/templates/virtual_environment/vms/fuel.xml b/deploy/templates/virtual_environment/vms/fuel.xml
index 4e7c7fd2a..bf8f3e288 100644
--- a/deploy/templates/virtual_environment/vms/fuel.xml
+++ b/deploy/templates/virtual_environment/vms/fuel.xml
@@ -29,7 +29,7 @@
<readonly/>
</disk>
<disk type='file' device='disk'>
- <driver name='qemu' type='raw'/>
+ <driver name='qemu' type='qcow2'/>
<source file='disk.raw'/>
<target dev='vda' bus='virtio'/>
</disk>
@@ -61,6 +61,4 @@
<memballoon model='virtio'>
</memballoon>
</devices>
- <seclabel type='dynamic' model='apparmor' relabel='yes'/>
</domain>
-
diff --git a/deploy/templates/virtual_environment_noha/vms/compute.xml b/deploy/templates/virtual_environment_noha/vms/compute.xml
index fa4ef5d8d..f794b651a 100644
--- a/deploy/templates/virtual_environment_noha/vms/compute.xml
+++ b/deploy/templates/virtual_environment_noha/vms/compute.xml
@@ -21,7 +21,7 @@
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='file' device='disk'>
- <driver name='qemu' type='raw'/>
+ <driver name='qemu' type='qcow2'/>
<source file='disk.raw'/>
<target dev='vda' bus='virtio'/>
</disk>
diff --git a/deploy/templates/virtual_environment_noha/vms/controller.xml b/deploy/templates/virtual_environment_noha/vms/controller.xml
index 50950db17..44dd5b655 100644
--- a/deploy/templates/virtual_environment_noha/vms/controller.xml
+++ b/deploy/templates/virtual_environment_noha/vms/controller.xml
@@ -21,7 +21,7 @@
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='file' device='disk'>
- <driver name='qemu' type='raw'/>
+ <driver name='qemu' type='qcow2'/>
<source file='disk.raw'/>
<target dev='vda' bus='virtio'/>
</disk>
diff --git a/deploy/templates/virtual_environment_noha/vms/fuel.xml b/deploy/templates/virtual_environment_noha/vms/fuel.xml
index 4e7c7fd2a..3e7576945 100644
--- a/deploy/templates/virtual_environment_noha/vms/fuel.xml
+++ b/deploy/templates/virtual_environment_noha/vms/fuel.xml
@@ -24,7 +24,7 @@
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='block' device='cdrom'>
- <driver name='qemu' type='raw'/>
+ <driver name='qemu' type='qcow2'/>
<target dev='hdc' bus='ide'/>
<readonly/>
</disk>
@@ -61,6 +61,5 @@
<memballoon model='virtio'>
</memballoon>
</devices>
- <seclabel type='dynamic' model='apparmor' relabel='yes'/>
</domain>
diff --git a/docs/build-instruction.rst b/docs/build-instruction.rst
index d5721af0b..254c0d3f2 100644
--- a/docs/build-instruction.rst
+++ b/docs/build-instruction.rst
@@ -1,9 +1,6 @@
-================================================================================================
+=================================================================================================
OPNFV Build instruction for the Brahmaputra release of OPNFV when using Fuel as a deployment tool
-================================================================================================
-
-.. contents:: Table of Contents
- :backlinks: none
+=================================================================================================
License
=======
@@ -87,7 +84,7 @@ Then restart docker:
.. code-block:: console
-$ sudo service docker restart
+ $ sudo service docker restart
Setting up OPNFV Gerrit in order to being able to clone the code
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/docs/conf.py b/docs/conf.py
new file mode 100644
index 000000000..6cd69313d
--- /dev/null
+++ b/docs/conf.py
@@ -0,0 +1,28 @@
+# SPDX-license-identifier: Apache-2.0
+##############################################################################
+# Copyright (c) 2016 Linux Foundation 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
+##############################################################################
+
+# Copied from releng/docs/etc/conf.py
+extensions = ['sphinxcontrib.httpdomain',
+ 'sphinx.ext.autodoc',
+ 'sphinx.ext.viewcode',
+ 'sphinx.ext.napoleon']
+
+needs_sphinx = '1.3'
+master_doc = 'index'
+pygments_style = 'sphinx'
+
+html_use_index = False
+numfig = True
+html_logo = 'opnfv-logo.png'
+
+latex_domain_indices = False
+latex_logo = 'opnfv-logo.png'
+
+# addtional config
+latex_elements = {'figure_align': 'H'}
diff --git a/docs/configguide/installerconfig.rst b/docs/configguide/installerconfig.rst
index ea08b6d31..60ffadf1f 100644
--- a/docs/configguide/installerconfig.rst
+++ b/docs/configguide/installerconfig.rst
@@ -69,7 +69,7 @@ Following high level hardware requirements must be met:
+--------------------+------------------------------------------------------+
| **HW Aspect** | **Requirement** |
| | |
-+--------------------+------------------------------------------------------+
++====================+======================================================+
| **# of nodes** | Minimum 5 (3 for non redundant deployment): |
| | |
| | - 1 Fuel deployment master (may be virtualized) |
@@ -155,7 +155,7 @@ developed by OPNFV:
+--------------------+------------------------------------------------------+
| **Plugin name** | **Short description** |
| | |
-+--------------------+------------------------------------------------------+
++====================+======================================================+
| OpenDaylight | OpenDaylight provides an open-source SDN Controller |
| | providing networking features such as L2 and L3 |
| | network control, "Service Function Chaining", |
@@ -212,8 +212,8 @@ developed by OPNFV:
*Additional third-party plugins can be found here:*
*https://www.mirantis.com/products/openstack-drivers-and-plugins/fuel-plugins/*
-**Note: Plugins are not necessarilly compatible with each other, see <TODO>
-for compatibility information**
+**Note: Plugins are not necessarilly compatible with each other, see section
+"Configuration options, OPNFV scenarios" for compatibility information**
The plugins come prepackaged, ready to install. To do so follow the
installation instructions provided in *Reference 13* provided in section
@@ -237,7 +237,7 @@ The plugins of your choice need to be enabled and configured.
To enable a plugin, follow the installation instructions found in
*Reference 13*, provided in section *"Fuel associated references"* below.
-For configuration of the plugins, please refer to the corresponding feature in the ????? <TODO>
+For configuration of the plugins, please see section "Feature Configuration".
Networking
^^^^^^^^^^
diff --git a/docs/index.rst b/docs/index.rst
index fd61a5201..6bba3aaf1 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -4,32 +4,16 @@
.. You should have received a copy of the license along with this work.
.. If not, see <http://creativecommons.org/licenses/by/4.0/>.
-.. OPNFV Release Engineering documentation, created by
- sphinx-quickstart on Tue Jun 9 19:12:31 2015.
- You can adapt this file completely to your liking, but it should at least
- contain the root `toctree` directive.
-
-.. image:: opnfv-logo.png
- :height: 40
- :width: 200
- :alt: OPNFV
- :align: left
-
+**********
Fuel@OPNFV
-=======================================
-
-Contents:
+**********
.. toctree::
:maxdepth: 4
- :titlesonly:
build-instruction.rst
installation-instruction.rst
release-notes.rst
-* :ref:`search`
-
-Revision: _sha1_
+.. :titlesonly:
-Build date: |today|
diff --git a/docs/installation-instruction.rst b/docs/installation-instruction.rst
index aaf96becb..f7125816d 100644
--- a/docs/installation-instruction.rst
+++ b/docs/installation-instruction.rst
@@ -2,9 +2,6 @@
OPNFV Installation instruction for the Brahmaputra release of OPNFV when using Fuel as a deployment tool
========================================================================================================
-.. contents:: Table of Contents
- :backlinks: none
-
License
=======
@@ -111,7 +108,7 @@ installation of Brahmaputra using Fuel:
+--------------------+------------------------------------------------------+
| **HW Aspect** | **Requirement** |
| | |
-+--------------------+------------------------------------------------------+
++====================+======================================================+
| **# of nodes** | Minimum 5 (3 for non redundant deployment): |
| | |
| | - 1 Fuel deployment master (may be virtualized) |
diff --git a/docs/release-notes.rst b/docs/release-notes.rst
index 253859bfe..e731af02c 100644
--- a/docs/release-notes.rst
+++ b/docs/release-notes.rst
@@ -2,9 +2,6 @@
OPNFV Release Note for the Brahmaputra release of OPNFV when using Fuel as a deployment tool
============================================================================================
-.. contents:: Table of Contents
- :backlinks: none
-
License
=======
@@ -104,7 +101,7 @@ following upstream versions:
- OpenStack Liberty release
-- OpenDaylight Beryllium pre-release <TODO>
+- OpenDaylight Beryllium release
- ONOS Drake release
@@ -121,19 +118,20 @@ comes with the following documentation:
Reason for version
------------------
+
Feature additions
~~~~~~~~~~~~~~~~~
**JIRA TICKETS:**
-`New features <https://jira.opnfv.org/browse/FUEL-81?jql=project%20%3D%20FUEL%20AND%20issuetype%20in%20%28Improvement%2C%20%22New%20Feature%22%2C%20Story%2C%20Sub-task%29%20AND%20status%20in%20%28Resolved%2C%20Closed%29%20AND%20resolution%20%3D%20Fixed%20AND%20labels%20in%20%28Fuel-B-WP1%2C%20R2%2C%20brahmaputra%29>`_
+`New features <https://jira.opnfv.org/issues/?filter=11002>`_ 'https://jira.opnfv.org/issues/?filter=11002'
Bug corrections
~~~~~~~~~~~~~~~
**JIRA TICKETS:**
-`Bug-fixes <https://jira.opnfv.org/browse/FUEL-96?jql=project%20%3D%20FUEL%20AND%20issuetype%20%3D%20Bug%20AND%20status%20in%20%28Resolved%2C%20Closed%29%20AND%20resolution%20%3D%20Fixed%20AND%20labels%20in%20%28Fuel-B-WP1%2C%20R2%2C%20brahmaputra%29>`_
+`Bug-fixes <https://jira.opnfv.org/browse/FUEL-99?filter=11001>`_ 'https://jira.opnfv.org/browse/FUEL-99?filter=11001'
Deliverables
------------
@@ -162,7 +160,7 @@ System Limitations
- **Min number of blades:** 1 Fuel master, 1 Controller, 1 Compute blade
-- **Storage:** Ceph is the only supported storage configuration.
+- **Storage:** Ceph is the only supported storage configuration
- **Max number of networks:** 65k
@@ -172,22 +170,21 @@ Known issues
**JIRA TICKETS:**
-`Known issues <https://jira.opnfv.org/browse/FUEL-99?jql=project%20%3D%20FUEL%20AND%20issuetype%20%3D%20Bug%20AND%20status%20in%20%28Open%2C%20%22In%20Progress%22%2C%20Reopened%29>`_
+`Known issues <https://jira.opnfv.org/issues/?filter=11000>`_ 'https://jira.opnfv.org/issues/?filter=11000'
Workarounds
-----------
--
+
Test results
============
The Brahmaputra release with the Fuel deployment tool has undergone QA test
-runs with the following results:
-<TODO>
+runs, see separate test results.
References
==========
-For more information on the OPNFV Brahmaputra release, please see
+For more information on the OPNFV Brahmaputra release, please see:
OPNFV
-----
diff --git a/prototypes/sfc_tacker/poc.tacker-up.sh b/prototypes/sfc_tacker/poc.tacker-up.sh
index 0b6e0ce0f..be647b409 100755
--- a/prototypes/sfc_tacker/poc.tacker-up.sh
+++ b/prototypes/sfc_tacker/poc.tacker-up.sh
@@ -1,6 +1,5 @@
#!/bin/bash
-
#
# POC Script to build/install/deploy/orchestrate Tacker on an OPNFV Brhamaputra Fuel cluster
# Script assuming it runs on the openstack primary controller (where is opendaylight
@@ -11,10 +10,9 @@
#
# (c) 2016 Telefonaktiebolaget L. M. ERICSSON
#
-# 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
+# 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
#
@@ -25,16 +23,16 @@ MYREPO="tacker-server"
CLIREPO="tacker-client"
DEPREPO="jsonrpclib"
-CLIENT="python-python-tackerclient_0.0.1~dev48-1_all.deb"
-JSONRPC="python-jsonrpclib_0.1.7-1_all.deb"
-SERVER="python-tacker_2014.2.0~dev176-1_all.deb"
+CLIENT=$(echo python-python-tackerclient_*_all.deb)
+JSONRPC=$(echo python-jsonrpclib_*_all.deb)
+SERVER=$(echo python-tacker_*_all.deb)
# Function checks whether crudini is available, if not - installs
function chkCrudini () {
if [[ ! -f '/usr/bin/crudini' ]]; then
wget -N http://mirrors.kernel.org/ubuntu/pool/universe/p/python-iniparse/python-iniparse_0.4-2.1build1_all.deb
wget -N http://archive.ubuntu.com/ubuntu/pool/universe/c/crudini/crudini_0.3-1_amd64.deb
- dpkg -i python-iniparse_0.4-2.1build1_all.deb crudini_0.3-1_amd64.deb crudini_0.3-1_amd64.deb
+ dpkg -i python-iniparse_0.4-2.1build1_all.deb crudini_0.3-1_amd64.deb
fi
}
@@ -76,6 +74,7 @@ function deployJsonrpclib () {
dpkg --purge python-jsonrpclib
python setup.py --command-packages=stdeb.command bdist_deb
cd "deb_dist"
+ JSONRPC=$(echo python-jsonrpclib_*_all.deb)
cp $JSONRPC $MYDIR
dpkg -i $JSONRPC
}
@@ -119,6 +118,9 @@ EOFSCP
# Function corrects and installs the Tacker-server debian package
function blessPackage () {
+ pushd "${MYDIR}/${MYREPO}/deb_dist"
+ SERVER=$(echo python-tacker_*_all.deb)
+ popd
DEBFILE="${MYDIR}/${MYREPO}/deb_dist/${SERVER}"
TMPDIR=$(mktemp -d /tmp/deb.XXXXXX) || exit 1
OUTPUT=$(basename "$DEBFILE")
@@ -146,9 +148,9 @@ diff -ruN a/DEBIAN/control b/DEBIAN/control
EOFDC
cd "$MYDIR"
echo "Patching deb..."
- dpkg -b "$TMPDIR" "${MYDIR}/${OUTPUT}"
+ dpkg -b "$TMPDIR" "${MYDIR}/${SERVER}"
rm -r "$TMPDIR"
- dpkg -i "${MYDIR}/${OUTPUT}"
+ dpkg -i "${MYDIR}/${SERVER}"
}
# Function deploys Tacker-server (installs missing mandatory files: upstart, default)
@@ -212,21 +214,11 @@ function deployTackerClient() {
dpkg --purge python-tackerclient
git clone -b 'SFC_refactor' https://github.com/trozet/python-tackerclient.git $CLIREPO
cd $CLIREPO
-# patch -p 1 <<EOFCSC
-#--- a/setup.cfg 2016-02-09 08:51:48.424937110 +0000
-#+++ b/setup.cfg 2016-02-09 08:52:17.084938135 +0000
-#@@ -1,5 +1,5 @@
-# [metadata]
-#-name = python-tackerclient
-#+name = tackerclient
-# summary = CLI and Client Library for OpenStack Networking
-# description-file =
-# README.rst
-#EOFCSC
python setup.py --command-packages=stdeb.command bdist_deb
cd "deb_dist"
+ CLIENT=$(echo python-python-tackerclient_*_all.deb)
cp $CLIENT $MYDIR
- dpkg -i $CLIENT
+ dpkg -i "${MYDIR}/${CLIENT}"
}
# Function removes the cloned git repositories
@@ -246,7 +238,7 @@ function populate_client() {
myaddr=$(ifconfig br-fw-admin | sed -n '/inet addr/s/.*addr.\([^ ]*\) .*/\1/p')
for anode in $clusternodes ; do
if [ "$anode" != "$myaddr" ] ; then
- echo "installing $CLIENT on $anode"
+ echo "Installing $CLIENT on $anode"
scp ${SSH_OPTIONS[@]} $CLIENT $anode:$CLIENT
ssh ${SSH_OPTIONS[@]} $anode dpkg -i $CLIENT
ssh ${SSH_OPTIONS[@]} $anode rm $CLIENT
@@ -263,21 +255,27 @@ function orchestarte () {
popd
### Facts ###
+
+ # Port(s) Protocol ServiceDetails Source
+ # 8805-8872 tcp,udp Unassigned IANA
+ bind_port='8808'
+
auth_uri=$(crudini --get '/etc/heat/heat.conf' 'keystone_authtoken' 'auth_uri')
identity_uri=$(crudini --get '/etc/heat/heat.conf' 'keystone_authtoken' 'identity_uri')
- database_connection="mysql://tacker:tacker@$(hiera database_vip)/tacker"
+ mgmt_addr=$(ifconfig br-mgmt | sed -n '/inet addr/s/.*addr.\([^ ]*\) .*/\1/p')
+ pub_addr=$(ifconfig br-ex-lnx | sed -n '/inet addr/s/.*addr.\([^ ]*\) .*/\1/p')
rabbit_host=$(crudini --get '/etc/heat/heat.conf' 'oslo_messaging_rabbit' 'rabbit_hosts'| cut -d ':' -f 1)
rabbit_password=$(crudini --get '/etc/heat/heat.conf' 'oslo_messaging_rabbit' 'rabbit_password')
sql_host=$(hiera database_vip)
- admin_url="http://$(hiera management_vip):8888/"
- public_url="http://$(hiera public_vip):8888/"
+ database_connection="mysql://tacker:tacker@${sql_host}/tacker"
+ admin_url="http://${mgmt_addr}:${bind_port}"
+ public_url="http://${pub_addr}:${bind_port}"
heat_api_vip=$(crudini --get '/etc/heat/heat.conf' 'heat_api' 'bind_host')
- mgmt_addr=$(ifconfig br-mgmt | sed -n '/inet addr/s/.*addr.\([^ ]*\) .*/\1/p')
- allowed_hosts="[ '${HOSTNAME}', 'localhost', '127.0.0.1', '%' ]"
+ allowed_hosts="[ '${sql_host}', '${HOSTNAME%%.domain.tld}', 'localhost', '127.0.0.1', '%' ]"
heat_uri="http://${heat_api_vip}:8004/v1"
odl_port='8282'
service_tenant='services'
- myRegion='regionOne'
+ myRegion='RegionOne'
myPassword='tacker'
cat > configure_tacker.pp << EOF
@@ -289,7 +287,7 @@ function orchestarte () {
class { 'tacker':
package_ensure => 'absent',
client_package_ensure => 'absent',
- bind_host => '${mgmt_addr}',
+ bind_port => '${bind_port}',
keystone_password => '${myPassword}',
keystone_tenant => '${service_tenant}',
auth_uri => '${auth_uri}',
@@ -304,7 +302,6 @@ function orchestarte () {
class { 'tacker::db::mysql':
password => '${myPassword}',
- host => '${sql_host}',
allowed_hosts => ${allowed_hosts},
}
@@ -327,11 +324,12 @@ export OS_NO_CACHE='true'
export OS_TENANT_NAME='${service_tenant}'
export OS_PROJECT_NAME='${service_tenant}'
export OS_USERNAME='tacker'
-export OS_PASSWORD='tacker'
+export OS_PASSWORD='${myPassword}'
export OS_AUTH_URL='${auth_uri}'
export OS_DEFAULT_DOMAIN='default'
export OS_AUTH_STRATEGY='keystone'
-export OS_REGION_NAME='RegionOne'
+export OS_REGION_NAME='${myRegion}'
+export TACKER_ENDPOINT_TYPE='internalURL'
EOFRC
chmod +x tackerc
}
@@ -346,7 +344,7 @@ function populate_rc() {
myaddr=$(ifconfig br-fw-admin | sed -n '/inet addr/s/.*addr.\([^ ]*\) .*/\1/p')
for anode in $clusternodes ; do
if [ "$anode" != "$myaddr" ] ; then
- echo "populating seetings to $anode"
+ echo "Populating seetings to $anode"
scp ${SSH_OPTIONS[@]} tackerc $anode:tackerc
fi
done