Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update install instructions for basepath #88

Closed
prasadtalasila opened this issue Jun 30, 2023 · 1 comment
Closed

Update install instructions for basepath #88

prasadtalasila opened this issue Jun 30, 2023 · 1 comment
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@prasadtalasila
Copy link
Contributor

prasadtalasila commented Jun 30, 2023

The updates required to make the application work with basepath (say bar):

1. Change the Gitlab OAuth URLs to include basepath

  REACT_APP_AUTH_AUTHORITY: 'https://gitlab.foo.com/',
  REACT_APP_REDIRECT_URI: 'https://foo.com/bar/Library',
  REACT_APP_LOGOUT_REDIRECT_URI: 'https://foo.com/bar',

2. Update traefik gateway config (deploy/config/gateway/fileConfig.yml)

http:
  routers:
    dtaas:
      entryPoints:
        - http
      rule: 'Host(`foo.com`)' #remember, there is no basepath for this rule
      middlewares:
        - basic-auth
      service: dtaas

    user1:
      entryPoints:
        - http
      rule: 'Host(`foo.com`) && PathPrefix(`/bar/user1`)'
      middlewares:
        - basic-auth
      service: user1

  # Middleware: Basic authentication
  middlewares:
    basic-auth:
      basicAuth:
        usersFile: '/etc/traefik/auth'
        removeHeader: true

  services:
    dtaas:
      loadBalancer:
        servers:
          - url: 'http://localhost:4000'

    user1:
      loadBalancer:
        servers:
          - url: 'http://localhost:8090'

3. Update deploy/config/client/env.js

Use docs/admin/client/CLIENT.md for an example

4. Update install scripts

Update deploy/install.sh by adding basepath. For example,

WORKSPACE_BASE_URL="bar/" for all user workspaces.

For user1, the docker command becomes:

docker run -d \
 -p 8090:8080 \
  --name "ml-workspace-user1" \
  -v "${TOP_DIR}/files/user1:/workspace" \
  -v "${TOP_DIR}/files/common:/workspace/common" \
  --env AUTHENTICATE_VIA_JUPYTER="" \
  --env WORKSPACE_BASE_URL="bar/user1" \
  --shm-size 512m \
  --restart always \
  mltooling/ml-workspace:0.13.2 || true

5. Proceed with install using deploy/install.sh

@prasadtalasila
Copy link
Contributor Author

PR #300 completes the work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants