[ARVADOS] updated: 1.3.0-1479-g5eb512e7b

Git user git at public.curoverse.com
Mon Aug 12 18:44:41 UTC 2019


Summary of changes:
 doc/install/install-keep-web.html.textile.liquid | 22 ++++++++------
 lib/config/config.default.yml                    |  5 ----
 lib/config/generated_config.go                   |  5 ----
 lib/config/load.go                               |  9 ++----
 services/keep-web/handler_test.go                |  5 ++--
 services/keep-web/main.go                        |  2 +-
 services/keep-web/server.go                      |  3 ++
 services/keep-web/server_test.go                 | 37 +++++++++++++-----------
 8 files changed, 43 insertions(+), 45 deletions(-)

       via  5eb512e7b6ff3a0d9f14591fe6bf611dde5cc27c (commit)
       via  7abf74e3ad723ed8aed4d13e794a8f6ad6f44059 (commit)
       via  e0fd2e426856a6593f2c86c60831f0f867f4f83d (commit)
       via  0efb729a71577d400d93b8db56975a4232ec9c6b (commit)
       via  6893f07253b37deac06aefdaedbadfb730254026 (commit)
      from  38821eb2984f73e62bf21fd214890864a8ad9d47 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 5eb512e7b6ff3a0d9f14591fe6bf611dde5cc27c
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date:   Mon Aug 12 15:42:41 2019 -0300

    14716: Removes test config loading func that short-circuited load mechanism.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>

diff --git a/services/keep-web/handler_test.go b/services/keep-web/handler_test.go
index fe8e767c4..ba0f76835 100644
--- a/services/keep-web/handler_test.go
+++ b/services/keep-web/handler_test.go
@@ -31,8 +31,9 @@ type UnitSuite struct {
 }
 
 func (s *UnitSuite) SetUpTest(c *check.C) {
-	ldr := config.NewLoader(nil, nil)
-	cfg, err := ldr.LoadDefaults()
+	ldr := config.NewLoader(bytes.NewBufferString("Clusters: {zzzzz: {}}"), nil)
+	ldr.Path = "-"
+	cfg, err := ldr.Load()
 	c.Assert(err, check.IsNil)
 	s.Config = cfg
 }
