Difference between revisions of "Demo scripts"

From OpenVZ Virtuozzo Containers Wiki
Jump to: navigation, search
m (Small corrections)
(enlarged)
Line 1: Line 1:
 
Demo scripts which can be used to show advantages of OpenVZ:
 
Demo scripts which can be used to show advantages of OpenVZ:
  
* Full VE lifecycle (create, set ip, start, add user, enter, exec, show ps -axf output inside VE), stop, destroy). It should take two minutes ("compare that to a time you need to deploy a new (non-virtual) server!")
+
== Full VE lifecycle ==
  
* Massive VE creation. Create/start 50 or 100 VEs in a shell loop. Shows fast deployment and high density.
+
Create VE, set IP, start, add user, enter, exec, show ps -axf output inside VE, stop, and destroy. It should take two minutes ("compare that to a time you need to deploy a new (non-virtual) server!"). During the demonstration, describe what's happening and why.
  
* Use VEs from prev. item — load those by <code>ab</code> or <code>http_load</code> — shows that many VE are working quite fine, with low response time etc.
+
Here are the example commands needed:
  
* If you have two boxes, do "<code>vzmigrate --online</code>" from one box to another. You can use, say, <code>xvnc</code> in a VE and <code>vncclient</code> to connect to it, then run <code>xscreensaver-demo</code> and while the picture is moving do a live migration. You'll show <code>xscreensaver</code> stalls for a few seconds but then keeps running — on another machine! That looks amazing, to say at least.
+
# VE=123
 +
# IP=10.1.1.123
 +
# sed -i "/$IP /d" ~/.ssh/
 +
# time vzctl create $VE --ostemplate fedora-core-5-i386-default
 +
# vzctl set $VE --ipadd $IP --hostname newVE --save
 +
# vzctl start $VE
 +
# vzctl exec $VE ps axf
 +
# vzctl set $VE --userpasswd guest:secret --save
 +
# ssh guest@$IP
 +
[newVE]# ps axf
 +
[newVE]# logout
 +
# vzctl stop $VE
 +
# vzctl destroy $VE
 +
 
 +
== Massive VE creation ==
 +
 
 +
Create/start 50 or 100 VEs in a shell loop. Shows fast deployment and high density.
 +
 
 +
Here are the example commands needed:
 +
 
 +
# VE=200
 +
# time while [ $VE -lt 250 ]; do \
 +
>  time vzctl create $VE --ostemplate fedora-core-5-i386-default; \
 +
>  vzctl start $VE; \
 +
>  let VE++; \
 +
> done
 +
 
 +
== Massive VE load ==
 +
 
 +
Use VEs from previous item — load those by <code>ab</code> or <code>http_load</code>. This demo shows that multiple VEs are working just fine, with low response time etc.
 +
 
 +
FIXME: commands, ab/http_load setup.
 +
 
 +
== Live migration ==
 +
 
 +
If you have two boxes, do "<code>vzmigrate --online</code>" from one box to another. You can use, say, <code>xvnc</code> in a VE and <code>vncclient</code> to connect to it, then run <code>xscreensaver-demo</code> and while the picture is moving do a live migration. You'll show <code>xscreensaver</code> stalls for a few seconds but then keeps running — on another machine! That looks amazing, to say at least.
 +
 
 +
FIXME: commands, setup, vnc template.

Revision as of 11:08, 26 October 2006

Demo scripts which can be used to show advantages of OpenVZ:

Full VE lifecycle

Create VE, set IP, start, add user, enter, exec, show ps -axf output inside VE, stop, and destroy. It should take two minutes ("compare that to a time you need to deploy a new (non-virtual) server!"). During the demonstration, describe what's happening and why.

Here are the example commands needed:

# VE=123
# IP=10.1.1.123
# sed -i "/$IP /d" ~/.ssh/
# time vzctl create $VE --ostemplate fedora-core-5-i386-default
# vzctl set $VE --ipadd $IP --hostname newVE --save
# vzctl start $VE
# vzctl exec $VE ps axf
# vzctl set $VE --userpasswd guest:secret --save
# ssh guest@$IP
[newVE]# ps axf
[newVE]# logout
# vzctl stop $VE
# vzctl destroy $VE

Massive VE creation

Create/start 50 or 100 VEs in a shell loop. Shows fast deployment and high density.

Here are the example commands needed:

# VE=200
# time while [ $VE -lt 250 ]; do \
>  time vzctl create $VE --ostemplate fedora-core-5-i386-default; \
>  vzctl start $VE; \
>  let VE++; \
> done

Massive VE load

Use VEs from previous item — load those by ab or http_load. This demo shows that multiple VEs are working just fine, with low response time etc.

FIXME: commands, ab/http_load setup.

Live migration

If you have two boxes, do "vzmigrate --online" from one box to another. You can use, say, xvnc in a VE and vncclient to connect to it, then run xscreensaver-demo and while the picture is moving do a live migration. You'll show xscreensaver stalls for a few seconds but then keeps running — on another machine! That looks amazing, to say at least.

FIXME: commands, setup, vnc template.