17944: Updates config knobs and documentation.
authorLucas Di Pentima <lucas.dipentima@curii.com>
Thu, 21 Oct 2021 18:16:14 +0000 (15:16 -0300)
committerLucas Di Pentima <lucas.dipentima@curii.com>
Tue, 2 Nov 2021 21:13:48 +0000 (18:13 -0300)
Workbench.VocabularyURL will be auto-exported providing the new vocabulary
endpoint, for backwards compatibility.

Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima@curii.com>

doc/_config.yml
doc/_includes/_metadata_vocabulary_example.liquid [moved from doc/_includes/_wb2_vocabulary_example.liquid with 90% similarity]
doc/admin/metadata-vocabulary.html.textile.liquid [moved from doc/admin/workbench2-vocabulary.html.textile.liquid with 79% similarity]
doc/admin/upgrading.html.textile.liquid
doc/install/install-workbench2-app.html.textile.liquid
lib/config/config.default.yml
lib/config/export.go
lib/config/generated_config.go
sdk/go/arvados/config.go

index 31db9c41d54eb82fbb57c3fbc798f4cffeaa5e69..dde87323d778e47f7e6297da784a1995d9f9726d 100644 (file)
@@ -194,7 +194,7 @@ navbar:
       - admin/keep-balance.html.textile.liquid
       - admin/controlling-container-reuse.html.textile.liquid
       - admin/logs-table-management.html.textile.liquid
-      - admin/workbench2-vocabulary.html.textile.liquid
+      - admin/metadata-vocabulary.html.textile.liquid
       - admin/storage-classes.html.textile.liquid
       - admin/keep-recovering-data.html.textile.liquid
       - admin/keep-measuring-deduplication.html.textile.liquid
