Merge "Added the number of processor cores to fuel master node"

This commit is contained in:
Jenkins 2015-02-11 14:17:30 +00:00 committed by Gerrit Code Review
commit c3f3bf4c1f
1 changed files with 18 additions and 3 deletions

View File

@ -33,15 +33,27 @@ idx=0
# 192.168.0.1/24 - OpenStack Management network
# 192.168.1.1/24 - OpenStack Storage network (for Ceph, Swift etc)
for ip in 10.20.0.1 172.16.0.1 172.16.1.1 ; do
# VirtualBox for Windows has different virtual NICs naming and indexing
# VirtualBox for Windows has different virtual NICs naming and indexing.
# Define the type of operating system and the number of processor cores for the fuel master node.
case "$(uname)" in
Linux)
host_nic_name[$idx]=vboxnet$idx
os_type="linux"
if [ "$(nproc)" -gt "1" ]; then
vm_master_cpu_cores=2
else
vm_master_cpu_cores=1
fi
;;
Darwin)
host_nic_name[$idx]=vboxnet$idx
os_type="darwin"
mac_nproc=`sysctl -a | grep machdep.cpu.thread_count | sed 's/^machdep.cpu.thread_count\:[ \t]*//'`
if [ "$mac_nproc" -gt "1" ]; then
vm_master_cpu_cores=2
else
vm_master_cpu_cores=1
fi
;;
CYGWIN*)
if [ $idx -eq 0 ]; then
@ -50,6 +62,11 @@ for ip in 10.20.0.1 172.16.0.1 172.16.1.1 ; do
host_nic_name[$idx]='VirtualBox Host-Only Ethernet Adapter #'$((idx+1))
fi
os_type="cygwin"
if [ "$(nproc)" -gt "1" ]; then
vm_master_cpu_cores=2
else
vm_master_cpu_cores=1
fi
;;
*)
echo "$(uname) is not supported operating system."
@ -61,9 +78,7 @@ for ip in 10.20.0.1 172.16.0.1 172.16.1.1 ; do
idx=$((idx+1))
done
# Master node settings
vm_master_cpu_cores=1
vm_master_memory_mb=1536
vm_master_disk_mb=65535