summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/build_perf_image.sh38
-rw-r--r--build/opnfv-apex-common.spec7
-rw-r--r--build/opnfv-apex-undercloud.spec7
-rwxr-xr-xbuild/overcloud-full.sh8
-rw-r--r--build/set_perf_images.sh31
-rw-r--r--build/setkernelparam.sh27
-rwxr-xr-xbuild/undercloud.sh8
7 files changed, 122 insertions, 4 deletions
diff --git a/build/build_perf_image.sh b/build/build_perf_image.sh
new file mode 100644
index 00000000..0a3e3d0f
--- /dev/null
+++ b/build/build_perf_image.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+##############################################################################
+# Copyright (c) 2016 Red Hat Inc.
+# Michael Chapman <michapma@redhat.com>
+# 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
+##############################################################################
+
+ROLE=$1
+shift
+CATEGORY=$1
+shift
+KEY=$1
+shift
+VALUE=$1
+shift
+
+IMAGE=$ROLE-overcloud-full.qcow2
+
+# Create image copy for this role
+if [ ! -f $IMAGE ] ; then
+ cp overcloud-full.qcow2 $IMAGE
+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
+ fi
+fi
+
+if [ "$CATEGORY" == "kernel" ]; then
+ LIBGUESTFS_BACKEND=direct virt-customize \
+ --run-command "bash -x /root/setkernelparam.sh $KEY $VALUE" \
+ -a $IMAGE
+fi
+
diff --git a/build/opnfv-apex-common.spec b/build/opnfv-apex-common.spec
index 0e44ebbc..6915b795 100644
--- a/build/opnfv-apex-common.spec
+++ b/build/opnfv-apex-common.spec
@@ -33,12 +33,13 @@ install ci/clean.sh %{buildroot}%{_bindir}/opnfv-clean
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-nofeature-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-nosdn-nofeature-ha.yaml
install config/deploy/os-odl_l2-nofeature-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-odl_l2-nofeature-ha.yaml
install config/deploy/os-odl_l2-sfc-noha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-odl_l2-sfc-noha.yaml
install config/deploy/os-odl_l3-nofeature-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-odl_l3-nofeature-ha.yaml
install config/deploy/os-onos-nofeature-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-onos-nofeature-ha.yaml
-install config/deploy/os-opencontrail-nofeature-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-opencontrail-nofeature-ha.yaml
+install config/deploy/os-ocl-nofeature-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-ocl-nofeature-ha.yaml
install config/network/network_settings.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/network_settings.yaml
mkdir -p %{buildroot}%{_var}/opt/opnfv/lib/python/apex
@@ -49,6 +50,7 @@ mkdir -p %{buildroot}%{python3_sitelib}/apex/
install lib/python/apex/__init__.py %{buildroot}%{python3_sitelib}/apex/
install lib/python/apex/ip_utils.py %{buildroot}%{python3_sitelib}/apex/
install lib/python/apex/net_env.py %{buildroot}%{python3_sitelib}/apex/
+install lib/python/apex/deploy_env.py %{buildroot}%{python3_sitelib}/apex/
mkdir -p %{buildroot}%{_var}/opt/opnfv/lib/installer/onos/
install lib/installer/onos/onos_gw_mac_update.sh %{buildroot}%{_var}/opt/opnfv/lib/installer/onos/
@@ -71,12 +73,13 @@ install config/inventory/pod_example_settings.yaml %{buildroot}%{_docdir}/opnfv/
%{_var}/opt/opnfv/lib/python/
%{python3_sitelib}/apex/
%{_var}/opt/opnfv/lib/installer/onos/onos_gw_mac_update.sh
+%{_sysconfdir}/opnfv-apex/os-nosdn-nofeature-noha.yaml
%{_sysconfdir}/opnfv-apex/os-nosdn-nofeature-ha.yaml
%{_sysconfdir}/opnfv-apex/os-odl_l2-nofeature-ha.yaml
%{_sysconfdir}/opnfv-apex/os-odl_l2-sfc-noha.yaml
%{_sysconfdir}/opnfv-apex/os-odl_l3-nofeature-ha.yaml
%{_sysconfdir}/opnfv-apex/os-onos-nofeature-ha.yaml
-%{_sysconfdir}/opnfv-apex/os-opencontrail-nofeature-ha.yaml
+%{_sysconfdir}/opnfv-apex/os-ocl-nofeature-ha.yaml
%{_sysconfdir}/opnfv-apex/network_settings.yaml
%doc %{_docdir}/opnfv/LICENSE.rst
%doc %{_docdir}/opnfv/installation-instructions.html
diff --git a/build/opnfv-apex-undercloud.spec b/build/opnfv-apex-undercloud.spec
index ae72485f..0e4798b3 100644
--- a/build/opnfv-apex-undercloud.spec
+++ b/build/opnfv-apex-undercloud.spec
@@ -27,6 +27,8 @@ install build/undercloud.qcow2 %{buildroot}%{_var}/opt/opnfv/images/
install build/network-environment.yaml %{buildroot}%{_var}/opt/opnfv/
install build/nics-controller.yaml.template %{buildroot}%{_var}/opt/opnfv/nics-controller.yaml.template
install build/nics-compute.yaml.template %{buildroot}%{_var}/opt/opnfv/nics-compute.yaml.template
+install build/nics-controller.yaml.template %{buildroot}%{_var}/opt/opnfv/nics-controller.yaml.jinja2
+install build/nics-compute.yaml.template %{buildroot}%{_var}/opt/opnfv/nics-compute.yaml.jinja2
%files
%defattr(644, root, root, -)
@@ -34,8 +36,13 @@ install build/nics-compute.yaml.template %{buildroot}%{_var}/opt/opnfv/nics-comp
%{_var}/opt/opnfv/network-environment.yaml
%{_var}/opt/opnfv/nics-controller.yaml.template
%{_var}/opt/opnfv/nics-compute.yaml.template
+%{_var}/opt/opnfv/nics-controller.yaml.jinja2
+%{_var}/opt/opnfv/nics-compute.yaml.jinja2
+
%changelog
+* Thu May 24 2016 Tim Rozet <trozet@redhat.com> - 3.0-1
+- Adds jinja2 nic templates
* Mon Apr 04 2016 Dan Radez <dradez@redhat.com> - 3.0-0
- Version update for Colorado
* Wed Mar 30 2016 Dan Radez <dradez@redhat.com> - 2.1-2
diff --git a/build/overcloud-full.sh b/build/overcloud-full.sh
index 065201f8..d0ee3f01 100755
--- a/build/overcloud-full.sh
+++ b/build/overcloud-full.sh
@@ -29,5 +29,13 @@ LIBGUESTFS_BACKEND=direct virt-customize \
--run-command "echo 'nf_conntrack_proto_sctp' > /etc/modules-load.d/nf_conntrack_proto_sctp.conf" \
-a overcloud-full_build.qcow2
+###################################
+##### Add CPU pinning script #####
+###################################
+
+LIBGUESTFS_BACKEND=direct virt-customize \
+ --upload ../setkernelparam.sh:/root \
+ -a overcloud-full_build.qcow2
+
mv -f overcloud-full_build.qcow2 overcloud-full.qcow2
popd > /dev/null
diff --git a/build/set_perf_images.sh b/build/set_perf_images.sh
new file mode 100644
index 00000000..ea31c7fa
--- /dev/null
+++ b/build/set_perf_images.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+##############################################################################
+# Copyright (c) 2016 Red Hat Inc.
+# Michael Chapman <michapma@redhat.com>
+# 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
+##############################################################################
+
+for ROLE in $@; do
+ if [ -f $ROLE-overcloud-full.qcow2 ]; then
+ echo "Uploading $ROLE-overcloud-full.qcow2 "
+ KERNEL=$(glance image-show overcloud-full | grep 'kernel_id' | cut -d '|' -f 3 | xargs)
+ RAMDISK=$(glance image-show overcloud-full | grep 'ramdisk_id' | cut -d '|' -f 3 | xargs)
+ glance image-create --name $ROLE-overcloud-full --disk-format qcow2 --file $ROLE-overcloud-full.qcow2 --container-format bare --property ramdisk_id=$RAMDISK --property kernel_id=$KERNEL
+ fi
+
+ if [ "$ROLE" == "Controller" ]; then
+ sed -i "s/overcloud-full/Controller-overcloud-full" opnfv-environment.yaml
+ fi
+
+ if [ "$ROLE" == "Compute" ]; then
+ sudo sed -i "s/NovaImage: overcloud-full/Compute-overcloud-full/" /usr/share/openstack-tripleo-heat-templates/environments/numa.yaml
+ fi
+
+ if [ "$ROLE" == "BlockStorage" ]; then
+ sudo sed -i "s/BlockStorageImage: overcloud-full/BlockStorage-overcloud-full/" /usr/share/openstack-tripleo-heat-templates/environments/numa.yaml
+ fi
+done
diff --git a/build/setkernelparam.sh b/build/setkernelparam.sh
new file mode 100644
index 00000000..b6986d6c
--- /dev/null
+++ b/build/setkernelparam.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+##############################################################################
+# Copyright (c) 2016 Red Hat Inc.
+# Michael Chapman <michapma@redhat.com>
+# 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
+##############################################################################
+
+GRUBCONF='/boot/grub2/grub.conf'
+
+if [ "$1" == "" ]; then
+ echo "No kernel parameter name provided, not modifying grub.conf"
+ exit 1
+fi
+
+if [ "$2" == "" ]; then
+ echo "No kernel parameter value provided, not modifying grub.conf"
+ exit 1
+fi
+
+echo "Setting $1=$2 in $GRUBCONF"
+echo "GRUB_CMDLINE_LINUX=\"\$GRUB_CMDLINE_LINUX $1=$2\"" >> /etc/default/grub
+grub2-mkconfig > $GRUBCONF
+exit 0
diff --git a/build/undercloud.sh b/build/undercloud.sh
index ed4f2b34..04c2667f 100755
--- a/build/undercloud.sh
+++ b/build/undercloud.sh
@@ -43,7 +43,7 @@ if [ "$PR_NUMBER" != "" ]; then
if [ "$MERGED" == "False" ]; then
REF=$(python -c "import json; print json.loads('''$PR'''.replace('\n', '').replace('\r', ''))['head']['ref']")
echo "Setting GitHub Ref to: $REF"
- REPO=$(python -c "import json; print json.loads('''$PR'''.replace('\n', '').replace('\r', ''))['head']['repo']['git_url']")
+ REPO=$(python -c "import json; print json.loads('''$PR'''.replace('\n', '').replace('\r', ''))['head']['repo']['clone_url']")
echo "Setting GitHub URL to: $REPO"
fi
fi
@@ -70,5 +70,9 @@ LIBGUESTFS_BACKEND=direct virt-customize \
--upload ../virtual-environment.yaml:/home/stack/ \
-a undercloud.qcow2
-popd > /dev/null
+# Add performance image scripts
+LIBGUESTFS_BACKEND=direct virt-customize --upload ../build_perf_image.sh:/home/stack \
+ --upload ../set_perf_images.sh:/home/stack \
+ -a undercloud.qcow2
+popd > /dev/null