diff --git a/services/keep-web/server_test.go b/services/keep-web/server_test.go
index 12596b16b..0607a7665 100644
--- a/services/keep-web/server_test.go
+++ b/services/keep-web/server_test.go
@@ -5,6 +5,7 @@
 package main
 
 import (
+	"bytes"
 	"crypto/md5"
 	"encoding/json"
 	"fmt"
@@ -408,21 +409,6 @@ func (s *IntegrationSuite) TestMetrics(c *check.C) {
 	c.Check(resp.StatusCode, check.Equals, http.StatusNotFound)
 }
 
-func (s *IntegrationSuite) SetUpSuite(c *check.C) {
-	arvadostest.StartAPI()
-	arvadostest.StartKeep(2, true)
-
-	arv, err := arvadosclient.MakeArvadosClient()
-	c.Assert(err, check.Equals, nil)
-	arv.ApiToken = arvadostest.ActiveToken
-	kc, err := keepclient.MakeKeepClient(arv)
-	c.Assert(err, check.Equals, nil)
-	kc.PutB([]byte("Hello world\n"))
-	kc.PutB([]byte("foo"))
-	kc.PutB([]byte("foobar"))
-	kc.PutB([]byte("waz"))
-}
-
 func (s *UnitSuite) TestLegacyConfig(c *check.C) {
 	content := []byte(`
 {
@@ -483,6 +469,21 @@ func (s *UnitSuite) TestLegacyConfig(c *check.C) {
 	c.Check(cfg.cluster.ManagementToken, check.Equals, "xyzzy")
 }
 
+func (s *IntegrationSuite) SetUpSuite(c *check.C) {
+	arvadostest.StartAPI()
+	arvadostest.StartKeep(2, true)
+
+	arv, err := arvadosclient.MakeArvadosClient()
+	c.Assert(err, check.Equals, nil)
+	arv.ApiToken = arvadostest.ActiveToken
+	kc, err := keepclient.MakeKeepClient(arv)
+	c.Assert(err, check.Equals, nil)
+	kc.PutB([]byte("Hello world\n"))
+	kc.PutB([]byte("foo"))
+	kc.PutB([]byte("foobar"))
+	kc.PutB([]byte("waz"))
+}
+
 func (s *IntegrationSuite) TearDownSuite(c *check.C) {
 	arvadostest.StopKeep(2)
 	arvadostest.StopAPI()
@@ -490,8 +491,10 @@ func (s *IntegrationSuite) TearDownSuite(c *check.C) {
 
 func (s *IntegrationSuite) SetUpTest(c *check.C) {
 	arvadostest.ResetEnv()
-	ldr := config.NewLoader(nil, nil)
-	arvCfg, err := ldr.LoadDefaults()
+	ldr := config.NewLoader(bytes.NewBufferString("Clusters: {zzzzz: {}}"), nil)
+	ldr.Path = "-"
+	arvCfg, err := ldr.Load()
+	c.Check(err, check.IsNil)
 	cfg := DefaultConfig(arvCfg)
 	c.Assert(err, check.IsNil)
 	cfg.Client = arvados.Client{

commit 7abf74e3ad723ed8aed4d13e794a8f6ad6f44059
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date:   Mon Aug 12 15:42:01 2019 -0300

    14716: Fixes on config loading.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>

diff --git a/lib/config/load.go b/lib/config/load.go
index 58747829b..3413e3bec 100644
--- a/lib/config/load.go
+++ b/lib/config/load.go
@@ -135,6 +135,9 @@ func (ldr *Loader) MungeLegacyConfigArgs(lgr logrus.FieldLogger, args []string,
 	if legacyConfigArg != "-legacy-ws-config" {
 		ldr.WebsocketPath = ""
 	}
+	if legacyConfigArg != "-legacy-keepweb-config" {
+		ldr.KeepWebPath = ""
+	}
 
 	return munged
 }
@@ -151,12 +154,6 @@ func (ldr *Loader) loadBytes(path string) ([]byte, error) {
 	return ioutil.ReadAll(f)
 }
 
-func (ldr *Loader) LoadDefaults() (*arvados.Config, error) {
-	ldr.configdata = []byte(`Clusters: {zzzzz: {}}`)
-	defer func() { ldr.configdata = nil }()
-	return ldr.Load()
-}
-
 func (ldr *Loader) Load() (*arvados.Config, error) {
 	if ldr.configdata == nil {
 		buf, err := ldr.loadBytes(ldr.Path)
diff --git a/services/keep-web/server.go b/services/keep-web/server.go
index 28a9dde24..b81c25175 100644
--- a/services/keep-web/server.go
+++ b/services/keep-web/server.go
@@ -32,6 +32,9 @@ func (srv *server) Start() error {
 	for listen = range srv.Config.cluster.Services.WebDAV.InternalURLs {
 		break
 	}
+	if len(srv.Config.cluster.Services.WebDAV.InternalURLs) > 1 {
+		logrus.Warn("Services.WebDAV.InternalURLs has more than one key; picked: ", listen)
+	}
 	srv.Addr = listen.Host
 	return srv.Server.Start()
 }

commit e0fd2e426856a6593f2c86c60831f0f867f4f83d
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date:   Mon Aug 12 11:46:06 2019 -0300

    14716: Fixes yaml lib being used.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>

diff --git a/services/keep-web/main.go b/services/keep-web/main.go
index 9dae50a8a..4a23bebe3 100644
--- a/services/keep-web/main.go
+++ b/services/keep-web/main.go
@@ -12,8 +12,8 @@ import (
 	"git.curoverse.com/arvados.git/lib/config"
 	"git.curoverse.com/arvados.git/sdk/go/arvados"
 	"github.com/coreos/go-systemd/daemon"
+	"github.com/ghodss/yaml"
 	log "github.com/sirupsen/logrus"
-	yaml "gopkg.in/yaml.v2"
 )
 
 var (

commit 0efb729a71577d400d93b8db56975a4232ec9c6b
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date:   Fri Aug 9 21:34:56 2019 -0300

    14716: Removes duplicated key from a past merge.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>

diff --git a/lib/config/config.default.yml b/lib/config/config.default.yml
index 7fd630618..8fe8762c2 100644
--- a/lib/config/config.default.yml
+++ b/lib/config/config.default.yml
@@ -251,11 +251,6 @@ Clusters:
       NewUserNotificationRecipients: {}
       NewInactiveUserNotificationRecipients: {}
 
-      # Set anonymous_user_token to enable anonymous user access. You can get
-      # the token by running "bundle exec ./script/get_anonymous_user_token.rb"
-      # in the directory where your API server is running.
-      AnonymousUserToken: ""
-
       # Set AnonymousUserToken to enable anonymous user access. You can get
       # the token by running "bundle exec ./script/get_anonymous_user_token.rb"
       # in the directory where your API server is running.
diff --git a/lib/config/generated_config.go b/lib/config/generated_config.go
index 14bbf33db..8413017b4 100644
--- a/lib/config/generated_config.go
+++ b/lib/config/generated_config.go
@@ -257,11 +257,6 @@ Clusters:
       NewUserNotificationRecipients: {}
       NewInactiveUserNotificationRecipients: {}
 
-      # Set anonymous_user_token to enable anonymous user access. You can get
-      # the token by running "bundle exec ./script/get_anonymous_user_token.rb"
-      # in the directory where your API server is running.
-      AnonymousUserToken: ""
-
       # Set AnonymousUserToken to enable anonymous user access. You can get
       # the token by running "bundle exec ./script/get_anonymous_user_token.rb"
       # in the directory where your API server is running.

commit 6893f07253b37deac06aefdaedbadfb730254026
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date:   Fri Aug 9 21:30:55 2019 -0300

    14716: Fixes install documentation.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>

diff --git a/doc/install/install-keep-web.html.textile.liquid b/doc/install/install-keep-web.html.textile.liquid
index 08dc186e8..f4da678f8 100644
--- a/doc/install/install-keep-web.html.textile.liquid
+++ b/doc/install/install-keep-web.html.textile.liquid
@@ -82,10 +82,10 @@ Set the cluster config file like the following:
         Insecure: false
       WebDAV:
         InternalURLs:
-          "http://:9002/": {}
+          "http://keep_web_hostname_goes_here:9002/": {}
       WebDAVDownload:
         InternalURLs:
-          "http://:9002/": {}
+          "http://keep_web_hostname_goes_here:9002/": {}
         ExternalURL: "https://download.<span class="userinput">uuid_prefix</span>.your.domain/"
     Users:
       AnonymousUserToken: "xxxxxxxxxxxxxxxxxxxx"
@@ -97,13 +97,17 @@ Set the cluster config file like the following:
 The basic command to start Keep-web in the service run script is:
 
 <notextile>
-<pre><code>exec sudo -u nobody keep-web -config=/path/to/arvados.yml
+<pre><code>exec sudo -u nobody keep-web
 </code></pre>
 </notextile>
 
+{% include 'notebox_begin' %}
+Please take into consideration that the config file should be world-readable.
+{% include 'notebox_end' %}
+
 Set @Users.AnonymousUserToken: ""@ (empty string) if you do not want to serve public data.
 
-Set @Services.Controller.Insecure: true@ if your API server's TLS certificate is not signed by a recognized CA.
+Set @TLS.Insecure: true@ if your API server's TLS certificate is not signed by a recognized CA.
 
 h3. Set up a reverse proxy with TLS support
 
@@ -166,14 +170,14 @@ h3. Tell Workbench about the Keep-web service
 
 Workbench has features like "download file from collection" and "show image" which work better if the content is served by Keep-web rather than Workbench itself. We recommend using the two different hostnames ("download" and "collections" above) for file downloads and inline content respectively.
 
-Add the following entry to your Workbench cluster configuration file (@/etc/arvados/config.yml@). This URL will be used for file downloads.
+Add the following entry to your cluster configuration file (@/etc/arvados/config.yml@). This URL will be used for file downloads.
 
 <notextile>
 <pre><code>Clusters:
   zzzzz:
     Services:
       WebDAVDownload:
-        ExternalURL: "https://download.<span class="userinput">uuid_prefix</span>.your.domain/c=%{uuid_or_pdh}"
+        ExternalURL: "https://download.<span class="userinput">uuid_prefix</span>.your.domain/"
 </code></pre>
 </notextile>
 
@@ -184,8 +188,8 @@ Additionally, add *one* of the following entries to your Workbench cluster confi
   zzzzz:
     Services:
       WebDAV:
-        ExternalURL: "https://%{uuid_or_pdh}--collections.<span class="userinput">uuid_prefix</span>.your.domain"
-        ExternalURL: "https://%{uuid_or_pdh}.collections.<span class="userinput">uuid_prefix</span>.your.domain"
-        ExternalURL: "https://collections.<span class="userinput">uuid_prefix</span>.your.domain/c=%{uuid_or_pdh}"
+        ExternalURL: "https://*--collections.<span class="userinput">uuid_prefix</span>.your.domain"
+        ExternalURL: "https://*.collections.<span class="userinput">uuid_prefix</span>.your.domain"
+        ExternalURL: "https://collections.<span class="userinput">uuid_prefix</span>.your.domain"
 </code></pre>
 </notextile>

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list