1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: Apache-2.0
8 arv: "http://arvados.org/cwl#"
9 cwltool: "http://commonwl.org/cwltool#"
11 container_name: string
12 this_cluster_id: string
14 cluster_hosts: string[]
15 arvbox_data: Directory
24 outputEval: $(inputs.arvbox_data)
28 ARVBOX_CONTAINER: $(inputs.container_name)
29 ARVBOX_DATA: $(inputs.arvbox_data.path)
30 InitialWorkDirRequirement:
32 - entryname: cluster_config.yml.override
35 var remoteClusters = {};
36 for (var i = 0; i < inputs.cluster_ids.length; i++) {
37 remoteClusters[inputs.cluster_ids[i]] = {
38 "Host": inputs.cluster_hosts[i],
43 var r = {"Clusters": {}};
44 r["Clusters"][inputs.this_cluster_id] = {"RemoteClusters": remoteClusters};
45 if (r["Clusters"][inputs.this_cluster_id]) {
46 r["Clusters"][inputs.this_cluster_id]["Login"] = {"LoginCluster": inputs.cluster_ids[0]};
47 r["Clusters"][inputs.this_cluster_id]["Users"] = {"AutoAdminFirstUser": false};
49 return JSON.stringify(r);
51 - entryname: application.yml.override
54 var remoteClusters = {};
55 for (var i = 0; i < inputs.cluster_ids.length; i++) {
56 remoteClusters[inputs.cluster_ids[i]] = inputs.cluster_hosts[i];
58 return JSON.stringify({"development": {"remote_hosts": remoteClusters}});
60 LoadListingRequirement:
61 loadListing: no_listing
62 ShellCommandRequirement: {}
63 InlineJavascriptRequirement: {}
64 InplaceUpdateRequirement:
69 docker cp cluster_config.yml.override $(inputs.container_name):/var/lib/arvados-arvbox
70 docker cp application.yml.override $(inputs.container_name):/usr/src/arvados/services/api/config
71 $(inputs.arvbox_bin.path) sv restart api
72 $(inputs.arvbox_bin.path) sv restart controller
73 $(inputs.arvbox_bin.path) sv restart keepstore0
74 $(inputs.arvbox_bin.path) sv restart keepstore1