Permalink
Browse files

create/tead down of 4 node network

  • Loading branch information...
christofdamian committed Apr 1, 2012
1 parent 01d5b18 commit b0b3591afbd70bece4cc582726e1bc955baaa166
Showing with 49 additions and 1 deletion.
  1. +1 −0 .gitignore
  2. +1 −1 bin/build-appl
  3. +22 −0 bin/setup-network
  4. +12 −0 bin/teardown-network
  5. +13 −0 config/playground-network.xml
View
@@ -4,3 +4,4 @@ log
rpm/*RPMS
rpm/BUILD*
rpm/SOURCES
+images
View
@@ -2,4 +2,4 @@
createrepo rpm/RPMS/noarch
-boxgrinder-build -f config/webapp.appl
+boxgrinder-build config/webapp.appl --force --os-config format:qcow2
View
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+topdir=`pwd`
+
+sudo virsh net-create config/playground-network.xml
+
+mkdir -p images
+
+for i in `seq 4`; do
+ name="webapp-$i"
+ sudo qemu-img create -b $topdir/build/appliances/x86_64/fedora/16/webapp/1.0/fedora-plugin/webapp-sda.qcow2 \
+ -f qcow2 $topdir/images/$name.qcow2
+ sudo virt-install \
+ --import \
+ --name $name \
+ --ram 512 \
+ --disk images/$name.qcow2,format=qcow2 \
+ --network network:playground \
+ --vnc \
+ --noautoconsole
+
+done
View
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+for i in `seq 4`; do
+ name="webapp-$i"
+ sudo virsh destroy $name
+ sudo virsh undefine $name
+done
+
+sudo virsh net-destroy playground
+sudo virsh net-undefine playground
+
+
@@ -0,0 +1,13 @@
+<network>
+ <name>playground</name>
+ <uuid>2ec5f209-38d3-127f-246c-60ae9805dada</uuid>
+ <forward mode='nat'/>
+ <bridge name='virbr1' stp='on' delay='0' />
+ <mac address='52:54:00:BA:42:83'/>
+ <ip address='192.168.100.1' netmask='255.255.255.0'>
+ <dhcp>
+ <range start='192.168.100.128' end='192.168.100.254' />
+ </dhcp>
+ </ip>
+</network>
+

0 comments on commit b0b3591

Please sign in to comment.