1 import "run-test.cwlex" as run_test
2 import "superuser-tok.cwl" as superuser_tok
5 arvados_api_hosts string[],
6 arvados_cluster_ids string[],
7 superuser_tokens string[],
8 arvbox_containers string[],
9 fed_migrate="arv-federation-migrate"
12 logincluster = run expr (arvados_cluster_ids) string (inputs.arvados_cluster_ids[0])
14 scatter arvbox_containers as container,
15 arvados_cluster_ids as cluster_id,
16 arvados_api_hosts as host
17 do run workflow(logincluster)
22 ARVBOX_CONTAINER: "$(inputs.container)"
27 run tool(container, cluster_id, logincluster, set_login = File("set_login.py")) {
30 docker cp $(inputs.container):/var/lib/arvados/cluster_config.yml.override .
31 chmod +w cluster_config.yml.override
32 python $(inputs.set_login.path) cluster_config.yml.override $(inputs.cluster_id) $(inputs.logincluster)
33 docker cp cluster_config.yml.override $(inputs.container):/var/lib/arvados
37 run tool(container, host, c) {
41 while ! curl --fail --insecure --silent https://$(inputs.host)/discovery/v1/apis/arvados/v1/rest >/dev/null ; do sleep 3 ; done
42 export ARVADOS_API_HOST=$(inputs.host)
43 export ARVADOS_API_TOKEN=\$(arvbox cat /var/lib/arvados/superuser_token)
44 export ARVADOS_API_HOST_INSECURE=1
45 ARVADOS_VIRTUAL_MACHINE_UUID=\$(arvbox cat /var/lib/arvados/vm-uuid)
46 while ! python -c "import arvados ; arvados.api().virtual_machines().get(uuid='$ARVADOS_VIRTUAL_MACHINE_UUID').execute()" 2>/dev/null ; do sleep 3; done
50 supertok = superuser_tok(container, d)
54 report = run_test(arvados_api_hosts, superuser_tokens=supertok, fed_migrate)
55 return supertok, report