Arvbox » History » Version 10
Peter Amstutz, 03/03/2016 04:25 PM
1 | 1 | Peter Amstutz | h1. Arvbox |
---|---|---|---|
2 | |||
3 | 3 | Peter Amstutz | We recommend using "Arvbox":http://doc.arvados.org/install/arvbox.html to set up self-contained Arvados development environment. |
4 | 1 | Peter Amstutz | |
5 | 3 | Peter Amstutz | h2. Running Arvados in development mode |
6 | |||
7 | <pre> |
||
8 | $ arvbox reboot dev |
||
9 | </pre> |
||
10 | |||
11 | This performs the following operations: |
||
12 | |||
13 | # Rebuild the arvbox-dev docker image (typically the layers are cached so this is a no-op unless you are working on arvbox itself) |
||
14 | # Create @~/.arvbox/arvbox@ to store arvbox state |
||
15 | # Clone the arvados git repository to @~/.arvbox/arvbox/arvados@ |
||
16 | # Place stateful container data in @~/.arvbox/arvbox/postgres@ and @~/.arvbox/arvbox/var@ |
||
17 | # Start the container |
||
18 | |||
19 | The container will then: |
||
20 | # Download and cache various packages (Ruby gems, Passenger) |
||
21 | 5 | Peter Amstutz | # Compile and install Arvados server binaries |
22 | # Build and install Arvados SDK packages (such as arvados-python-client) |
||
23 | 3 | Peter Amstutz | # Start the Arvados services |
24 | |||
25 | The directories inside @~/.arvbox/arvbox@ are all bind-mounted inside the container. This means that you may edit files on the host file system and the changes will be seen inside the container immediately. For example, if you edit a page template in @~/.arvbox/arvbox/arvados/apps/workbench/app/views@ you only need to reload the page in your browser to see the change. |
||
26 | |||
27 | 6 | Peter Amstutz | You can restart individual services without restarting the whole container. For compiled services, the startup script always recompiles the server before starting it. For example, if you are working on @keepproxy@ |
28 | 3 | Peter Amstutz | |
29 | <pre> |
||
30 | $ arvbox sv restart keepproxy |
||
31 | </pre> |
||
32 | |||
33 | If any service fails to come up, you can see the debug log using @arvbox log@. This log will include compilation or install errors: |
||
34 | |||
35 | <pre> |
||
36 | $ arvbox log keepproxy |
||
37 | </pre> |
||
38 | |||
39 | Finally, you can get a root shell inside the container using @arvbox sh@ |
||
40 | |||
41 | <pre> |
||
42 | $ arvbox sh |
||
43 | </pre> |
||
44 | |||
45 | 9 | Peter Amstutz | h2. Running multiple Arvbox containers |
46 | |||
47 | To run multiple Arvbox containers, give them different names by setting the environment variable @ARVBOX_CONTAINER@. |
||
48 | |||
49 | <pre> |
||
50 | $ arvbox status |
||
51 | Selected: arvbox |
||
52 | Status: running |
||
53 | IP: 172.17.0.2 |
||
54 | Data: /home/peter/.arvbox/arvbox |
||
55 | |||
56 | $ export ARVBOX_CONTAINER=arvbox2 |
||
57 | $ arvbox status |
||
58 | Selected: arvbox2 |
||
59 | Status: not running |
||
60 | Data: /home/peter/.arvbox/arvbox2 |
||
61 | </pre> |
||
62 | |||
63 | 3 | Peter Amstutz | h2. Running the test suite |
64 | 1 | Peter Amstutz | |
65 | 9 | Peter Amstutz | Arvbox can also be used to run the Arvados test suite in an isolated environment. |
66 | 3 | Peter Amstutz | |
67 | <pre> |
||
68 | $ arvbox restart test |
||
69 | </pre> |
||
70 | 7 | Peter Amstutz | |
71 | 8 | Peter Amstutz | You can pass parameters to the test suite as described in [[Running tests#Save-time-by-skipping-install]]: |
72 | 7 | Peter Amstutz | |
73 | <pre> |
||
74 | $ arvbox restart test --only services/keepproxy |
||
75 | </pre> |