-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: move jupyter and jupyterlab to single host
- Loading branch information
1 parent
871211a
commit 3a94761
Showing
24 changed files
with
378 additions
and
36 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
architecture/decisions/0047-remove-need-for-wildcard-certificates.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# 47. Remove need for wildcard certificates | ||
|
||
Date: 2021-05-13 | ||
|
||
## Status | ||
|
||
Accepted | ||
|
||
## Context | ||
|
||
DataLabs makes extensive use of reverse proxying, to give users access to resources (such as Minio or JupyterLabs). These resources need individually from an external URL to an internal service URL. There are four design options for reverse proxying (<http://sawers.com/blog/reverse-proxying-with-nginx/>): | ||
|
||
1. Subdomain - this allows the external path and internal path to be the same, probably with a default root base path (/). Different services are identified by the external URL's hostname. This has some disadvantages - multiple hostnames require a wildcard certificate, or multiple certificates if a wildcard certificate can not be acquired; and it makes the development environment more difficult, because you can not just use localhost. | ||
2. Port - this also allows the external path and internal path to be the same, probably with a default root base path (/). Different services are identified by the external URL's port. This has the disadvantage that some organisational firewalls restrict http traffic to unusual hosts. | ||
3. Symmetric Path - this allows the external path and internal path to be the same, but with that path configured. Different services are identified by the path. This is the best option, but the internal service must allow the path to be configurable. | ||
4. Asymmetric Path - here the external and internal paths are different. Different services are identifiable by the external path. This requires a search-and-replace of the path on the rendered HTML and JavaScript, so unless these are simple, then this is too fragile. | ||
|
||
Historically DataLabs has used Subdomain proxying. | ||
|
||
## Decision | ||
|
||
Where possible, Symmetric Path or Asymmetric Path proxying should be used. If this is not possible, a ConfigMap option should determine whether the remaining proxying strategy should be Subdomain or Port proxying. | ||
|
||
## Consequences | ||
|
||
* Developer effort is required to develop the different proxying strategies. | ||
* Portability will be improved and local development will be simplified. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import data from './catalogue_asset_repo_config.json'; | ||
|
||
export const catalogueAvailable = () => data.catalogue && data.catalogue.available; | ||
export const catalogueServer = () => catalogueAvailable() && data.catalogue.storage.server; | ||
export const catalogueFileLocation = () => catalogueAvailable() && data.catalogue.storage.rootDirectory; | ||
export const catalogueServer = () => (catalogueAvailable() ? data.catalogue.storage.server : null); | ||
export const catalogueFileLocation = () => (catalogueAvailable() ? data.catalogue.storage.rootDirectory : null); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { JUPYTER, basePath } from './stackTypes'; | ||
|
||
describe('stackTypes', () => { | ||
describe('basePath', () => { | ||
const projectKey = 'project-key'; | ||
const name = 'name'; | ||
it('gives custom base path if type is for single hostname', () => { | ||
expect(basePath(JUPYTER, projectKey, name)).toEqual('/resource/project-key/name'); | ||
}); | ||
|
||
it('gives root base path if type is for multiple hostname', () => { | ||
expect(basePath('assumed-to-be-multiple', projectKey, name)).toEqual('/'); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.