blob: c00eacbdbcd9ceb962eb699e3036c2865aae995b [file] [log] [blame]
Andy Bavierb146f7f2016-02-12 10:03:35 -05001#!/bin/bash
2
Andy Bavier2c108de2016-02-18 16:55:00 -05003TESTING=false
4
5while [[ $# > 0 ]]
6do
7key="$1"
8
9case $key in
10 --testing)
11 TESTING=true
12 ;;
13 *)
14 ;;
15esac
16shift
17done
18
Andy Bavierb146f7f2016-02-12 10:03:35 -050019function create-vm {
20 NAME=$1
21 CPU=$2
22 MEM_MB=$3
23 DISK_GB=$4
24 uvt-kvm list | grep $1
25 if [ "$?" -ne "0" ]
26 then
Andy Bavier2c108de2016-02-18 16:55:00 -050027 if $TESTING
28 then
29 # Don't use mgmtbr for testing
30 uvt-kvm create $NAME --cpu=$CPU --memory=$MEM_MB --disk=$DISK_GB
31 else
32 uvt-kvm create $NAME --cpu=$CPU --memory=$MEM_MB --disk=$DISK_GB --bridge mgmtbr
33 fi
Andy Bavierb146f7f2016-02-12 10:03:35 -050034 uvt-kvm wait --insecure $NAME
35 fi
36}
37
38create-vm juju 1 2048 20
39create-vm mysql 2 4096 40
40create-vm rabbitmq-server 2 4096 40
41create-vm keystone 2 4096 40
42create-vm glance 2 4096 160
43create-vm nova-cloud-controller 2 4096 40
Andy Bavierb146f7f2016-02-12 10:03:35 -050044create-vm neutron-api 2 4096 40
45create-vm openstack-dashboard 1 2048 20
46create-vm ceilometer 1 2048 20
47create-vm nagios 1 2048 20
Andy Bavier2c108de2016-02-18 16:55:00 -050048
49create-vm xos 2 4096 40
50create-vm onos-cord 2 4096 40
51if $TESTING
52then
53 create-vm nova-compute 2 4096 100
54fi