summaryrefslogtreecommitdiffstats
path: root/build/set_perf_images.sh
diff options
context:
space:
mode:
authorMichael Chapman <woppin@gmail.com>2016-05-09 17:38:54 +1000
committerMichael Chapman <woppin@gmail.com>2016-05-24 23:19:33 +1000
commitfb0f275cd373aec28a8a970ced0f1d20ca8abbfc (patch)
treea221f3632d7ad4d839a7e7f451f0623dabe7e83d /build/set_perf_images.sh
parentbe03cde24377105b340bbd2d5acae84617ffb7c6 (diff)
Add pinning support
Add support for CPU pinning of libvirt guests and also restricting host processes to selected CPUs via isolcpus. Hugepage support is added using the same mechanism as isolcpus, along with a perf scenario where all 3 performance options are enabled. Deploy options are now parsed in python JIRA: APEX-127 JIRA: APEX-105 JIRA: APEX-106 Change-Id: I438e80fb88e596cc017595d43bc1efda1001325c opnfv-tht-pr: 8 Signed-off-by: Michael Chapman <woppin@gmail.com>
Diffstat (limited to 'build/set_perf_images.sh')
-rw-r--r--build/set_perf_images.sh31
1 files changed, 31 insertions, 0 deletions
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