X-Git-Url: http://git.annexia.org/?p=mclu.git;a=blobdiff_plain;f=mclu.pod;h=63b9b2093540702028932ac36d61d32fc3b1c677;hp=45b9bd5a4de3edca88b73ad7dd13f97987e4f18a;hb=97b5c2a2402eef41726e54ed6797e8b7d3336058;hpb=f7d1a79773b8b04dfcd13c2dd2f6ae3b70d43663 diff --git a/mclu.pod b/mclu.pod index 45b9bd5..63b9b20 100644 --- a/mclu.pod +++ b/mclu.pod @@ -10,10 +10,60 @@ mclu --help =head1 DESCRIPTION +C (Mini Cloud, previously Mini Cluster) is probably the simplest +cloud management software possible. +Cloud management doesn't require a daemon running on each node. We +already have L for secure access, and L to +manage the state of the guests. On most Linux systems, those are +running out of the box. That is sufficient to manage all te state we +care about. C just goes out and queries each node for that +information when it needs it (in parallel of course). Nodes that are +switched off are handled by ignoring them. +For a small cloud, we can throw out features that aren't needed: +multi-user/multi-tenant, failover, VLANs, a GUI. +C is essentially the smallest sensible interface to parallel +libvirt over ssh. There are some extra features, such as the ability +to boot VMs from templates, but those are kept as minimal as possible. +C is good for small clouds from 2 - 10 Linux nodes, that are +managed by a single user, where everything is located at a single +location on a single network, where you are happy to hack on small +shell scripts and manage everything from the command line. + +=head2 EXAMPLES + +Examine the state of the nodes (one node is switched on, three nodes +are off): + + $ mclu status + ham0 on + total: 8pcpus 30.9G + free: 29.9G + ham1 off + ham2 off + ham3 off + +Bring up another node (using wake-on-LAN): + + $ mclu on ham1 + Waking up 74:d4:35:51:ab:86... + +Start a new instance on node C, based on the C guest +template, with up to 20G of disk space: + + $ mclu boot rawhide ham1:test --size 20G + +Connect to the graphical console of the new guest: + + $ mclu viewer test + +If your local DHCP server and DNS are connected then you can probably +connect to the new instance by doing: + + $ ssh test =head1 GLOBAL OPTIONS @@ -48,9 +98,6 @@ Display version number and exit. =back - - - =head1 SUBCOMMANDS =over 4 @@ -66,16 +113,35 @@ control resources using the following options: =over 4 +=item B<--console> + +Open the serial console immediately after booting the guest. This is +the same as using the C subcommand, but quicker. + =item B<--memory nnG> Specify the amount of memory (RAM) to give this guest. You can use -a number followed by a unit, eg. C<--memory=4G> +a number followed by a unit, eg. C<--memory 4G> + +=item B<--size nnG> + +Specify the amount of disk space to give this guest. You can use +a number followed by a unit, eg. C<--size 20G> + +=item B<--timezone TZ> + +Specify the timezone, eg. C<--timezone Europe/London> =item B<--vcpus N> Specify the number of virtual CPUs to give to the guest. The default is the number of physical CPUs, but not more than 4. +=item B<--viewer> + +Open the graphical console immediately after booting the guest. This is +the same as using the C subcommand, but quicker. + =back =item B @@ -129,6 +195,10 @@ for each host: host0 mac=11:22:33:44:55:66 host1 mac=11:22:33:44:55:67 +=item B + +Reboot the guest. + =item B Display the status of the cloud. This shows you which nodes are on @@ -149,8 +219,170 @@ Open the graphical console of the guest (using L). =head1 TEMPLATE FILES +Template files are shell scripts which the C program calls to +perform various operations. + +Template files must have the extension C<.template>, must be +executable (C), and they must live in the +template directory (usually found through the C<$MCLU_PATH> +environment variable). + +Several template files are supplied with mclu sources, and it's a good +idea to consult those for examples and when creating your own +templates. + +C runs the template with a single parameter in order to "query" +the template. All templates must support the C parameter, +which is used to test that the file is a template: + + $ ./templates/rawhide.template probe + hello + +Templates should exit with code 2 if they don't know about a parameter: + + $ ./templates/rawhide.template unknown + $ echo $? + 2 + +The current parameters are: + +=over 4 + +=item base-image + +The template MUST print the name of the image that it builds. The +meaning of this generally follows the conventions of +L, if virt-builder is used by the template. + +=item build + +The template MUST build a disk image. Because the C