~sandbox-developers/mysql-sandbox/replication-topo

« back to all changes in this revision

Viewing changes to README

  • Committer: Giuseppe Maxia
  • Date: 2009-04-06 09:33:42 UTC
  • Revision ID: g.maxia@gmail.com-20090406093342-4uu6s62e51yz36gd
- added 'delete' action to sbtool
- introduced --export_binaries to make_sandbox
- added 03_test_sandbox.t, which uses test_sandbox within
  the test suite
- fixed bug in sbtool. Moving sandbox failed becaus of wrong regular expression
- added a test suite for sbtool to test_sandbox (test_sandbox --tests=sbtool)

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
    with existing MYSQL installations.
19
19
 
20
20
INSTALLATION
21
 
MySQL Sandbox installs as a normal Perl Module. Since its purpose is to
22
 
install side servers in user space, you can install it as root (default) 
23
 
or as an unprivileged user. In this case, you need to set the PERL5LIB 
24
 
and PATH variables.
 
21
    MySQL Sandbox installs as a normal Perl Module. Since its purpose is to
 
22
    install side servers in user space, you can install it as root (default)
 
23
    or as an unprivileged user. In this case, you need to set the PERL5LIB
 
24
    and PATH variables.
 
25
 
25
26
       # as root
26
27
       perl Makefile.PL 
27
28
       make
195
196
    additional options to be passed to the master * SLAVE_OPTIONS additional
196
197
    options to be passed to each slave
197
198
 
 
199
SBTool the Sandbox helper
 
200
        usage: sbtool [options] 
 
201
            -o     --operation       (s) <> - what task to perform
 
202
                     'info'     returns configuration options from a Sandbox
 
203
                     'copy'     copies data from one Sandbox to another
 
204
                     'ports'    lists ports used by the Sandbox
 
205
                     'tree'     creates a replication tree
 
206
                     'move'     moves a Sandbox to a different location
 
207
                     'range'    finds N consecutive ports not yet used by the Sandbox
 
208
                     'port'     Changes a Sandbox port
 
209
            -s     --source_dir      (s) <> - source directory for move,copy
 
210
            -d     --dest_dir        (s) <> - destination directory for move,copy
 
211
            -n     --new_port        (s) <> - new port while moving a sandbox
 
212
            -u     --only_used       (-) <> - for "ports" operation, shows only the used ones
 
213
            -i     --min_range       (i) <5000> - minimum port when searching for available ranges
 
214
            -x     --max_range       (i) <32000> - maximum port when searching for available ranges
 
215
            -z     --range_size      (i) <10> - size of range when searching for available port range
 
216
            -f     --format          (s) <text> - format for "ports" and "info"
 
217
                     'perl'     fully structured information in Perl code
 
218
                     'text'     plain text dump of requested information
 
219
            -p     --search_path     (s) </Users/gmax/sandboxes> - search path for ports and info
 
220
            -a     --all_info        (-) <> - print more info for "ports" operation
 
221
                   --tree_nodes      (s) <> - description of the tree (x-x x x-x x|x x x|x x)
 
222
                   --mid_nodes       (s) <> - description of the middle nodes (x x x)
 
223
                   --leaf_nodes      (s) <> - description of the leaf nodes (x x|x x x|x x)
 
224
                   --tree_dir        (s) <> - which directory contains the tree nodes
 
225
            -v     --verbose         (-) <> - prints more info on some operations
 
226
            -h     --help            (-) <1> - this screen
 
227
 
 
228
TESTING
 
229
  test_sandbox
 
230
    The MySQL Sandbox comes with a test suite, called test_sandbox, which by
 
231
    default tests single,replicated, multiple, and custom installations of
 
232
    MySQL version 5.0.77 and 5.1.32.You can override the version being
 
233
    tested by means of command line options:
 
234
 
 
235
     test_sandbox --versions=5.0.67,5.1.30
 
236
 
 
237
    or you can specify a tarball
 
238
 
 
239
     test_sandbox --versions=/path/to/mysql-tarball-5.1.31.tar.gz
 
240
     test_sandbox --tarball=/path/to/mysql-tarball-5.1.31.tar.gz
 
241
 
 
242
    You can also define which tests you want to run:
 
243
 
 
244
      test_sandbox --tests=single,replication
 
245
 
 
246
  Test isolation
 
247
    The tests are not performed in the common c($SANDBOX_HOME) directory,
 
248
    but on a separate directory, which by default is c($HOME/test_sb). To
 
249
    avoid interferences, before the tests start, the application runs the
 
250
    c($SANDBOX_HOME/stop_all) command. The test directory is considered to
 
251
    exist purely for testing purposes, and it is erased several times while
 
252
    running the suite. Using this directory to store valuable data is higly
 
253
    risky.
 
254
 
 
255
  Tests during installation
 
256
    When you build the package and run
 
257
 
 
258
      make test
 
259
 
 
260
    test_sandbox is called, and the tests are performed on a temporary
 
261
    directory under c($INSTALLATION_DIRECTORY/t/test_sb). By default,
 
262
    version 5.0.77 is used. If this version is not found in
 
263
    c($HOME/opt/mysql/), the test is skipped. You can override this option
 
264
    by setting the TEST_VERSION environment variable.
 
265
 
 
266
      TEST_VERSION=5.1.30 make test
 
267
      TEST_VERSION=$HOME/opt/mysql/5.1.30 make test
 
268
      TEST_VERSION=/path/to/myswl-tarball-5.1.30.tar.gz make test
 
269
 
198
270
REQUIREMENTS
199
271
    To use this package you need at least the following:
200
272