Customization in servers.json for docker instance
I'm trying to apply customization to my Ubuntu/Docker/GPU free setup ( on 7.xx instance).
Despite having the line:
"customStyles": {
"logoURL": "link to web png image"
}
I cannot see to new logo in the dashboard existing nor in the new ones.
Also, some other lines seems not working, for example:
"username": "user1",
"password": "******",
"loadDashboard": "4"
shouldn't the user1 enter directly into the dashboard 4 in default mode since the user log in?
Instead, the user enter into the Dashboard list.
It seems to me that the setup into the servers.json is not working, apart the "enableJupyter": true" line: Jupyter is enabled, therefore the link to the json file into my heavy.conf should be right:
[web]
jupyter-url = "http://jupyterhub:8000"
servers-json = "/var/lib/heavyai/servers.json"
-
Hi Gianfranco,
Probably the web server hasn't correctly loaded the intended server.json file for an error in the JSON, or because of a wrong mapping of the filesystem in docker.
To ensure which server.json file has been loaded and if it has without errors, open Immerse and check for the webserver logs using /logs/all URI.
Using this server.json file[ { "database": "heavyai", "port": "6273", "username": "admin", "password": "HyperInteractive", "feature_flags": { "ui/default_theme": "dark", "ui/hide_deprecated_chart_types": false, "ui/enable_crosslink_panel" : true, "ui/enable_linked_zoom": true, "ui/enable_global_custom_sql": true, "ui/enable_dashboard_shared_custom_sql": true, "ui/enable_custom_source_manager": true, "ui/enable_3d_chart": true, "ui/session_create_timeout": 15000, "ui/enable_cross_section_chart": true, "ui/enable_joins": true }, "loadDashboard": 2, "login_panel_databases": ["heavyai","commuting","verizon","information_schema","vattelapesca","123 stella", "database 4", "database 5", "database 7"], "customStyles": {
"logoURL": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTjsScWYmyfPv3XdkNdEFVJ1wlDKMOgcSWUcg&usqp=CA"
"loginText": "Log into your Heavyai custom workstation" } } ]
On Immerse, when entered the localhost:6273 URL, the system logged in automatically using the specified user and password, opening the dashboard specified with the loadDashbaord property.
I'm on 7.1, but the different release isn't crucial in this case.
Regards,
Candido -
Thanks for all the useful info.
I checked the /all/logs messages after login with "admin" user, and I get:
time="2023-10-16T08:24:14Z" level=info msg="Using servers.json file at /var/lib/heavyai/servers.json" time="2023-10-16T08:24:15Z" level=error msg="Unable to find or retrieve license: Post \"http://localhost:6278\": dial tcp 127.0.0.1:6278: connect: connection refused" time="2023-10-16T08:24:15Z" level=info msg="Using config file at /var/lib/heavyai/heavy.conf"
It seems to me that the json is correctly retrieved and parsed.
In the same log I see a strange message, on the second row :
time="2023-10-16T08:24:15Z" level=error msg="Unable to find or retrieve license: Post \"http://localhost:6278\": dial tcp 127.0.0.1:6278: connect: connection refused"
This is strange, because the db and Immerse are both working fine, and I have no connection refused in reality.
Anyway, I am sure that the path of heavy.conf and servers.json, namely /var/lib/heavyai/, is accessible by Docker ( I enter into the container, go to the path, and I get the content of the host system).
Also, the log does not show any error in parsing the json.
This is the json in /var/lib/heavyai/ that I'm testing, checked with a json validator:
[
{
"enableJupyter": true
},
{
"database": "heavyai",
"port": "6273",
"host": "localhost",
"username": "user1",
"password": "******",
"loadDashboard": "4",
"customStyles": {
"logoURL": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTjsScWYmyfPv3XdkNdEFVJ1wlDKMOgcSWUcg&usqp=CA",
"loginTest": "test login custoom",
"title": "test title custom"
}
}
]BUT: If I login with the user "user1" configured in the json, I have no log at all, no lines at the URI: http://localhost:6273/logs/all.
-
Just solved:
I had to insert the ""enableJupyter": true" into the second paragraph, among the others parameters:
[
{
"database": "heavyai",
"port": "6273",
"host": "localhost",
"username": "admin",
"password": "HyperInteractive",
"loadDashboard": "4",
"enableJupyter": true,
"customStyles": {
"logoURL": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTjsScWYmyfPv3XdkNdEFVJ1wlDKMOgcSWUcg&usqp=CA",
"loginTest": "test login custoom",
"title": "test title custom"
}
}
]Now the json config is working fine. So I have to use only a single paragraph into the json as your example?
I noted that both admin and user1 enter directly into the dashboard 4.
Is this s a normal behavior with this json file, where I only indicated admin?
I would like to set a different dashboard number for each user: is this possible?
Please sign in to leave a comment.
Comments
5 comments