Skip to content

Fixes and documentation for session routing in GDK

The following discussion from gitlab-org/cells/http-router!233 (merged) should be addressed:

  • @tkuah started a discussion: (+5 comments)

    Testing

    Try if it works with GDK

    Testing this is quite difficult. Lots of things to setup.

    TODO: Document this.

    1. Update ../gitlab-topology-service/config.toml to use the cell-1's address
      address = "gdk.test:12001"
      session_prefix = "cell-1"
    2. Update ../gitlab-cells/cell-1/gdk.yml to disable gitlab_topology_service, and also to set a session prefix to match:
      gitlab:
        rails:
         session_store:
            session_cookie_token_prefix: cell-1
      gitlab_http_router:
        enabled: false
      gitlab_topology_service:
        enabled: false
    3. gdk restart gitlab-topology-service
    4. gdk cells cell-1 reconfigure
    5. gdk cells cell-1 restart
    6. cd ../gitlab-http-router, and then switch to this branch
    7. cd -
    8. Edit Procfile to add --var GITLAB_RULES_CONFIG:session_prefix to the gitlab-http-router line.
    9. gdk restart gitlab-http-router
    10. Run gdk tail gitlab-http-router to show logs
    11. Add a force-cell cookie with value cell-1. This should make the router start to classify cell-1, and then route to gdk.test:12001 instead.
    12. Login using a username and password that can log into cell-1.
    13. Delete the force-cell cookie. We should still be routed to gdk.test:12001.
    14. (Optional) Set unique_cookie_key_postfix to false

TODO: Document/FIX GDK

Edited by Bojan Marjanovic