Inserting VZGOT development tree within GIT
[safe/jmp/vzgot] / support / tree
1
2                                 VZGOT
3
4
5 Description:
6
7         vzgot is a package to manage linux container.
8         it is working with a PLAIN linux kernel (currently 2.6.31.6-162.fc12),
9         without need to make any kernel adjustementm (project mandatory).
10
11         Most of installation is done using shell script, allowing
12         host admin to make local adjustement.
13
14         I was able to have containers (rh7.3, rh8, rh9, fc2 -> fc12, Centos 4.6 ->5.3)
15         for a total of 33, up and running on a FC12 plain distribution.
16         Some old distribution need small adjustement and RPM are included within
17         the vzgot RPM (src.rpm included).
18
19         Template used by vzgot are the exact same one used with openvz (this was
20         project mandatory)
21
22
23 commands:
24
25         Basic commands:
26
27         vzgot boot|shutdown container_name
28                 To boot or shutdown the name container.
29                 To debug your first container:
30                 vzgot -d9 -f -v boot cont_name /bin/bash
31         
32
33         vzgot create container_name template_tar_filename distribution_name architecture
34                 Take template_tar_filename and store it in the vzgot main directory
35                 (/var/lib/vzgot/vzdir)
36
37         vzgot firstboot container_name distribution_name domain_name node_name ip_list
38                 Configure the template to set the host name (node.domain.name),
39                 preparing device definition (/dev/tty, etc..), configuring network, etc...
40                 Some specific site configuration allow you to prepare user,group, ssh key,
41                 resolv.conf to be exactly the same for all generated container.
42                 /var/lib/vzgot/etc is where common data are stored.
43
44         vzgot destroy container_name
45                 To get rid of the container directory once for all (need to
46                 be shutdown first.
47
48
49
50         Complex commands:
51
52         vzgot.mksrvz nodename.your_domain.name [distribution] [architecture]
53                 It used to prepare a container (create,firstboot,boot) using
54                 the nodename.your_domain.name resolution to extract IP.
55                 You may need to change the TPL enviromenet variable (within
56                 the script) to fit your template name of your own.
57                 (ours is TPL=linux-$DISTRIB-$CPUARCH-vzserver.tar.gz).
58
59         vzgot.redoall filename_list_to_redo     
60                 This script check for a file /etc/vzgot/'filename_list_to_redo'
61                 and use it to regenerate all set container.
62                 There is a file /etc/vzgot/vzredoall as example, this is
63                 the list of all template we are able to succesfully run now
64                 (33 all together).
65
66
67         Production command:
68
69         service vzgot start|stop
70                 Classical redhat service start|stop
71                 this script will start all container with a file named
72                 /var/lib/vzgot/vzdir/cont_name/status
73                 with content to be "BOOT=ON"
74                 this script will stop all container with a file named
75                 /var/lib/vzgot/vzdir/cont_name/first.pid
76                 
77                 
78
79 Notes:
80         We are using our own template (the one used with the openvz package),
81         they are fine tuned to do what we want (be able to use container
82         to compile package, check bug on distribution configuration). 
83         to make sure you own template can be used we have made a successful 
84         test using standard openvz template centos-5-x86_64-devel.tar.gz 
85         as vzgot feed. 
86
87         While fully operationnal for us, vzgot need to be improved
88         on the resources allocation (cgroups) and quota (?), before
89         to be expose to uncontrolled/adverse production usage.
90
91
92
93 Package structure:
94         
95         /etc/vzgot: directory with configuration file needed
96         by the main host to create or manage a container.
97
98         /var/lib/vzgot: application core directory
99
100         /var/lib/vzgot/vzdir:   all container storage area,
101         the directory name is the container name.
102
103         /var/lib/vzgot/vzdir/cont_name:
104         - rootfs is the container root directory
105         - console is a file receiving ALL data transmitted
106           to container /dev/console (/sbin/init boot process)
107         - first.pid is file with the /sbin/init
108         - status, used to boot container, contens is
109           BOOT=ON of BOOT=OFF
110         
111         /var/lib/vzgot/RPM:
112         tree with RPM to be added to have some distribution
113         fully working (RH7.3 etc...), you can add your
114         own if you like.
115         
116         /var/lib/vzgot/home:
117         template directory to standard user to be added on
118         container while created.
119         
120         /var/lib/vzgot/etc:
121         - groups,users list of group and users you want to
122           be added at template creation
123         - shadow, crypted password you want to set on 
124           container.
125         - resolv.conf to be set in the container.
126         - sudoers to be added to container /etc/sudoers.
127         
128
129         Please feel free to play with it and you are welcome to
130         give me feed back about it
131
132         jmp AT safe DOT ca
133