Setting up an arvbox dev federation » History » Revision 4
Revision 3 (Peter Amstutz, 10/26/2018 06:21 PM) → Revision 4/6 (Peter Amstutz, 05/14/2019 03:45 PM)
h1. Setting up an arvbox dev federation For development of federation features, you can run multiple arvbox instances and configure them for federation. Make sure you have the latest 'arvbox' script and arvbox-dev image. <pre> curl -O https://raw.githubusercontent.com/curoverse/arvados/master/tools/arvbox/bin/arvbox chmod +x arvbox docker pull arvados/arvbox-dev </pre> h2. Create two arvbox instances <pre> $ export ARVBOX_CONTAINER=cluster1 $ arvbox start dev $ export ARVBOX_CONTAINER=cluster2 $ arvbox start dev </pre> Make note of the cluster ids and IP addresses. In this example cluster1 is 1b7fr and cluster2 is 2gvh8. Note that Docker assigns IP addresses sequentially. To ensure you get the same IP addresses each time you'll need to start cluster1 first, followed by cluster2, and you don't want any other containers running. Your cluster ids will be different than this example. h2. Set configuration overrides Create files ~/.arvbox/cluster[1,2]/arvados/services/api/config/application.yml.override <pre> development: remote_hosts: 1b7fr: 172.17.0.2:8000 2gvh8: 172.17.0.3:8000 sso_insecure: true </pre> Create ~/.arvbox/cluster1/var/cluster_config.yml.override <pre> Clusters: 1b7fr: # cluster1 id RemoteClusters: 1b7fr: Host: 172.17.0.2:8000 Proxy: true Insecure: true 2gvh8: Host: 172.17.0.3:8000 Proxy: true Insecure: true </pre> Create ~/.arvbox/cluster2/var/cluster_config.yml.override <pre> Clusters: 2gvh8: # cluster2 id RemoteClusters: 1b7fr: Host: 172.17.0.2:8000 Proxy: true Insecure: true 2gvh8: Host: 172.17.0.3:8000 Proxy: true Insecure: true </pre> h2. Copy root certificates <pre> docker cp ~/.arvbox/cluster2/var/arvbox2-root-cert.crt cluster1:/usr/local/share/ca-certificates/ docker cp ~/.arvbox/cluster1/var/arvbox-root-cert.crt cluster2:/usr/local/share/ca-certificates/ docker exec cluster1 update-ca-certificates docker exec cluster2 update-ca-certificates </pre> You probably also want to install the root certificates on the host: https://doc.arvados.org/install/arvbox.html h2. Restart services <pre> $ export ARVBOX_CONTAINER=cluster1 $ arvbox sv restart api $ arvbox sv restart controller $ arvbox sv restart keepstore0 $ arvbox sv restart keepstore1 $ export ARVBOX_CONTAINER=cluster2 $ arvbox sv restart api $ arvbox sv restart controller $ arvbox sv restart keepstore0 $ arvbox sv restart keepstore1 </pre> h2. Testing # Visit workbench2 workbench at 172.17.0.2:3001 172.17.0.2 and create a user account. # Copy the token # Visit workbench2 workbench at 172.17.0.3:3001 and specify "log in with user from cluster1" 172.17.0.3?api_token=token_copied_in_previous_step # You should be logged into workbench on the cluster2 with the user from cluster1 At the command line: <pre> $ export ARVADOS_API_HOST=172.17.0.3:8000 $ export ARVADOS_API_HOST_INSECURE=true $ export ARVADOS_API_TOKEN=token_copied_in_previous_step $ arv user current </pre> This shows cluster2 accepting a token for cluster1. Look for the "writable_by" field in the response including uuids with both cluster1 and cluster2.