Commit 0bd7c9fa authored by Jérome Perrin's avatar Jérome Perrin

metabase wip

parent 721ba78d
[instance-profile] [instance-profile]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = b2a0acafc7dc9f7592be5ffd9459ffcd md5sum = 5355b75d006d355fe5da7448e8ae68fd
...@@ -29,7 +29,7 @@ environment = ...@@ -29,7 +29,7 @@ environment =
hash-existing-files = hash-existing-files =
$${buildout:directory}/software_release/buildout.cfg $${buildout:directory}/software_release/buildout.cfg
ip = $${instance-parameter:ipv6-random} ip = $${instance-parameter:ipv6-random}
port = 8443 port = 8443
# XXX It does not seem we can prevent metabase to also listen on http, so we # XXX It does not seem we can prevent metabase to also listen on http, so we
# give it an http port, but don't use it. # give it an http port, but don't use it.
...@@ -42,10 +42,9 @@ promises = ...@@ -42,10 +42,9 @@ promises =
[metabase-promise] [metabase-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_port_listening module = check_url_available
name = $${:_buildout_section_name_}.py name = $${:_buildout_section_name_}.py
config-hostname= $${metabase-instance:ip} config-url= $${metabase-instance:url}/api/session/properties
config-port = $${metabase-instance:port}
[metabase-keystore] [metabase-keystore]
recipe = plone.recipe.command recipe = plone.recipe.command
...@@ -55,7 +54,7 @@ command = ...@@ -55,7 +54,7 @@ command =
-alias "metabase" \ -alias "metabase" \
-keyalg RSA \ -keyalg RSA \
-keypass "$${:password}" \ -keypass "$${:password}" \
-dname "CN=metabase,OU=Unit,O=Organization,L=City,S=State,C=Country" \ -dname "CN=$${metabase-instance:ip},OU=Unit,O=Organization,L=City,S=State,C=Country" \
-keystore "$${:file}" \ -keystore "$${:file}" \
-storepass "$${:password}" -storepass "$${:password}"
file = $${directory:etc}/.metabase_keystore file = $${directory:etc}/.metabase_keystore
......
...@@ -47,19 +47,9 @@ class TestMetabaseSetup(MetabaseTestCase): ...@@ -47,19 +47,9 @@ class TestMetabaseSetup(MetabaseTestCase):
self.assertTrue(resp.text) self.assertTrue(resp.text)
# get a setup token as described in https://github.com/metabase/metabase/issues/4240#issuecomment-290717451 # get a setup token as described in https://github.com/metabase/metabase/issues/4240#issuecomment-290717451
# XXX this can timeout for some reasons, maybe a race condition in metabase, but if properties = requests.get(
# we retry it seems to work parse.urljoin(url, '/api/session/properties'), verify=False,
try: timeout=10).json()
properties = requests.get(
parse.urljoin(url, '/api/session/properties'),
verify=False,
timeout=10).json()
except requests.ReadTimeout:
self.logger.exception("getting setup token failed, retrying")
properties = requests.get(
parse.urljoin(url, '/api/session/properties'),
verify=False,
timeout=10).json()
email = "youlooknicetoday@email.com" email = "youlooknicetoday@email.com"
password = "password123456" password = "password123456"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment