summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/Makefile27
-rw-r--r--build/build_perf_image.sh2
-rw-r--r--build/network-environment.yaml2
-rwxr-xr-xbuild/openstack-congress.spec80
-rw-r--r--build/opnfv-apex-common.spec4
-rwxr-xr-xbuild/overcloud-full.sh5
-rw-r--r--build/variables.sh3
-rwxr-xr-xci/dev_deploy_check.sh3
-rw-r--r--config/deploy/os-nosdn-fdio-noha.yaml25
-rw-r--r--config/deploy/os-odl_l2-fdio-ha.yaml14
-rw-r--r--config/deploy/os-odl_l2-fdio-noha.yaml16
-rwxr-xr-xlib/overcloud-deploy-functions.sh17
-rwxr-xr-xlib/parse-functions.sh14
-rw-r--r--lib/python/apex/common/constants.py4
-rw-r--r--lib/python/apex/network_environment.py15
-rwxr-xr-xlib/python/apex_python_utils.py15
-rwxr-xr-xlib/virtual-setup-functions.sh18
-rw-r--r--tests/test_apex_network_environment.py4
18 files changed, 245 insertions, 23 deletions
diff --git a/build/Makefile b/build/Makefile
index a1089a84..96711d23 100644
--- a/build/Makefile
+++ b/build/Makefile
@@ -27,7 +27,7 @@ all_networks="admin_network private_network storage_network external_network api
all: iso
.PHONY: clean
-clean: images-clean rpms-clean iso-clean tacker-clean
+clean: images-clean rpms-clean iso-clean tacker-clean congress-clean
.PHONY: images
images: undercloud overcloud-full overcloud-opendaylight overcloud-onos overcloud-opendaylight-sfc
@@ -107,6 +107,29 @@ openstack-tacker-2015.2-1.noarch.rpm:
rpmbuild --clean -bb --target noarch openstack-tacker.spec -D '_topdir %(echo `pwd`)' -D '_builddir %(echo `pwd`)' -D '_sourcedir %(echo `pwd`)' -D '_rpmdir %(echo `pwd`)' -D '_specdir %(echo `pwd`)' -D '_srcrpmdir %(echo `pwd`)'
###############
+# CONGRESS #
+###############
+
+.PHONY: congress-clean
+
+congress-clean:
+ @rm -rf openstack-congress-2016.1
+ @rm -f openstack-congress.tar.gz
+
+openstack-congress.tar.gz:
+ @echo "Preparing the Congress RPM prerequisites"
+ git clone http://github.com/openstack/congress -b stable/mitaka openstack-congress-2016.1
+ cd openstack-congress-2016.1 && curl -O https://radez.fedorapeople.org/openstack-congress.service
+ tar czf openstack-congress.tar.gz openstack-congress-2016.1
+
+.PHONY: congress-rpm
+congress-rpm: openstack-congress.tar.gz openstack-congress-2016.1-1.noarch.rpm
+
+openstack-congress-2016.1-1.noarch.rpm:
+ @echo "Building the Congress RPM"
+ rpmbuild --clean -bb --target noarch openstack-congress.spec -D '_topdir %(echo `pwd`)' -D '_builddir %(echo `pwd`)' -D '_sourcedir %(echo `pwd`)' -D '_rpmdir %(echo `pwd`)' -D '_specdir %(echo `pwd`)' -D '_srcrpmdir %(echo `pwd`)'
+
+###############
# UNDERCLOUD #
###############
@@ -151,7 +174,7 @@ overcloud-full-clean:
.PHONY: overcloud-full
overcloud-full: images/overcloud-full.qcow2
-images/overcloud-full.qcow2: tacker-rpm
+images/overcloud-full.qcow2: tacker-rpm congress-rpm
@echo "Building the Apex Base Overcloud Image"
@./overcloud-full.sh
diff --git a/build/build_perf_image.sh b/build/build_perf_image.sh
index c91b563d..a6ca066b 100644
--- a/build/build_perf_image.sh
+++ b/build/build_perf_image.sh
@@ -27,8 +27,6 @@ fi
if [ "$CATEGORY" == "nova" ]; then
if [ "$KEY" == "libvirtpin" ]; then
sudo sed -i "s/#LibvirtCPUPinSet:.*/LibvirtCPUPinSet: '${VALUE}'/" /usr/share/openstack-tripleo-heat-templates/environments/numa.yaml
- sudo sed -i "s/^#resource_registry:/resource_registry:/" /usr/share/openstack-tripleo-heat-templates/environments/numa.yaml
- sudo sed -i "s/# {numa}/ OS::TripleO::ComputeExtraConfigPre: ..\/puppet\/extraconfig\/pre_deploy\/compute\/numa.yaml/" /usr/share/openstack-tripleo-heat-templates/environments/numa.yaml
fi
fi
diff --git a/build/network-environment.yaml b/build/network-environment.yaml
index 84bb5cef..8b5b070c 100644
--- a/build/network-environment.yaml
+++ b/build/network-environment.yaml
@@ -39,7 +39,6 @@ resource_registry:
OS::TripleO::Compute::Net::SoftwareConfig: nics/compute.yaml
OS::TripleO::Controller::Net::SoftwareConfig: nics/controller.yaml
-
parameter_defaults:
NeutronExternalNetworkBridge: 'br-ex'
ControlPlaneSubnetCidr: "24"
@@ -82,6 +81,7 @@ parameters:
SwiftMgmtNetwork: storage
SwiftProxyNetwork: storage
TackerApiNetwork: internal_api
+ CongressApiNetwork: internal_api
HorizonNetwork: internal_api
MemcachedNetwork: internal_api
RabbitMqNetwork: internal_api
diff --git a/build/openstack-congress.spec b/build/openstack-congress.spec
new file mode 100755
index 00000000..0dd3491c
--- /dev/null
+++ b/build/openstack-congress.spec
@@ -0,0 +1,80 @@
+%define debug_package %{nil}
+
+Name: openstack-congress
+Version: 2016.1
+Release: 1%{?dist}
+Summary: OpenStack servicevm/device manager
+
+Group: Applications/Internet
+License: Apache 2.0
+URL: https://wiki.openstack.org/wiki/Congress/Installation
+Source0: openstack-congress.tar.gz
+
+BuildArch: noarch
+BuildRequires: python-setuptools python2-oslo-config python2-debtcollector
+#Requires: pbr>=0.8 Paste PasteDeploy>=1.5.0 Routes>=1.12.3!=2.0 anyjson>=0.3.3 argparse
+#Requires: Babel>=1.3 eventlet>=0.16.1!=0.17.0 greenlet>=0.3.2 httplib2>=0.7.5 requests>=2.2.0!=2.4.0
+#Requires: iso8601>=0.1.9 kombu>=2.5.0 netaddr>=0.7.12 SQLAlchemy<1.1.0>=0.9.7
+#Requires: WebOb>=1.2.3 python-heatclient>=0.3.0 python-keystoneclient>=1.1.0 alembic>=0.7.2 six>=1.9.0
+#Requires: stevedore>=1.5.0 http oslo.config>=1.11.0 oslo.messaging!=1.17.0!=1.17.1>=1.16.0 oslo.rootwrap>=2.0.0 python-novaclient>=2.22.0
+
+%description
+OpenStack policy manager
+
+%prep
+#git archive --format=tar.gz --prefix=openstack-congress-%{version}/ HEAD > openstack-congress.tar.gz
+
+%setup -q
+
+
+%build
+#rm requirements.txt
+#/usr/bin/python setup.py build
+
+
+%install
+/usr/bin/python setup.py install --prefix=%{buildroot} --install-lib=%{buildroot}/usr/lib/python2.7/site-packages
+
+install -d -m 755 %{buildroot}/var/log/congress/
+install -d -m 755 %{buildroot}/etc/congress/snapshot/
+
+install etc/api-paste.ini %{buildroot}/etc/congress/api-paste.ini
+install etc/policy.json %{buildroot}/etc/congress/policy.json
+tox -egenconfig
+install etc/congress.conf.sample %{buildroot}/etc/congress/congress.conf
+
+install -p -D -m 644 openstack-congress.service %{buildroot}%{_unitdir}/openstack-congress.service
+install -d -m 755 %{buildroot}%{_sharedstatedir}/congress
+
+%pre
+getent group congress >/dev/null || groupadd -r congress
+if ! getent passwd congress >/dev/null; then
+ useradd -r -g congress -G congress,nobody -d %{_sharedstatedir}/congress -s /sbin/nologin -c "OpenStack Congress Daemon" congress
+fi
+exit 0
+
+%post
+%systemd_post openstack-congress
+
+%preun
+%systemd_preun openstack-congress
+
+%postun
+%systemd_postun_with_restart openstack-congress
+
+%files
+
+%config /etc/congress/congress.conf
+/etc/congress/policy.json
+/etc/congress/api-paste.ini
+/bin/congress-server
+/bin/congress-db-manage
+%{_unitdir}/openstack-congress.service
+/usr/lib/python2.7/site-packages/congress/*
+/usr/lib/python2.7/site-packages/congress-*
+/usr/lib/python2.7/site-packages/congress_tempest_tests/*
+/usr/lib/python2.7/site-packages/antlr3runtime/*
+%dir %attr(0750, congress, root) %{_localstatedir}/log/congress
+
+%changelog
+
diff --git a/build/opnfv-apex-common.spec b/build/opnfv-apex-common.spec
index 854fbbb6..6b86bf87 100644
--- a/build/opnfv-apex-common.spec
+++ b/build/opnfv-apex-common.spec
@@ -35,6 +35,7 @@ install ci/util.sh %{buildroot}%{_bindir}/opnfv-util
mkdir -p %{buildroot}%{_sysconfdir}/opnfv-apex/
install config/deploy/os-nosdn-nofeature-noha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-nosdn-nofeature-noha.yaml
+install config/deploy/os-nosdn-fdio-noha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-nosdn-fdio-noha.yaml
install config/deploy/os-nosdn-ovs-noha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-nosdn-ovs-noha.yaml
install config/deploy/os-nosdn-nofeature-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-nosdn-nofeature-ha.yaml
install config/deploy/os-nosdn-performance-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-nosdn-performance-ha.yaml
@@ -104,6 +105,7 @@ install config/inventory/pod_example_settings.yaml %{buildroot}%{_docdir}/opnfv/
%{_var}/opt/opnfv/lib/installer/onos/onos_gw_mac_update.sh
%{_var}/opt/opnfv/lib/installer/domain.xml
%{_sysconfdir}/opnfv-apex/os-nosdn-nofeature-noha.yaml
+%{_sysconfdir}/opnfv-apex/os-nosdn-fdio-noha.yaml
%{_sysconfdir}/opnfv-apex/os-nosdn-ovs-noha.yaml
%{_sysconfdir}/opnfv-apex/os-nosdn-nofeature-ha.yaml
%{_sysconfdir}/opnfv-apex/os-nosdn-performance-ha.yaml
@@ -129,6 +131,8 @@ install config/inventory/pod_example_settings.yaml %{buildroot}%{_docdir}/opnfv/
%doc %{_docdir}/opnfv/inventory.yaml.example
%changelog
+* Thu Aug 1 2016 Tim Rozet <trozet@redhat.com> - 3.0-11
+- Add nosdn fdio scenarios.
* Tue Jul 5 2016 Dan Radez <dradez@redhat.com> - 3.0-10
- Adding functions.sh files
* Thu Jun 15 2016 Tim Rozet <trozet@redhat.com> - 3.0-9
diff --git a/build/overcloud-full.sh b/build/overcloud-full.sh
index 2c522943..6a72705a 100755
--- a/build/overcloud-full.sh
+++ b/build/overcloud-full.sh
@@ -13,7 +13,6 @@ source ./variables.sh
source ./functions.sh
populate_cache "$rdo_images_uri/overcloud-full.tar"
-populate_cache "$openstack_congress"
if [ ! -d images/ ]; then mkdir images; fi
tar -xf cache/overcloud-full.tar -C images/
@@ -121,7 +120,8 @@ LIBGUESTFS_BACKEND=direct virt-customize \
--run-command "yum remove -y qemu-system-x86" \
--upload ../os-net-config.tar.gz:/usr/lib/python2.7/site-packages \
--run-command "cd /usr/lib/python2.7/site-packages/ && rm -rf os_net_config && tar xzf os-net-config.tar.gz" \
- --install "$openstack_congress" \
+ --upload ../noarch/openstack-congress-2016.1-1.el7.centos.noarch.rpm:/root/ \
+ --install /root/openstack-congress-2016.1-1.el7.centos.noarch.rpm \
--install "python2-congressclient" \
--upload puppet-congress.tar.gz:/etc/puppet/modules/ \
--run-command "cd /etc/puppet/modules/ && tar xzf puppet-congress.tar.gz" \
@@ -139,6 +139,7 @@ LIBGUESTFS_BACKEND=direct virt-customize \
--install /root/openstack-tacker-2015.2-1.noarch.rpm \
--upload puppet-tacker.tar.gz:/etc/puppet/modules/ \
--run-command "cd /etc/puppet/modules/ && tar xzf puppet-tacker.tar.gz" \
+ --run-command "yum install -y https://dl.dropboxusercontent.com/u/7079970/rabbitmq-server-3.6.3-5.el7ost.noarch.rpm" \
-a overcloud-full_build.qcow2
mv -f overcloud-full_build.qcow2 overcloud-full.qcow2
diff --git a/build/variables.sh b/build/variables.sh
index 27118c93..134cc295 100644
--- a/build/variables.sh
+++ b/build/variables.sh
@@ -13,8 +13,7 @@ onos_release_uri=https://downloads.onosproject.org/nightly/
onos_release_file=onos-1.6.0-rc2.tar.gz
onos_jdk_uri=https://www.dropbox.com/s/qyujpib8zyhzeev
onos_ovs_uri=https://www.dropbox.com/s/2dyd8zyt2l6p586
-openstack_congress=https://radez.fedorapeople.org/openstack-congress-2016.1-1.fc24.noarch.rpm
-doctor_driver=https://raw.githubusercontent.com/muroi/congress/doctor-poc/congress/datasources/doctor_driver.py
+doctor_driver=https://raw.githubusercontent.com/openstack/congress/master/congress/datasources/doctor_driver.py
dpdk_uri_base=http://artifacts.opnfv.org/ovsnfv
dpdk_rpms=(
diff --git a/ci/dev_deploy_check.sh b/ci/dev_deploy_check.sh
index 831ff1fd..68a9ac2b 100755
--- a/ci/dev_deploy_check.sh
+++ b/ci/dev_deploy_check.sh
@@ -45,3 +45,6 @@ done
# Make sure jinja2 is installed
easy_install-3.4 jinja2
+
+# TODO(cgoncalves): remove once congress RPM is downloaded from upstream
+easy_install-3.4 tox
diff --git a/config/deploy/os-nosdn-fdio-noha.yaml b/config/deploy/os-nosdn-fdio-noha.yaml
new file mode 100644
index 00000000..057177f6
--- /dev/null
+++ b/config/deploy/os-nosdn-fdio-noha.yaml
@@ -0,0 +1,25 @@
+global_params:
+ ha_enabled: false
+
+deploy_options:
+ sdn_controller: false
+ sdn_l3: false
+ tacker: false
+ congress: false
+ sfc: false
+ vpn: false
+ vpp: true
+ dataplane: fdio
+ performance:
+ Controller:
+ kernel:
+ hugepages: 1024
+ hugepagesz: 2M
+ Compute:
+ nova:
+ libvirtpin: 1
+ kernel:
+ hugepagesz: 2M
+ hugepages: 4096
+ intel_iommu: 'on'
+ iommu: pt
diff --git a/config/deploy/os-odl_l2-fdio-ha.yaml b/config/deploy/os-odl_l2-fdio-ha.yaml
index b6b073fc..c66b35b6 100644
--- a/config/deploy/os-odl_l2-fdio-ha.yaml
+++ b/config/deploy/os-odl_l2-fdio-ha.yaml
@@ -10,3 +10,17 @@ deploy_options:
sfc: false
vpn: false
vpp: true
+ dataplane: fdio
+ performance:
+ Controller:
+ kernel:
+ hugepages: 1024
+ hugepagesz: 2M
+ Compute:
+ nova:
+ libvirtpin: 1
+ kernel:
+ hugepagesz: 2M
+ hugepages: 4096
+ intel_iommu: 'on'
+ iommu: pt
diff --git a/config/deploy/os-odl_l2-fdio-noha.yaml b/config/deploy/os-odl_l2-fdio-noha.yaml
index f323e2cd..15942fd6 100644
--- a/config/deploy/os-odl_l2-fdio-noha.yaml
+++ b/config/deploy/os-odl_l2-fdio-noha.yaml
@@ -10,3 +10,19 @@ deploy_options:
sfc: false
vpn: false
vpp: true
+ dataplane: fdio
+ performance:
+ Controller:
+ kernel:
+ hugepages: 1024
+ hugepagesz: 2M
+ intel_iommu: 'on'
+ iommu: pt
+ Compute:
+ nova:
+ libvirtpin: 1
+ kernel:
+ hugepagesz: 2M
+ hugepages: 4096
+ intel_iommu: 'on'
+ iommu: pt
diff --git a/lib/overcloud-deploy-functions.sh b/lib/overcloud-deploy-functions.sh
index 1fcaa0df..e613dae0 100755
--- a/lib/overcloud-deploy-functions.sh
+++ b/lib/overcloud-deploy-functions.sh
@@ -71,7 +71,7 @@ function overcloud_deploy {
scp ${SSH_OPTIONS[@]} $RESOURCES/overcloud-full-${SDN_IMAGE}.qcow2 "stack@$UNDERCLOUD":overcloud-full.qcow2
# Install ovs-dpdk inside the overcloud image if it is enabled.
- if [ "${deploy_options_array['dataplane']}" == 'ovs_dpdk' ]; then
+ if [[ "${deploy_options_array['dataplane']}" == 'ovs_dpdk' || "${deploy_options_array['dataplane']}" == 'fdio' ]]; then
# install dpdk packages before ovs
echo -e "${blue}INFO: Enabling kernel modules for dpdk inside overcloud image${reset}"
@@ -90,9 +90,16 @@ EOF
--upload uio_pci_generic.modules:/etc/sysconfig/modules/ \
--run-command "chmod 0755 /etc/sysconfig/modules/vfio_pci.modules" \
--run-command "chmod 0755 /etc/sysconfig/modules/uio_pci_generic.modules" \
- --run-command "yum install -y /root/dpdk_rpms/*" \
-a overcloud-full.qcow2
+
+ if [ "${deploy_options_array['dataplane']}" == 'fdio' ]; then
+ sed -i '/FdioEnabled:/c\ FdioEnabled: true' opnfv-environment.yaml
+ else
+ LIBGUESTFS_BACKEND=direct virt-customize --run-command "yum install -y /root/dpdk_rpms/*" \
+ -a overcloud-full.qcow2
+ fi
EOI
+
elif [ "${deploy_options_array['dataplane']}" != 'ovs' ]; then
echo "${red}${deploy_options_array['dataplane']} not supported${reset}"
exit 1
@@ -150,6 +157,12 @@ popd
/bin/rm -rf ipa/
EOI
+ # set NIC heat params and resource registry
+ ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
+sed -i '/TenantNIC:/c\ TenantNIC: '${private_network_compute_interface} opnfv-environment.yaml
+sed -i '/PublicNIC:/c\ PublicNIC: '${public_network_compute_interface} opnfv-environment.yaml
+EOI
+
DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/numa.yaml"
fi
diff --git a/lib/parse-functions.sh b/lib/parse-functions.sh
index dde9041a..e8dd982d 100755
--- a/lib/parse-functions.sh
+++ b/lib/parse-functions.sh
@@ -52,8 +52,18 @@ parse_setting_value() {
##parses network settings yaml into globals
parse_network_settings() {
- local output
- if output=$(python3.4 -B $LIB/python/apex_python_utils.py parse-net-settings -s $NETSETS -i $net_isolation_enabled -e $CONFIG/network-environment.yaml); then
+ local output parse_ext
+ parse_ext=''
+
+ for val in ${performance_roles[@]}; do
+ if [ "$val" == "Compute" ]; then
+ parse_ext="${parse_ext} --compute-pre-config "
+ elif [ "$val" == "Controller" ]; then
+ parse_ext="${parse_ext} --controller-pre-config "
+ fi
+ done
+
+ if output=$(python3.4 -B $LIB/python/apex_python_utils.py parse-net-settings -s $NETSETS -i $net_isolation_enabled -e $CONFIG/network-environment.yaml $parse_ext); then
echo -e "${blue}${output}${reset}"
eval "$output"
else
diff --git a/lib/python/apex/common/constants.py b/lib/python/apex/common/constants.py
index 996ef2f0..ae8ffe31 100644
--- a/lib/python/apex/common/constants.py
+++ b/lib/python/apex/common/constants.py
@@ -17,3 +17,7 @@ OPNFV_NETWORK_TYPES = [ADMIN_NETWORK, PRIVATE_NETWORK, PUBLIC_NETWORK,
DNS_SERVERS = ["8.8.8.8", "8.8.4.4"]
ROLES = ['compute', 'controller']
DOMAIN_NAME = 'localdomain.com'
+COMPUTE_PRE = "OS::TripleO::ComputeExtraConfigPre"
+CONTROLLER_PRE = "OS::TripleO::ControllerExtraConfigPre"
+PRE_CONFIG_DIR = "/usr/share/openstack-tripleo-heat-templates/puppet/" \
+ "extraconfig/pre_deploy/"
diff --git a/lib/python/apex/network_environment.py b/lib/python/apex/network_environment.py
index 981c8f1c..bf81b98d 100644
--- a/lib/python/apex/network_environment.py
+++ b/lib/python/apex/network_environment.py
@@ -15,6 +15,9 @@ from .common.constants import (
STORAGE_NETWORK,
PUBLIC_NETWORK,
API_NETWORK,
+ CONTROLLER_PRE,
+ COMPUTE_PRE,
+ PRE_CONFIG_DIR
)
PORTS = '/ports'
@@ -48,8 +51,11 @@ class NetworkEnvironment:
The class builds upon an existing network-environment file and modifies
based on a NetworkSettings object.
"""
- def __init__(self, net_settings, filename):
+ def __init__(self, net_settings, filename, compute_pre_config=False,
+ controller_pre_config=False):
with open(filename, 'r') as net_env_fh:
+ self.compute_pre = compute_pre_config
+ self.controller_pre = controller_pre_config
self.netenv_obj = yaml.load(net_env_fh)
self._update_net_environment(net_settings)
@@ -185,6 +191,13 @@ class NetworkEnvironment:
prefix = ''
self.netenv_obj[reg][key] = tht_dir + prefix + postfix
+ if self.compute_pre:
+ self.netenv_obj[reg][COMPUTE_PRE] = PRE_CONFIG_DIR + \
+ "compute/numa.yaml"
+ if self.controller_pre:
+ self.netenv_obj[reg][CONTROLLER_PRE] = PRE_CONFIG_DIR + \
+ "controller/numa.yaml"
+
# Set IPv6 related flags to True. Not that we do not set those to False
# when IPv4 is configured, we'll use the default or whatever the user
# may have set.
diff --git a/lib/python/apex_python_utils.py b/lib/python/apex_python_utils.py
index bc9bc56f..c548437d 100755
--- a/lib/python/apex_python_utils.py
+++ b/lib/python/apex_python_utils.py
@@ -38,7 +38,9 @@ def parse_net_settings(args):
"""
settings = NetworkSettings(args.net_settings_file,
args.network_isolation)
- net_env = NetworkEnvironment(settings, args.net_env_file)
+ net_env = NetworkEnvironment(settings, args.net_env_file,
+ args.compute_pre_config,
+ args.controller_pre_config)
dump_yaml(net_env.get_netenv_settings(), '/tmp/network-environment.yaml')
settings.dump_bash()
@@ -136,6 +138,17 @@ def get_parser():
default="network-environment.yaml",
dest='net_env_file',
help='path to network environment file')
+ net_settings.add_argument('--compute-pre-config',
+ default=False,
+ action='store_true',
+ dest='compute_pre_config',
+ help='Boolean to enable Compute Pre Config')
+ net_settings.add_argument('--controller-pre-config',
+ action='store_true',
+ default=False,
+ dest='controller_pre_config',
+ help='Boolean to enable Controller Pre Config')
+
net_settings.set_defaults(func=parse_net_settings)
get_int_ip = subparsers.add_parser('find-ip',
diff --git a/lib/virtual-setup-functions.sh b/lib/virtual-setup-functions.sh
index e7410da7..ed4d4dfd 100755
--- a/lib/virtual-setup-functions.sh
+++ b/lib/virtual-setup-functions.sh
@@ -40,6 +40,17 @@ EOF
fi
for i in $(seq 0 $vm_index); do
+ if [ "$VM_COMPUTES" -gt 0 ]; then
+ capability="profile:compute"
+ VM_COMPUTES=$((VM_COMPUTES - 1))
+ else
+ capability="profile:control"
+ if [[ "${deploy_options_array['sdn_controller']}" == 'opendaylight' && "$ha_enabled" == "True" && "$ramsize" -lt 10240 ]]; then
+ echo "WARN: RAM per controller too low. OpenDaylight specified in HA deployment requires at least 10GB"
+ echo "INFO: Increasing RAM per controller to 10GB"
+ ramsize=10240
+ fi
+ fi
if ! virsh list --all | grep baremetal${i} > /dev/null; then
define_vm baremetal${i} network 41 'admin_network' $vcpus $ramsize
for n in private_network public_network storage_network api_network; do
@@ -54,13 +65,6 @@ EOF
#virsh vol-list default | grep baremetal${i} 2>&1> /dev/null || virsh vol-create-as default baremetal${i}.qcow2 41G --format qcow2
mac=$(virsh domiflist baremetal${i} | grep admin_network | awk '{ print $5 }')
- if [ "$VM_COMPUTES" -gt 0 ]; then
- capability="profile:compute"
- VM_COMPUTES=$((VM_COMPUTES - 1))
- else
- capability="profile:control"
- fi
-
cat >> $CONFIG/instackenv-virt.json << EOF
{
"pm_addr": "192.168.122.1",
diff --git a/tests/test_apex_network_environment.py b/tests/test_apex_network_environment.py
index 2a8438fa..97bdd370 100644
--- a/tests/test_apex_network_environment.py
+++ b/tests/test_apex_network_environment.py
@@ -38,6 +38,8 @@ class TestNetworkEnvironment(object):
def test_get_netenv_settings(self):
ns = NetworkSettings('../config/network/network_settings.yaml', True)
- ne = NetworkEnvironment(ns, '../build/network-environment.yaml')
+ ne = NetworkEnvironment(ns, '../build/network-environment.yaml',
+ compute_pre_config=True,
+ controller_pre_config=True)
assert_is_instance(ne.get_netenv_settings(), dict)
assert_not_equal(ne.get_netenv_settings(), {})