Add pinning support
[apex.git] / build / set_perf_images.sh
1 #!/bin/bash
2
3 ##############################################################################
4 # Copyright (c) 2016 Red Hat Inc.
5 # Michael Chapman <michapma@redhat.com>
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Apache License, Version 2.0
8 # which accompanies this distribution, and is available at
9 # http://www.apache.org/licenses/LICENSE-2.0
10 ##############################################################################
11
12 for ROLE in $@; do
13   if [ -f $ROLE-overcloud-full.qcow2 ]; then
14     echo "Uploading $ROLE-overcloud-full.qcow2 "
15     KERNEL=$(glance image-show overcloud-full | grep 'kernel_id' | cut -d '|' -f 3 | xargs)
16     RAMDISK=$(glance image-show overcloud-full | grep 'ramdisk_id' | cut -d '|' -f 3 | xargs)
17     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
18   fi
19
20   if [ "$ROLE" == "Controller" ]; then
21     sed -i "s/overcloud-full/Controller-overcloud-full" opnfv-environment.yaml
22   fi
23
24   if [ "$ROLE" == "Compute" ]; then
25     sudo sed -i "s/NovaImage: overcloud-full/Compute-overcloud-full/" /usr/share/openstack-tripleo-heat-templates/environments/numa.yaml
26   fi
27
28   if [ "$ROLE" == "BlockStorage" ]; then
29     sudo sed -i "s/BlockStorageImage: overcloud-full/BlockStorage-overcloud-full/" /usr/share/openstack-tripleo-heat-templates/environments/numa.yaml
30   fi
31 done