Customization in servers.json for docker instance

Comments

5 comments

  • Avatar
    Candido Dessanti

    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

    0
    Comment actions Permalink
  • Avatar
    Gianfranco Campana

    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.


     

     

     

     

    0
    Comment actions Permalink
  • Avatar
    Gianfranco Campana

    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?

     

     

    0
    Comment actions Permalink
  • Avatar
    Candido Dessanti

    Hi Gianfranco,

    I don't think that's possible. AFAIK using SAML or LDAP alone, each use can have  adefault database, but I don't think you associate the users to specific dashboards.

     

     

    0
    Comment actions Permalink
  • Avatar
    Gianfranco Campana

    Thank you Candido. Maybe this could possibly be added to the next feature releases.

    Cheers.

    0
    Comment actions Permalink

Please sign in to leave a comment.