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