| | | |
Offset 1469, 14 lines modified | Offset 1469, 134 lines modified |
1469 | #··respond.·Callers·of·spawner.start·will·assume·that·startup·has·failed·if·it | 1469 | #··respond.·Callers·of·spawner.start·will·assume·that·startup·has·failed·if·it |
1470 | #··takes·longer·than·this.·start·should·return·when·the·server·process·is·started | 1470 | #··takes·longer·than·this.·start·should·return·when·the·server·process·is·started |
1471 | #··and·its·location·is·known. | 1471 | #··and·its·location·is·known. |
1472 | #··Default:·60 | 1472 | #··Default:·60 |
1473 | #·c.Spawner.start_timeout·=·60 | 1473 | #·c.Spawner.start_timeout·=·60 |
| |
1474 | #------------------------------------------------------------------------------ | 1474 | #------------------------------------------------------------------------------ |
| 1475 | #·CryptKeeper(SingletonConfigurable)·configuration |
| 1476 | #------------------------------------------------------------------------------ |
| 1477 | ##·Encapsulate·encryption·configuration |
| 1478 | #·· |
| 1479 | #··Use·via·the·encryption_config·singleton·below. |
| |
| 1480 | #··Default:·[] |
| 1481 | #·c.CryptKeeper.keys·=·[] |
| |
| 1482 | ##·The·number·of·threads·to·allocate·for·encryption |
| 1483 | #··Default:·42 |
| 1484 | #·c.CryptKeeper.n_threads·=·42 |
| |
| 1485 | #------------------------------------------------------------------------------ |
| 1486 | #·Proxy(LoggingConfigurable)·configuration |
| 1487 | #------------------------------------------------------------------------------ |
| 1488 | ##·Base·class·for·configurable·proxies·that·JupyterHub·can·use. |
| 1489 | #·· |
| 1490 | #··A·proxy·implementation·should·subclass·this·and·must·define·the·following |
| 1491 | #··methods: |
| 1492 | #·· |
| 1493 | #··-·:meth:`.get_all_routes`·return·a·dictionary·of·all·JupyterHub-related·routes |
| 1494 | #··-·:meth:`.add_route`·adds·a·route·-·:meth:`.delete_route`·deletes·a·route |
| 1495 | #·· |
| 1496 | #··In·addition·to·these,·the·following·method(s)·may·need·to·be·implemented: |
| 1497 | #·· |
| 1498 | #··-·:meth:`.start`·start·the·proxy,·if·it·should·be·launched·by·the·Hub |
| 1499 | #····instead·of·externally·managed. |
| 1500 | #····If·the·proxy·is·externally·managed,·it·should·set·:attr:`should_start`·to·False. |
| 1501 | #··-·:meth:`.stop`·stop·the·proxy.·Only·used·if·:meth:`.start`·is·also·used. |
| 1502 | #·· |
| 1503 | #··And·the·following·method(s)·are·optional,·but·can·be·provided: |
| 1504 | #·· |
| 1505 | #··-·:meth:`.get_route`·gets·a·single·route. |
| 1506 | #····There·is·a·default·implementation·that·extracts·data·from·:meth:`.get_all_routes`, |
| 1507 | #····but·implementations·may·choose·to·provide·a·more·efficient·implementation |
| 1508 | #····of·fetching·a·single·route. |
| |
| 1509 | ##·Additional·routes·to·be·maintained·in·the·proxy. |
| 1510 | #·· |
| 1511 | #··A·dictionary·with·a·route·specification·as·key,·and·a·URL·as·target.·The·hub |
| 1512 | #··will·ensure·this·route·is·present·in·the·proxy. |
| 1513 | #·· |
| 1514 | #··If·the·hub·is·running·in·host·based·mode·(with·JupyterHub.subdomain_host·set), |
| 1515 | #··the·routespec·*must*·have·a·domain·component·(example.com/my-url/).·If·the·hub |
| 1516 | #··is·not·running·in·host·based·mode,·the·routespec·*must·not*·have·a·domain |
| 1517 | #··component·(/my-url/). |
| 1518 | #·· |
| 1519 | #··Helpful·when·the·hub·is·running·in·API-only·mode. |
| 1520 | #··Default:·{} |
| 1521 | #·c.Proxy.extra_routes·=·{} |
| |
| 1522 | ##·Should·the·Hub·start·the·proxy |
| 1523 | #·· |
| 1524 | #··········If·True,·the·Hub·will·start·the·proxy·and·stop·it. |
| 1525 | #··········Set·to·False·if·the·proxy·is·managed·externally, |
| 1526 | #··········such·as·by·systemd,·docker,·or·another·service·manager. |
| 1527 | #··Default:·True |
| 1528 | #·c.Proxy.should_start·=·True |
| |
| 1529 | #------------------------------------------------------------------------------ |
| 1530 | #·ConfigurableHTTPProxy(Proxy)·configuration |
| 1531 | #------------------------------------------------------------------------------ |
| 1532 | ##·Proxy·implementation·for·the·default·configurable-http-proxy. |
| 1533 | #·· |
| 1534 | #··This·is·the·default·proxy·implementation·for·running·the·nodejs·proxy |
| 1535 | #··`configurable-http-proxy`. |
| 1536 | #·· |
| 1537 | #··If·the·proxy·should·not·be·run·as·a·subprocess·of·the·Hub,·(e.g.·in·a·separate |
| 1538 | #··container),·set:: |
| 1539 | #·· |
| 1540 | #······c.ConfigurableHTTPProxy.should_start·=·False |
| |
| 1541 | ##·The·ip·(or·hostname)·of·the·proxy's·API·endpoint |
| 1542 | #··Default:·'' |
| 1543 | #·c.ConfigurableHTTPProxy.api_url·=·'' |
| |
| 1544 | ##·The·Proxy·auth·token |
| 1545 | #·· |
| 1546 | #··········Loaded·from·the·CONFIGPROXY_AUTH_TOKEN·env·variable·by·default. |
| 1547 | #··Default:·'' |
| 1548 | #·c.ConfigurableHTTPProxy.auth_token·=·'' |
| |
| 1549 | ##·Interval·(in·seconds)·at·which·to·check·if·the·proxy·is·running. |
| 1550 | #··Default:·5 |
| 1551 | #·c.ConfigurableHTTPProxy.check_running_interval·=·5 |
| |
| 1552 | ##·The·command·to·start·the·proxy |
| 1553 | #··Default:·['configurable-http-proxy'] |
| 1554 | #·c.ConfigurableHTTPProxy.command·=·['configurable-http-proxy'] |
| |
| 1555 | ##·The·number·of·requests·allowed·to·be·concurrently·outstanding·to·the·proxy |
| 1556 | #·· |
| 1557 | #··Limiting·this·number·avoids·potential·timeout·errors·by·sending·too·many |
| 1558 | #··requests·to·update·the·proxy·at·once |
| 1559 | #··Default:·10 |
| 1560 | #·c.ConfigurableHTTPProxy.concurrency·=·10 |
| |
| 1561 | ##·Add·debug-level·logging·to·the·Proxy. |
| 1562 | #··Default:·False |
| 1563 | #·c.ConfigurableHTTPProxy.debug·=·False |
| |
| 1564 | ##· |
| 1565 | #··See·also:·Proxy.extra_routes |
| 1566 | #·c.ConfigurableHTTPProxy.extra_routes·=·{} |
| |
| 1567 | ##·Proxy·log·level |
| 1568 | #··Choices:·any·of·['debug',·'info',·'warn',·'error']·(case-insensitive) |
| 1569 | #··Default:·'info' |
| 1570 | #·c.ConfigurableHTTPProxy.log_level·=·'info' |
| |
| 1571 | ##·File·in·which·to·write·the·PID·of·the·proxy·process. |
| 1572 | #··Default:·'jupyterhub-proxy.pid' |
| 1573 | #·c.ConfigurableHTTPProxy.pid_file·=·'jupyterhub-proxy.pid' |
| |
| 1574 | ##·Should·the·Hub·start·the·proxy |
| 1575 | #··See·also:·Proxy.should_start |
| 1576 | #·c.ConfigurableHTTPProxy.should_start·=·True |
| |
| 1577 | #------------------------------------------------------------------------------ |
Max diff block lines reached; 15503/20443 bytes (75.84%) of diff not shown.
|