conf.base updates and memory limit tweaks.
[tridge/autocluster.git] / README
1 BASIC SETUP
2 ===========
3
4 Before you start, make sure you have the latest version of
5 autocluster. To download autocluster do this:
6
7   git clone git://git.samba.org/tridge/autocluster.git autocluster
8
9 Or to update it, run "git pull" in the autocluster directory
10
11 To setup a virtual cluster for SoFS with autocluster follow these steps:
12
13
14  1) download and install the latest kvm-userspace and kvm tools 
15     from http://kvm.qumranet.com/kvmwiki/Code
16
17     You need a x86_64 Linux box to run this on. I use a Ubuntu Hardy
18     system. It also needs plenty of memory - at least 3G to run a SoFS
19     cluster.
20
21     You may also find you need a newer version of libvirt. If you get
22     an error when running create_base.sh about not handling a device
23     named 'sda' then you need a newer libvirt. Get it like this:
24
25        git clone git://git.et.redhat.com/libvirt.git
26
27     When building it, you probably want to configure it like this:
28
29        ./configure --without-xen --prefix=/usr
30
31     You will need to configure the right kvm networking setup. The
32     files in host_setup/etc/libvirt/qemu/networks/ should help. This
33     command will install the right networks for kvm:
34
35        rsync -av --delete host_setup/etc/libvirt/qemu/networks/ /etc/libvirt/qemu/networks/
36
37  2) You need a cacheing web proxy on your local network. If you don't
38     have one, then install a squid proxy on your host. See
39     host_setup/etc/squid/squid.conf for a sample config suitable for a
40     virtual cluster. Make sure it caches large objects and has plenty
41     of space. This will be needed to make downloading all the RPMs to
42     each client sane
43
44     To test your squid setup, run a command like this:
45
46       http_proxy=http://10.0.0.1:3128/ wget http://9.155.61.11/mediasets/SoFS-daily/
47
48
49  3) setup a DNS server on your host. See host_setup/etc/bind/ for a
50     sample config that is suitable. It needs to redirect DNS queries
51     for your SOFS virtual domain to your windows domain controller
52
53
54  4) download a RHEL-5.2 install ISO. You can get it from the install
55     server in Mainz. See the FSCC wiki page on autocluster for
56     details.
57
58  5) create a 'config' file in the autocluster directory.  See the
59     "CONFIGURATION" section below for more details.
60
61  6) use "./autocluster create base" to create the base install image.
62     The install will take about 10 to 15 minutes and you will see the
63     packages installing in your terminal
64
65     Before you start create base make sure your web proxy cache is
66     authenticated with the Mainz BSO (eg. connect to
67     https://9.155.61.11 with a web browser)
68
69
70  7) when that has finished I recommend you mark that base image
71     immutable like this:
72
73       chattr +i /virtual/SoFS-1.5-base.img
74
75     That will ensure it won't change. This is a precaution as the
76     image will be used as a basis file for the per-node images, and if
77     it changes your cluster will become corrupt
78
79
80  8) now run "./autocluster create cluster" specifying a cluster
81     name. For example:
82
83       ./autocluster create cluster c1
84
85     That will create your cluster nodes and the TSM server node
86
87
88  9) now boot your cluster nodes like this:
89
90        ./vircmd start c1
91
92    The most useful vircmd commands are:
93  
94        start    : boot a node
95        shutdown : graceful shutdown of a node
96        destroy  : power off a node immediately
97
98
99  10) you can watch boot progress like this:
100
101        tail -f /var/log/kvm/serial.c1*
102
103     All the nodes have serial consoles, making it easier to capture
104     kernel panic messages and watch the nodes via ssh
105
106
107  11) now you can ssh into your nodes. You may like to look at the
108      small set of scripts in /root/scripts on the nodes for
109      some scripts. In particular:
110
111       setup_tsm_server.sh:  run this on the TSM node to setup the TSM server
112       setup_tsm_client.sh:  run this on the GPFS nodes to setup HSM
113       mknsd.sh           :  this sets up the local shared disks as GPFS NSDs
114       setup_gpfs.sh      :  this sets GPFS, creates a filesystem etc,
115                             byppassing the SoFS GUI. Useful for quick tests.
116
117
118  12) If using the SoFS GUI, then you may want to lower the memory it
119      uses so that it fits easily on the first node. Just edit this
120      file on the first node:
121
122           /opt/IBM/sofs/conf/overrides/sofs.javaopt
123
124
125  13) For automating the SoFS GUI, you may wish to install the iMacros
126      extension to firefox, and look at some sample macros I have put
127      in the imacros/ directory of autocluster. They will need editing
128      for your environment, but they should give you some hints on how
129      to automate the final GUI stage of the installation of a SoFS
130      cluster. 
131
132 CONFIGURATION
133 =============
134
135 * See config.sample for an example of a configuration file.  Note that
136   all items in the sample file are commented out by default
137
138 * Configuration options are defined in config.d/*.defconf.  All
139   configuration options have an equivalent command-line option.
140
141 * Use "autocluster --help" to list all available command-line options
142   - all the items listed under "configuration options:" are the
143   equivalents of the settings for config files.
144
145 * Run "autocluster --dump > config.foo" (or similar) to create a
146   config file containing the default values for all options that you
147   can set.  You can then delete all options for which you wish to keep
148   the default values and then modify the remaining ones, resulting in
149   a relatively small config file.
150
151 * Use the --with-release option on the command-line or the
152   with_release function in a configuration file to get default values
153   for building virtual clusters for releases of particular "products".
154   Currently there are only release definitions for SoFS.  
155
156   For example, you can setup default values for SoFS-1.5.3 by running:
157
158     autocluster --with-release=SoFS-1.5.3 ...
159
160   Equivalently you can use the following syntax in a configuration
161   file:
162
163     with_release "SoFS-1.5.3"
164
165   The release definitions are stored in releases/*.release.  The
166   available releases are listed in the output of "autocluster --help".
167
168   NOTE: Occasionally you will need to consider the position of
169   with_release in your configuration.  If you want to override options
170   handled by a release definition then you will obviously need to set
171   them later in your configuration.  This will be the case for most
172   options you will want to set.  However, some options will need to
173   appear before with_release so that they can be used within a release
174   definition - the most obvious one is the (rarely used) RHEL_ARCH
175   option, which is used in the default ISO setting for each release.