|
| 1 | +Using the ArangoDB Starter |
| 2 | +========================== |
| 3 | + |
| 4 | +This section describes how to start an Active Failover setup the tool [_Starter_](../../Programs/Starter/README.md) |
| 5 | +(the _arangodb_ binary program). |
| 6 | + |
| 7 | +Local Tests |
| 8 | +----------- |
| 9 | + |
| 10 | +If you want to start a local _Active Failover_ setup quickly, use the `--starter.local` |
| 11 | +option of the _Starter_. This will start all servers within the context of a single |
| 12 | +starter process: |
| 13 | + |
| 14 | +```bash |
| 15 | +arangodb --starter.local --starter.mode=activefailover --starter.data-dir=./localdata |
| 16 | +``` |
| 17 | + |
| 18 | +**Note:** When you restart the _Starter_, it remembers the original `--starter.local` flag. |
| 19 | + |
| 20 | +Multiple Machines |
| 21 | +----------------- |
| 22 | + |
| 23 | +If you want to start an Active Failover setup using the _Starter_, use the `--starter.mode=activefailover` |
| 24 | +option of the _Starter_. A 3 "machine" _Agency_ is started as well as 2 single servers, |
| 25 | +that perform asynchronous replication and failover: |
| 26 | + |
| 27 | +```bash |
| 28 | +arangodb --starter.mode=activefailover --server.storage-engine=rocksdb --starter.data-dir=./data --starter.join A,B,C |
| 29 | +``` |
| 30 | + |
| 31 | +Run the above command on machine A, B & C. |
| 32 | + |
| 33 | +The _Starter_ will decide on which 2 machines to run a single server instance. |
| 34 | +To override this decision (only valid while bootstrapping), add a |
| 35 | +`--cluster.start-single=false` to the machine where the single server |
| 36 | +instance should _not_ be started. |
| 37 | + |
| 38 | +Once all the processes started by the _Starter_ are up and running, and joined the |
| 39 | +Active Failover setup (this may take a while depending on your system), the _Starter_ will inform |
| 40 | +you where to connect the Active Failover from a Browser, shell or your program. |
| 41 | + |
| 42 | +For a full list of options of the _Starter_ please refer to [this](../../Programs/Starter/Options.md) |
| 43 | +section. |
| 44 | + |
| 45 | +Using the ArangoDB Starter in Docker |
| 46 | +------------------------------------ |
| 47 | + |
| 48 | +The _Starter_ can also be used to launch an Active Failover setup based on _Docker_ |
| 49 | +containers. To do this, you can use the normal Docker arguments, combined with |
| 50 | +`--starter.mode=activefailover`: |
| 51 | + |
| 52 | +```bash |
| 53 | +export IP=<IP of docker host> |
| 54 | +docker volume create arangodb |
| 55 | +docker run -it --name=adb --rm -p 8528:8528 \ |
| 56 | + -v arangodb:/data \ |
| 57 | + -v /var/run/docker.sock:/var/run/docker.sock \ |
| 58 | + arangodb/arangodb-starter \ |
| 59 | + --starter.address=$IP \ |
| 60 | + --starter.mode=activefailover \ |
| 61 | + --starter.join=A,B,C |
| 62 | +``` |
| 63 | + |
| 64 | +Run the above command on machine A, B & C. |
| 65 | + |
| 66 | +The _Starter_ will decide on which 2 machines to run a single server instance. |
| 67 | +To override this decision (only valid while bootstrapping), add a |
| 68 | +`--cluster.start-single=false` to the machine where the single server |
| 69 | +instance should _not_ be started. |
0 commit comments