We recommend using Arvbox to set up self-contained Arvados development environment.
Running Arvados in development mode¶
$ arvbox reboot dev
This performs the following operations:
- Rebuild the arvbox-dev docker image (typically the layers are cached so this is a no-op unless you are working on arvbox itself)
~/.arvbox/arvboxto store arvbox state
- Clone the arvados git repository to
- Place stateful container data in
- Start the container
- Download and cache various packages (Ruby gems, Passenger)
- Compile and install Arvados server binaries
- Build and install Arvados SDK packages (such as arvados-python-client)
- Start the Arvados services
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.
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
$ arvbox sv restart keepproxy
If any service fails to come up, you can see the debug log using
arvbox log. This log will include compilation or install errors:
$ arvbox log keepproxy
Finally, you can get a root shell inside the container using
$ arvbox sh
Making Arvbox accessible from other hosts¶
By default, Arvbox can only be accessed on the same host it is running. To publish Arvbox service ports to the host's service ports and advertise the host's IP address for services, use
$ arvbox reboot publicdev
This attempts to auto-detect the correct IP address to use by taking the IP address of the default route device. If the auto-detection is wrong, you want to publish a hostname instead of a raw address, or you need to access it through a different device (such as a router or firewall), set
ARVBOX_PUBLISH_IP to the desire hostname or IP address.
$ export ARVBOX_PUBLISH_IP=example.com $ arvbox reboot publicdev
Note: this expects to bind the host's port 80 (http) for workbench, so you cannot have a conflicting web server already running on the host. It does not attempt to take bind the host's port 22 (ssh), as a result the arvbox ssh port is not published.
Running multiple Arvbox containers¶
To run multiple Arvbox containers, give them different names by setting the environment variable
$ arvbox status Selected: arvbox Status: running IP: 172.17.0.2 Data: /home/peter/.arvbox/arvbox $ export ARVBOX_CONTAINER=arvbox2 $ arvbox status Selected: arvbox2 Status: not running Data: /home/peter/.arvbox/arvbox2
Running the test suite¶
Arvbox can also be used to run the Arvados test suite in an isolated environment.
$ arvbox restart test
You can pass parameters to the test suite as described in Running tests:
$ arvbox restart test --only services/keepproxy