similarity index 90%
rename from doc/_includes/_wb2_vocabulary_example.liquid
rename to doc/_includes/_metadata_vocabulary_example.liquid
index ee2ac97ef3cf5a7d4af57b39f53f0a88dfedcffe..016b48c6aeb1bdab9e990aa86ceb4144bb01acab 100644 (file)
@@ -1,3 +1,9 @@
+{% comment %}
+Copyright (C) The Arvados Authors. All rights reserved.
+
+SPDX-License-Identifier: CC-BY-SA-3.0
+{% endcomment %}
+
 {
     "strict_tags": false,
     "tags": {
similarity index 79%
rename from doc/admin/workbench2-vocabulary.html.textile.liquid
rename to doc/admin/metadata-vocabulary.html.textile.liquid
index 9a8d7fcd015b795144ca21e277be6379fa34a84f..e615fa3c8971d99b13105a7ba149a1b3fd8cfbb5 100644 (file)
@@ -1,7 +1,7 @@
 ---
 layout: default
 navsection: admin
-title: User properties vocabulary
+title: Metadata vocabulary
 ...
 
 {% comment %}
@@ -12,17 +12,19 @@ SPDX-License-Identifier: CC-BY-SA-3.0
 
 Many Arvados objects (like collections and projects) can store metadata as properties that in turn can be used in searches allowing a flexible way of organizing data inside the system.
 
-The Workbench2 user interface enables the site adminitrator to set up a properties vocabulary formal definition so that users can select from predefined key/value pairs of properties, offering the possibility to add different terms for the same concept.
+Arvados enables the site administrator to set up a formal metadata vocabulary definition so that users can select from predefined key/value pairs of properties, offering the possibility to add different terms for the same concept on clients' UI such as workbench2.
 
-h2. Workbench2 configuration
+The Controller service loads and caches the configured vocabulary file in memory at startup time, exporting it on a particular endpoint. From time to time, it'll check for updates in the local copy and refresh its cache if validation passes.
 
-Workbench2 retrieves the vocabulary file URL from the cluster config as shown:
+h2. Configuration
+
+The site administrator should place the JSON vocabulary file on the same host as the controller service and set up the config file as follows:
 
 <notextile>
 <pre><code>Cluster:
   zzzzz:
-    Workbench:
-      VocabularyURL: <span class="userinput">https://site.example.com/vocabulary.json</span>
+    API:
+      VocabularyPath: <span class="userinput">/etc/arvados/vocabulary.json</span>
 </code></pre>
 </notextile>
 
@@ -35,10 +37,10 @@ Keys and values are indexed by identifiers so that the concept of a term is pres
 The following is an example of a vocabulary definition:
 
 {% codeblock as json %}
-{% include 'wb2_vocabulary_example' %}
+{% include 'metadata_vocabulary_example' %}
 {% endcodeblock %}
 
-If the @strict_tags@ flag at the root level is @true@, it will restrict the users from saving property keys other than the ones defined in the vocabulary. Take notice that this restriction is at the client level on Workbench2, it doesn't limit the user's ability to set any arbitrary property via other means (e.g. Python SDK or CLI commands)
+If the @strict_tags@ flag at the root level is @true@, it will restrict the users from saving property keys other than the ones defined in the vocabulary. This restriction is enforced at the backend level to ensure consistency across different clients.
 
 Inside the @tags@ member, IDs are defined (@IDTAGANIMALS@, @IDTAGCOMMENT@, @IDTAGIMPORTANCES@) and can have any format that the current application requires. Every key will declare at least a @labels@ list with zero or more label objects.
 
index 0aea90bd0ddab04164ee6a668e26c1851ab6e934..c4299746e0228942d5fbc68031df969a5be94da5 100644 (file)
@@ -292,7 +292,7 @@ Workbench 2 is now ready for regular use.  Follow the instructions to "install w
 
 h3. New property vocabulary format for Workbench2
 
-(feature "#14151":https://dev.arvados.org/issues/14151) Workbench2 supports a new vocabulary format and it isn't compatible with the previous one, please read the "workbench2 vocabulary format admin page":{{site.baseurl}}/admin/workbench2-vocabulary.html for more information.
+(feature "#14151":https://dev.arvados.org/issues/14151) Workbench2 supports a new vocabulary format and it isn't compatible with the previous one, please read the "metadata vocabulary format admin page":{{site.baseurl}}/admin/metadata-vocabulary.html for more information.
 
 h3. Cloud installations only: node manager replaced by arvados-dispatch-cloud
 
index f3a320b10251745f64a8d7eece1e36fb73628e6a..c9a1c7012659fd1a3b629431441dcda69f018a68 100644 (file)
@@ -75,7 +75,7 @@ server {
 
 h2. Vocabulary configuration (optional)
 
-Workbench2 can load a vocabulary file which lists available metadata properties for groups and collections.  To configure the property vocabulary definition, please visit the "Workbench2 Vocabulary Format":{{site.baseurl}}/admin/workbench2-vocabulary.html page in the Admin section.
+Workbench2 can load a vocabulary file which lists available metadata properties for groups and collections.  To configure the property vocabulary definition, please visit the "Metadata Vocabulary Format":{{site.baseurl}}/admin/metadata-vocabulary.html page in the Admin section.
 
 {% assign arvados_component = 'arvados-workbench2' %}
 
index 97ded6bf6863739e23ed53d365be8db1014a5b35..378690ad5aef257aa627c6a70020c415f8e2ba8e 100644 (file)
@@ -234,6 +234,12 @@ Clusters:
       # Timeout on requests to internal Keep services.
       KeepServiceRequestTimeout: 15s
 
+      # Vocabulary file path, local to the node running the controller.
+      # This JSON file should contain the description of what's allowed
+      # as object's metadata. Its format is described at:
+      # https://doc.arvados.org/admin/metadata-vocabulary.html
+      VocabularyPath: ""
+
     Users:
       # Config parameters to automatically setup new users.  If enabled,
       # this users will be able to self-activate.  Enable this if you want
@@ -1566,7 +1572,6 @@ Clusters:
       DefaultOpenIdPrefix: "https://www.google.com/accounts/o8/id"
 
       # Workbench2 configs
-      VocabularyURL: ""
       FileViewersConfigURL: ""
 
       # Idle time after which the user's session will be auto closed.
index e36d6e76cae40d17c54217e643bf82341e298b87..fe8d45509ec4c6ae0a049239c33e36de362f7f92 100644 (file)
@@ -72,6 +72,7 @@ var whitelist = map[string]bool{
        "API.MaxTokenLifetime":                                false,
        "API.RequestTimeout":                                  true,
        "API.SendTimeout":                                     true,
+       "API.VocabularyPath":                                  false,
        "API.WebsocketClientEventQueue":                       false,
        "API.WebsocketServerEventQueue":                       false,
        "AuditLogs":                                           false,
@@ -276,7 +277,6 @@ var whitelist = map[string]bool{
        "Workbench.UserProfileFormFields.*.*":                 true,
        "Workbench.UserProfileFormFields.*.*.*":               true,
        "Workbench.UserProfileFormMessage":                    true,
-       "Workbench.VocabularyURL":                             true,
        "Workbench.WelcomePageHTML":                           true,
 }
 
index f7849d6142cda6e4353a076a90a561295f7fa034..a1bb2330dfdd9b5b77dc60a63ea0793317652823 100644 (file)
@@ -240,6 +240,12 @@ Clusters:
       # Timeout on requests to internal Keep services.
       KeepServiceRequestTimeout: 15s
 
+      # Vocabulary file path, local to the node running the controller.
+      # This JSON file should contain the description of what's allowed
+      # as object's metadata. Its format is described at:
+      # https://doc.arvados.org/admin/metadata-vocabulary.html
+      VocabularyPath: ""
+
     Users:
       # Config parameters to automatically setup new users.  If enabled,
       # this users will be able to self-activate.  Enable this if you want
@@ -1572,7 +1578,6 @@ Clusters:
       DefaultOpenIdPrefix: "https://www.google.com/accounts/o8/id"
 
       # Workbench2 configs
-      VocabularyURL: ""
       FileViewersConfigURL: ""
 
       # Idle time after which the user's session will be auto closed.
index e736f79fd7f2bcee24e449596b4950bd279881bc..2df0b90577751a4e2dc246a1fa7f4828d3323824 100644 (file)
@@ -102,6 +102,7 @@ type Cluster struct {
                WebsocketClientEventQueue      int
                WebsocketServerEventQueue      int
                KeepServiceRequestTimeout      Duration
+               VocabularyPath                 string
        }
        AuditLogs struct {
                MaxAge             Duration
@@ -273,7 +274,6 @@ type Cluster struct {
                        Options              map[string]struct{}
                }
                UserProfileFormMessage string
-               VocabularyURL          string
                WelcomePageHTML        string
                InactivePageHTML       string
                SSHHelpPageHTML        string