Compare commits
1166 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
bcf5f49dd6 | ||
![]() |
522f9d44d9 | ||
![]() |
b29e35650d | ||
![]() |
168fa5c699 | ||
![]() |
cca80bc284 | ||
![]() |
a49c0fdb02 | ||
![]() |
f73c0cea0b | ||
![]() |
46df414d6e | ||
![]() |
8f4942f669 | ||
![]() |
75c947be59 | ||
![]() |
2556cd0691 | ||
![]() |
43fff0a280 | ||
![]() |
d9ce1b917f | ||
![]() |
bf840c65d6 | ||
![]() |
9e5af6f3ca | ||
![]() |
fb1614e20a | ||
![]() |
bb09070e16 | ||
![]() |
e72f0976f9 | ||
![]() |
99b37f1f0f | ||
![]() |
039d457797 | ||
![]() |
cc7662ec87 | ||
![]() |
aa89a63117 | ||
![]() |
9c1944d946 | ||
![]() |
8153e53fb1 | ||
![]() |
3f5d220af4 | ||
![]() |
7d7db9774f | ||
![]() |
01e7d00829 | ||
![]() |
3d7a3393e1 | ||
![]() |
ab40f29056 | ||
![]() |
6c4eba2682 | ||
![]() |
88fe734585 | ||
![]() |
89fa76fae8 | ||
![]() |
2919a2b6c2 | ||
![]() |
af5b3e0c31 | ||
![]() |
c94dcc435c | ||
![]() |
6a17797719 | ||
![]() |
6d7bde996b | ||
![]() |
fdd421bfa9 | ||
![]() |
5e3b1601d7 | ||
![]() |
e766d7a885 | ||
![]() |
f13fb2f12e | ||
![]() |
904e200daf | ||
![]() |
1ae1e66136 | ||
![]() |
7ca2105b80 | ||
![]() |
8820d5c028 | ||
![]() |
a50ed507fe | ||
![]() |
4320f2aff5 | ||
![]() |
102db113cf | ||
![]() |
528c7faf92 | ||
![]() |
b06a0f29ed | ||
![]() |
ce74fdf0a3 | ||
![]() |
48c046359f | ||
![]() |
dc234a79f0 | ||
![]() |
8fd09053a2 | ||
![]() |
634d59dfd5 | ||
![]() |
50dc39b102 | ||
![]() |
772c9e20b7 | ||
![]() |
0eac18bb22 | ||
![]() |
061d267d74 | ||
![]() |
d5e9e3a632 | ||
![]() |
d0523f5e93 | ||
![]() |
b79cb12095 | ||
![]() |
b486fc8abe | ||
![]() |
4d8c3cbf0d | ||
![]() |
6a93abbe1c | ||
![]() |
84ed311902 | ||
![]() |
6c0a0643e8 | ||
![]() |
e3ea59759e | ||
![]() |
aefc8de49a | ||
![]() |
88189d54d9 | ||
![]() |
3fe1e9d510 | ||
![]() |
93a34d9874 | ||
![]() |
f609b00358 | ||
![]() |
9d835a8670 | ||
![]() |
1a04ecde8e | ||
![]() |
6b8dd277a2 | ||
![]() |
0f1acce363 | ||
![]() |
044a916488 | ||
![]() |
47f39e7c2f | ||
![]() |
5424108593 | ||
![]() |
0424f2938b | ||
![]() |
9dc91fb707 | ||
![]() |
1fa4fa32ce | ||
![]() |
4dd36f5988 | ||
![]() |
0f0afa178e | ||
![]() |
c52b308067 | ||
![]() |
8835f79bf9 | ||
![]() |
9d0e8e0861 | ||
![]() |
66c65c93db | ||
![]() |
5aa8d29913 | ||
![]() |
4ec2fe3c19 | ||
![]() |
fcf49be5f6 | ||
![]() |
633aa69623 | ||
![]() |
45a67e2d73 | ||
![]() |
2fe060861a | ||
![]() |
cca49486e3 | ||
![]() |
dfbe7257e6 | ||
![]() |
8c5715621a | ||
![]() |
b05b3a30ab | ||
![]() |
f9fb650a7b | ||
![]() |
3ce2643ab7 | ||
![]() |
3e61e46497 | ||
![]() |
587e6cec4e | ||
![]() |
a6c513c1ac | ||
![]() |
b678236f87 | ||
![]() |
11f5759fc7 | ||
![]() |
95db61e613 | ||
![]() |
ab37cd7f24 | ||
![]() |
26a0be5103 | ||
![]() |
9009bf2825 | ||
![]() |
6ce1a2dc83 | ||
![]() |
b7d68ca255 | ||
![]() |
f0220c87d8 | ||
![]() |
7d720371c5 | ||
![]() |
2262bab442 | ||
![]() |
c08b582c53 | ||
![]() |
7e56bf7e2c | ||
![]() |
1feb3564c1 | ||
![]() |
7e25dd15e6 | ||
![]() |
f581b1a541 | ||
![]() |
f253cc46ad | ||
![]() |
26906cca07 | ||
![]() |
baf6e03c46 | ||
![]() |
0d6778f955 | ||
![]() |
1c02c0f2dd | ||
![]() |
1799b57e4b | ||
![]() |
b98af09df8 | ||
![]() |
ca6032381a | ||
![]() |
f4aa8a4c25 | ||
![]() |
5831079bf6 | ||
![]() |
c685d4bec9 | ||
![]() |
8057323331 | ||
![]() |
c3c69027fa | ||
![]() |
68f359360e | ||
![]() |
ca3ac3b08b | ||
![]() |
9b3d55ded0 | ||
![]() |
6a72ad8ca5 | ||
![]() |
4cf007b515 | ||
![]() |
352826a1ec | ||
![]() |
acf7d7daaa | ||
![]() |
92d59cd12b | ||
![]() |
6ade08825b | ||
![]() |
ff693e82af | ||
![]() |
d2a07aaf1b | ||
![]() |
4a83cddb8e | ||
![]() |
c110c25428 | ||
![]() |
1cd3bc1860 | ||
![]() |
51156a4762 | ||
![]() |
71f6cfa92b | ||
![]() |
66c1600f4f | ||
![]() |
b319b58a2f | ||
![]() |
83ce6d3f6b | ||
![]() |
a76e62dc65 | ||
![]() |
6a6c54fef5 | ||
![]() |
ed0a3699e7 | ||
![]() |
89992296ac | ||
![]() |
970693ef46 | ||
![]() |
74455d6337 | ||
![]() |
e1e34a14a2 | ||
![]() |
1db5e5e95c | ||
![]() |
ed5b9249fe | ||
![]() |
bb702abe15 | ||
![]() |
0d427338a1 | ||
![]() |
5723746e05 | ||
![]() |
6bc3e05c6c | ||
![]() |
0abe517faa | ||
![]() |
c9c4c3cfd7 | ||
![]() |
5033effffb | ||
![]() |
f83c22ea0e | ||
![]() |
b0ae97fd32 | ||
![]() |
46c3548725 | ||
![]() |
061bd7b19f | ||
![]() |
a587c1c91c | ||
![]() |
d3add440ca | ||
![]() |
52af3abedc | ||
![]() |
25da2c2ad3 | ||
![]() |
6d4e17c531 | ||
![]() |
e15b7c2620 | ||
![]() |
5e166970fa | ||
![]() |
4375c2db96 | ||
![]() |
b0235527ab | ||
![]() |
77e625d36d | ||
![]() |
bfe143f1ac | ||
![]() |
871f747597 | ||
![]() |
d0665a9f21 | ||
![]() |
f47d0a1524 | ||
![]() |
d87e2dd3ae | ||
![]() |
e540963f20 | ||
![]() |
bc3bb47672 | ||
![]() |
8cbe1eac2b | ||
![]() |
78a796cea6 | ||
![]() |
943e4a7072 | ||
![]() |
af396ec8d6 | ||
![]() |
41379bfe8c | ||
![]() |
eab6065a26 | ||
![]() |
86b3d8dc79 | ||
![]() |
3492cebec2 | ||
![]() |
a09862cb1b | ||
![]() |
f5bfe6a773 | ||
![]() |
a6e32deeb1 | ||
![]() |
38dc781271 | ||
![]() |
f4f30db334 | ||
![]() |
f13e69b172 | ||
![]() |
87bf84d05f | ||
![]() |
fd78a03280 | ||
![]() |
4d8f86fe63 | ||
![]() |
5ac5850037 | ||
![]() |
8a8ccd068c | ||
![]() |
911513435b | ||
![]() |
6dc9dccbb7 | ||
![]() |
557e200dcf | ||
![]() |
cabc05f7dd | ||
![]() |
8303633527 | ||
![]() |
c66fca73af | ||
![]() |
be1848fba0 | ||
![]() |
e694bad314 | ||
![]() |
ee8d8f68ee | ||
![]() |
5c18b0d450 | ||
![]() |
b659627044 | ||
![]() |
1b88eb67a3 | ||
![]() |
9c3f98d427 | ||
![]() |
c281c82220 | ||
![]() |
da128fb99b | ||
![]() |
58ada78dc2 | ||
![]() |
b7dffc7afc | ||
![]() |
ed8a531b85 | ||
![]() |
654c2c8fc1 | ||
![]() |
7f6e501ad3 | ||
![]() |
135be72470 | ||
![]() |
6c13c83144 | ||
![]() |
c8860649f9 | ||
![]() |
efd6ae357c | ||
![]() |
c45f4b44d9 | ||
![]() |
3bc9e2ff9b | ||
![]() |
bbb3aee386 | ||
![]() |
80c4041036 | ||
![]() |
3286afd848 | ||
![]() |
e1f144ad79 | ||
![]() |
5cddce343d | ||
![]() |
9a75622ee5 | ||
![]() |
a033653918 | ||
![]() |
c15116c76c | ||
![]() |
ffa07afd80 | ||
![]() |
c520102008 | ||
![]() |
3a8851004c | ||
![]() |
ded7610b88 | ||
![]() |
829c65d76e | ||
![]() |
0082f5b3da | ||
![]() |
2c93299764 | ||
![]() |
41fff711e7 | ||
![]() |
a20b29fb1c | ||
![]() |
4555d5bbb2 | ||
![]() |
ef568e3d61 | ||
![]() |
1171bdcef6 | ||
![]() |
77e90051fd | ||
![]() |
8703df341f | ||
![]() |
5c91f3cad7 | ||
![]() |
4712802b45 | ||
![]() |
9fa196092f | ||
![]() |
000b42bdcf | ||
![]() |
7f8eef5e19 | ||
![]() |
041acbc0bf | ||
![]() |
2c7fe93212 | ||
![]() |
41a2e29f27 | ||
![]() |
c9b7b9b224 | ||
![]() |
46fbd0465e | ||
![]() |
92da2c12fd | ||
![]() |
47e8bbaf5e | ||
![]() |
d3d6d0a997 | ||
![]() |
5663964bf4 | ||
![]() |
35fe5f3bd2 | ||
![]() |
c69dcdd0ed | ||
![]() |
ab588c28ce | ||
![]() |
551c65243c | ||
![]() |
1d9182dd82 | ||
![]() |
547543b888 | ||
![]() |
8c3596d923 | ||
![]() |
e879ab18e2 | ||
![]() |
8a5fc8044a | ||
![]() |
68c12d4d32 | ||
![]() |
965e4a91d6 | ||
![]() |
1a5220d5d8 | ||
![]() |
cc9d9e435a | ||
![]() |
efb5789dea | ||
![]() |
4dd430e080 | ||
![]() |
2f091e5300 | ||
![]() |
603c59a307 | ||
![]() |
0758b661df | ||
![]() |
a11816bff8 | ||
![]() |
a5b1b02220 | ||
![]() |
935a366fd3 | ||
![]() |
00bab929fc | ||
![]() |
3f44c75fbc | ||
![]() |
1f596793c6 | ||
![]() |
be14baf096 | ||
![]() |
ab82b8e492 | ||
![]() |
7532ba1310 | ||
![]() |
8f2ad59254 | ||
![]() |
ebca6af1fd | ||
![]() |
a142876a4e | ||
![]() |
7bf4efd3f8 | ||
![]() |
b0517a96d5 | ||
![]() |
fca5e9365c | ||
![]() |
f7434008b4 | ||
![]() |
fcc0669492 | ||
![]() |
377681c796 | ||
![]() |
aea3d7c71c | ||
![]() |
6ba43d06b6 | ||
![]() |
11ea8f40d5 | ||
![]() |
73b2307b36 | ||
![]() |
e81ca0b386 | ||
![]() |
a110504aa7 | ||
![]() |
7000cea8ec | ||
![]() |
6e1b18315a | ||
![]() |
2ecb31b1ad | ||
![]() |
704cec4133 | ||
![]() |
3fe576eb93 | ||
![]() |
41c5be8fbe | ||
![]() |
582533527d | ||
![]() |
6edd440aae | ||
![]() |
7613ba170f | ||
![]() |
6d91e5a4b2 | ||
![]() |
e881b9487f | ||
![]() |
2721081a51 | ||
![]() |
4a42d2ea01 | ||
![]() |
0a32ad63f8 | ||
![]() |
79e75be9f3 | ||
![]() |
690b583e80 | ||
![]() |
4eedc59090 | ||
![]() |
99d72dfccf | ||
![]() |
96f20cf2b0 | ||
![]() |
29bb4b8032 | ||
![]() |
d2bff90f17 | ||
![]() |
277d5a3e97 | ||
![]() |
e633199ea9 | ||
![]() |
25df187e37 | ||
![]() |
6da692523c | ||
![]() |
5e570f94b6 | ||
![]() |
46a1e2b75d | ||
![]() |
4a12f7904f | ||
![]() |
1a0fec74cf | ||
![]() |
ac2c74e5f3 | ||
![]() |
f8d7e7f06b | ||
![]() |
d5bc3856aa | ||
![]() |
e8429ad5e0 | ||
![]() |
cf69c0a4cb | ||
![]() |
76d475f152 | ||
![]() |
36f8ad2ec3 | ||
![]() |
b939f8af37 | ||
![]() |
c614484ea3 | ||
![]() |
60802b2b76 | ||
![]() |
a8e43198a9 | ||
![]() |
b75082e1b6 | ||
![]() |
982e2e8e6c | ||
![]() |
70a3e5fb9c | ||
![]() |
f47165b5d2 | ||
![]() |
f1a2f7d2d0 | ||
![]() |
2bde84d452 | ||
![]() |
40df3cda62 | ||
![]() |
b4d8d67c75 | ||
![]() |
cafe193504 | ||
![]() |
3a52b5be72 | ||
![]() |
5108a987fb | ||
![]() |
63e3f91ee0 | ||
![]() |
c3510d2853 | ||
![]() |
20c39d474a | ||
![]() |
2a1f82d7a9 | ||
![]() |
f5cf87d91b | ||
![]() |
04eb9ca5ea | ||
![]() |
f366b785a3 | ||
![]() |
26a744456b | ||
![]() |
21e7cc53f9 | ||
![]() |
0d6c27ca1d | ||
![]() |
c5e11e4d7a | ||
![]() |
b50fa894ad | ||
![]() |
1ed2c4d07d | ||
![]() |
70717dc9ab | ||
![]() |
f8ec54c3e0 | ||
![]() |
6f0e4e1f7d | ||
![]() |
c689ec726d | ||
![]() |
5deb594933 | ||
![]() |
671ae3c0d7 | ||
![]() |
8a6fab9673 | ||
![]() |
3baae644d6 | ||
![]() |
00777568d0 | ||
![]() |
e5b52b9ac5 | ||
![]() |
7a5a21be29 | ||
![]() |
29e954c407 | ||
![]() |
7e3b0008f8 | ||
![]() |
02622edcc6 | ||
![]() |
f89fd26d92 | ||
![]() |
f0ed10091b | ||
![]() |
6175819f54 | ||
![]() |
9f8516d47e | ||
![]() |
c5c72cddfc | ||
![]() |
060ef8be58 | ||
![]() |
6905c75cea | ||
![]() |
1b7ca1e5de | ||
![]() |
be96990258 | ||
![]() |
be9f9b18d2 | ||
![]() |
4433efe14d | ||
![]() |
f5baa7b55c | ||
![]() |
a1ec5bb09a | ||
![]() |
f7b5d8e4c5 | ||
![]() |
577c93c70a | ||
![]() |
1df0e171d4 | ||
![]() |
96c5c52bf9 | ||
![]() |
8f4764426f | ||
![]() |
93fc1d0efa | ||
![]() |
01edb634ef | ||
![]() |
fd14ce2de3 | ||
![]() |
73aa219ebe | ||
![]() |
30ed97d153 | ||
![]() |
f396c9910e | ||
![]() |
fbd28ef0fd | ||
![]() |
d7849f0d99 | ||
![]() |
23fd5bc87e | ||
![]() |
cbc9f19d6e | ||
![]() |
6c872b6621 | ||
![]() |
a431edd813 | ||
![]() |
6e0e3e3bf3 | ||
![]() |
f4426ae0df | ||
![]() |
71cac7c8f7 | ||
![]() |
c8acf6ce36 | ||
![]() |
27569bc97e | ||
![]() |
1141216758 | ||
![]() |
ff51aa40a5 | ||
![]() |
a91817280c | ||
![]() |
550dec4cf8 | ||
![]() |
ece8408381 | ||
![]() |
3b2af29653 | ||
![]() |
dbc1585864 | ||
![]() |
e1dfc04169 | ||
![]() |
66f9034dab | ||
![]() |
4fe3fe8f12 | ||
![]() |
841913a1d1 | ||
![]() |
906d528302 | ||
![]() |
db39bab3fe | ||
![]() |
aa8d8300b1 | ||
![]() |
4838a5a8e5 | ||
![]() |
77d7b88b01 | ||
![]() |
d33d0f7dac | ||
![]() |
2e0253197c | ||
![]() |
42488fdb12 | ||
![]() |
3865df7db0 | ||
![]() |
85ef375cc5 | ||
![]() |
effbef373f | ||
![]() |
e52700e950 | ||
![]() |
b3d03a25c0 | ||
![]() |
1eda00b721 | ||
![]() |
53c5a5001b | ||
![]() |
f416306913 | ||
![]() |
6ea33fa7cc | ||
![]() |
7f50a0a7fa | ||
![]() |
69ccd21069 | ||
![]() |
8f98075c54 | ||
![]() |
1d0c686966 | ||
![]() |
351b5c0c90 | ||
![]() |
7757dea8a4 | ||
![]() |
63d222912a | ||
![]() |
0af68d8363 | ||
![]() |
803d18989b | ||
![]() |
664bf967e0 | ||
![]() |
ec0a4eaad3 | ||
![]() |
9f208881d9 | ||
![]() |
f45ad335c3 | ||
![]() |
9f848de395 | ||
![]() |
862455ee56 | ||
![]() |
8b28fe6265 | ||
![]() |
e6768763b4 | ||
![]() |
340abcc0d5 | ||
![]() |
8c40f3207e | ||
![]() |
b36a44e634 | ||
![]() |
c59942c690 | ||
![]() |
a66801c424 | ||
![]() |
baaa558a84 | ||
![]() |
6d1178616f | ||
![]() |
4897abbd84 | ||
![]() |
9325d24370 | ||
![]() |
a5061deeee | ||
![]() |
f215324c44 | ||
![]() |
7dbb4ce1ff | ||
![]() |
da144c98ce | ||
![]() |
45102b248b | ||
![]() |
94687e5215 | ||
![]() |
7ce8fb7153 | ||
![]() |
74e02b45ba | ||
![]() |
de5b19dc6c | ||
![]() |
73a2a50e7b | ||
![]() |
d9154681eb | ||
![]() |
3c0fab7449 | ||
![]() |
d268633a2c | ||
![]() |
8505b49eb0 | ||
![]() |
09f65126d8 | ||
![]() |
051729448c | ||
![]() |
9cf799d05b | ||
![]() |
534deaece4 | ||
![]() |
e8b8abac7b | ||
![]() |
1839a2cc1c | ||
![]() |
d1786a5a9d | ||
![]() |
107b98b964 | ||
![]() |
aae5aee065 | ||
![]() |
a67e636830 | ||
![]() |
d5d9081f5b | ||
![]() |
dc129849dd | ||
![]() |
e6e92365d2 | ||
![]() |
67938581d9 | ||
![]() |
71b1d4fa4b | ||
![]() |
85c9983894 | ||
![]() |
bff7be6640 | ||
![]() |
64cc0f72b3 | ||
![]() |
d1cf683fff | ||
![]() |
9aedb50fe2 | ||
![]() |
c3641ef3f3 | ||
![]() |
c6325f3d85 | ||
![]() |
051a941e1e | ||
![]() |
6ea1976b9c | ||
![]() |
4f894097d7 | ||
![]() |
35c279f819 | ||
![]() |
4294791e08 | ||
![]() |
42e7eb382e | ||
![]() |
b6d37e70b4 | ||
![]() |
368f2234d1 | ||
![]() |
58bbea7f57 | ||
![]() |
80f2b9015a | ||
![]() |
9159d77ff1 | ||
![]() |
3fbdf02cc5 | ||
![]() |
33c8f356a6 | ||
![]() |
2977823a13 | ||
![]() |
abfa8217ec | ||
![]() |
f4a5c94a71 | ||
![]() |
bd6148df2a | ||
![]() |
e5d941a3ad | ||
![]() |
9473362b08 | ||
![]() |
b3a97de5fa | ||
![]() |
e890c3b8b2 | ||
![]() |
bb2c91dd1e | ||
![]() |
0528a06e03 | ||
![]() |
81885d5c61 | ||
![]() |
aa754a1a2c | ||
![]() |
9034de28f9 | ||
![]() |
2823c12552 | ||
![]() |
9ef5978515 | ||
![]() |
33e6c0de23 | ||
![]() |
9a0d00fd69 | ||
![]() |
8cef59bdd7 | ||
![]() |
5870bedb3e | ||
![]() |
bdcf697fe9 | ||
![]() |
bf565ece3b | ||
![]() |
95781880c5 | ||
![]() |
d251b705e8 | ||
![]() |
5bb4b70ab1 | ||
![]() |
71fbe5e29d | ||
![]() |
e7defa6e12 | ||
![]() |
1314eca8ec | ||
![]() |
7dd4e4516f | ||
![]() |
e515a4b820 | ||
![]() |
28464f9c47 | ||
![]() |
0e437224d0 | ||
![]() |
664e2d7088 | ||
![]() |
c268026cb6 | ||
![]() |
e28dbe949e | ||
![]() |
b654b5b867 | ||
![]() |
9d6751febe | ||
![]() |
f27838cf2f | ||
![]() |
b58aa2468c | ||
![]() |
1ee10ef93d | ||
![]() |
000110f5d7 | ||
![]() |
617678b16e | ||
![]() |
38126ecfe1 | ||
![]() |
90ca77194d | ||
![]() |
d32b57450c | ||
![]() |
3afb209cd7 | ||
![]() |
8cd1b57eb4 | ||
![]() |
5a48a8e1fc | ||
![]() |
1734b75d47 | ||
![]() |
e12a317e7a | ||
![]() |
f24fbc761f | ||
![]() |
715b8f3cee | ||
![]() |
4fb4eed5e9 | ||
![]() |
105f8dcb92 | ||
![]() |
1d9e41ef57 | ||
![]() |
fc361e3aea | ||
![]() |
f92af04e0e | ||
![]() |
d38dd92415 | ||
![]() |
de31e7f815 | ||
![]() |
e50ad5f039 | ||
![]() |
7ae1b0b97f | ||
![]() |
a3ccee3871 | ||
![]() |
55e4ed6c07 | ||
![]() |
eb1f589d60 | ||
![]() |
328177d25a | ||
![]() |
13dd6e402b | ||
![]() |
26068c7db8 | ||
![]() |
a553f97425 | ||
![]() |
6aacc33cd5 | ||
![]() |
7d00dd9054 | ||
![]() |
6db762c2a7 | ||
![]() |
c5fe261530 | ||
![]() |
8e8640de3e | ||
![]() |
f7c601ec25 | ||
![]() |
58da178d30 | ||
![]() |
b69048f08a | ||
![]() |
2673564e66 | ||
![]() |
a31127ed8b | ||
![]() |
38e1a0aed5 | ||
![]() |
7a0b8d675a | ||
![]() |
c2e7ce52ae | ||
![]() |
6eaa3a4343 | ||
![]() |
161cdcd7e7 | ||
![]() |
ad3266b902 | ||
![]() |
64d237a89e | ||
![]() |
0e4deec714 | ||
![]() |
345f50d29c | ||
![]() |
262a831af8 | ||
![]() |
2c7d693537 | ||
![]() |
52a08176cc | ||
![]() |
c90b190c13 | ||
![]() |
20f75c0018 | ||
![]() |
b71d1543ca | ||
![]() |
cf21933a1d | ||
![]() |
9349ad52e4 | ||
![]() |
689dc5ba24 | ||
![]() |
d42a7261a4 | ||
![]() |
bcbf136de2 | ||
![]() |
55e9a0f5b5 | ||
![]() |
fd1dd8d1e6 | ||
![]() |
0d7c0c0f24 | ||
![]() |
bd06651bb0 | ||
![]() |
d64d916abc | ||
![]() |
da668b5e9a | ||
![]() |
d54442ecbf | ||
![]() |
c930d6bf6a | ||
![]() |
2ce263d45f | ||
![]() |
68f81fdc30 | ||
![]() |
e7ab18a720 | ||
![]() |
582467642c | ||
![]() |
d65e2daa15 | ||
![]() |
4eaa7c5eb3 | ||
![]() |
02de44e551 | ||
![]() |
4cdf0a65cd | ||
![]() |
b0367c21f3 | ||
![]() |
9d68107722 | ||
![]() |
ad61c23873 | ||
![]() |
52d070835f | ||
![]() |
e477756f27 | ||
![]() |
c359221ef3 | ||
![]() |
cc94d290ab | ||
![]() |
da0a58cb9c | ||
![]() |
7ddd3b0589 | ||
![]() |
118fa9e480 | ||
![]() |
ff71d09fd1 | ||
![]() |
1eb0b1b073 | ||
![]() |
9ea9902c76 | ||
![]() |
6494017ce2 | ||
![]() |
b0cd9eebe9 | ||
![]() |
c3d4885521 | ||
![]() |
2919aaae79 | ||
![]() |
1986ba71c1 | ||
![]() |
a2c39a4dbc | ||
![]() |
1e847c8710 | ||
![]() |
83a8552a63 | ||
![]() |
f60c633320 | ||
![]() |
a5c7384228 | ||
![]() |
27de930978 | ||
![]() |
98e76d52bc | ||
![]() |
729aac9bd1 | ||
![]() |
bc85c445ab | ||
![]() |
9f708fa10c | ||
![]() |
d26c7cd6fc | ||
![]() |
0174083439 | ||
![]() |
e6fc2aee4a | ||
![]() |
47513cfbd0 | ||
![]() |
4e7147a495 | ||
![]() |
5cfc0db0d5 | ||
![]() |
eb862e2cbb | ||
![]() |
98799e4227 | ||
![]() |
ea6a0e53cc | ||
![]() |
f2b42a50c8 | ||
![]() |
43336f5b07 | ||
![]() |
bf2d948366 | ||
![]() |
271fd35bce | ||
![]() |
1d70986c25 | ||
![]() |
ec017d1f1d | ||
![]() |
a8c804de5b | ||
![]() |
3578001fab | ||
![]() |
b199110276 | ||
![]() |
b69bba5a7d | ||
![]() |
efdad701df | ||
![]() |
8a074b12b5 | ||
![]() |
b5e5fe630d | ||
![]() |
5d23bf6da3 | ||
![]() |
e5a8939481 | ||
![]() |
0eca901c65 | ||
![]() |
4a1964f881 | ||
![]() |
131094b5ff | ||
![]() |
4544a98fb9 | ||
![]() |
cbacdecb1e | ||
![]() |
64d8b2adc9 | ||
![]() |
9c83c15f67 | ||
![]() |
d2a545a01e | ||
![]() |
10e7ab96e5 | ||
![]() |
40f519544f | ||
![]() |
076c14dce6 | ||
![]() |
e223ce59e1 | ||
![]() |
ad833755e1 | ||
![]() |
142978b4d8 | ||
![]() |
e3cab48039 | ||
![]() |
203f4a5855 | ||
![]() |
cfc27db43d | ||
![]() |
e2a8557083 | ||
![]() |
d5478b1f21 | ||
![]() |
cf19af6f1c | ||
![]() |
1342f00d8e | ||
![]() |
1e49b4379b | ||
![]() |
a5d563217c | ||
![]() |
b1ac3b82dc | ||
![]() |
a376f33af1 | ||
![]() |
6f8a49569b | ||
![]() |
a4c553a5c5 | ||
![]() |
75ebe40f86 | ||
![]() |
69d711929a | ||
![]() |
4c12872dbf | ||
![]() |
21cee1be31 | ||
![]() |
00c782fd40 | ||
![]() |
b3f9635ecc | ||
![]() |
8c10fb285e | ||
![]() |
8a3f5d8f2e | ||
![]() |
7b496a5b4a | ||
![]() |
41445cffb4 | ||
![]() |
64e7705053 | ||
![]() |
dafd2d67f6 | ||
![]() |
823ab58f3a | ||
![]() |
ab7883e5c3 | ||
![]() |
8fd1fb3234 | ||
![]() |
6502b50576 | ||
![]() |
861347cce0 | ||
![]() |
43d4b65250 | ||
![]() |
e53ce19fcc | ||
![]() |
e603ff8274 | ||
![]() |
22b15f0ecf | ||
![]() |
c48c5bce99 | ||
![]() |
fa11d7e3c6 | ||
![]() |
7e3f29d033 | ||
![]() |
b7827687a8 | ||
![]() |
0beb4639a3 | ||
![]() |
b010c9501e | ||
![]() |
295e92270b | ||
![]() |
e42066f1c9 | ||
![]() |
1d29fcbfb2 | ||
![]() |
bdbfbb7e32 | ||
![]() |
42314ed75b | ||
![]() |
d8141692ab | ||
![]() |
44e58818af | ||
![]() |
eaab24d11a | ||
![]() |
025db2f9f3 | ||
![]() |
3985140377 | ||
![]() |
6886384ca3 | ||
![]() |
4a7fe8648a | ||
![]() |
7383c0cf60 | ||
![]() |
83186e02a2 | ||
![]() |
c6b4577c0a | ||
![]() |
73b1922c17 | ||
![]() |
1430e02fa8 | ||
![]() |
9ef09a288a | ||
![]() |
4a093be938 | ||
![]() |
64a253dbef | ||
![]() |
54877025ca | ||
![]() |
7793176b65 | ||
![]() |
bf32599d5d | ||
![]() |
01a31c894c | ||
![]() |
1e9cf23302 | ||
![]() |
555969141e | ||
![]() |
a938982bdc | ||
![]() |
17b54fee6a | ||
![]() |
60a153718d | ||
![]() |
9e1e382c37 | ||
![]() |
d72a96ec17 | ||
![]() |
5f845e78f1 | ||
![]() |
0d7e608a64 | ||
![]() |
15c5f152f8 | ||
![]() |
6d13893f16 | ||
![]() |
7e35de2577 | ||
![]() |
ec78503d1e | ||
![]() |
7d0bc1a112 | ||
![]() |
98e4531b44 | ||
![]() |
bb92058fbf | ||
![]() |
a5c59d6550 | ||
![]() |
f14be3df65 | ||
![]() |
3f7a32c990 | ||
![]() |
a8d8fc02e7 | ||
![]() |
0713fa209e | ||
![]() |
850f430ad6 | ||
![]() |
4026ed87e8 | ||
![]() |
f57d196e33 | ||
![]() |
ca9dc3a179 | ||
![]() |
a348ba6536 | ||
![]() |
c9e194f187 | ||
![]() |
5c6825f298 | ||
![]() |
6bd0bb4b4a | ||
![]() |
9422d2778f | ||
![]() |
ca760fc0df | ||
![]() |
901904ecb8 | ||
![]() |
33e173766f | ||
![]() |
6df40cd94b | ||
![]() |
6cc6be6c1c | ||
![]() |
44c7fe0fa6 | ||
![]() |
533e97eaa9 | ||
![]() |
e4dece9f24 | ||
![]() |
08f9396017 | ||
![]() |
c6598c797b | ||
![]() |
6378592db9 | ||
![]() |
fd598a0b97 | ||
![]() |
bc3ef4403f | ||
![]() |
786196527b | ||
![]() |
93c488f840 | ||
![]() |
23516e93f9 | ||
![]() |
112a79d7c6 | ||
![]() |
ce7085b720 | ||
![]() |
e31e4f8cfc | ||
![]() |
177c6ea0ee | ||
![]() |
b0dbb055f4 | ||
![]() |
f245e933ee | ||
![]() |
e0cd07a9bb | ||
![]() |
46052387bc | ||
![]() |
0b5a992605 | ||
![]() |
3e9cd8acf8 | ||
![]() |
bed466018c | ||
![]() |
6de12313e1 | ||
![]() |
ecc2108710 | ||
![]() |
b64ff64cc0 | ||
![]() |
63dcebadbe | ||
![]() |
015dc03986 | ||
![]() |
f1075b5a21 | ||
![]() |
403b5f1ffe | ||
![]() |
e9fd6e1c32 | ||
![]() |
18adfbbf30 | ||
![]() |
4c1df3f3fe | ||
![]() |
0ea813e6ad | ||
![]() |
09a595851e | ||
![]() |
6ad6cf01c5 | ||
![]() |
bdfde0a256 | ||
![]() |
ee2e830e03 | ||
![]() |
c9d52ce6ff | ||
![]() |
3b04f0872b | ||
![]() |
61ac37500b | ||
![]() |
a43757bc1a | ||
![]() |
5f9283c7c0 | ||
![]() |
5d9e8b47c2 | ||
![]() |
475548a3e2 | ||
![]() |
f21743b751 | ||
![]() |
b2a9a6d1c0 | ||
![]() |
c93832cb33 | ||
![]() |
46508a31d3 | ||
![]() |
b171608e26 | ||
![]() |
d65064af74 | ||
![]() |
493d856872 | ||
![]() |
2adb341769 | ||
![]() |
ac9682a4a7 | ||
![]() |
057d32c166 | ||
![]() |
037c3bc184 | ||
![]() |
9a49d06b21 | ||
![]() |
dff1b0aca6 | ||
![]() |
9535fa3af1 | ||
![]() |
fed4cd5e40 | ||
![]() |
587e5ebfff | ||
![]() |
46be2c21e0 | ||
![]() |
1837c33a56 | ||
![]() |
40164e685f | ||
![]() |
3ad81f3bce | ||
![]() |
155c8f664a | ||
![]() |
969084df98 | ||
![]() |
39d4d38b8b | ||
![]() |
759c4c5ebc | ||
![]() |
2bc452a617 | ||
![]() |
8ef43941e8 | ||
![]() |
defde67746 | ||
![]() |
3abce3581c | ||
![]() |
ec9e9c3b04 | ||
![]() |
c766f5866e | ||
![]() |
27c44e44c3 | ||
![]() |
af1dd54470 | ||
![]() |
be07c7ef31 | ||
![]() |
637cafcf6e | ||
![]() |
977c5b7f0b | ||
![]() |
a084d23107 | ||
![]() |
c4d5762608 | ||
![]() |
270b619921 | ||
![]() |
f2ac996bc6 | ||
![]() |
8cb1e347da | ||
![]() |
d1fba40f9a | ||
![]() |
195ec4c359 | ||
![]() |
f857b17022 | ||
![]() |
58dccdb59b | ||
![]() |
63f164ca53 | ||
![]() |
39f1faa1df | ||
![]() |
9de3757caa | ||
![]() |
75e49ebdd3 | ||
![]() |
150b22aab9 | ||
![]() |
842712171e | ||
![]() |
ce1264cd18 | ||
![]() |
2755966adf | ||
![]() |
bea35a60df | ||
![]() |
bf560707b6 | ||
![]() |
194ff5ee57 | ||
![]() |
bc751b0740 | ||
![]() |
44cb302de0 | ||
![]() |
da5183a6f8 | ||
![]() |
dd0b49c8f4 | ||
![]() |
d5bc135d9b | ||
![]() |
9884fa7127 | ||
![]() |
e85b91cd9b | ||
![]() |
1666342fc3 | ||
![]() |
2a13929e63 | ||
![]() |
11cd8674c2 | ||
![]() |
df3be4c770 | ||
![]() |
ceb1154e61 | ||
![]() |
56e603bf0f | ||
![]() |
7366fddb0c | ||
![]() |
124ae60133 | ||
![]() |
d2231cb683 | ||
![]() |
51b6376634 | ||
![]() |
95cf06a46e | ||
![]() |
f658113b8c | ||
![]() |
6911e2b052 | ||
![]() |
3cf2ef7757 | ||
![]() |
2db7c47fbf | ||
![]() |
680309e35d | ||
![]() |
62ceb9cc3d | ||
![]() |
f825973588 | ||
![]() |
0a84738fe9 | ||
![]() |
a24608d445 | ||
![]() |
7f818a04ae | ||
![]() |
6340b1564e | ||
![]() |
d2814c9c11 | ||
![]() |
49169dab2f | ||
![]() |
3f2d55474c | ||
![]() |
ee43ebeab5 | ||
![]() |
e255ada169 | ||
![]() |
a336a30cf8 | ||
![]() |
7b39790a86 | ||
![]() |
38ba275367 | ||
![]() |
c65779db56 | ||
![]() |
d8a5034b16 | ||
![]() |
cb0073e9b8 | ||
![]() |
dd95201b90 | ||
![]() |
f88695084b | ||
![]() |
61ad3812ce | ||
![]() |
7c8800c724 | ||
![]() |
b691480e5f | ||
![]() |
36f74689c4 | ||
![]() |
043390afe1 | ||
![]() |
c5cceb789a | ||
![]() |
f434b7ea33 | ||
![]() |
8b0258c4f5 | ||
![]() |
5b5069af99 | ||
![]() |
08c14a03d7 | ||
![]() |
70196a4721 | ||
![]() |
1114736ae7 | ||
![]() |
0873902a18 | ||
![]() |
a245708eaf | ||
![]() |
21ad59dc3c | ||
![]() |
c7f8895a95 | ||
![]() |
abe1136cba | ||
![]() |
d0f719b0e1 | ||
![]() |
c565835773 | ||
![]() |
663857a15f | ||
![]() |
728b4e3dc7 | ||
![]() |
6da46f36c9 | ||
![]() |
126f8d0115 | ||
![]() |
11f575568f | ||
![]() |
57a22719a5 | ||
![]() |
995264ffef | ||
![]() |
f364c61d64 | ||
![]() |
93926a564a | ||
![]() |
5b743a147f | ||
![]() |
6abcbe8e37 | ||
![]() |
f4d8ad00a3 | ||
![]() |
ad9b0095cb | ||
![]() |
3c0467ebcf | ||
![]() |
dfec64ab18 | ||
![]() |
f65f429a4a | ||
![]() |
db9226d871 | ||
![]() |
ced81d1a2e | ||
![]() |
fec0cb1260 | ||
![]() |
52b8bc135f | ||
![]() |
c7402676a8 | ||
![]() |
336d7cfcfa | ||
![]() |
bf029d3c31 | ||
![]() |
ffb41b0164 | ||
![]() |
86dcb51417 | ||
![]() |
8613d43fe4 | ||
![]() |
6b7061173f | ||
![]() |
80368aad24 | ||
![]() |
b17b073599 | ||
![]() |
e84359cc23 | ||
![]() |
e4f72c9eeb | ||
![]() |
7a94443a06 | ||
![]() |
ddf1ff03f5 | ||
![]() |
49c518940b | ||
![]() |
bf0927685f | ||
![]() |
30f5d9c8ce | ||
![]() |
e057e8696b | ||
![]() |
e31b69863f | ||
![]() |
bf85411f23 | ||
![]() |
5977e7f092 | ||
![]() |
70e53f31d0 | ||
![]() |
afe50ef96e | ||
![]() |
e580b907c3 | ||
![]() |
3491ad6816 | ||
![]() |
d300eb2519 | ||
![]() |
7f7463ac3c | ||
![]() |
b3f121e3e4 | ||
![]() |
7358b4d4ea | ||
![]() |
15a7e9406b | ||
![]() |
d6965cca81 | ||
![]() |
78e36db3e3 | ||
![]() |
25a4ef36db | ||
![]() |
1a8d4c0e96 | ||
![]() |
0627fe0bb3 | ||
![]() |
2b0533fd8d | ||
![]() |
fe81f4d72d | ||
![]() |
241f927e91 | ||
![]() |
ea2c081f6d | ||
![]() |
4022a3d564 | ||
![]() |
7739890264 | ||
![]() |
cf5999b048 | ||
![]() |
868a571c73 | ||
![]() |
21ff1de87e | ||
![]() |
2dab6aed99 | ||
![]() |
a8549ddbe2 | ||
![]() |
aa91a69bc8 | ||
![]() |
0ed05edba2 | ||
![]() |
bec7c8ad2d | ||
![]() |
9449e77cca | ||
![]() |
0bd20ba74b | ||
![]() |
98494b8c58 | ||
![]() |
7c5662ee52 | ||
![]() |
a9b6d7e51c | ||
![]() |
ee45866afe | ||
![]() |
593112807b | ||
![]() |
0fa732a0a8 | ||
![]() |
4d0b37292d | ||
![]() |
d4a98738f1 | ||
![]() |
3884d556b0 | ||
![]() |
71d5e604cb | ||
![]() |
f3bb3651b3 | ||
![]() |
8bdd5a58a4 | ||
![]() |
0085febc1c | ||
![]() |
8b988dc0be | ||
![]() |
b859818a9c | ||
![]() |
832e8c0348 | ||
![]() |
5b7b9b5677 | ||
![]() |
1d0496fc80 | ||
![]() |
4ff76d6d85 | ||
![]() |
97e51fe54f | ||
![]() |
19a375fba2 | ||
![]() |
e5d48f419f | ||
![]() |
e9c0fc6eb7 | ||
![]() |
cfc93d8555 | ||
![]() |
ab8629642d | ||
![]() |
7dee409218 | ||
![]() |
7dc230581c | ||
![]() |
a5a61893fb | ||
![]() |
67f5543e18 | ||
![]() |
cd32aadbe8 | ||
![]() |
75272a8499 | ||
![]() |
bde3f87fb1 | ||
![]() |
29208ebb08 | ||
![]() |
6f6d60297c | ||
![]() |
c8f0bed963 | ||
![]() |
a1212a8503 | ||
![]() |
40eae6c685 | ||
![]() |
464b13c9a5 | ||
![]() |
07fa856943 | ||
![]() |
cfcf0defd0 | ||
![]() |
e2b538b324 | ||
![]() |
82317692ae | ||
![]() |
261a9a5d8a | ||
![]() |
e205d05ec8 | ||
![]() |
2cdba6f42a | ||
![]() |
6219c206e9 | ||
![]() |
9d82a64a85 | ||
![]() |
7a4a00e5c1 | ||
![]() |
f28b613ccb | ||
![]() |
20f5c2690b | ||
![]() |
f9b3ff58f9 | ||
![]() |
0a1811e86c | ||
![]() |
e8ae58f6b5 | ||
![]() |
4033dbbd3f | ||
![]() |
85da3be6af | ||
![]() |
59d43edea1 | ||
![]() |
4a93cffb52 | ||
![]() |
7fb6df1c18 | ||
![]() |
f17fb36501 | ||
![]() |
3ff1afa88b | ||
![]() |
faf3b4b477 | ||
![]() |
452891148e | ||
![]() |
b76a9ff146 | ||
![]() |
08164fb0a7 | ||
![]() |
ce4d8cf0f3 | ||
![]() |
224b14043a | ||
![]() |
0fe08ad082 | ||
![]() |
516c394303 | ||
![]() |
d4532c64aa | ||
![]() |
5e94759fde | ||
![]() |
b6a4b702ac | ||
![]() |
7d902e87cd | ||
![]() |
d4213a98d0 | ||
![]() |
6b67a1b146 | ||
![]() |
463e1fb9d7 | ||
![]() |
4440e56aa1 | ||
![]() |
f59727b39f | ||
![]() |
aa1eb32b4c | ||
![]() |
d690cfad38 | ||
![]() |
0b04bf1181 | ||
![]() |
9450a69bd3 | ||
![]() |
67573728ad | ||
![]() |
7011bc12fe | ||
![]() |
9186594dc1 | ||
![]() |
4d38087fa8 | ||
![]() |
6a8b1be940 | ||
![]() |
5d9967d3bd | ||
![]() |
3b4c8fe827 | ||
![]() |
052bf17292 | ||
![]() |
8df935829d | ||
![]() |
39479609ca | ||
![]() |
4344b0c0b0 | ||
![]() |
13ea058bbb | ||
![]() |
8fe4bc201e | ||
![]() |
f6a35de542 | ||
![]() |
d7fbe494dd | ||
![]() |
1ccf282170 | ||
![]() |
b2a6a5a82f | ||
![]() |
60cd4ff872 | ||
![]() |
35f4c76982 | ||
![]() |
6ede428990 | ||
![]() |
bfc9c880b9 | ||
![]() |
ef113a9040 | ||
![]() |
ca4342a010 | ||
![]() |
e627e91fa6 | ||
![]() |
b1c0ebd521 | ||
![]() |
e6c4ca1f25 | ||
![]() |
0643b8280e | ||
![]() |
6e9ca0dc4a | ||
![]() |
42af51a1a5 | ||
![]() |
0d90b81cb6 | ||
![]() |
020738a7ea | ||
![]() |
515cadd079 | ||
![]() |
5e5830185d | ||
![]() |
26c65339a7 | ||
![]() |
e59e7f534c | ||
![]() |
25b0133979 | ||
![]() |
3b7e4d8550 | ||
![]() |
2b6666e114 | ||
![]() |
06b2b78ffc | ||
![]() |
2dd2b7d60c | ||
![]() |
c7cb4138ee | ||
![]() |
d812d0f11c | ||
![]() |
7fe565cc05 | ||
![]() |
5aed99b4a6 | ||
![]() |
4c30e9e1d1 | ||
![]() |
7a56cadfb5 | ||
![]() |
21231d2f23 | ||
![]() |
b11814c95b | ||
![]() |
471e492c11 |
@@ -5,6 +5,5 @@ jupyterhub.sqlite
|
||||
jupyterhub_config.py
|
||||
node_modules
|
||||
docs
|
||||
.git
|
||||
dist
|
||||
build
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# dependabot.yml reference: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
||||
# dependabot.yaml reference: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
||||
#
|
||||
# Notes:
|
||||
# - Status and logs from dependabot are provided at
|
||||
@@ -8,8 +8,9 @@ version: 2
|
||||
updates:
|
||||
# Maintain dependencies in our GitHub Workflows
|
||||
- package-ecosystem: github-actions
|
||||
directory: "/"
|
||||
directory: /
|
||||
labels: [ci]
|
||||
schedule:
|
||||
interval: weekly
|
||||
interval: monthly
|
||||
time: "05:00"
|
||||
timezone: "Etc/UTC"
|
||||
timezone: Etc/UTC
|
54
.github/workflows/registry-overviews.yml
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
name: Update Registry overviews
|
||||
|
||||
env:
|
||||
OWNER: ${{ github.repository_owner }}
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- ".github/workflows/registry-overviews.yml"
|
||||
|
||||
- "README.md"
|
||||
- "onbuild/README.md"
|
||||
- "demo-image/README.md"
|
||||
- "singleuser/README.md"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
update-overview:
|
||||
runs-on: ubuntu-latest
|
||||
name: update-overview (${{matrix.image}})
|
||||
if: github.repository_owner == 'jupyterhub'
|
||||
|
||||
steps:
|
||||
- name: Checkout Repo ⚡️
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Push README to Registry 🐳
|
||||
uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8 # v1
|
||||
env:
|
||||
DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
DOCKER_PASS: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
with:
|
||||
destination_container_repo: ${{ env.OWNER }}/${{ matrix.image }}
|
||||
provider: dockerhub
|
||||
short_description: ${{ matrix.description }}
|
||||
readme_file: ${{ matrix.readme_file }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- image: jupyterhub
|
||||
description: "JupyterHub: multi-user Jupyter notebook server"
|
||||
readme_file: README.md
|
||||
- image: jupyterhub-onbuild
|
||||
description: onbuild version of JupyterHub images
|
||||
readme_file: onbuild/README.md
|
||||
- image: jupyterhub-demo
|
||||
description: Demo JupyterHub Docker image with a quick overview of what JupyterHub is and how it works
|
||||
readme_file: demo-image/README.md
|
||||
- image: singleuser
|
||||
description: "single-user docker images for use with JupyterHub and DockerSpawner see also: jupyter/docker-stacks"
|
||||
readme_file: singleuser/README.md
|
73
.github/workflows/release.yml
vendored
@@ -30,16 +30,16 @@ on:
|
||||
|
||||
jobs:
|
||||
build-release:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.9"
|
||||
python-version: "3.11"
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "14"
|
||||
node-version: "20"
|
||||
|
||||
- name: install build requirements
|
||||
run: |
|
||||
@@ -67,7 +67,7 @@ jobs:
|
||||
docker run --rm -v $PWD/dist:/dist:ro docker.io/library/python:3.9-slim-bullseye bash -c 'pip install /dist/jupyterhub-*.tar.gz'
|
||||
|
||||
# ref: https://github.com/actions/upload-artifact#readme
|
||||
- uses: actions/upload-artifact@v3
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: jupyterhub-${{ github.sha }}
|
||||
path: "dist/*"
|
||||
@@ -83,7 +83,8 @@ jobs:
|
||||
twine upload --skip-existing dist/*
|
||||
|
||||
publish-docker:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 30
|
||||
|
||||
services:
|
||||
# So that we can test this in PRs/branches
|
||||
@@ -96,39 +97,35 @@ jobs:
|
||||
- name: Should we push this image to a public registry?
|
||||
run: |
|
||||
if [ "${{ startsWith(github.ref, 'refs/tags/') || (github.ref == 'refs/heads/main') }}" = "true" ]; then
|
||||
# Empty => Docker Hub
|
||||
echo "REGISTRY=" >> $GITHUB_ENV
|
||||
echo "REGISTRY=quay.io/" >> $GITHUB_ENV
|
||||
else
|
||||
echo "REGISTRY=localhost:5000/" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# Setup docker to build for multiple platforms, see:
|
||||
# https://github.com/docker/build-push-action/tree/v2.4.0#usage
|
||||
# https://github.com/docker/build-push-action/blob/v2.4.0/docs/advanced/multi-platform.md
|
||||
- name: Set up QEMU (for docker buildx)
|
||||
uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # associated tag: v1.0.2
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx (for multi-arch builds)
|
||||
uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
# Allows pushing to registry on localhost:5000
|
||||
driver-opts: network=host
|
||||
|
||||
- name: Setup push rights to Docker Hub
|
||||
# This was setup by...
|
||||
# 1. Creating a Docker Hub service account "jupyterhubbot"
|
||||
# 2. Creating a access token for the service account specific to this
|
||||
# repository: https://hub.docker.com/settings/security
|
||||
# 3. Making the account part of the "bots" team, and granting that team
|
||||
# permissions to push to the relevant images:
|
||||
# https://hub.docker.com/orgs/jupyterhub/teams/bots/permissions
|
||||
# 4. Registering the username and token as a secret for this repo:
|
||||
# https://github.com/jupyterhub/jupyterhub/settings/secrets/actions
|
||||
# 1. Creating a [Robot Account](https://quay.io/organization/jupyterhub?tab=robots) in the JupyterHub
|
||||
# . Quay.io org
|
||||
# 2. Giving it enough permissions to push to the jupyterhub and singleuser images
|
||||
# 3. Putting the robot account's username and password in GitHub actions environment
|
||||
if: env.REGISTRY != 'localhost:5000/'
|
||||
run: |
|
||||
docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" -p "${{ secrets.DOCKERHUB_TOKEN }}"
|
||||
docker login -u "${{ secrets.QUAY_USERNAME }}" -p "${{ secrets.QUAY_PASSWORD }}" "${{ env.REGISTRY }}"
|
||||
docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" -p "${{ secrets.DOCKERHUB_TOKEN }}" docker.io
|
||||
|
||||
# image: jupyterhub/jupyterhub
|
||||
#
|
||||
@@ -141,15 +138,17 @@ jobs:
|
||||
# If GITHUB_TOKEN isn't available (e.g. in PRs) returns no tags [].
|
||||
- name: Get list of jupyterhub tags
|
||||
id: jupyterhubtags
|
||||
uses: jupyterhub/action-major-minor-tag-calculator@v2
|
||||
uses: jupyterhub/action-major-minor-tag-calculator@v3
|
||||
with:
|
||||
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||
prefix: "${{ env.REGISTRY }}jupyterhub/jupyterhub:"
|
||||
prefix: >-
|
||||
${{ env.REGISTRY }}jupyterhub/jupyterhub:
|
||||
jupyterhub/jupyterhub:
|
||||
defaultTag: "${{ env.REGISTRY }}jupyterhub/jupyterhub:noref"
|
||||
branchRegex: ^\w[\w-.]*$
|
||||
|
||||
- name: Build and push jupyterhub
|
||||
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
@@ -162,15 +161,17 @@ jobs:
|
||||
#
|
||||
- name: Get list of jupyterhub-onbuild tags
|
||||
id: onbuildtags
|
||||
uses: jupyterhub/action-major-minor-tag-calculator@v2
|
||||
uses: jupyterhub/action-major-minor-tag-calculator@v3
|
||||
with:
|
||||
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||
prefix: "${{ env.REGISTRY }}jupyterhub/jupyterhub-onbuild:"
|
||||
prefix: >-
|
||||
${{ env.REGISTRY }}jupyterhub/jupyterhub-onbuild:
|
||||
jupyterhub/jupyterhub-onbuild:
|
||||
defaultTag: "${{ env.REGISTRY }}jupyterhub/jupyterhub-onbuild:noref"
|
||||
branchRegex: ^\w[\w-.]*$
|
||||
|
||||
- name: Build and push jupyterhub-onbuild
|
||||
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
build-args: |
|
||||
BASE_IMAGE=${{ fromJson(steps.jupyterhubtags.outputs.tags)[0] }}
|
||||
@@ -183,15 +184,17 @@ jobs:
|
||||
#
|
||||
- name: Get list of jupyterhub-demo tags
|
||||
id: demotags
|
||||
uses: jupyterhub/action-major-minor-tag-calculator@v2
|
||||
uses: jupyterhub/action-major-minor-tag-calculator@v3
|
||||
with:
|
||||
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||
prefix: "${{ env.REGISTRY }}jupyterhub/jupyterhub-demo:"
|
||||
prefix: >-
|
||||
${{ env.REGISTRY }}jupyterhub/jupyterhub-demo:
|
||||
jupyterhub/jupyterhub-demo:
|
||||
defaultTag: "${{ env.REGISTRY }}jupyterhub/jupyterhub-demo:noref"
|
||||
branchRegex: ^\w[\w-.]*$
|
||||
|
||||
- name: Build and push jupyterhub-demo
|
||||
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
build-args: |
|
||||
BASE_IMAGE=${{ fromJson(steps.onbuildtags.outputs.tags)[0] }}
|
||||
@@ -207,15 +210,17 @@ jobs:
|
||||
#
|
||||
- name: Get list of jupyterhub/singleuser tags
|
||||
id: singleusertags
|
||||
uses: jupyterhub/action-major-minor-tag-calculator@v2
|
||||
uses: jupyterhub/action-major-minor-tag-calculator@v3
|
||||
with:
|
||||
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||
prefix: "${{ env.REGISTRY }}jupyterhub/singleuser:"
|
||||
prefix: >-
|
||||
${{ env.REGISTRY }}jupyterhub/singleuser:
|
||||
jupyterhub/singleuser:
|
||||
defaultTag: "${{ env.REGISTRY }}jupyterhub/singleuser:noref"
|
||||
branchRegex: ^\w[\w-.]*$
|
||||
|
||||
- name: Build and push jupyterhub/singleuser
|
||||
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
build-args: |
|
||||
JUPYTERHUB_VERSION=${{ github.ref_type == 'tag' && github.ref_name || format('git:{0}', github.sha) }}
|
||||
|
4
.github/workflows/support-bot.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
action:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: dessant/support-requests@v2
|
||||
- uses: dessant/support-requests@v4
|
||||
with:
|
||||
github-token: ${{ github.token }}
|
||||
support-label: "support"
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
|
||||
Our goal is to sustain a positive experience for both users and developers. We use GitHub issues for specific discussions related to changing a repository's content, and let the forum be where we can more generally help and inspire each other.
|
||||
|
||||
Thanks you for being an active member of our community! :heart:
|
||||
Thank you for being an active member of our community! :heart:
|
||||
close-issue: true
|
||||
lock-issue: false
|
||||
issue-lock-reason: "off-topic"
|
||||
|
69
.github/workflows/test-docs.yml
vendored
@@ -36,27 +36,76 @@ env:
|
||||
|
||||
jobs:
|
||||
validate-rest-api-definition:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "20"
|
||||
cache: npm
|
||||
|
||||
- name: Validate REST API definition
|
||||
uses: char0n/swagger-editor-validate@v1.3.2
|
||||
with:
|
||||
definition-file: docs/source/_static/rest-api.yml
|
||||
run: |
|
||||
npx @redocly/cli lint
|
||||
|
||||
test-docs:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
python-version: "3.9"
|
||||
# make rediraffecheckdiff requires git history to compare current
|
||||
# commit with the main branch and previous releases.
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Install requirements
|
||||
run: |
|
||||
pip install -r docs/requirements.txt pytest
|
||||
pip install -e . -r docs/requirements.txt pytest
|
||||
|
||||
- name: pytest docs/
|
||||
run: |
|
||||
pytest docs/
|
||||
|
||||
# readthedocs doesn't halt on warnings,
|
||||
# so raise any warnings here
|
||||
- name: build docs
|
||||
run: |
|
||||
cd docs
|
||||
make html
|
||||
|
||||
- name: check links
|
||||
run: |
|
||||
cd docs
|
||||
make linkcheck
|
||||
|
||||
# make rediraffecheckdiff compares files for different changesets
|
||||
# these diff targets aren't always available
|
||||
# - compare with base ref (usually 'main', always on 'origin') for pull requests
|
||||
# - only compare with tags when running against jupyterhub/jupyterhub
|
||||
# to avoid errors on forks, which often lack tags
|
||||
- name: check redirects for this PR
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
cd docs
|
||||
export REDIRAFFE_BRANCH=origin/${{ github.base_ref }}
|
||||
make rediraffecheckdiff
|
||||
|
||||
# this should check currently published 'stable' links for redirects
|
||||
- name: check redirects since last release
|
||||
if: github.repository == 'jupyterhub/jupyterhub'
|
||||
run: |
|
||||
cd docs
|
||||
export REDIRAFFE_BRANCH=$(git describe --tags --abbrev=0)
|
||||
make rediraffecheckdiff
|
||||
|
||||
# longer-term redirect check (fixed version) for older links
|
||||
- name: check redirects since 3.0.0
|
||||
if: github.repository == 'jupyterhub/jupyterhub'
|
||||
run: |
|
||||
cd docs
|
||||
export REDIRAFFE_BRANCH=3.0.0
|
||||
make rediraffecheckdiff
|
||||
|
22
.github/workflows/test-jsx.yml
vendored
@@ -25,28 +25,24 @@ permissions:
|
||||
jobs:
|
||||
# The ./jsx folder contains React based source code files that are to compile
|
||||
# to share/jupyterhub/static/js/admin-react.js. The ./jsx folder includes
|
||||
# tests also has tests that this job is meant to run with `yarn test`
|
||||
# tests also has tests that this job is meant to run with `npm test`
|
||||
# according to the documentation in jsx/README.md.
|
||||
test-jsx-admin-react:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 5
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "14"
|
||||
node-version: "20"
|
||||
|
||||
- name: Install yarn
|
||||
run: |
|
||||
npm install -g yarn
|
||||
|
||||
- name: yarn
|
||||
- name: install jsx
|
||||
run: |
|
||||
cd jsx
|
||||
yarn
|
||||
npm ci
|
||||
|
||||
- name: yarn test
|
||||
- name: test
|
||||
run: |
|
||||
cd jsx
|
||||
yarn test
|
||||
npm test
|
||||
|
112
.github/workflows/test.yml
vendored
@@ -28,7 +28,7 @@ on:
|
||||
env:
|
||||
# UTF-8 content may be interpreted as ascii and causes errors without this.
|
||||
LANG: C.UTF-8
|
||||
PYTEST_ADDOPTS: "--verbose --color=yes"
|
||||
SQLALCHEMY_WARN_20: "1"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -36,7 +36,7 @@ permissions:
|
||||
jobs:
|
||||
# Run "pytest jupyterhub/tests" in various configurations
|
||||
pytest:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 15
|
||||
|
||||
strategy:
|
||||
@@ -65,7 +65,7 @@ jobs:
|
||||
# unencrypted HTTP
|
||||
#
|
||||
# main_dependencies:
|
||||
# Tests everything when the we use the latest available dependencies
|
||||
# Tests everything when we use the latest available dependencies
|
||||
# from: traitlets.
|
||||
#
|
||||
# NOTE: Since only the value of these parameters are presented in the
|
||||
@@ -74,22 +74,39 @@ jobs:
|
||||
# Python versions available at:
|
||||
# https://github.com/actions/python-versions/blob/HEAD/versions-manifest.json
|
||||
include:
|
||||
- python: "3.7"
|
||||
- python: "3.8"
|
||||
oldest_dependencies: oldest_dependencies
|
||||
legacy_notebook: legacy_notebook
|
||||
- python: "3.8"
|
||||
legacy_notebook: legacy_notebook
|
||||
jupyter_server: "1.*"
|
||||
subset: singleuser
|
||||
- python: "3.9"
|
||||
db: mysql
|
||||
- python: "3.10"
|
||||
db: postgres
|
||||
- python: "3.11"
|
||||
- python: "3.12"
|
||||
subdomain: subdomain
|
||||
serverextension: serverextension
|
||||
- python: "3.11"
|
||||
ssl: ssl
|
||||
serverextension: serverextension
|
||||
- python: "3.11"
|
||||
selenium: selenium
|
||||
jupyverse: jupyverse
|
||||
subset: singleuser
|
||||
- python: "3.11"
|
||||
subdomain: subdomain
|
||||
noextension: noextension
|
||||
subset: singleuser
|
||||
- python: "3.11"
|
||||
ssl: ssl
|
||||
noextension: noextension
|
||||
subset: singleuser
|
||||
- python: "3.11"
|
||||
browser: browser
|
||||
- python: "3.11"
|
||||
subdomain: subdomain
|
||||
browser: browser
|
||||
- python: "3.12"
|
||||
main_dependencies: main_dependencies
|
||||
|
||||
steps:
|
||||
@@ -103,7 +120,7 @@ jobs:
|
||||
fi
|
||||
if [ "${{ matrix.db }}" == "mysql" ]; then
|
||||
echo "MYSQL_HOST=127.0.0.1" >> $GITHUB_ENV
|
||||
echo "JUPYTERHUB_TEST_DB_URL=mysql+mysqlconnector://root@127.0.0.1:3306/jupyterhub" >> $GITHUB_ENV
|
||||
echo "JUPYTERHUB_TEST_DB_URL=mysql+mysqldb://root@127.0.0.1:3306/jupyterhub" >> $GITHUB_ENV
|
||||
fi
|
||||
if [ "${{ matrix.ssl }}" == "ssl" ]; then
|
||||
echo "SSL_ENABLED=1" >> $GITHUB_ENV
|
||||
@@ -114,55 +131,72 @@ jobs:
|
||||
echo "PGPASSWORD=hub[test/:?" >> $GITHUB_ENV
|
||||
echo "JUPYTERHUB_TEST_DB_URL=postgresql://test_user:hub%5Btest%2F%3A%3F@127.0.0.1:5432/jupyterhub" >> $GITHUB_ENV
|
||||
fi
|
||||
if [ "${{ matrix.jupyter_server }}" != "" ]; then
|
||||
echo "JUPYTERHUB_SINGLEUSER_APP=jupyterhub.tests.mockserverapp.MockServerApp" >> $GITHUB_ENV
|
||||
if [ "${{ matrix.serverextension }}" != "" ]; then
|
||||
echo "JUPYTERHUB_SINGLEUSER_EXTENSION=1" >> $GITHUB_ENV
|
||||
elif [ "${{ matrix.noextension }}" != "" ]; then
|
||||
echo "JUPYTERHUB_SINGLEUSER_EXTENSION=0" >> $GITHUB_ENV
|
||||
fi
|
||||
- uses: actions/checkout@v3
|
||||
# NOTE: actions/setup-node@v3 make use of a cache within the GitHub base
|
||||
if [ "${{ matrix.jupyverse }}" != "" ]; then
|
||||
echo "JUPYTERHUB_SINGLEUSER_APP=jupyverse" >> $GITHUB_ENV
|
||||
fi
|
||||
- uses: actions/checkout@v4
|
||||
# NOTE: actions/setup-node@v4 make use of a cache within the GitHub base
|
||||
# environment and setup in a fraction of a second.
|
||||
- name: Install Node v14
|
||||
uses: actions/setup-node@v3
|
||||
- name: Install Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "14"
|
||||
node-version: "20"
|
||||
- name: Install Javascript dependencies
|
||||
run: |
|
||||
npm install
|
||||
npm install -g configurable-http-proxy yarn
|
||||
npm list
|
||||
|
||||
# NOTE: actions/setup-python@v4 make use of a cache within the GitHub base
|
||||
# NOTE: actions/setup-python@v5 make use of a cache within the GitHub base
|
||||
# environment and setup in a fraction of a second.
|
||||
- name: Install Python ${{ matrix.python }}
|
||||
uses: actions/setup-python@v4
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "${{ matrix.python }}"
|
||||
|
||||
- name: Install Python dependencies
|
||||
run: |
|
||||
pip install --upgrade pip
|
||||
pip install ".[test]"
|
||||
|
||||
if [ "${{ matrix.oldest_dependencies }}" != "" ]; then
|
||||
# take any dependencies in requirements.txt such as tornado>=5.0
|
||||
# and transform them to tornado==5.0 so we can run tests with
|
||||
# the earliest-supported versions
|
||||
cat requirements.txt | grep '>=' | sed -e 's@>=@==@g' > oldest-requirements.txt
|
||||
pip install -r oldest-requirements.txt
|
||||
# frozen env with oldest dependencies
|
||||
# make sure our `>=` pins really do express our minimum supported versions
|
||||
pip install -r ci/oldest-dependencies/requirements.old -e .
|
||||
else
|
||||
pip install -e ".[test]"
|
||||
fi
|
||||
|
||||
if [ "${{ matrix.main_dependencies }}" != "" ]; then
|
||||
pip install git+https://github.com/ipython/traitlets#egg=traitlets --force
|
||||
# Tests are broken:
|
||||
# https://github.com/jupyterhub/jupyterhub/issues/4418
|
||||
# pip install git+https://github.com/ipython/traitlets#egg=traitlets --force
|
||||
pip install --upgrade --pre sqlalchemy
|
||||
fi
|
||||
if [ "${{ matrix.legacy_notebook }}" != "" ]; then
|
||||
pip uninstall jupyter_server --yes
|
||||
pip install 'notebook<7'
|
||||
fi
|
||||
if [ "${{ matrix.jupyter_server }}" != "" ]; then
|
||||
pip install "jupyter_server==${{ matrix.jupyter_server }}"
|
||||
fi
|
||||
if [ "${{ matrix.jupyverse }}" != "" ]; then
|
||||
pip install "jupyverse[jupyterlab,auth-jupyterhub]"
|
||||
pip install -e .
|
||||
fi
|
||||
if [ "${{ matrix.db }}" == "mysql" ]; then
|
||||
pip install mysql-connector-python
|
||||
pip install mysqlclient
|
||||
fi
|
||||
if [ "${{ matrix.db }}" == "postgres" ]; then
|
||||
pip install psycopg2-binary
|
||||
fi
|
||||
if [ "${{ matrix.serverextension }}" != "" ]; then
|
||||
pip install 'jupyter-server>=2'
|
||||
fi
|
||||
|
||||
pip freeze
|
||||
|
||||
@@ -206,38 +240,32 @@ jobs:
|
||||
DB=postgres bash ci/docker-db.sh
|
||||
DB=postgres bash ci/init-db.sh
|
||||
fi
|
||||
- name: Setup Firefox
|
||||
if: matrix.selenium
|
||||
uses: browser-actions/setup-firefox@latest
|
||||
with:
|
||||
firefox-version: latest
|
||||
|
||||
- name: Setup Geckodriver
|
||||
if: matrix.selenium
|
||||
uses: browser-actions/setup-geckodriver@latest
|
||||
- name: Configure browser tests
|
||||
if: matrix.browser
|
||||
run: echo "PYTEST_ADDOPTS=$PYTEST_ADDOPTS -m browser" >> "${GITHUB_ENV}"
|
||||
|
||||
- name: Configure selenium tests
|
||||
if: matrix.selenium
|
||||
run: echo "PYTEST_ADDOPTS=$PYTEST_ADDOPTS -m selenium" >> "${GITHUB_ENV}"
|
||||
- name: Ensure browsers are installed for playwright
|
||||
if: matrix.browser
|
||||
run: python -m playwright install --with-deps
|
||||
|
||||
- name: Run pytest
|
||||
run: |
|
||||
pytest --maxfail=2 --cov=jupyterhub jupyterhub/tests
|
||||
pytest -k "${{ matrix.subset }}" --maxfail=2 --cov=jupyterhub jupyterhub/tests
|
||||
|
||||
- uses: codecov/codecov-action@v3
|
||||
- uses: codecov/codecov-action@v4
|
||||
|
||||
docker-build:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 20
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: build images
|
||||
run: |
|
||||
docker build -t jupyterhub/jupyterhub .
|
||||
DOCKER_BUILDKIT=1 docker build -t jupyterhub/jupyterhub .
|
||||
docker build -t jupyterhub/jupyterhub-onbuild onbuild
|
||||
docker build -t jupyterhub/jupyterhub:alpine -f dockerfiles/Dockerfile.alpine .
|
||||
docker build -t jupyterhub/singleuser singleuser
|
||||
|
||||
- name: smoke test jupyterhub
|
||||
|
10
.gitignore
vendored
@@ -9,15 +9,21 @@ docs/_build
|
||||
docs/build
|
||||
docs/source/_static/rest-api
|
||||
docs/source/rbac/scope-table.md
|
||||
docs/source/reference/metrics.md
|
||||
|
||||
.ipynb_checkpoints
|
||||
.virtual_documents
|
||||
|
||||
jsx/build/
|
||||
# ignore config file at the top-level of the repo
|
||||
# but not sub-dirs
|
||||
/jupyterhub_config.py
|
||||
jupyterhub_cookie_secret
|
||||
jupyterhub.sqlite
|
||||
package-lock.json
|
||||
jupyterhub.sqlite*
|
||||
share/jupyterhub/static/components
|
||||
share/jupyterhub/static/css/style.css
|
||||
share/jupyterhub/static/css/style.css.map
|
||||
share/jupyterhub/static/css/style.min.css
|
||||
share/jupyterhub/static/css/style.min.css.map
|
||||
share/jupyterhub/static/js/admin-react.js*
|
||||
@@ -34,3 +40,5 @@ docs/source/reference/metrics.rst
|
||||
oldest-requirements.txt
|
||||
jupyterhub-proxy.pid
|
||||
examples/server-api/service-token
|
||||
|
||||
*.hot-update*
|
||||
|
@@ -8,54 +8,50 @@
|
||||
# - Run on all files: pre-commit run --all-files
|
||||
# - Register git hooks: pre-commit install --install-hooks
|
||||
#
|
||||
|
||||
ci:
|
||||
# pre-commit.ci will open PRs updating our hooks once a month
|
||||
autoupdate_schedule: monthly
|
||||
|
||||
repos:
|
||||
# Autoformat: Python code, syntax patterns are modernized
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v3.2.2
|
||||
# autoformat and lint Python code
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.3.5
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
args:
|
||||
- --py36-plus
|
||||
|
||||
# Autoformat: Python code
|
||||
- repo: https://github.com/PyCQA/autoflake
|
||||
rev: v2.0.0
|
||||
hooks:
|
||||
- id: autoflake
|
||||
# args ref: https://github.com/PyCQA/autoflake#advanced-usage
|
||||
args:
|
||||
- --in-place
|
||||
|
||||
# Autoformat: Python code
|
||||
- repo: https://github.com/pycqa/isort
|
||||
rev: 5.10.1
|
||||
hooks:
|
||||
- id: isort
|
||||
|
||||
# Autoformat: Python code
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 22.10.0
|
||||
hooks:
|
||||
- id: black
|
||||
- id: ruff
|
||||
types_or:
|
||||
- python
|
||||
- jupyter
|
||||
args: ["--fix", "--show-fixes"]
|
||||
- id: ruff-format
|
||||
types_or:
|
||||
- python
|
||||
- jupyter
|
||||
|
||||
# Autoformat: markdown, yaml, javascript (see the file .prettierignore)
|
||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
||||
rev: v3.0.0-alpha.4
|
||||
rev: v4.0.0-alpha.8
|
||||
hooks:
|
||||
- id: prettier
|
||||
exclude: .*/templates/.*
|
||||
|
||||
# autoformat HTML templates
|
||||
- repo: https://github.com/djlint/djLint
|
||||
rev: v1.34.1
|
||||
hooks:
|
||||
- id: djlint-reformat-jinja
|
||||
files: ".*templates/.*.html"
|
||||
types_or: ["html"]
|
||||
- id: djlint-jinja
|
||||
files: ".*templates/.*.html"
|
||||
types_or: ["html"]
|
||||
|
||||
# Autoformat and linting, misc. details
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.4.0
|
||||
rev: v4.5.0
|
||||
hooks:
|
||||
- id: end-of-file-fixer
|
||||
exclude: share/jupyterhub/static/js/admin-react.js
|
||||
- id: requirements-txt-fixer
|
||||
- id: check-case-conflict
|
||||
- id: check-executables-have-shebangs
|
||||
|
||||
# Linting: Python code (see the file .flake8)
|
||||
- repo: https://github.com/PyCQA/flake8
|
||||
rev: "6.0.0"
|
||||
hooks:
|
||||
- id: flake8
|
||||
|
@@ -1,2 +1,4 @@
|
||||
share/jupyterhub/templates/
|
||||
share/jupyterhub/static/js/admin-react.js
|
||||
jupyterhub/singleuser/templates/
|
||||
docs/source/_templates/
|
||||
|
@@ -8,13 +8,14 @@ sphinx:
|
||||
configuration: docs/source/conf.py
|
||||
|
||||
build:
|
||||
os: ubuntu-20.04
|
||||
os: ubuntu-22.04
|
||||
tools:
|
||||
nodejs: "16"
|
||||
python: "3.9"
|
||||
nodejs: "20"
|
||||
python: "3.11"
|
||||
|
||||
python:
|
||||
install:
|
||||
- path: .
|
||||
- requirements: docs/requirements.txt
|
||||
|
||||
formats:
|
||||
|
139
Dockerfile
@@ -6,7 +6,7 @@
|
||||
#
|
||||
# Option 1:
|
||||
#
|
||||
# FROM jupyterhub/jupyterhub:latest
|
||||
# FROM quay.io/jupyterhub/jupyterhub:latest
|
||||
#
|
||||
# And put your configuration file jupyterhub_config.py in /srv/jupyterhub/jupyterhub_config.py.
|
||||
#
|
||||
@@ -14,90 +14,133 @@
|
||||
#
|
||||
# Or you can create your jupyterhub config and database on the host machine, and mount it with:
|
||||
#
|
||||
# docker run -v $PWD:/srv/jupyterhub -t jupyterhub/jupyterhub
|
||||
# docker run -v $PWD:/srv/jupyterhub -t quay.io/jupyterhub/jupyterhub
|
||||
#
|
||||
# NOTE
|
||||
# If you base on jupyterhub/jupyterhub-onbuild
|
||||
# If you base on quay.io/jupyterhub/jupyterhub-onbuild
|
||||
# your jupyterhub_config.py will be added automatically
|
||||
# from your docker directory.
|
||||
|
||||
######################################################################
|
||||
# This Dockerfile uses multi-stage builds with optimisations to build
|
||||
# the JupyterHub wheel on the native architecture only
|
||||
# https://www.docker.com/blog/faster-multi-platform-builds-dockerfile-cross-compilation-guide/
|
||||
|
||||
ARG BASE_IMAGE=ubuntu:22.04
|
||||
FROM $BASE_IMAGE AS builder
|
||||
|
||||
USER root
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
RUN apt-get update \
|
||||
&& apt-get install -yq --no-install-recommends \
|
||||
######################################################################
|
||||
# The JupyterHub wheel is pure Python so can be built for any platform
|
||||
# on the native architecture (avoiding QEMU emulation)
|
||||
FROM --platform=${BUILDPLATFORM:-linux/amd64} $BASE_IMAGE AS jupyterhub-builder
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Don't clear apt cache, and don't combine RUN commands, so that cached layers can
|
||||
# be reused in other stages
|
||||
|
||||
RUN apt-get update -qq \
|
||||
&& apt-get install -yqq --no-install-recommends \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
curl \
|
||||
git \
|
||||
gnupg \
|
||||
locales \
|
||||
python3-dev \
|
||||
python3-pip \
|
||||
python3-pycurl \
|
||||
python3-venv \
|
||||
nodejs \
|
||||
npm \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN python3 -m pip install --upgrade setuptools pip build wheel
|
||||
RUN npm install --global yarn
|
||||
&& python3 -m pip install --no-cache-dir --upgrade setuptools pip build wheel
|
||||
# Ubuntu 22.04 comes with Nodejs 12 which is too old for building JupyterHub JS
|
||||
# It's fine at runtime though (used only by configurable-http-proxy)
|
||||
ARG NODE_MAJOR=20
|
||||
RUN mkdir -p /etc/apt/keyrings \
|
||||
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
|
||||
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install -yqq --no-install-recommends \
|
||||
nodejs
|
||||
|
||||
WORKDIR /src/jupyterhub
|
||||
# copy everything except whats in .dockerignore, its a
|
||||
# compromise between needing to rebuild and maintaining
|
||||
# what needs to be part of the build
|
||||
COPY . /src/jupyterhub/
|
||||
WORKDIR /src/jupyterhub
|
||||
COPY . .
|
||||
|
||||
# Build client component packages (they will be copied into ./share and
|
||||
# packaged with the built wheel.)
|
||||
RUN python3 -m build --wheel
|
||||
RUN python3 -m pip wheel --wheel-dir wheelhouse dist/*.whl
|
||||
ARG PIP_CACHE_DIR=/tmp/pip-cache
|
||||
RUN --mount=type=cache,target=${PIP_CACHE_DIR} \
|
||||
python3 -m build --wheel
|
||||
|
||||
# verify installed files
|
||||
RUN --mount=type=cache,target=${PIP_CACHE_DIR} \
|
||||
python3 -m pip install ./dist/*.whl \
|
||||
&& cd ci \
|
||||
&& python3 check_installed_data.py
|
||||
|
||||
FROM $BASE_IMAGE
|
||||
|
||||
USER root
|
||||
######################################################################
|
||||
# All other wheels required by JupyterHub, some are platform specific
|
||||
FROM $BASE_IMAGE AS wheel-builder
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -yq --no-install-recommends \
|
||||
RUN apt-get update -qq \
|
||||
&& apt-get install -yqq --no-install-recommends \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
curl \
|
||||
gnupg \
|
||||
locales \
|
||||
python3-dev \
|
||||
python3-pip \
|
||||
python3-pycurl \
|
||||
nodejs \
|
||||
npm \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
python3-venv \
|
||||
&& python3 -m pip install --no-cache-dir --upgrade setuptools pip build wheel
|
||||
|
||||
ENV SHELL=/bin/bash \
|
||||
WORKDIR /src/jupyterhub
|
||||
|
||||
COPY --from=jupyterhub-builder /src/jupyterhub/dist/*.whl /src/jupyterhub/dist/
|
||||
ARG PIP_CACHE_DIR=/tmp/pip-cache
|
||||
RUN --mount=type=cache,target=${PIP_CACHE_DIR} \
|
||||
python3 -m pip wheel --wheel-dir wheelhouse dist/*.whl
|
||||
|
||||
|
||||
######################################################################
|
||||
# The final JupyterHub image, platform specific
|
||||
FROM $BASE_IMAGE AS jupyterhub
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive \
|
||||
SHELL=/bin/bash \
|
||||
LC_ALL=en_US.UTF-8 \
|
||||
LANG=en_US.UTF-8 \
|
||||
LANGUAGE=en_US.UTF-8
|
||||
|
||||
RUN locale-gen $LC_ALL
|
||||
|
||||
# always make sure pip is up to date!
|
||||
RUN python3 -m pip install --no-cache --upgrade setuptools pip
|
||||
|
||||
RUN npm install -g configurable-http-proxy@^4.2.0 \
|
||||
&& rm -rf ~/.npm
|
||||
|
||||
# install the wheels we built in the first stage
|
||||
COPY --from=builder /src/jupyterhub/wheelhouse /tmp/wheelhouse
|
||||
RUN python3 -m pip install --no-cache /tmp/wheelhouse/*
|
||||
|
||||
RUN mkdir -p /srv/jupyterhub/
|
||||
WORKDIR /srv/jupyterhub/
|
||||
LANGUAGE=en_US.UTF-8 \
|
||||
PYTHONDONTWRITEBYTECODE=1
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
LABEL maintainer="Jupyter Project <jupyter@googlegroups.com>"
|
||||
LABEL org.jupyter.service="jupyterhub"
|
||||
|
||||
WORKDIR /srv/jupyterhub
|
||||
|
||||
RUN apt-get update -qq \
|
||||
&& apt-get install -yqq --no-install-recommends \
|
||||
ca-certificates \
|
||||
curl \
|
||||
gnupg \
|
||||
locales \
|
||||
python-is-python3 \
|
||||
python3-pip \
|
||||
python3-pycurl \
|
||||
nodejs \
|
||||
npm \
|
||||
&& locale-gen $LC_ALL \
|
||||
&& npm install -g configurable-http-proxy@^4.2.0 \
|
||||
# clean cache and logs
|
||||
&& rm -rf /var/lib/apt/lists/* /var/log/* /var/tmp/* ~/.npm
|
||||
# install the wheels we built in the previous stage
|
||||
RUN --mount=type=cache,from=wheel-builder,source=/src/jupyterhub/wheelhouse,target=/tmp/wheelhouse \
|
||||
# always make sure pip is up to date!
|
||||
python3 -m pip install --no-compile --no-cache-dir --upgrade setuptools pip \
|
||||
&& python3 -m pip install --no-compile --no-cache-dir /tmp/wheelhouse/*
|
||||
|
||||
CMD ["jupyterhub"]
|
||||
|
36
MANIFEST.in
@@ -1,29 +1,13 @@
|
||||
include README.md
|
||||
include COPYING.md
|
||||
include setupegg.py
|
||||
include bower-lite
|
||||
include package.json
|
||||
# using setuptools-scm means we only need to handle _non-tracked files here_
|
||||
|
||||
include package-lock.json
|
||||
include *requirements.txt
|
||||
include Dockerfile
|
||||
|
||||
graft onbuild
|
||||
graft jsx
|
||||
graft jupyterhub
|
||||
graft scripts
|
||||
# include untracked js/css artifacts, components
|
||||
graft share
|
||||
graft singleuser
|
||||
graft ci
|
||||
|
||||
# Documentation
|
||||
graft docs
|
||||
prune docs/node_modules
|
||||
|
||||
# Intermediate javascript files
|
||||
prune jsx/node_modules
|
||||
prune jsx/build
|
||||
|
||||
# prune some large unused files from components
|
||||
# prune some large unused files from components.
|
||||
# these patterns affect source distributions (sdists)
|
||||
# we have stricter exclusions from installation in setup.py:get_data_files
|
||||
prune share/jupyterhub/static/components/bootstrap/dist/css
|
||||
exclude share/jupyterhub/static/components/bootstrap/dist/fonts/*.svg
|
||||
prune share/jupyterhub/static/components/font-awesome/css
|
||||
@@ -33,11 +17,3 @@ prune share/jupyterhub/static/components/jquery/external
|
||||
prune share/jupyterhub/static/components/jquery/src
|
||||
prune share/jupyterhub/static/components/moment/lang
|
||||
prune share/jupyterhub/static/components/moment/min
|
||||
|
||||
# Patterns to exclude from any directory
|
||||
global-exclude *~
|
||||
global-exclude *.pyc
|
||||
global-exclude *.pyo
|
||||
global-exclude .git
|
||||
global-exclude .ipynb_checkpoints
|
||||
global-exclude .bower.json
|
||||
|
24
README.md
@@ -8,22 +8,12 @@
|
||||
|
||||
---
|
||||
|
||||
Please note that this repository is participating in a study into the sustainability of open source projects. Data will be gathered about this repository for approximately the next 12 months, starting from 2021-06-11.
|
||||
|
||||
Data collected will include the number of contributors, number of PRs, time taken to close/merge these PRs, and issues closed.
|
||||
|
||||
For more information, please visit
|
||||
[our informational page](https://sustainable-open-science-and-software.github.io/) or download our [participant information sheet](https://sustainable-open-science-and-software.github.io/assets/PIS_sustainable_software.pdf).
|
||||
|
||||
---
|
||||
|
||||
# [JupyterHub](https://github.com/jupyterhub/jupyterhub)
|
||||
|
||||
[](https://pypi.python.org/pypi/jupyterhub)
|
||||
[](https://anaconda.org/conda-forge/jupyterhub)
|
||||
[](https://jupyterhub.readthedocs.org/en/latest/)
|
||||
[](https://github.com/jupyterhub/jupyterhub/actions)
|
||||
[](https://hub.docker.com/r/jupyterhub/jupyterhub/tags)
|
||||
[](https://codecov.io/gh/jupyterhub/jupyterhub)
|
||||
[](https://github.com/jupyterhub/jupyterhub/issues)
|
||||
[](https://discourse.jupyter.org/c/jupyterhub)
|
||||
@@ -66,7 +56,7 @@ for administration of the Hub and its users.
|
||||
### Check prerequisites
|
||||
|
||||
- A Linux/Unix based system
|
||||
- [Python](https://www.python.org/downloads/) 3.6 or greater
|
||||
- [Python](https://www.python.org/downloads/) 3.8 or greater
|
||||
- [nodejs/npm](https://www.npmjs.com/)
|
||||
|
||||
- If you are using **`conda`**, the nodejs and npm dependencies will be installed for
|
||||
@@ -127,7 +117,7 @@ more configuration of the system.
|
||||
|
||||
## Configuration
|
||||
|
||||
The [Getting Started](https://jupyterhub.readthedocs.io/en/latest/getting-started/index.html) section of the
|
||||
The [Getting Started](https://jupyterhub.readthedocs.io/en/latest/tutorial/index.html#getting-started) section of the
|
||||
documentation explains the common steps in setting up JupyterHub.
|
||||
|
||||
The [**JupyterHub tutorial**](https://github.com/jupyterhub/jupyterhub-tutorial)
|
||||
@@ -169,10 +159,10 @@ To start the Hub on a specific url and port `10.0.1.2:443` with **https**:
|
||||
|
||||
## Docker
|
||||
|
||||
A starter [**docker image for JupyterHub**](https://hub.docker.com/r/jupyterhub/jupyterhub/)
|
||||
A starter [**docker image for JupyterHub**](https://quay.io/repository/jupyterhub/jupyterhub)
|
||||
gives a baseline deployment of JupyterHub using Docker.
|
||||
|
||||
**Important:** This `jupyterhub/jupyterhub` image contains only the Hub itself,
|
||||
**Important:** This `quay.io/jupyterhub/jupyterhub` image contains only the Hub itself,
|
||||
with no configuration. In general, one needs to make a derivative image, with
|
||||
at least a `jupyterhub_config.py` setting up an Authenticator and/or a Spawner.
|
||||
To run the single-user servers, which may be on the same system as the Hub or
|
||||
@@ -180,7 +170,7 @@ not, Jupyter Notebook version 4 or greater must be installed.
|
||||
|
||||
The JupyterHub docker image can be started with the following command:
|
||||
|
||||
docker run -p 8000:8000 -d --name jupyterhub jupyterhub/jupyterhub jupyterhub
|
||||
docker run -p 8000:8000 -d --name jupyterhub quay.io/jupyterhub/jupyterhub jupyterhub
|
||||
|
||||
This command will create a container named `jupyterhub` that you can
|
||||
**stop and resume** with `docker stop/start`.
|
||||
@@ -239,9 +229,9 @@ You can also talk with us on our JupyterHub [Gitter](https://gitter.im/jupyterhu
|
||||
|
||||
- [Reporting Issues](https://github.com/jupyterhub/jupyterhub/issues)
|
||||
- [JupyterHub tutorial](https://github.com/jupyterhub/jupyterhub-tutorial)
|
||||
- [Documentation for JupyterHub](https://jupyterhub.readthedocs.io/en/latest/) | [PDF (latest)](https://media.readthedocs.org/pdf/jupyterhub/latest/jupyterhub.pdf) | [PDF (stable)](https://media.readthedocs.org/pdf/jupyterhub/stable/jupyterhub.pdf)
|
||||
- [Documentation for JupyterHub](https://jupyterhub.readthedocs.io/en/latest/)
|
||||
- [Documentation for JupyterHub's REST API][rest api]
|
||||
- [Documentation for Project Jupyter](http://jupyter.readthedocs.io/en/latest/index.html) | [PDF](https://media.readthedocs.org/pdf/jupyter/latest/jupyter.pdf)
|
||||
- [Documentation for Project Jupyter](http://jupyter.readthedocs.io/en/latest/index.html)
|
||||
- [Project Jupyter website](https://jupyter.org)
|
||||
- [Project Jupyter community](https://jupyter.org/community)
|
||||
|
||||
|
@@ -7,6 +7,7 @@ bower-lite
|
||||
Since Bower's on its way out,
|
||||
stage frontend dependencies from node_modules into components
|
||||
"""
|
||||
|
||||
import json
|
||||
import os
|
||||
import shutil
|
||||
|
@@ -2,19 +2,35 @@
|
||||
# Check that installed package contains everything we expect
|
||||
|
||||
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
import jupyterhub
|
||||
from jupyterhub._data import DATA_FILES_PATH
|
||||
|
||||
print("Checking jupyterhub._data")
|
||||
print(f"DATA_FILES_PATH={DATA_FILES_PATH}")
|
||||
assert os.path.exists(DATA_FILES_PATH), DATA_FILES_PATH
|
||||
print("Checking jupyterhub._data", end=" ")
|
||||
print(f"DATA_FILES_PATH={DATA_FILES_PATH}", end=" ")
|
||||
DATA_FILES_PATH = Path(DATA_FILES_PATH)
|
||||
assert DATA_FILES_PATH.is_dir(), DATA_FILES_PATH
|
||||
for subpath in (
|
||||
"templates/page.html",
|
||||
"templates/spawn.html",
|
||||
"static/css/style.min.css",
|
||||
"static/components/jquery/dist/jquery.js",
|
||||
"static/js/admin-react.js",
|
||||
):
|
||||
path = os.path.join(DATA_FILES_PATH, subpath)
|
||||
assert os.path.exists(path), path
|
||||
path = DATA_FILES_PATH / subpath
|
||||
assert path.is_file(), path
|
||||
|
||||
print("OK")
|
||||
|
||||
print("Checking package_data", end=" ")
|
||||
jupyterhub_path = Path(jupyterhub.__file__).parent.resolve()
|
||||
for subpath in (
|
||||
"alembic.ini",
|
||||
"alembic/versions/833da8570507_rbac.py",
|
||||
"event-schemas/server-actions/v1.yaml",
|
||||
"singleuser/templates/page.html",
|
||||
):
|
||||
path = jupyterhub_path / subpath
|
||||
assert path.is_file(), path
|
||||
|
||||
print("OK")
|
||||
|
@@ -21,7 +21,7 @@ fi
|
||||
# Configure a set of databases in the database server for upgrade tests
|
||||
# this list must be in sync with versions in test_db.py:test_upgrade
|
||||
set -x
|
||||
for SUFFIX in '' _upgrade_110 _upgrade_122 _upgrade_130 _upgrade_150 _upgrade_211; do
|
||||
for SUFFIX in '' _upgrade_110 _upgrade_122 _upgrade_130 _upgrade_150 _upgrade_211 _upgrade_311; do
|
||||
$SQL_CLIENT "DROP DATABASE jupyterhub${SUFFIX};" 2>/dev/null || true
|
||||
$SQL_CLIENT "CREATE DATABASE jupyterhub${SUFFIX} ${EXTRA_CREATE_DATABASE_ARGS:-};"
|
||||
done
|
||||
|
13
ci/oldest-dependencies/oldest-dependencies.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
alembic==1.4
|
||||
async_generator==1.9
|
||||
certipy==0.1.2
|
||||
importlib_metadata==3.6; python_version < '3.10'
|
||||
jinja2==2.11.0
|
||||
jupyter_telemetry==0.1.0
|
||||
oauthlib==3.0
|
||||
pamela==1.1.0; sys_platform != 'win32'
|
||||
prometheus_client==0.5.0
|
||||
psutil==5.6.5; sys_platform == 'win32'
|
||||
SQLAlchemy==1.4.1
|
||||
tornado==5.1
|
||||
traitlets==4.3.2
|
20
ci/oldest-dependencies/requirements.in
Normal file
@@ -0,0 +1,20 @@
|
||||
# oldest-dependencies.txt is autogenerated.
|
||||
# recreate with:
|
||||
# cat requirements.txt | grep '>=' | sed -e 's@>=@==@g' > ci/legacy-env/oldest-dependencies.txt
|
||||
-r ./oldest-dependencies.txt
|
||||
# then `pip-compile` with Python 3.8
|
||||
# below are additional pins to make this a working test env
|
||||
# these are extracted from jupyterhub[test]
|
||||
beautifulsoup4
|
||||
coverage
|
||||
playwright
|
||||
pytest
|
||||
pytest-cov
|
||||
pytest-asyncio==0.17.*
|
||||
requests-mock
|
||||
virtualenv
|
||||
|
||||
# and any additional pins to make this a working test env
|
||||
# e.g. pinning down a transitive dependency
|
||||
notebook==6.*
|
||||
markupsafe==2.0.*
|
285
ci/oldest-dependencies/requirements.old
Normal file
@@ -0,0 +1,285 @@
|
||||
#
|
||||
# This file is autogenerated by pip-compile with Python 3.8
|
||||
# by the following command:
|
||||
#
|
||||
# pip-compile --output-file=requirements.old
|
||||
#
|
||||
alembic==1.4.0
|
||||
# via -r ./oldest-dependencies.txt
|
||||
appnope==0.1.3
|
||||
# via
|
||||
# ipykernel
|
||||
# ipython
|
||||
argon2-cffi==23.1.0
|
||||
# via notebook
|
||||
argon2-cffi-bindings==21.2.0
|
||||
# via argon2-cffi
|
||||
async-generator==1.9
|
||||
# via -r ./oldest-dependencies.txt
|
||||
attrs==23.1.0
|
||||
# via
|
||||
# jsonschema
|
||||
# referencing
|
||||
backcall==0.2.0
|
||||
# via ipython
|
||||
beautifulsoup4==4.12.2
|
||||
# via -r requirements.in
|
||||
bleach==6.0.0
|
||||
# via nbconvert
|
||||
certifi==2023.7.22
|
||||
# via requests
|
||||
certipy==0.1.2
|
||||
# via -r ./oldest-dependencies.txt
|
||||
cffi==1.15.1
|
||||
# via
|
||||
# argon2-cffi-bindings
|
||||
# cryptography
|
||||
charset-normalizer==3.2.0
|
||||
# via requests
|
||||
coverage[toml]==7.3.1
|
||||
# via
|
||||
# -r requirements.in
|
||||
# pytest-cov
|
||||
cryptography==41.0.4
|
||||
# via pyopenssl
|
||||
debugpy==1.8.0
|
||||
# via ipykernel
|
||||
decorator==5.1.1
|
||||
# via
|
||||
# ipython
|
||||
# traitlets
|
||||
defusedxml==0.7.1
|
||||
# via nbconvert
|
||||
distlib==0.3.7
|
||||
# via virtualenv
|
||||
entrypoints==0.4
|
||||
# via
|
||||
# jupyter-client
|
||||
# nbconvert
|
||||
exceptiongroup==1.1.3
|
||||
# via pytest
|
||||
fastjsonschema==2.18.0
|
||||
# via nbformat
|
||||
filelock==3.12.4
|
||||
# via virtualenv
|
||||
greenlet==2.0.2
|
||||
# via
|
||||
# playwright
|
||||
# sqlalchemy
|
||||
idna==3.4
|
||||
# via requests
|
||||
importlib-metadata==3.6.0 ; python_version < "3.10"
|
||||
# via -r ./oldest-dependencies.txt
|
||||
importlib-resources==6.1.0
|
||||
# via
|
||||
# jsonschema
|
||||
# jsonschema-specifications
|
||||
iniconfig==2.0.0
|
||||
# via pytest
|
||||
ipykernel==6.4.2
|
||||
# via notebook
|
||||
ipython==7.34.0
|
||||
# via ipykernel
|
||||
ipython-genutils==0.2.0
|
||||
# via
|
||||
# ipykernel
|
||||
# notebook
|
||||
# traitlets
|
||||
jedi==0.19.0
|
||||
# via ipython
|
||||
jinja2==2.11.0
|
||||
# via
|
||||
# -r ./oldest-dependencies.txt
|
||||
# nbconvert
|
||||
# notebook
|
||||
jsonschema==4.19.1
|
||||
# via
|
||||
# jupyter-telemetry
|
||||
# nbformat
|
||||
jsonschema-specifications==2023.7.1
|
||||
# via jsonschema
|
||||
jupyter-client==7.2.0
|
||||
# via
|
||||
# ipykernel
|
||||
# nbclient
|
||||
# notebook
|
||||
jupyter-core==5.0.0
|
||||
# via
|
||||
# jupyter-client
|
||||
# nbconvert
|
||||
# nbformat
|
||||
# notebook
|
||||
jupyter-telemetry==0.1.0
|
||||
# via -r ./oldest-dependencies.txt
|
||||
jupyterlab-pygments==0.2.2
|
||||
# via nbconvert
|
||||
mako==1.2.4
|
||||
# via alembic
|
||||
markupsafe==2.0.1
|
||||
# via
|
||||
# -r requirements.in
|
||||
# jinja2
|
||||
# mako
|
||||
matplotlib-inline==0.1.6
|
||||
# via
|
||||
# ipykernel
|
||||
# ipython
|
||||
mistune==0.8.4
|
||||
# via nbconvert
|
||||
nbclient==0.5.11
|
||||
# via nbconvert
|
||||
nbconvert==6.0.7
|
||||
# via notebook
|
||||
nbformat==5.3.0
|
||||
# via
|
||||
# nbclient
|
||||
# nbconvert
|
||||
# notebook
|
||||
nest-asyncio==1.5.8
|
||||
# via
|
||||
# jupyter-client
|
||||
# nbclient
|
||||
notebook==6.1.6
|
||||
# via -r requirements.in
|
||||
oauthlib==3.0.0
|
||||
# via -r ./oldest-dependencies.txt
|
||||
packaging==23.1
|
||||
# via pytest
|
||||
pamela==1.1.0 ; sys_platform != "win32"
|
||||
# via -r ./oldest-dependencies.txt
|
||||
pandocfilters==1.5.0
|
||||
# via nbconvert
|
||||
parso==0.8.3
|
||||
# via jedi
|
||||
pexpect==4.8.0
|
||||
# via ipython
|
||||
pickleshare==0.7.5
|
||||
# via ipython
|
||||
pkgutil-resolve-name==1.3.10
|
||||
# via jsonschema
|
||||
platformdirs==3.10.0
|
||||
# via
|
||||
# jupyter-core
|
||||
# virtualenv
|
||||
playwright==1.38.0
|
||||
# via -r requirements.in
|
||||
pluggy==1.3.0
|
||||
# via pytest
|
||||
prometheus-client==0.5.0
|
||||
# via
|
||||
# -r ./oldest-dependencies.txt
|
||||
# notebook
|
||||
prompt-toolkit==3.0.39
|
||||
# via ipython
|
||||
ptyprocess==0.7.0
|
||||
# via
|
||||
# pexpect
|
||||
# terminado
|
||||
pycparser==2.21
|
||||
# via cffi
|
||||
pyee==9.0.4
|
||||
# via playwright
|
||||
pygments==2.16.1
|
||||
# via
|
||||
# ipython
|
||||
# nbconvert
|
||||
pyopenssl==23.2.0
|
||||
# via certipy
|
||||
pytest==7.4.2
|
||||
# via
|
||||
# -r requirements.in
|
||||
# pytest-asyncio
|
||||
# pytest-cov
|
||||
pytest-asyncio==0.17.2
|
||||
# via -r requirements.in
|
||||
pytest-cov==4.1.0
|
||||
# via -r requirements.in
|
||||
python-dateutil==2.8.2
|
||||
# via
|
||||
# alembic
|
||||
# jupyter-client
|
||||
python-editor==1.0.4
|
||||
# via alembic
|
||||
python-json-logger==2.0.7
|
||||
# via jupyter-telemetry
|
||||
pyzmq==25.1.1
|
||||
# via
|
||||
# jupyter-client
|
||||
# notebook
|
||||
referencing==0.30.2
|
||||
# via
|
||||
# jsonschema
|
||||
# jsonschema-specifications
|
||||
requests==2.31.0
|
||||
# via requests-mock
|
||||
requests-mock==1.11.0
|
||||
# via -r requirements.in
|
||||
rpds-py==0.10.3
|
||||
# via
|
||||
# jsonschema
|
||||
# referencing
|
||||
ruamel-yaml==0.17.32
|
||||
# via jupyter-telemetry
|
||||
ruamel-yaml-clib==0.2.7
|
||||
# via ruamel-yaml
|
||||
send2trash==1.8.2
|
||||
# via notebook
|
||||
six==1.16.0
|
||||
# via
|
||||
# bleach
|
||||
# python-dateutil
|
||||
# requests-mock
|
||||
# traitlets
|
||||
soupsieve==2.5
|
||||
# via beautifulsoup4
|
||||
sqlalchemy==1.4.1
|
||||
# via
|
||||
# -r ./oldest-dependencies.txt
|
||||
# alembic
|
||||
terminado==0.13.3
|
||||
# via notebook
|
||||
testpath==0.6.0
|
||||
# via nbconvert
|
||||
tomli==2.0.1
|
||||
# via
|
||||
# coverage
|
||||
# pytest
|
||||
tornado==5.1
|
||||
# via
|
||||
# -r ./oldest-dependencies.txt
|
||||
# ipykernel
|
||||
# jupyter-client
|
||||
# notebook
|
||||
# terminado
|
||||
traitlets==4.3.2
|
||||
# via
|
||||
# -r ./oldest-dependencies.txt
|
||||
# ipykernel
|
||||
# ipython
|
||||
# jupyter-client
|
||||
# jupyter-core
|
||||
# jupyter-telemetry
|
||||
# matplotlib-inline
|
||||
# nbclient
|
||||
# nbconvert
|
||||
# nbformat
|
||||
# notebook
|
||||
typing-extensions==4.8.0
|
||||
# via
|
||||
# playwright
|
||||
# pyee
|
||||
urllib3==2.0.5
|
||||
# via requests
|
||||
virtualenv==20.24.5
|
||||
# via -r requirements.in
|
||||
wcwidth==0.2.6
|
||||
# via prompt-toolkit
|
||||
webencodings==0.5.1
|
||||
# via bleach
|
||||
zipp==3.17.0
|
||||
# via
|
||||
# importlib-metadata
|
||||
# importlib-resources
|
||||
|
||||
# The following packages are considered to be unsafe in a requirements file:
|
||||
# setuptools
|
@@ -3,7 +3,7 @@
|
||||
# This should only be used for demo or testing and not as a base image to build on.
|
||||
#
|
||||
# It includes the notebook package and it uses the DummyAuthenticator and the SimpleLocalProcessSpawner.
|
||||
ARG BASE_IMAGE=jupyterhub/jupyterhub-onbuild
|
||||
ARG BASE_IMAGE=quay.io/jupyterhub/jupyterhub-onbuild
|
||||
FROM ${BASE_IMAGE}
|
||||
|
||||
# Install the notebook package
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# Configuration file for jupyterhub-demo
|
||||
|
||||
c = get_config()
|
||||
c = get_config() # noqa
|
||||
|
||||
# Use DummyAuthenticator and SimpleSpawner
|
||||
c.JupyterHub.spawner_class = "simple"
|
||||
|
@@ -1,14 +0,0 @@
|
||||
FROM alpine:3.13
|
||||
ENV LANG=en_US.UTF-8
|
||||
RUN apk add --no-cache \
|
||||
python3 \
|
||||
py3-pip \
|
||||
py3-ruamel.yaml \
|
||||
py3-cryptography \
|
||||
py3-sqlalchemy
|
||||
|
||||
ARG JUPYTERHUB_VERSION=1.3.0
|
||||
RUN pip3 install --no-cache jupyterhub==${JUPYTERHUB_VERSION}
|
||||
|
||||
USER nobody
|
||||
CMD ["jupyterhub"]
|
@@ -1,22 +0,0 @@
|
||||
## What is Dockerfile.alpine
|
||||
|
||||
Dockerfile.alpine contains the base image for jupyterhub. It does not work independently, but only as part of a full jupyterhub cluster
|
||||
|
||||
## How to use it?
|
||||
|
||||
You will need:
|
||||
|
||||
1. A running configurable-http-proxy, whose API is accessible.
|
||||
2. A jupyterhub_config file.
|
||||
3. Authentication and other libraries required by the specific jupyterhub_config file.
|
||||
|
||||
## Steps to test it outside a cluster
|
||||
|
||||
- start configurable-http-proxy in another container
|
||||
- specify CONFIGPROXY_AUTH_TOKEN env in both containers
|
||||
- put both containers on the same network (e.g. docker network create jupyterhub; docker run ... --net jupyterhub)
|
||||
- tell jupyterhub where CHP is (e.g. c.ConfigurableHTTPProxy.api_url = 'http://chp:8001')
|
||||
- tell jupyterhub not to start the proxy itself (c.ConfigurableHTTPProxy.should_start = False)
|
||||
- Use a dummy authenticator for ease of testing. Update following in jupyterhub_config file
|
||||
- c.JupyterHub.authenticator_class = 'dummyauthenticator.DummyAuthenticator'
|
||||
- c.DummyAuthenticator.password = "your strong password"
|
240
docs/Makefile
@@ -1,212 +1,62 @@
|
||||
# Makefile for Sphinx documentation
|
||||
#
|
||||
# Makefile for Sphinx documentation generated by sphinx-quickstart
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
# You can set these variables from the command line.
|
||||
SPHINXOPTS = "-W"
|
||||
SPHINXBUILD = sphinx-build
|
||||
PAPER =
|
||||
BUILDDIR = build
|
||||
|
||||
# User-friendly check for sphinx-build
|
||||
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
|
||||
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
|
||||
endif
|
||||
|
||||
# Internal variables.
|
||||
PAPEROPT_a4 = -D latex_paper_size=a4
|
||||
PAPEROPT_letter = -D latex_paper_size=letter
|
||||
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
|
||||
# the i18n builder cannot share the environment and doctrees with the others
|
||||
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
|
||||
|
||||
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext
|
||||
# You can set these variables from the command line, and also
|
||||
# from the environment for the first two.
|
||||
SPHINXOPTS ?= --color -W --keep-going
|
||||
SPHINXBUILD ?= sphinx-build
|
||||
SOURCEDIR = source
|
||||
BUILDDIR = _build
|
||||
|
||||
# Put it first so that "make" without argument is like "make help".
|
||||
help:
|
||||
@echo "Please use \`make <target>' where <target> is one of"
|
||||
@echo " html to make standalone HTML files"
|
||||
@echo " dirhtml to make HTML files named index.html in directories"
|
||||
@echo " singlehtml to make a single large HTML file"
|
||||
@echo " pickle to make pickle files"
|
||||
@echo " json to make JSON files"
|
||||
@echo " htmlhelp to make HTML files and a HTML help project"
|
||||
@echo " qthelp to make HTML files and a qthelp project"
|
||||
@echo " applehelp to make an Apple Help Book"
|
||||
@echo " devhelp to make HTML files and a Devhelp project"
|
||||
@echo " epub to make an epub"
|
||||
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
|
||||
@echo " latexpdf to make LaTeX files and run them through pdflatex"
|
||||
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
|
||||
@echo " text to make text files"
|
||||
@echo " man to make manual pages"
|
||||
@echo " texinfo to make Texinfo files"
|
||||
@echo " info to make Texinfo files and run them through makeinfo"
|
||||
@echo " gettext to make PO message catalogs"
|
||||
@echo " changes to make an overview of all changed/added/deprecated items"
|
||||
@echo " xml to make Docutils-native XML files"
|
||||
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
|
||||
@echo " linkcheck to check all external links for integrity"
|
||||
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
|
||||
@echo " coverage to run coverage check of the documentation (if enabled)"
|
||||
@echo " spelling to run spell check on documentation"
|
||||
@echo " metrics to generate documentation for metrics by inspecting the source code"
|
||||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)
|
||||
|
||||
clean:
|
||||
rm -rf $(BUILDDIR)/*
|
||||
.PHONY: help Makefile metrics scopes
|
||||
|
||||
metrics: source/reference/metrics.rst
|
||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||
# "make mode" option.
|
||||
#
|
||||
# Several sphinx-build commands can be used through this, for example:
|
||||
#
|
||||
# - make clean
|
||||
# - make linkcheck
|
||||
# - make spelling
|
||||
#
|
||||
%: Makefile
|
||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)
|
||||
|
||||
source/reference/metrics.rst: generate-metrics.py
|
||||
python3 generate-metrics.py
|
||||
|
||||
scopes: source/rbac/scope-table.md
|
||||
# Manually added targets - related to code generation
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
source/rbac/scope-table.md: source/rbac/generate-scope-table.py
|
||||
python3 source/rbac/generate-scope-table.py
|
||||
|
||||
# If the pre-requisites for the html target is updated, also update the Read The
|
||||
# Docs section in docs/source/conf.py.
|
||||
# For local development:
|
||||
# - builds the html
|
||||
# - NOTE: If the pre-requisites for the html target is updated, also update the
|
||||
# Read The Docs section in docs/source/conf.py.
|
||||
#
|
||||
html: metrics scopes
|
||||
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
||||
$(SPHINXBUILD) -b html "$(SOURCEDIR)" "$(BUILDDIR)/html" $(SPHINXOPTS)
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
||||
|
||||
dirhtml:
|
||||
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
|
||||
metrics: source/reference/metrics.md
|
||||
source/reference/metrics.md:
|
||||
python3 generate-metrics.py
|
||||
|
||||
singlehtml:
|
||||
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
|
||||
@echo
|
||||
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
|
||||
scopes: source/rbac/scope-table.md
|
||||
source/rbac/scope-table.md:
|
||||
python3 source/rbac/generate-scope-table.py
|
||||
|
||||
pickle:
|
||||
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
|
||||
@echo
|
||||
@echo "Build finished; now you can process the pickle files."
|
||||
|
||||
json:
|
||||
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
|
||||
@echo
|
||||
@echo "Build finished; now you can process the JSON files."
|
||||
# Manually added targets - related to development
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
htmlhelp:
|
||||
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
|
||||
@echo
|
||||
@echo "Build finished; now you can run HTML Help Workshop with the" \
|
||||
".hhp project file in $(BUILDDIR)/htmlhelp."
|
||||
|
||||
qthelp:
|
||||
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
|
||||
@echo
|
||||
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
|
||||
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
|
||||
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/JupyterHub.qhcp"
|
||||
@echo "To view the help file:"
|
||||
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/JupyterHub.qhc"
|
||||
|
||||
applehelp:
|
||||
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
|
||||
@echo
|
||||
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
|
||||
@echo "N.B. You won't be able to view it unless you put it in" \
|
||||
"~/Library/Documentation/Help or install it in your application" \
|
||||
"bundle."
|
||||
|
||||
devhelp:
|
||||
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
|
||||
@echo
|
||||
@echo "Build finished."
|
||||
@echo "To view the help file:"
|
||||
@echo "# mkdir -p $$HOME/.local/share/devhelp/JupyterHub"
|
||||
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/JupyterHub"
|
||||
@echo "# devhelp"
|
||||
|
||||
epub:
|
||||
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
|
||||
@echo
|
||||
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
|
||||
|
||||
latex:
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo
|
||||
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
|
||||
@echo "Run \`make' in that directory to run these through (pdf)latex" \
|
||||
"(use \`make latexpdf' here to do that automatically)."
|
||||
|
||||
latexpdf:
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo "Running LaTeX files through pdflatex..."
|
||||
$(MAKE) -C $(BUILDDIR)/latex all-pdf
|
||||
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
||||
|
||||
latexpdfja:
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo "Running LaTeX files through platex and dvipdfmx..."
|
||||
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
|
||||
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
||||
|
||||
text:
|
||||
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
|
||||
@echo
|
||||
@echo "Build finished. The text files are in $(BUILDDIR)/text."
|
||||
|
||||
man:
|
||||
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
|
||||
@echo
|
||||
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
|
||||
|
||||
texinfo:
|
||||
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
||||
@echo
|
||||
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
|
||||
@echo "Run \`make' in that directory to run these through makeinfo" \
|
||||
"(use \`make info' here to do that automatically)."
|
||||
|
||||
info:
|
||||
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
||||
@echo "Running Texinfo files through makeinfo..."
|
||||
make -C $(BUILDDIR)/texinfo info
|
||||
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
|
||||
|
||||
gettext:
|
||||
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
|
||||
@echo
|
||||
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
|
||||
|
||||
changes:
|
||||
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
|
||||
@echo
|
||||
@echo "The overview file is in $(BUILDDIR)/changes."
|
||||
|
||||
linkcheck:
|
||||
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
|
||||
@echo
|
||||
@echo "Link check complete; look for any errors in the above output " \
|
||||
"or in $(BUILDDIR)/linkcheck/output.txt."
|
||||
|
||||
spelling:
|
||||
$(SPHINXBUILD) -b spelling $(ALLSPHINXOPTS) $(BUILDDIR)/spelling
|
||||
@echo
|
||||
@echo "Spell check complete; look for any errors in the above output " \
|
||||
"or in $(BUILDDIR)/spelling/output.txt."
|
||||
doctest:
|
||||
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
|
||||
@echo "Testing of doctests in the sources finished, look at the " \
|
||||
"results in $(BUILDDIR)/doctest/output.txt."
|
||||
|
||||
coverage:
|
||||
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
|
||||
@echo "Testing of coverage in the sources finished, look at the " \
|
||||
"results in $(BUILDDIR)/coverage/python.txt."
|
||||
|
||||
xml:
|
||||
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
|
||||
@echo
|
||||
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
|
||||
|
||||
pseudoxml:
|
||||
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
|
||||
@echo
|
||||
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
|
||||
# For local development:
|
||||
# - requires sphinx-autobuild, see
|
||||
# https://sphinxcontrib-spelling.readthedocs.io/en/latest/
|
||||
# - builds and rebuilds html on changes to source, but does not re-generate
|
||||
# metrics/scopes files
|
||||
# - starts a livereload enabled webserver and opens up a browser
|
||||
devenv: html
|
||||
sphinx-autobuild -b html --open-browser "$(SOURCEDIR)" "$(BUILDDIR)/html"
|
||||
|
@@ -1,7 +1,6 @@
|
||||
import os
|
||||
|
||||
from pytablewriter import RstSimpleTableWriter
|
||||
from pytablewriter.style import Style
|
||||
from pytablewriter import MarkdownTableWriter
|
||||
|
||||
import jupyterhub.metrics
|
||||
|
||||
@@ -11,12 +10,11 @@ HERE = os.path.abspath(os.path.dirname(__file__))
|
||||
class Generator:
|
||||
@classmethod
|
||||
def create_writer(cls, table_name, headers, values):
|
||||
writer = RstSimpleTableWriter()
|
||||
writer = MarkdownTableWriter()
|
||||
writer.table_name = table_name
|
||||
writer.headers = headers
|
||||
writer.value_matrix = values
|
||||
writer.margin = 1
|
||||
[writer.set_style(header, Style(align="center")) for header in headers]
|
||||
return writer
|
||||
|
||||
def _parse_metrics(self):
|
||||
@@ -33,18 +31,17 @@ class Generator:
|
||||
if not os.path.exists(generated_directory):
|
||||
os.makedirs(generated_directory)
|
||||
|
||||
filename = f"{generated_directory}/metrics.rst"
|
||||
filename = f"{generated_directory}/metrics.md"
|
||||
table_name = ""
|
||||
headers = ["Type", "Name", "Description"]
|
||||
values = self._parse_metrics()
|
||||
writer = self.create_writer(table_name, headers, values)
|
||||
|
||||
title = "List of Prometheus Metrics"
|
||||
underline = "============================"
|
||||
content = f"{title}\n{underline}\n{writer.dumps()}"
|
||||
with open(filename, 'w') as f:
|
||||
f.write(content)
|
||||
print(f"Generated {filename}.")
|
||||
f.write("# List of Prometheus Metrics\n\n")
|
||||
f.write(writer.dumps())
|
||||
f.write("\n")
|
||||
print(f"Generated {filename}")
|
||||
|
||||
|
||||
def main():
|
||||
|
260
docs/make.bat
@@ -1,263 +1,49 @@
|
||||
@ECHO OFF
|
||||
|
||||
pushd %~dp0
|
||||
|
||||
REM Command file for Sphinx documentation
|
||||
|
||||
if "%SPHINXBUILD%" == "" (
|
||||
set SPHINXBUILD=--color -W --keep-going
|
||||
)
|
||||
if "%SPHINXBUILD%" == "" (
|
||||
set SPHINXBUILD=sphinx-build
|
||||
)
|
||||
set BUILDDIR=build
|
||||
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source
|
||||
set I18NSPHINXOPTS=%SPHINXOPTS% source
|
||||
if NOT "%PAPER%" == "" (
|
||||
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
|
||||
set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
|
||||
)
|
||||
set SOURCEDIR=source
|
||||
set BUILDDIR=_build
|
||||
|
||||
if "%1" == "" goto help
|
||||
|
||||
if "%1" == "help" (
|
||||
:help
|
||||
echo.Please use `make ^<target^>` where ^<target^> is one of
|
||||
echo. html to make standalone HTML files
|
||||
echo. dirhtml to make HTML files named index.html in directories
|
||||
echo. singlehtml to make a single large HTML file
|
||||
echo. pickle to make pickle files
|
||||
echo. json to make JSON files
|
||||
echo. htmlhelp to make HTML files and a HTML help project
|
||||
echo. qthelp to make HTML files and a qthelp project
|
||||
echo. devhelp to make HTML files and a Devhelp project
|
||||
echo. epub to make an epub
|
||||
echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
|
||||
echo. text to make text files
|
||||
echo. man to make manual pages
|
||||
echo. texinfo to make Texinfo files
|
||||
echo. gettext to make PO message catalogs
|
||||
echo. changes to make an overview over all changed/added/deprecated items
|
||||
echo. xml to make Docutils-native XML files
|
||||
echo. pseudoxml to make pseudoxml-XML files for display purposes
|
||||
echo. linkcheck to check all external links for integrity
|
||||
echo. doctest to run all doctests embedded in the documentation if enabled
|
||||
echo. coverage to run coverage check of the documentation if enabled
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "clean" (
|
||||
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
|
||||
del /q /s %BUILDDIR%\*
|
||||
goto end
|
||||
)
|
||||
if "%1" == "devenv" goto devenv
|
||||
goto default
|
||||
|
||||
|
||||
REM Check if sphinx-build is available and fallback to Python version if any
|
||||
%SPHINXBUILD% 1>NUL 2>NUL
|
||||
if errorlevel 9009 goto sphinx_python
|
||||
goto sphinx_ok
|
||||
|
||||
:sphinx_python
|
||||
|
||||
set SPHINXBUILD=python -m sphinx.__init__
|
||||
%SPHINXBUILD% 2> nul
|
||||
:default
|
||||
%SPHINXBUILD% >NUL 2>NUL
|
||||
if errorlevel 9009 (
|
||||
echo.
|
||||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
|
||||
echo.installed, then set the SPHINXBUILD environment variable to point
|
||||
echo.to the full path of the 'sphinx-build' executable. Alternatively you
|
||||
echo.may add the Sphinx directory to PATH.
|
||||
echo.
|
||||
echo.If you don't have Sphinx installed, grab it from
|
||||
echo.http://sphinx-doc.org/
|
||||
echo.The 'sphinx-build' command was not found. Open and read README.md!
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:sphinx_ok
|
||||
|
||||
|
||||
if "%1" == "html" (
|
||||
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished. The HTML pages are in %BUILDDIR%/html.
|
||||
%SPHINXBUILD% -M %1 "%SOURCEDIR%" "%BUILDDIR%" %SPHINXOPTS%
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "dirhtml" (
|
||||
%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "singlehtml" (
|
||||
%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
|
||||
:help
|
||||
%SPHINXBUILD% -M help "%SOURCEDIR%" "%BUILDDIR%" %SPHINXOPTS%
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "pickle" (
|
||||
%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished; now you can process the pickle files.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "json" (
|
||||
%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
|
||||
if errorlevel 1 exit /b 1
|
||||
:devenv
|
||||
sphinx-autobuild >NUL 2>NUL
|
||||
if errorlevel 9009 (
|
||||
echo.
|
||||
echo.Build finished; now you can process the JSON files.
|
||||
goto end
|
||||
echo.The 'sphinx-autobuild' command was not found. Open and read README.md!
|
||||
exit /b 1
|
||||
)
|
||||
sphinx-autobuild -b html --open-browser "%SOURCEDIR%" "%BUILDDIR%/html"
|
||||
goto end
|
||||
|
||||
if "%1" == "htmlhelp" (
|
||||
%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished; now you can run HTML Help Workshop with the ^
|
||||
.hhp project file in %BUILDDIR%/htmlhelp.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "qthelp" (
|
||||
%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished; now you can run "qcollectiongenerator" with the ^
|
||||
.qhcp project file in %BUILDDIR%/qthelp, like this:
|
||||
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\JupyterHub.qhcp
|
||||
echo.To view the help file:
|
||||
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\JupyterHub.ghc
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "devhelp" (
|
||||
%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "epub" (
|
||||
%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished. The epub file is in %BUILDDIR%/epub.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "latex" (
|
||||
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "latexpdf" (
|
||||
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
|
||||
cd %BUILDDIR%/latex
|
||||
make all-pdf
|
||||
cd %~dp0
|
||||
echo.
|
||||
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "latexpdfja" (
|
||||
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
|
||||
cd %BUILDDIR%/latex
|
||||
make all-pdf-ja
|
||||
cd %~dp0
|
||||
echo.
|
||||
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "text" (
|
||||
%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished. The text files are in %BUILDDIR%/text.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "man" (
|
||||
%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished. The manual pages are in %BUILDDIR%/man.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "texinfo" (
|
||||
%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "gettext" (
|
||||
%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "changes" (
|
||||
%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.The overview file is in %BUILDDIR%/changes.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "linkcheck" (
|
||||
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Link check complete; look for any errors in the above output ^
|
||||
or in %BUILDDIR%/linkcheck/output.txt.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "doctest" (
|
||||
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Testing of doctests in the sources finished, look at the ^
|
||||
results in %BUILDDIR%/doctest/output.txt.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "coverage" (
|
||||
%SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Testing of coverage in the sources finished, look at the ^
|
||||
results in %BUILDDIR%/coverage/python.txt.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "xml" (
|
||||
%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished. The XML files are in %BUILDDIR%/xml.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "pseudoxml" (
|
||||
%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
|
||||
goto end
|
||||
)
|
||||
|
||||
:end
|
||||
popd
|
||||
|
@@ -1,17 +1,10 @@
|
||||
# We install the jupyterhub package to help autodoc-traits inspect it and
|
||||
# generate documentation.
|
||||
#
|
||||
# FIXME: If there is a way for this requirements.txt file to pass a flag that
|
||||
# the build system can intercept to not build the javascript artifacts,
|
||||
# then do so so. That would mean that installing the documentation can
|
||||
# avoid needing node/npm installed.
|
||||
#
|
||||
--editable .
|
||||
|
||||
# docs also require jupyterhub itself to be installed
|
||||
# don't depend on it here, as that often results in a duplicate
|
||||
# installation of jupyterhub that's already installed
|
||||
autodoc-traits
|
||||
myst-parser
|
||||
jupyterhub-sphinx-theme
|
||||
myst-parser>=0.19
|
||||
pre-commit
|
||||
pydata-sphinx-theme
|
||||
pytablewriter>=0.56
|
||||
ruamel.yaml
|
||||
sphinx>=4
|
||||
|
2
docs/source/_templates/page.html
Normal file
@@ -0,0 +1,2 @@
|
||||
{%- set _meta = meta | default({}) %}
|
||||
{%- extends _meta.page_template | default('!page.html') %}
|
36
docs/source/_templates/redoc.html
Normal file
@@ -0,0 +1,36 @@
|
||||
{%- extends "!layout.html" %}
|
||||
{# not sure why, but theme CSS prevents scrolling within redoc content
|
||||
# If this were fixed, we could keep the navbar and footer
|
||||
#}
|
||||
{% block css %}
|
||||
{% endblock css %}
|
||||
{% block docs_navbar %}
|
||||
{% endblock docs_navbar %}
|
||||
{% block footer %}
|
||||
{% endblock footer %}
|
||||
{# djlint: off #}
|
||||
{%- block body_tag -%}<body>{%- endblock body_tag %}
|
||||
{# djlint: on #}
|
||||
{%- block extrahead %}
|
||||
{{ super() }}
|
||||
<link href="{{ pathto('_static/redoc-fonts.css', 1) }}" rel="stylesheet" />
|
||||
<script src="{{ pathto('_static/redoc.js', 1) }}"></script>
|
||||
{%- endblock extrahead %}
|
||||
{%- block content %}
|
||||
<redoc id="redoc-spec"></redoc>
|
||||
<script>
|
||||
if (location.protocol === "file:") {
|
||||
document.body.innerText = "Rendered API specification doesn't work with file: protocol. Use sphinx-autobuild to do local builds of the docs, served over HTTP."
|
||||
} else {
|
||||
Redoc.init(
|
||||
"{{ pathto('_static/rest-api.yml', 1) }}", {
|
||||
{
|
||||
meta.redoc_options |
|
||||
default ({})
|
||||
}
|
||||
},
|
||||
document.getElementById("redoc-spec"),
|
||||
);
|
||||
}
|
||||
</script>
|
||||
{%- endblock content %}
|
@@ -1,155 +0,0 @@
|
||||
====================
|
||||
Upgrading JupyterHub
|
||||
====================
|
||||
|
||||
JupyterHub offers easy upgrade pathways between minor versions. This
|
||||
document describes how to do these upgrades.
|
||||
|
||||
If you are using :ref:`a JupyterHub distribution <index/distributions>`, you
|
||||
should consult the distribution's documentation on how to upgrade. This documentation is
|
||||
for those who have set up their JupyterHub without using a distribution.
|
||||
|
||||
This documentation is lengthy because it is quite detailed. Most likely, upgrading
|
||||
JupyterHub is painless, quick and with minimal user interruption.
|
||||
|
||||
The steps are discussed in detail, so if you get stuck at any step you can always refer to this guide.
|
||||
|
||||
Read the Changelog
|
||||
==================
|
||||
|
||||
The `changelog <../changelog.md>`_ contains information on what has
|
||||
changed with the new JupyterHub release and any deprecation warnings.
|
||||
Read these notes to familiarize yourself with the coming changes. There
|
||||
might be new releases of the authenticators & spawners you use, so
|
||||
read the changelogs for those too!
|
||||
|
||||
Notify your users
|
||||
=================
|
||||
|
||||
If you use the default configuration where ``configurable-http-proxy``
|
||||
is managed by JupyterHub, your users will see service disruption during
|
||||
the upgrade process. You should notify them, and pick a time to do the
|
||||
upgrade where they will be least disrupted.
|
||||
|
||||
If you use a different proxy or run ``configurable-http-proxy``
|
||||
independent of JupyterHub, your users will be able to continue using notebook
|
||||
servers they had already launched, but will not be able to launch new servers or sign in.
|
||||
|
||||
|
||||
Backup database & config
|
||||
========================
|
||||
|
||||
Before doing an upgrade, it is critical to back up:
|
||||
|
||||
#. Your JupyterHub database (SQLite by default, or MySQL / Postgres if you used those).
|
||||
If you use SQLite (the default), you should backup the ``jupyterhub.sqlite`` file.
|
||||
|
||||
#. Your ``jupyterhub_config.py`` file.
|
||||
|
||||
#. Your users' home directories. This is unlikely to be affected directly by
|
||||
a JupyterHub upgrade, but we recommend a backup since user data is critical.
|
||||
|
||||
|
||||
Shut down JupyterHub
|
||||
====================
|
||||
|
||||
Shut down the JupyterHub process. This would vary depending on how you
|
||||
have set up JupyterHub to run. It is most likely using a process
|
||||
supervisor of some sort (``systemd`` or ``supervisord`` or even ``docker``).
|
||||
Use the supervisor-specific command to stop the JupyterHub process.
|
||||
|
||||
Upgrade JupyterHub packages
|
||||
===========================
|
||||
|
||||
There are two environments where the ``jupyterhub`` package is installed:
|
||||
|
||||
#. The *hub environment*: where the JupyterHub server process
|
||||
runs. This is started with the ``jupyterhub`` command, and is what
|
||||
people generally think of as JupyterHub.
|
||||
|
||||
#. The *notebook user environments*: where the user notebook
|
||||
servers are launched from, and is probably custom to your own
|
||||
installation. This could be just one environment (different from the
|
||||
hub environment) that is shared by all users, one environment
|
||||
per user, or the same environment as the hub environment. The hub
|
||||
launched the ``jupyterhub-singleuser`` command in this environment,
|
||||
which in turn starts the notebook server.
|
||||
|
||||
You need to make sure the version of the ``jupyterhub`` package matches
|
||||
in both these environments. If you installed ``jupyterhub`` with pip,
|
||||
you can upgrade it with:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
python3 -m pip install --upgrade jupyterhub==<version>
|
||||
|
||||
Where ``<version>`` is the version of JupyterHub you are upgrading to.
|
||||
|
||||
If you used ``conda`` to install ``jupyterhub``, you should upgrade it
|
||||
with:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
conda install -c conda-forge jupyterhub==<version>
|
||||
|
||||
You should also check for new releases of the authenticator & spawner you
|
||||
are using. You might wish to upgrade those packages, too, along with JupyterHub
|
||||
or upgrade them separately.
|
||||
|
||||
Upgrade JupyterHub database
|
||||
===========================
|
||||
|
||||
Once new packages are installed, you need to upgrade the JupyterHub
|
||||
database. From the hub environment, in the same directory as your
|
||||
``jupyterhub_config.py`` file, you should run:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
jupyterhub upgrade-db
|
||||
|
||||
This should find the location of your database, and run the necessary upgrades
|
||||
for it.
|
||||
|
||||
SQLite database disadvantages
|
||||
-----------------------------
|
||||
|
||||
SQLite has some disadvantages when it comes to upgrading JupyterHub. These
|
||||
are:
|
||||
|
||||
- ``upgrade-db`` may not work, and you may need to delete your database
|
||||
and start with a fresh one.
|
||||
- ``downgrade-db`` **will not** work if you want to rollback to an
|
||||
earlier version, so backup the ``jupyterhub.sqlite`` file before
|
||||
upgrading.
|
||||
|
||||
What happens if I delete my database?
|
||||
-------------------------------------
|
||||
|
||||
Losing the Hub database is often not a big deal. Information that
|
||||
resides only in the Hub database includes:
|
||||
|
||||
- active login tokens (user cookies, service tokens)
|
||||
- users added via JupyterHub UI, instead of config files
|
||||
- info about running servers
|
||||
|
||||
If the following conditions are true, you should be fine clearing the
|
||||
Hub database and starting over:
|
||||
|
||||
- users specified in the config file, or login using an external
|
||||
authentication provider (Google, GitHub, LDAP, etc)
|
||||
- user servers are stopped during the upgrade
|
||||
- don't mind causing users to log in again after the upgrade
|
||||
|
||||
Start JupyterHub
|
||||
================
|
||||
|
||||
Once the database upgrade is completed, start the ``jupyterhub``
|
||||
process again.
|
||||
|
||||
#. Log in and start the server to make sure things work as
|
||||
expected.
|
||||
#. Check the logs for any errors or deprecation warnings. You
|
||||
might have to update your ``jupyterhub_config.py`` file to
|
||||
deal with any deprecated options.
|
||||
|
||||
Congratulations, your JupyterHub has been upgraded!
|
@@ -1,15 +0,0 @@
|
||||
=========================
|
||||
Application configuration
|
||||
=========================
|
||||
|
||||
Module: :mod:`jupyterhub.app`
|
||||
=============================
|
||||
|
||||
.. automodule:: jupyterhub.app
|
||||
|
||||
.. currentmodule:: jupyterhub.app
|
||||
|
||||
:class:`JupyterHub`
|
||||
-------------------
|
||||
|
||||
.. autoconfigurable:: JupyterHub
|
@@ -1,32 +0,0 @@
|
||||
==============
|
||||
Authenticators
|
||||
==============
|
||||
|
||||
Module: :mod:`jupyterhub.auth`
|
||||
==============================
|
||||
|
||||
.. automodule:: jupyterhub.auth
|
||||
|
||||
.. currentmodule:: jupyterhub.auth
|
||||
|
||||
:class:`Authenticator`
|
||||
----------------------
|
||||
|
||||
.. autoconfigurable:: Authenticator
|
||||
:members:
|
||||
|
||||
:class:`LocalAuthenticator`
|
||||
---------------------------
|
||||
|
||||
.. autoconfigurable:: LocalAuthenticator
|
||||
:members:
|
||||
|
||||
:class:`PAMAuthenticator`
|
||||
-------------------------
|
||||
|
||||
.. autoconfigurable:: PAMAuthenticator
|
||||
|
||||
:class:`DummyAuthenticator`
|
||||
---------------------------
|
||||
|
||||
.. autoconfigurable:: DummyAuthenticator
|
@@ -1,33 +0,0 @@
|
||||
.. _api-index:
|
||||
|
||||
##############
|
||||
JupyterHub API
|
||||
##############
|
||||
|
||||
:Release: |release|
|
||||
:Date: |today|
|
||||
|
||||
JupyterHub also provides a REST API for administration of the Hub and users.
|
||||
The documentation on `Using JupyterHub's REST API <../reference/rest.html>`_ provides
|
||||
information on:
|
||||
|
||||
- what you can do with the API
|
||||
- creating an API token
|
||||
- adding API tokens to the config files
|
||||
- making an API request programmatically using the requests library
|
||||
- learning more about JupyterHub's API
|
||||
|
||||
JupyterHub API Reference:
|
||||
|
||||
.. toctree::
|
||||
|
||||
app
|
||||
auth
|
||||
spawner
|
||||
proxy
|
||||
user
|
||||
service
|
||||
services.auth
|
||||
|
||||
|
||||
.. _OpenAPI Initiative: https://www.openapis.org/
|
@@ -1,22 +0,0 @@
|
||||
=======
|
||||
Proxies
|
||||
=======
|
||||
|
||||
Module: :mod:`jupyterhub.proxy`
|
||||
===============================
|
||||
|
||||
.. automodule:: jupyterhub.proxy
|
||||
|
||||
.. currentmodule:: jupyterhub.proxy
|
||||
|
||||
:class:`Proxy`
|
||||
--------------
|
||||
|
||||
.. autoconfigurable:: Proxy
|
||||
:members:
|
||||
|
||||
:class:`ConfigurableHTTPProxy`
|
||||
------------------------------
|
||||
|
||||
.. autoconfigurable:: ConfigurableHTTPProxy
|
||||
:members: debug, auth_token, check_running_interval, api_url, command
|
@@ -1,16 +0,0 @@
|
||||
========
|
||||
Services
|
||||
========
|
||||
|
||||
Module: :mod:`jupyterhub.services.service`
|
||||
==========================================
|
||||
|
||||
.. automodule:: jupyterhub.services.service
|
||||
|
||||
.. currentmodule:: jupyterhub.services.service
|
||||
|
||||
:class:`Service`
|
||||
----------------
|
||||
|
||||
.. autoconfigurable:: Service
|
||||
:members: name, admin, url, api_token, managed, kind, command, cwd, environment, user, oauth_client_id, server, prefix, proxy_spec
|
@@ -1,40 +0,0 @@
|
||||
=======================
|
||||
Services Authentication
|
||||
=======================
|
||||
|
||||
Module: :mod:`jupyterhub.services.auth`
|
||||
=======================================
|
||||
|
||||
.. automodule:: jupyterhub.services.auth
|
||||
|
||||
.. currentmodule:: jupyterhub.services.auth
|
||||
|
||||
|
||||
:class:`HubAuth`
|
||||
----------------
|
||||
|
||||
.. autoconfigurable:: HubAuth
|
||||
:members:
|
||||
|
||||
:class:`HubOAuth`
|
||||
-----------------
|
||||
|
||||
.. autoconfigurable:: HubOAuth
|
||||
:members:
|
||||
|
||||
|
||||
:class:`HubAuthenticated`
|
||||
-------------------------
|
||||
|
||||
.. autoclass:: HubAuthenticated
|
||||
:members:
|
||||
|
||||
:class:`HubOAuthenticated`
|
||||
--------------------------
|
||||
|
||||
.. autoclass:: HubOAuthenticated
|
||||
|
||||
:class:`HubOAuthCallbackHandler`
|
||||
--------------------------------
|
||||
|
||||
.. autoclass:: HubOAuthCallbackHandler
|
@@ -1,21 +0,0 @@
|
||||
========
|
||||
Spawners
|
||||
========
|
||||
|
||||
Module: :mod:`jupyterhub.spawner`
|
||||
=================================
|
||||
|
||||
.. automodule:: jupyterhub.spawner
|
||||
|
||||
.. currentmodule:: jupyterhub.spawner
|
||||
|
||||
:class:`Spawner`
|
||||
----------------
|
||||
|
||||
.. autoconfigurable:: Spawner
|
||||
:members: options_from_form, poll, start, stop, get_args, get_env, get_state, template_namespace, format_string, create_certs, move_certs
|
||||
|
||||
:class:`LocalProcessSpawner`
|
||||
----------------------------
|
||||
|
||||
.. autoconfigurable:: LocalProcessSpawner
|
@@ -1,36 +0,0 @@
|
||||
=====
|
||||
Users
|
||||
=====
|
||||
|
||||
Module: :mod:`jupyterhub.user`
|
||||
==============================
|
||||
|
||||
.. automodule:: jupyterhub.user
|
||||
|
||||
.. currentmodule:: jupyterhub.user
|
||||
|
||||
:class:`UserDict`
|
||||
-----------------
|
||||
|
||||
.. autoclass:: UserDict
|
||||
:members:
|
||||
|
||||
|
||||
:class:`User`
|
||||
-------------
|
||||
|
||||
.. autoclass:: User
|
||||
:members: escaped_name
|
||||
|
||||
.. attribute:: name
|
||||
|
||||
The user's name
|
||||
|
||||
.. attribute:: server
|
||||
|
||||
The user's Server data object if running, None otherwise.
|
||||
Has ``ip``, ``port`` attributes.
|
||||
|
||||
.. attribute:: spawner
|
||||
|
||||
The user's :class:`~.Spawner` instance.
|
@@ -6,22 +6,26 @@ import contextlib
|
||||
import datetime
|
||||
import io
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
from urllib.request import urlretrieve
|
||||
|
||||
from docutils import nodes
|
||||
from ruamel.yaml import YAML
|
||||
from sphinx.directives.other import SphinxDirective
|
||||
from sphinx.util import logging
|
||||
|
||||
import jupyterhub
|
||||
from jupyterhub.app import JupyterHub
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
# -- Project information -----------------------------------------------------
|
||||
# ref: https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
||||
#
|
||||
project = "JupyterHub"
|
||||
author = "Project Jupyter Contributors"
|
||||
copyright = f"{datetime.date.today().year}, {author}"
|
||||
version = "%i.%i" % jupyterhub.version_info[:2]
|
||||
release = jupyterhub.__version__
|
||||
|
||||
|
||||
# -- General Sphinx configuration --------------------------------------------
|
||||
@@ -36,23 +40,41 @@ extensions = [
|
||||
"sphinx-jsonschema",
|
||||
"sphinxext.opengraph",
|
||||
"sphinxext.rediraffe",
|
||||
"jupyterhub_sphinx_theme",
|
||||
"myst_parser",
|
||||
]
|
||||
root_doc = "index"
|
||||
source_suffix = [".md", ".rst"]
|
||||
source_suffix = [".md"]
|
||||
# default_role let's use use `foo` instead of ``foo`` in rST
|
||||
default_role = "literal"
|
||||
|
||||
docs = Path(__file__).parent.parent.absolute()
|
||||
docs_source = docs / "source"
|
||||
rest_api_yaml = docs_source / "_static" / "rest-api.yml"
|
||||
|
||||
|
||||
# -- MyST configuration ------------------------------------------------------
|
||||
# ref: https://myst-parser.readthedocs.io/en/latest/configuration.html
|
||||
#
|
||||
myst_heading_anchors = 2
|
||||
|
||||
myst_enable_extensions = [
|
||||
# available extensions: https://myst-parser.readthedocs.io/en/latest/syntax/optional.html
|
||||
"attrs_inline",
|
||||
"colon_fence",
|
||||
"deflist",
|
||||
"fieldlist",
|
||||
"substitution",
|
||||
]
|
||||
|
||||
myst_substitutions = {
|
||||
# date example: Dev 07, 2022
|
||||
"date": datetime.date.today().strftime("%b %d, %Y").title(),
|
||||
"node_min": "12",
|
||||
"python_min": "3.8",
|
||||
"version": jupyterhub.__version__,
|
||||
}
|
||||
|
||||
|
||||
# -- Custom directives to generate documentation -----------------------------
|
||||
# ref: https://myst-parser.readthedocs.io/en/latest/syntax/roles-and-directives.html
|
||||
@@ -109,10 +131,102 @@ class HelpAllDirective(SphinxDirective):
|
||||
return [par]
|
||||
|
||||
|
||||
class RestAPILinksDirective(SphinxDirective):
|
||||
"""Directive to populate link targets for the REST API
|
||||
|
||||
The resulting nodes resolve xref targets,
|
||||
but are not actually rendered in the final result
|
||||
which is handled by a custom template.
|
||||
"""
|
||||
|
||||
has_content = False
|
||||
required_arguments = 0
|
||||
optional_arguments = 0
|
||||
final_argument_whitespace = False
|
||||
option_spec = {}
|
||||
|
||||
def run(self):
|
||||
targets = []
|
||||
yaml = YAML(typ="safe")
|
||||
with rest_api_yaml.open() as f:
|
||||
api = yaml.load(f)
|
||||
for path, path_spec in api["paths"].items():
|
||||
for method, operation in path_spec.items():
|
||||
operation_id = operation.get("operationId")
|
||||
if not operation_id:
|
||||
logger.warning(f"No operation id for {method} {path}")
|
||||
continue
|
||||
# 'id' is the id on the page (must match redoc anchor)
|
||||
# 'name' is the name of the ref for use in our documents
|
||||
target = nodes.target(
|
||||
ids=[f"operation/{operation_id}"],
|
||||
names=[f"rest-api-{operation_id}"],
|
||||
)
|
||||
targets.append(target)
|
||||
self.state.document.note_explicit_target(target, target)
|
||||
|
||||
return targets
|
||||
|
||||
|
||||
templates_path = ["_templates"]
|
||||
|
||||
|
||||
def stage_redoc_js(app, exception):
|
||||
"""Download redoc.js to our static files"""
|
||||
if app.builder.name != "html":
|
||||
logger.info(f"Skipping redoc download for builder: {app.builder.name}")
|
||||
return
|
||||
|
||||
out_static = Path(app.builder.outdir) / "_static"
|
||||
|
||||
redoc_version = "2.1.3"
|
||||
redoc_url = (
|
||||
f"https://cdn.redoc.ly/redoc/v{redoc_version}/bundles/redoc.standalone.js"
|
||||
)
|
||||
dest = out_static / "redoc.js"
|
||||
if not dest.exists():
|
||||
logger.info(f"Downloading {redoc_url} -> {dest}")
|
||||
urlretrieve(redoc_url, dest)
|
||||
|
||||
# stage fonts for redoc from google fonts
|
||||
fonts_css_url = "https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700"
|
||||
fonts_css_file = out_static / "redoc-fonts.css"
|
||||
fonts_dir = out_static / "fonts"
|
||||
fonts_dir.mkdir(exist_ok=True)
|
||||
if not fonts_css_file.exists():
|
||||
logger.info(f"Downloading {fonts_css_url} -> {fonts_css_file}")
|
||||
urlretrieve(fonts_css_url, fonts_css_file)
|
||||
|
||||
# For each font external font URL,
|
||||
# download the font and rewrite to a local URL
|
||||
# The downloaded TTF fonts have license info in their metadata
|
||||
with open(fonts_css_file) as f:
|
||||
fonts_css = f.read()
|
||||
|
||||
fonts_css_changed = False
|
||||
for font_url in re.findall(r'url\((https?[^\)]+)\)', fonts_css):
|
||||
fonts_css_changed = True
|
||||
filename = font_url.rpartition("/")[-1]
|
||||
dest = fonts_dir / filename
|
||||
local_url = str(dest.relative_to(fonts_css_file.parent))
|
||||
fonts_css = fonts_css.replace(font_url, local_url)
|
||||
if not dest.exists():
|
||||
logger.info(f"Downloading {font_url} -> {dest}")
|
||||
urlretrieve(font_url, dest)
|
||||
|
||||
if fonts_css_changed:
|
||||
# rewrite font css with local URLs
|
||||
with open(fonts_css_file, "w") as f:
|
||||
logger.info(f"Rewriting URLs in {fonts_css_file}")
|
||||
f.write(fonts_css)
|
||||
|
||||
|
||||
def setup(app):
|
||||
app.connect("build-finished", stage_redoc_js)
|
||||
app.add_css_file("custom.css")
|
||||
app.add_directive("jupyterhub-generate-config", ConfigDirective)
|
||||
app.add_directive("jupyterhub-help-all", HelpAllDirective)
|
||||
app.add_directive("jupyterhub-rest-api-links", RestAPILinksDirective)
|
||||
|
||||
|
||||
# -- Read The Docs -----------------------------------------------------------
|
||||
@@ -121,8 +235,7 @@ def setup(app):
|
||||
# pre-requisite steps for "make html" from here if needed.
|
||||
#
|
||||
if os.environ.get("READTHEDOCS"):
|
||||
docs = os.path.dirname(os.path.dirname(__file__))
|
||||
subprocess.check_call(["make", "metrics", "scopes"], cwd=docs)
|
||||
subprocess.check_call(["make", "metrics", "scopes"], cwd=str(docs))
|
||||
|
||||
|
||||
# -- Spell checking ----------------------------------------------------------
|
||||
@@ -146,18 +259,13 @@ html_logo = "_static/images/logo/logo.png"
|
||||
html_favicon = "_static/images/logo/favicon.ico"
|
||||
html_static_path = ["_static"]
|
||||
|
||||
html_theme = "pydata_sphinx_theme"
|
||||
html_theme = "jupyterhub_sphinx_theme"
|
||||
html_theme_options = {
|
||||
"icon_links": [
|
||||
{
|
||||
"name": "GitHub",
|
||||
"url": "https://github.com/jupyterhub/jupyterhub",
|
||||
"icon": "fab fa-github-square",
|
||||
},
|
||||
{
|
||||
"name": "Discourse",
|
||||
"url": "https://discourse.jupyter.org/c/jupyterhub/10",
|
||||
"icon": "fab fa-discourse",
|
||||
"icon": "fa-brands fa-github",
|
||||
},
|
||||
],
|
||||
"use_edit_page_button": True,
|
||||
@@ -177,23 +285,30 @@ html_context = {
|
||||
linkcheck_ignore = [
|
||||
r"(.*)github\.com(.*)#", # javascript based anchors
|
||||
r"(.*)/#%21(.*)/(.*)", # /#!forum/jupyter - encoded anchor edge case
|
||||
r"https?://(.*\.)?example\.(org|com)(/.*)?", # example links
|
||||
r"https://github.com/[^/]*$", # too many github usernames / searches in changelog
|
||||
"https://github.com/jupyterhub/jupyterhub/pull/", # too many PRs in changelog
|
||||
"https://github.com/jupyterhub/jupyterhub/compare/", # too many comparisons in changelog
|
||||
r"https?://(localhost|127.0.0.1).*", # ignore localhost references in auto-links
|
||||
r"https://linux.die.net/.*", # linux.die.net seems to block requests from CI with 403 sometimes
|
||||
# don't check links to unpublished advisories
|
||||
r"https://github.com/jupyterhub/jupyterhub/security/advisories/.*",
|
||||
]
|
||||
linkcheck_anchors_ignore = [
|
||||
"/#!",
|
||||
"/#%21",
|
||||
]
|
||||
|
||||
|
||||
# -- Intersphinx -------------------------------------------------------------
|
||||
# ref: https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#configuration
|
||||
#
|
||||
intersphinx_mapping = {
|
||||
"python": ("https://docs.python.org/3/", None),
|
||||
"tornado": ("https://www.tornadoweb.org/en/stable/", None),
|
||||
"jupyter-server": ("https://jupyter-server.readthedocs.io/en/stable/", None),
|
||||
"nbgitpuller": ("https://nbgitpuller.readthedocs.io/en/latest", None),
|
||||
}
|
||||
|
||||
# -- Options for the opengraph extension -------------------------------------
|
||||
# ref: https://github.com/wpilibsuite/sphinxext-opengraph#options
|
||||
#
|
||||
@@ -205,11 +320,33 @@ ogp_use_first_image = True
|
||||
# -- Options for the rediraffe extension -------------------------------------
|
||||
# ref: https://github.com/wpilibsuite/sphinxext-rediraffe#readme
|
||||
#
|
||||
# This extensions help us relocated content without breaking links. If a
|
||||
# document is moved internally, a redirect like should be configured below to
|
||||
# This extension helps us relocate content without breaking links. If a
|
||||
# document is moved internally, a redirect link should be configured as below to
|
||||
# help us not break links.
|
||||
#
|
||||
rediraffe_branch = "main"
|
||||
rediraffe_redirects = {
|
||||
# The workflow for adding redirects can be as follows:
|
||||
# 1. Change "rediraffe_branch" below to point to the commit/ branch you
|
||||
# want to base off the changes.
|
||||
# 2. Option 1: run "make rediraffecheckdiff"
|
||||
# a. Analyze the output of this command.
|
||||
# b. Manually add the redirect entries to the "redirects.txt" file.
|
||||
# Option 2: run "make rediraffewritediff"
|
||||
# a. rediraffe will then automatically add the obvious redirects to redirects.txt.
|
||||
# b. Analyze the output of the command for broken links.
|
||||
# c. Check the "redirects.txt" file for any files that were moved/ renamed but are not listed.
|
||||
# d. Manually add the redirects that have been mised by the automatic builder to "redirects.txt".
|
||||
# Option 3: Do not use the commands above and, instead, do everything manually - by taking
|
||||
# note of the files you have moved or renamed and adding them to the "redirects.txt" file.
|
||||
#
|
||||
# If you are basing changes off another branch/ commit, always change back
|
||||
# rediraffe_branch to main before pushing your changes upstream.
|
||||
#
|
||||
rediraffe_branch = os.environ.get("REDIRAFFE_BRANCH", "main")
|
||||
rediraffe_redirects = "redirects.txt"
|
||||
|
||||
# allow 80% match for autogenerated redirects
|
||||
rediraffe_auto_redirect_perc = 80
|
||||
|
||||
# rediraffe_redirects = {
|
||||
# "old-file": "new-folder/new-file-name",
|
||||
}
|
||||
# }
|
||||
|
@@ -19,7 +19,7 @@ We use [our Gitter channel](https://gitter.im/jupyterhub/jupyterhub) for online,
|
||||
[Github issues](https://docs.github.com/en/issues/tracking-your-work-with-issues/about-issues) are used for most long-form project discussions, bug reports and feature requests.
|
||||
|
||||
- Issues related to a specific authenticator or spawner should be opened in the appropriate repository for the authenticator or spawner.
|
||||
- If you are using a specific JupyterHub distribution (such as [Zero to JupyterHub on Kubernetes](http://github.com/jupyterhub/zero-to-jupyterhub-k8s) or [The Littlest JupyterHub](http://github.com/jupyterhub/the-littlest-jupyterhub/)), you should open issues directly in their repository.
|
||||
- If you are using a specific JupyterHub distribution (such as [Zero to JupyterHub on Kubernetes](https://github.com/jupyterhub/zero-to-jupyterhub-k8s) or [The Littlest JupyterHub](https://github.com/jupyterhub/the-littlest-jupyterhub/)), you should open issues directly in their repository.
|
||||
- If you cannot find a repository to open your issue in, do not worry! Open the issue in the [main JupyterHub repository](https://github.com/jupyterhub/jupyterhub/) and our community will help you figure it out.
|
||||
|
||||
```{note}
|
||||
|
76
docs/source/contributing/docs.md
Normal file
@@ -0,0 +1,76 @@
|
||||
(contributing-docs)=
|
||||
|
||||
# Contributing Documentation
|
||||
|
||||
Documentation is often more important than code. This page helps
|
||||
you get set up on how to contribute to JupyterHub's documentation.
|
||||
|
||||
## Building documentation locally
|
||||
|
||||
We use [sphinx](https://www.sphinx-doc.org) to build our documentation. It takes
|
||||
our documentation source files (written in [markdown](https://daringfireball.net/projects/markdown/) or [reStructuredText](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html) &
|
||||
stored under the `docs/source` directory) and converts it into various
|
||||
formats for people to read. To make sure the documentation you write or
|
||||
change renders correctly, it is good practice to test it locally.
|
||||
|
||||
1. Make sure you have successfully completed {ref}`contributing/setup`.
|
||||
|
||||
2. Install the packages required to build the docs.
|
||||
|
||||
```bash
|
||||
python3 -m pip install -r docs/requirements.txt
|
||||
```
|
||||
|
||||
3. Build the html version of the docs. This is the most commonly used
|
||||
output format, so verifying it renders correctly is usually good
|
||||
enough.
|
||||
|
||||
```bash
|
||||
cd docs
|
||||
make html
|
||||
```
|
||||
|
||||
This step will display any syntax or formatting errors in the documentation,
|
||||
along with the filename / line number in which they occurred. Fix them,
|
||||
and re-run the `make html` command to re-render the documentation.
|
||||
|
||||
4. View the rendered documentation by opening `_build/html/index.html` in
|
||||
a web browser.
|
||||
|
||||
:::{tip}
|
||||
**On Windows**, you can open a file from the terminal with `start <path-to-file>`.
|
||||
|
||||
**On macOS**, you can do the same with `open <path-to-file>`.
|
||||
|
||||
**On Linux**, you can do the same with `xdg-open <path-to-file>`.
|
||||
|
||||
After opening index.html in your browser you can just refresh the page whenever
|
||||
you rebuild the docs via `make html`
|
||||
:::
|
||||
|
||||
(contributing-docs-conventions)=
|
||||
|
||||
## Documentation conventions
|
||||
|
||||
This section lists various conventions we use in our documentation. This is a
|
||||
living document that grows over time, so feel free to add to it / change it!
|
||||
|
||||
Our entire documentation does not yet fully conform to these conventions yet,
|
||||
so help in making it so would be appreciated!
|
||||
|
||||
### `pip` invocation
|
||||
|
||||
There are many ways to invoke a `pip` command, we recommend the following
|
||||
approach:
|
||||
|
||||
```bash
|
||||
python3 -m pip
|
||||
```
|
||||
|
||||
This invokes pip explicitly using the python3 binary that you are
|
||||
currently using. This is the **recommended way** to invoke pip
|
||||
in our documentation, since it is least likely to cause problems
|
||||
with python3 and pip being from different environments.
|
||||
|
||||
For more information on how to invoke `pip` commands, see
|
||||
[the pip documentation](https://pip.pypa.io/en/stable/).
|
@@ -1,84 +0,0 @@
|
||||
.. _contributing/docs:
|
||||
|
||||
==========================
|
||||
Contributing Documentation
|
||||
==========================
|
||||
|
||||
Documentation is often more important than code. This page helps
|
||||
you get set up on how to contribute to JupyterHub's documentation.
|
||||
|
||||
Building documentation locally
|
||||
==============================
|
||||
|
||||
We use `sphinx <http://sphinx-doc.org>`_ to build our documentation. It takes
|
||||
our documentation source files (written in `markdown
|
||||
<https://daringfireball.net/projects/markdown/>`_ or `reStructuredText
|
||||
<https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html>`_ &
|
||||
stored under the ``docs/source`` directory) and converts it into various
|
||||
formats for people to read. To make sure the documentation you write or
|
||||
change renders correctly, it is good practice to test it locally.
|
||||
|
||||
#. Make sure you have successfully completed :ref:`contributing/setup`.
|
||||
|
||||
#. Install the packages required to build the docs.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
python3 -m pip install -r docs/requirements.txt
|
||||
|
||||
#. Build the html version of the docs. This is the most commonly used
|
||||
output format, so verifying it renders correctly is usually good
|
||||
enough.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
cd docs
|
||||
make html
|
||||
|
||||
This step will display any syntax or formatting errors in the documentation,
|
||||
along with the filename / line number in which they occurred. Fix them,
|
||||
and re-run the ``make html`` command to re-render the documentation.
|
||||
|
||||
#. View the rendered documentation by opening ``build/html/index.html`` in
|
||||
a web browser.
|
||||
|
||||
.. tip::
|
||||
|
||||
**On Windows**, you can open a file from the terminal with ``start <path-to-file>``.
|
||||
|
||||
**On macOS**, you can do the same with ``open <path-to-file>``.
|
||||
|
||||
**On Linux**, you can do the same with ``xdg-open <path-to-file>``.
|
||||
|
||||
After opening index.html in your browser you can just refresh the page whenever
|
||||
you rebuild the docs via ``make html``
|
||||
|
||||
|
||||
.. _contributing/docs/conventions:
|
||||
|
||||
Documentation conventions
|
||||
=========================
|
||||
|
||||
This section lists various conventions we use in our documentation. This is a
|
||||
living document that grows over time, so feel free to add to it / change it!
|
||||
|
||||
Our entire documentation does not yet fully conform to these conventions yet,
|
||||
so help in making it so would be appreciated!
|
||||
|
||||
``pip`` invocation
|
||||
------------------
|
||||
|
||||
There are many ways to invoke a ``pip`` command, we recommend the following
|
||||
approach:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
python3 -m pip
|
||||
|
||||
This invokes pip explicitly using the python3 binary that you are
|
||||
currently using. This is the **recommended way** to invoke pip
|
||||
in our documentation, since it is least likely to cause problems
|
||||
with python3 and pip being from different environments.
|
||||
|
||||
For more information on how to invoke ``pip`` commands, see
|
||||
`the pip documentation <https://pip.pypa.io/en/stable/>`_.
|
22
docs/source/contributing/index.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# Contributing
|
||||
|
||||
We want you to contribute to JupyterHub in ways that are most exciting
|
||||
and useful to you. We value documentation, testing, bug reporting & code equally,
|
||||
and are glad to have your contributions in whatever form you wish.
|
||||
|
||||
Be sure to first check our [Code of Conduct](https://github.com/jupyter/governance/blob/HEAD/conduct/code_of_conduct.md)
|
||||
([reporting guidelines](https://github.com/jupyter/governance/blob/HEAD/conduct/reporting_online.md)), which help keep our community welcoming to as many people as possible.
|
||||
|
||||
This section covers information about our community, as well as ways that you can connect and get involved.
|
||||
|
||||
```{toctree}
|
||||
:maxdepth: 2
|
||||
|
||||
contributor-list
|
||||
community
|
||||
setup
|
||||
docs
|
||||
tests
|
||||
roadmap
|
||||
security
|
||||
```
|
@@ -1,21 +0,0 @@
|
||||
============
|
||||
Contributing
|
||||
============
|
||||
|
||||
We want you to contribute to JupyterHub in ways that are most exciting
|
||||
& useful to you. We value documentation, testing, bug reporting & code equally,
|
||||
and are glad to have your contributions in whatever form you wish :)
|
||||
|
||||
Our `Code of Conduct <https://github.com/jupyter/governance/blob/HEAD/conduct/code_of_conduct.md>`_
|
||||
(`reporting guidelines <https://github.com/jupyter/governance/blob/HEAD/conduct/reporting_online.md>`_)
|
||||
helps keep our community welcoming to as many people as possible.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
community
|
||||
setup
|
||||
docs
|
||||
tests
|
||||
roadmap
|
||||
security
|
9
docs/source/contributing/security.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Reporting security issues in Jupyter or JupyterHub
|
||||
|
||||
If you find a security vulnerability in Jupyter or JupyterHub,
|
||||
whether it is a failure of the security model described in [Security Overview](web-security)
|
||||
or a failure in implementation,
|
||||
please report it to <mailto:security@ipython.org>.
|
||||
|
||||
If you prefer to encrypt your security reports,
|
||||
you can use {download}`this PGP public key </ipython_security.asc>`.
|
@@ -1,10 +0,0 @@
|
||||
Reporting security issues in Jupyter or JupyterHub
|
||||
==================================================
|
||||
|
||||
If you find a security vulnerability in Jupyter or JupyterHub,
|
||||
whether it is a failure of the security model described in :doc:`../reference/websecurity`
|
||||
or a failure in implementation,
|
||||
please report it to security@ipython.org.
|
||||
|
||||
If you prefer to encrypt your security reports,
|
||||
you can use :download:`this PGP public key </ipython_security.asc>`.
|
242
docs/source/contributing/setup.md
Normal file
@@ -0,0 +1,242 @@
|
||||
(contributing/setup)=
|
||||
|
||||
# Setting up a development install
|
||||
|
||||
## System requirements
|
||||
|
||||
JupyterHub can only run on macOS or Linux operating systems. If you are
|
||||
using Windows, we recommend using [VirtualBox](https://virtualbox.org)
|
||||
or a similar system to run [Ubuntu Linux](https://ubuntu.com) for
|
||||
development.
|
||||
|
||||
### Install Python
|
||||
|
||||
JupyterHub is written in the [Python](https://python.org) programming language and
|
||||
requires you have at least version {{python_min}} installed locally. If you haven’t
|
||||
installed Python before, the recommended way to install it is to use
|
||||
[Miniforge](https://github.com/conda-forge/miniforge#download).
|
||||
|
||||
### Install nodejs
|
||||
|
||||
[NodeJS {{node_min}}+](https://nodejs.org/en/) is required for building some JavaScript components.
|
||||
`configurable-http-proxy`, the default proxy implementation for JupyterHub, is written in Javascript.
|
||||
If you have not installed NodeJS before, we recommend installing it in the `miniconda` environment you set up for Python.
|
||||
You can do so with `conda install nodejs`.
|
||||
|
||||
Many in the Jupyter community use [`nvm`](https://github.com/nvm-sh/nvm) to
|
||||
managing node dependencies.
|
||||
|
||||
### Install git
|
||||
|
||||
JupyterHub uses [Git](https://git-scm.com) & [GitHub](https://github.com)
|
||||
for development & collaboration. You need to [install git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) to work on
|
||||
JupyterHub. We also recommend getting a free account on GitHub.com.
|
||||
|
||||
## Setting up a development install
|
||||
|
||||
When developing JupyterHub, you would need to make changes and be able to instantly view the results of the changes. To achieve that, a developer install is required.
|
||||
|
||||
:::{note}
|
||||
This guide does not attempt to dictate _how_ development
|
||||
environments should be isolated since that is a personal preference and can
|
||||
be achieved in many ways, for example, `tox`, `conda`, `docker`, etc. See this
|
||||
[forum thread](https://discourse.jupyter.org/t/thoughts-on-using-tox/3497) for
|
||||
a more detailed discussion.
|
||||
:::
|
||||
|
||||
1. Clone the [JupyterHub git repository](https://github.com/jupyterhub/jupyterhub)
|
||||
to your computer.
|
||||
|
||||
```bash
|
||||
git clone https://github.com/jupyterhub/jupyterhub
|
||||
cd jupyterhub
|
||||
```
|
||||
|
||||
2. Make sure the `python` you installed and the `npm` you installed
|
||||
are available to you on the command line.
|
||||
|
||||
```bash
|
||||
python -V
|
||||
```
|
||||
|
||||
This should return a version number greater than or equal to {{python_min}}.
|
||||
|
||||
```bash
|
||||
npm -v
|
||||
```
|
||||
|
||||
This should return a version number greater than or equal to 5.0.
|
||||
|
||||
3. Install `configurable-http-proxy` (required to run and test the default JupyterHub configuration):
|
||||
|
||||
```bash
|
||||
npm install -g configurable-http-proxy
|
||||
```
|
||||
|
||||
If you get an error that says `Error: EACCES: permission denied`, you might need to prefix the command with `sudo`.
|
||||
`sudo` may be required to perform a system-wide install.
|
||||
If you do not have access to sudo, you may instead run the following commands:
|
||||
|
||||
```bash
|
||||
npm install configurable-http-proxy
|
||||
export PATH=$PATH:$(pwd)/node_modules/.bin
|
||||
```
|
||||
|
||||
The second line needs to be run every time you open a new terminal.
|
||||
|
||||
If you are using conda you can instead run:
|
||||
|
||||
```bash
|
||||
conda install configurable-http-proxy
|
||||
```
|
||||
|
||||
4. Install an editable version of JupyterHub and its requirements for
|
||||
development and testing. This lets you edit JupyterHub code in a text editor
|
||||
& restart the JupyterHub process to see your code changes immediately.
|
||||
|
||||
```bash
|
||||
python3 -m pip install --editable ".[test]"
|
||||
```
|
||||
|
||||
5. You are now ready to start JupyterHub!
|
||||
|
||||
```bash
|
||||
jupyterhub
|
||||
```
|
||||
|
||||
6. You can access JupyterHub from your browser at
|
||||
`http://localhost:8000` now.
|
||||
|
||||
Happy developing!
|
||||
|
||||
## Using DummyAuthenticator & SimpleLocalProcessSpawner
|
||||
|
||||
To simplify testing of JupyterHub, it is helpful to use
|
||||
{class}`~jupyterhub.auth.DummyAuthenticator` instead of the default JupyterHub
|
||||
authenticator and SimpleLocalProcessSpawner instead of the default spawner.
|
||||
|
||||
There is a sample configuration file that does this in
|
||||
`testing/jupyterhub_config.py`. To launch JupyterHub with this
|
||||
configuration:
|
||||
|
||||
```bash
|
||||
jupyterhub -f testing/jupyterhub_config.py
|
||||
```
|
||||
|
||||
The test configuration enables a few things to make testing easier:
|
||||
|
||||
- use 'dummy' authentication and 'simple' spawner
|
||||
- named servers are enabled
|
||||
- listen only on localhost
|
||||
- 'admin' is an admin user, if you want to test the admin page
|
||||
- disable caching of static files
|
||||
|
||||
The default JupyterHub [authenticator](PAMAuthenticator)
|
||||
& [spawner](LocalProcessSpawner)
|
||||
require your system to have user accounts for each user you want to log in to
|
||||
JupyterHub as.
|
||||
|
||||
DummyAuthenticator allows you to log in with any username & password,
|
||||
while SimpleLocalProcessSpawner allows you to start servers without having to
|
||||
create a Unix user for each JupyterHub user. Together, these make it
|
||||
much easier to test JupyterHub.
|
||||
|
||||
Tip: If you are working on parts of JupyterHub that are common to all
|
||||
authenticators & spawners, we recommend using both DummyAuthenticator &
|
||||
SimpleLocalProcessSpawner. If you are working on just authenticator-related
|
||||
parts, use only SimpleLocalProcessSpawner. Similarly, if you are working on
|
||||
just spawner-related parts, use only DummyAuthenticator.
|
||||
|
||||
## Building frontend components
|
||||
|
||||
The testing configuration file also disables caching of static files,
|
||||
which allows you to edit and rebuild these files without restarting JupyterHub.
|
||||
|
||||
If you are working on the admin react page, which is in the `jsx` directory, you can run:
|
||||
|
||||
```bash
|
||||
cd jsx
|
||||
npm install
|
||||
npm run build:watch
|
||||
```
|
||||
|
||||
to continuously rebuild the admin page, requiring only a refresh of the page.
|
||||
|
||||
If you are working on the frontend SCSS files, you can run the same `build:watch` command
|
||||
in the _top level_ directory of the repo:
|
||||
|
||||
```bash
|
||||
npm install
|
||||
npm run build:watch
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
This section lists common ways setting up your development environment may
|
||||
fail, and how to fix them. Please add to the list if you encounter yet
|
||||
another way it can fail!
|
||||
|
||||
### `lessc` not found
|
||||
|
||||
If the `python3 -m pip install --editable .` command fails and complains about
|
||||
`lessc` being unavailable, you may need to explicitly install some
|
||||
additional JavaScript dependencies:
|
||||
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
This will fetch client-side JavaScript dependencies necessary to compile
|
||||
CSS.
|
||||
|
||||
You may also need to manually update JavaScript and CSS after some
|
||||
development updates, with:
|
||||
|
||||
```bash
|
||||
python3 setup.py js # fetch updated client-side js
|
||||
python3 setup.py css # recompile CSS from LESS sources
|
||||
python3 setup.py jsx # build React admin app
|
||||
```
|
||||
|
||||
### Failed to bind XXX to `http://127.0.0.1:<port>/<path>`
|
||||
|
||||
This error can happen when there's already an application or a service using this
|
||||
port.
|
||||
|
||||
Use the following command to find out which service is using this port.
|
||||
|
||||
```bash
|
||||
lsof -P -i TCP:<port> -sTCP:LISTEN
|
||||
```
|
||||
|
||||
If nothing shows up, it likely means there's a system service that uses it but
|
||||
your current user cannot list it. Reuse the same command with sudo.
|
||||
|
||||
```bash
|
||||
sudo lsof -P -i TCP:<port> -sTCP:LISTEN
|
||||
```
|
||||
|
||||
Depending on the result of the above commands, the most simple solution is to
|
||||
configure JupyterHub to use a different port for the service that is failing.
|
||||
|
||||
As an example, the following is a frequently seen issue:
|
||||
|
||||
`Failed to bind hub to http://127.0.0.1:8081/hub/`
|
||||
|
||||
Using the procedure described above, start with:
|
||||
|
||||
```bash
|
||||
lsof -P -i TCP:8081 -sTCP:LISTEN
|
||||
```
|
||||
|
||||
and if nothing shows up:
|
||||
|
||||
```bash
|
||||
sudo lsof -P -i TCP:8081 -sTCP:LISTEN
|
||||
```
|
||||
|
||||
Finally, depending on your findings, you can apply the following change and start JupyterHub again:
|
||||
|
||||
```python
|
||||
c.JupyterHub.hub_port = 9081 # Or any other free port
|
||||
```
|
@@ -1,187 +0,0 @@
|
||||
.. _contributing/setup:
|
||||
|
||||
================================
|
||||
Setting up a development install
|
||||
================================
|
||||
|
||||
System requirements
|
||||
===================
|
||||
|
||||
JupyterHub can only run on macOS or Linux operating systems. If you are
|
||||
using Windows, we recommend using `VirtualBox <https://virtualbox.org>`_
|
||||
or a similar system to run `Ubuntu Linux <https://ubuntu.com>`_ for
|
||||
development.
|
||||
|
||||
Install Python
|
||||
--------------
|
||||
|
||||
JupyterHub is written in the `Python <https://python.org>`_ programming language and
|
||||
requires you have at least version 3.6 installed locally. If you haven’t
|
||||
installed Python before, the recommended way to install it is to use
|
||||
`Miniconda <https://conda.io/miniconda.html>`_. Remember to get the ‘Python 3’ version,
|
||||
and **not** the ‘Python 2’ version!
|
||||
|
||||
Install nodejs
|
||||
--------------
|
||||
|
||||
`NodeJS 12+ <https://nodejs.org/en/>`_ is required for building some JavaScript components.
|
||||
``configurable-http-proxy``, the default proxy implementation for JupyterHub, is written in Javascript.
|
||||
If you have not installed NodeJS before, we recommend installing it in the ``miniconda`` environment you set up for Python.
|
||||
You can do so with ``conda install nodejs``.
|
||||
|
||||
Many in the Jupyter community use [``nvm``](https://github.com/nvm-sh/nvm) to
|
||||
managing node dependencies.
|
||||
|
||||
Install git
|
||||
-----------
|
||||
|
||||
JupyterHub uses `Git <https://git-scm.com>`_ & `GitHub <https://github.com>`_
|
||||
for development & collaboration. You need to `install git
|
||||
<https://git-scm.com/book/en/v2/Getting-Started-Installing-Git>`_ to work on
|
||||
JupyterHub. We also recommend getting a free account on GitHub.com.
|
||||
|
||||
Setting up a development install
|
||||
================================
|
||||
|
||||
When developing JupyterHub, you would need to make changes and be able to instantly view the results of the changes. To achieve that, a developer install is required.
|
||||
|
||||
.. note:: This guide does not attempt to dictate *how* development
|
||||
environments should be isolated since that is a personal preference and can
|
||||
be achieved in many ways, for example, `tox`, `conda`, `docker`, etc. See this
|
||||
`forum thread <https://discourse.jupyter.org/t/thoughts-on-using-tox/3497>`_ for
|
||||
a more detailed discussion.
|
||||
|
||||
1. Clone the `JupyterHub git repository <https://github.com/jupyterhub/jupyterhub>`_
|
||||
to your computer.
|
||||
|
||||
.. code:: bash
|
||||
|
||||
git clone https://github.com/jupyterhub/jupyterhub
|
||||
cd jupyterhub
|
||||
|
||||
2. Make sure the ``python`` you installed and the ``npm`` you installed
|
||||
are available to you on the command line.
|
||||
|
||||
.. code:: bash
|
||||
|
||||
python -V
|
||||
|
||||
This should return a version number greater than or equal to 3.6.
|
||||
|
||||
.. code:: bash
|
||||
|
||||
npm -v
|
||||
|
||||
This should return a version number greater than or equal to 5.0.
|
||||
|
||||
3. Install ``configurable-http-proxy`` (required to run and test the default JupyterHub configuration) and ``yarn`` (required to build some components):
|
||||
|
||||
.. code:: bash
|
||||
|
||||
npm install -g configurable-http-proxy yarn
|
||||
|
||||
If you get an error that says ``Error: EACCES: permission denied``, you might need to prefix the command with ``sudo``.
|
||||
``sudo`` may be required to perform a system-wide install.
|
||||
If you do not have access to sudo, you may instead run the following commands:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
npm install configurable-http-proxy yarn
|
||||
export PATH=$PATH:$(pwd)/node_modules/.bin
|
||||
|
||||
The second line needs to be run every time you open a new terminal.
|
||||
|
||||
If you are using conda you can instead run:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
conda install configurable-http-proxy yarn
|
||||
|
||||
4. Install an editable version of JupyterHub and its requirements for
|
||||
development and testing. This lets you edit JupyterHub code in a text editor
|
||||
& restart the JupyterHub process to see your code changes immediately.
|
||||
|
||||
.. code:: bash
|
||||
|
||||
python3 -m pip install --editable ".[test]"
|
||||
|
||||
5. Set up a database.
|
||||
|
||||
The default database engine is ``sqlite`` so if you are just trying
|
||||
to get up and running quickly for local development that should be
|
||||
available via `Python <https://docs.python.org/3.5/library/sqlite3.html>`__.
|
||||
See :doc:`/reference/database` for details on other supported databases.
|
||||
|
||||
6. You are now ready to start JupyterHub!
|
||||
|
||||
.. code:: bash
|
||||
|
||||
jupyterhub
|
||||
|
||||
7. You can access JupyterHub from your browser at
|
||||
``http://localhost:8000`` now.
|
||||
|
||||
Happy developing!
|
||||
|
||||
Using DummyAuthenticator & SimpleLocalProcessSpawner
|
||||
====================================================
|
||||
|
||||
To simplify testing of JupyterHub, it is helpful to use
|
||||
:class:`~jupyterhub.auth.DummyAuthenticator` instead of the default JupyterHub
|
||||
authenticator and SimpleLocalProcessSpawner instead of the default spawner.
|
||||
|
||||
There is a sample configuration file that does this in
|
||||
``testing/jupyterhub_config.py``. To launch JupyterHub with this
|
||||
configuration:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
jupyterhub -f testing/jupyterhub_config.py
|
||||
|
||||
The default JupyterHub `authenticator
|
||||
<https://jupyterhub.readthedocs.io/en/stable/reference/authenticators.html#the-default-pam-authenticator>`_
|
||||
& `spawner
|
||||
<https://jupyterhub.readthedocs.io/en/stable/api/spawner.html#localprocessspawner>`_
|
||||
require your system to have user accounts for each user you want to log in to
|
||||
JupyterHub as.
|
||||
|
||||
DummyAuthenticator allows you to log in with any username & password,
|
||||
while SimpleLocalProcessSpawner allows you to start servers without having to
|
||||
create a Unix user for each JupyterHub user. Together, these make it
|
||||
much easier to test JupyterHub.
|
||||
|
||||
Tip: If you are working on parts of JupyterHub that are common to all
|
||||
authenticators & spawners, we recommend using both DummyAuthenticator &
|
||||
SimpleLocalProcessSpawner. If you are working on just authenticator-related
|
||||
parts, use only SimpleLocalProcessSpawner. Similarly, if you are working on
|
||||
just spawner-related parts, use only DummyAuthenticator.
|
||||
|
||||
Troubleshooting
|
||||
===============
|
||||
|
||||
This section lists common ways setting up your development environment may
|
||||
fail, and how to fix them. Please add to the list if you encounter yet
|
||||
another way it can fail!
|
||||
|
||||
``lessc`` not found
|
||||
-------------------
|
||||
|
||||
If the ``python3 -m pip install --editable .`` command fails and complains about
|
||||
``lessc`` being unavailable, you may need to explicitly install some
|
||||
additional JavaScript dependencies:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
npm install
|
||||
|
||||
This will fetch client-side JavaScript dependencies necessary to compile
|
||||
CSS.
|
||||
|
||||
You may also need to manually update JavaScript and CSS after some
|
||||
development updates, with:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
python3 setup.py js # fetch updated client-side js
|
||||
python3 setup.py css # recompile CSS from LESS sources
|
||||
python3 setup.py jsx # build React admin app
|
157
docs/source/contributing/tests.md
Normal file
@@ -0,0 +1,157 @@
|
||||
(contributing-tests)=
|
||||
|
||||
# Testing JupyterHub and linting code
|
||||
|
||||
Unit testing helps to validate that JupyterHub works the way we think it does,
|
||||
and continues to do so when changes occur. They also help communicate
|
||||
precisely what we expect our code to do.
|
||||
|
||||
JupyterHub uses [pytest](https://pytest.org) for all the tests. You
|
||||
can find them under the [jupyterhub/tests](https://github.com/jupyterhub/jupyterhub/tree/main/jupyterhub/tests) directory in the git repository.
|
||||
|
||||
## Running the tests
|
||||
|
||||
1. Make sure you have completed {ref}`contributing/setup`.
|
||||
Once you are done, you would be able to run `jupyterhub` from the command line and access it from your web browser.
|
||||
This ensures that the dev environment is properly set up for tests to run.
|
||||
|
||||
2. You can run all tests in JupyterHub
|
||||
|
||||
```bash
|
||||
pytest -v jupyterhub/tests
|
||||
```
|
||||
|
||||
This should display progress as it runs all the tests, printing
|
||||
information about any test failures as they occur.
|
||||
|
||||
If you wish to confirm test coverage the run tests with the `--cov` flag:
|
||||
|
||||
```bash
|
||||
pytest -v --cov=jupyterhub jupyterhub/tests
|
||||
```
|
||||
|
||||
3. You can also run tests in just a specific file:
|
||||
|
||||
```bash
|
||||
pytest -v jupyterhub/tests/<test-file-name>
|
||||
```
|
||||
|
||||
4. To run a specific test only, you can do:
|
||||
|
||||
```bash
|
||||
pytest -v jupyterhub/tests/<test-file-name>::<test-name>
|
||||
```
|
||||
|
||||
This runs the test with function name `<test-name>` defined in
|
||||
`<test-file-name>`. This is very useful when you are iteratively
|
||||
developing a single test.
|
||||
|
||||
For example, to run the test `test_shutdown` in the file `test_api.py`,
|
||||
you would run:
|
||||
|
||||
```bash
|
||||
pytest -v jupyterhub/tests/test_api.py::test_shutdown
|
||||
```
|
||||
|
||||
For more details, refer to the [pytest usage documentation](https://pytest.readthedocs.io/en/latest/usage.html).
|
||||
|
||||
## Test organisation
|
||||
|
||||
The tests live in `jupyterhub/tests` and are organized roughly into:
|
||||
|
||||
1. `test_api.py` tests the REST API
|
||||
2. `test_pages.py` tests loading the HTML pages
|
||||
|
||||
and other collections of tests for different components.
|
||||
When writing a new test, there should usually be a test of
|
||||
similar functionality already written and related tests should
|
||||
be added nearby.
|
||||
|
||||
The fixtures live in `jupyterhub/tests/conftest.py`. There are
|
||||
fixtures that can be used for JupyterHub components, such as:
|
||||
|
||||
- `app`: an instance of JupyterHub with mocked parts
|
||||
- `auth_state_enabled`: enables persisting auth_state (like authentication tokens)
|
||||
- `db`: a sqlite in-memory DB session
|
||||
- `` io_loop` ``: a Tornado event loop
|
||||
- `event_loop`: a new asyncio event loop
|
||||
- `user`: creates a new temporary user
|
||||
- `admin_user`: creates a new temporary admin user
|
||||
- single user servers
|
||||
\- `cleanup_after`: allows cleanup of single user servers between tests
|
||||
- mocked service
|
||||
\- `MockServiceSpawner`: a spawner that mocks services for testing with a short poll interval
|
||||
\- `` mockservice` ``: mocked service with no external service url
|
||||
\- `mockservice_url`: mocked service with a url to test external services
|
||||
|
||||
And fixtures to add functionality or spawning behavior:
|
||||
|
||||
- `admin_access`: grants admin access
|
||||
- `` no_patience` ``: sets slow-spawning timeouts to zero
|
||||
- `slow_spawn`: enables the SlowSpawner (a spawner that takes a few seconds to start)
|
||||
- `never_spawn`: enables the NeverSpawner (a spawner that will never start)
|
||||
- `bad_spawn`: enables the BadSpawner (a spawner that fails immediately)
|
||||
- `slow_bad_spawn`: enables the SlowBadSpawner (a spawner that fails after a short delay)
|
||||
|
||||
Refer to the [pytest fixtures documentation](https://pytest.readthedocs.io/en/latest/fixture.html) to learn how to use fixtures that exists already and to create new ones.
|
||||
|
||||
### The Pytest-Asyncio Plugin
|
||||
|
||||
When testing the various JupyterHub components and their various implementations, it sometimes becomes necessary to have a running instance of JupyterHub to test against.
|
||||
The [`app`](https://github.com/jupyterhub/jupyterhub/blob/270b61992143b29af8c2fab90c4ed32f2f6fe209/jupyterhub/tests/conftest.py#L60) fixture mocks a JupyterHub application for use in testing by:
|
||||
|
||||
- enabling ssl if internal certificates are available
|
||||
- creating an instance of [MockHub](https://github.com/jupyterhub/jupyterhub/blob/270b61992143b29af8c2fab90c4ed32f2f6fe209/jupyterhub/tests/mocking.py#L221) using any provided configurations as arguments
|
||||
- initializing the mocked instance
|
||||
- starting the mocked instance
|
||||
- finally, a registered finalizer function performs a cleanup and stops the mocked instance
|
||||
|
||||
The JupyterHub test suite uses the [pytest-asyncio plugin](https://pytest-asyncio.readthedocs.io/en/latest/) that handles [event-loop](https://docs.python.org/3/library/asyncio-eventloop.html) integration in [Tornado](https://www.tornadoweb.org/en/stable/) applications. This allows for the use of top-level awaits when calling async functions or [fixtures](https://docs.pytest.org/en/6.2.x/fixture.html#what-fixtures-are) during testing. All test functions and fixtures labelled as `async` will run on the same event loop.
|
||||
|
||||
```{note}
|
||||
With the introduction of [top-level awaits](https://piccolo-orm.com/blog/top-level-await-in-python/), the use of the `io_loop` fixture of the [pytest-tornado plugin](https://www.tornadoweb.org/en/stable/ioloop.html) is no longer necessary. It was initially used to call coroutines. With the upgrades made to `pytest-asyncio`, this usage is now deprecated. It is now, only utilized within the JupyterHub test suite to ensure complete cleanup of resources used during testing such as open file descriptors. This is demonstrated in this [pull request](https://github.com/jupyterhub/jupyterhub/pull/4332).
|
||||
More information is provided below.
|
||||
```
|
||||
|
||||
One of the general goals of the [JupyterHub Pytest Plugin project](https://github.com/jupyterhub/pytest-jupyterhub) is to ensure the MockHub cleanup fully closes and stops all utilized resources during testing so the use of the `io_loop` fixture for teardown is not necessary. This was highlighted in this [issue](https://github.com/jupyterhub/pytest-jupyterhub/issues/30)
|
||||
|
||||
For more information on asyncio and event-loops, here are some resources:
|
||||
|
||||
- **Read**: [Introduction to the Python event loop](https://www.pythontutorial.net/python-concurrency/python-event-loop)
|
||||
- **Read**: [Overview of Async IO in Python 3.7](https://stackabuse.com/overview-of-async-io-in-python-3-7)
|
||||
- **Watch**: [Asyncio: Understanding Async / Await in Python](https://www.youtube.com/watch?v=bs9tlDFWWdQ)
|
||||
- **Watch**: [Learn Python's AsyncIO #2 - The Event Loop](https://www.youtube.com/watch?v=E7Yn5biBZ58)
|
||||
|
||||
## Troubleshooting Test Failures
|
||||
|
||||
### All the tests are failing
|
||||
|
||||
Make sure you have completed all the steps in {ref}`contributing/setup` successfully, and are able to access JupyterHub from your browser at http://localhost:8000 after starting `jupyterhub` in your command line.
|
||||
|
||||
## Code formatting and linting
|
||||
|
||||
JupyterHub automatically enforces code formatting. This means that pull requests
|
||||
with changes breaking this formatting will receive a commit from pre-commit.ci
|
||||
automatically.
|
||||
|
||||
To automatically format code locally, you can install pre-commit and register a
|
||||
_git hook_ to automatically check with pre-commit before you make a commit if
|
||||
the formatting is okay.
|
||||
|
||||
```bash
|
||||
pip install pre-commit
|
||||
pre-commit install --install-hooks
|
||||
```
|
||||
|
||||
To run pre-commit manually you would do:
|
||||
|
||||
```bash
|
||||
# check for changes to code not yet committed
|
||||
pre-commit run
|
||||
|
||||
# check for changes also in already committed code
|
||||
pre-commit run --all-files
|
||||
```
|
||||
|
||||
You may also install [black integration](https://github.com/psf/black#editor-integration)
|
||||
into your text editor to format code automatically.
|
@@ -1,138 +0,0 @@
|
||||
.. _contributing/tests:
|
||||
|
||||
===================================
|
||||
Testing JupyterHub and linting code
|
||||
===================================
|
||||
|
||||
Unit testing helps to validate that JupyterHub works the way we think it does,
|
||||
and continues to do so when changes occur. They also help communicate
|
||||
precisely what we expect our code to do.
|
||||
|
||||
JupyterHub uses `pytest <https://pytest.org>`_ for all the tests. You
|
||||
can find them under the `jupyterhub/tests <https://github.com/jupyterhub/jupyterhub/tree/main/jupyterhub/tests>`_ directory in the git repository.
|
||||
|
||||
Running the tests
|
||||
==================
|
||||
|
||||
#. Make sure you have completed :ref:`contributing/setup`.
|
||||
Once you are done, you would be able to run ``jupyterhub`` from the command line and access it from your web browser.
|
||||
This ensures that the dev environment is properly set up for tests to run.
|
||||
|
||||
#. You can run all tests in JupyterHub
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
pytest -v jupyterhub/tests
|
||||
|
||||
This should display progress as it runs all the tests, printing
|
||||
information about any test failures as they occur.
|
||||
|
||||
If you wish to confirm test coverage the run tests with the `--cov` flag:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
pytest -v --cov=jupyterhub jupyterhub/tests
|
||||
|
||||
#. You can also run tests in just a specific file:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
pytest -v jupyterhub/tests/<test-file-name>
|
||||
|
||||
#. To run a specific test only, you can do:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
pytest -v jupyterhub/tests/<test-file-name>::<test-name>
|
||||
|
||||
This runs the test with function name ``<test-name>`` defined in
|
||||
``<test-file-name>``. This is very useful when you are iteratively
|
||||
developing a single test.
|
||||
|
||||
For example, to run the test ``test_shutdown`` in the file ``test_api.py``,
|
||||
you would run:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
pytest -v jupyterhub/tests/test_api.py::test_shutdown
|
||||
|
||||
For more details, refer to the `pytest usage documentation <https://pytest.readthedocs.io/en/latest/usage.html>`_.
|
||||
|
||||
Test organisation
|
||||
=================
|
||||
|
||||
The tests live in ``jupyterhub/tests`` and are organized roughly into:
|
||||
|
||||
#. ``test_api.py`` tests the REST API
|
||||
#. ``test_pages.py`` tests loading the HTML pages
|
||||
|
||||
and other collections of tests for different components.
|
||||
When writing a new test, there should usually be a test of
|
||||
similar functionality already written and related tests should
|
||||
be added nearby.
|
||||
|
||||
The fixtures live in ``jupyterhub/tests/conftest.py``. There are
|
||||
fixtures that can be used for JupyterHub components, such as:
|
||||
|
||||
- ``app``: an instance of JupyterHub with mocked parts
|
||||
- ``auth_state_enabled``: enables persisting auth_state (like authentication tokens)
|
||||
- ``db``: a sqlite in-memory DB session
|
||||
- ``io_loop```: a Tornado event loop
|
||||
- ``event_loop``: a new asyncio event loop
|
||||
- ``user``: creates a new temporary user
|
||||
- ``admin_user``: creates a new temporary admin user
|
||||
- single user servers
|
||||
- ``cleanup_after``: allows cleanup of single user servers between tests
|
||||
- mocked service
|
||||
- ``MockServiceSpawner``: a spawner that mocks services for testing with a short poll interval
|
||||
- ``mockservice```: mocked service with no external service url
|
||||
- ``mockservice_url``: mocked service with a url to test external services
|
||||
|
||||
And fixtures to add functionality or spawning behavior:
|
||||
|
||||
- ``admin_access``: grants admin access
|
||||
- ``no_patience```: sets slow-spawning timeouts to zero
|
||||
- ``slow_spawn``: enables the SlowSpawner (a spawner that takes a few seconds to start)
|
||||
- ``never_spawn``: enables the NeverSpawner (a spawner that will never start)
|
||||
- ``bad_spawn``: enables the BadSpawner (a spawner that fails immediately)
|
||||
- ``slow_bad_spawn``: enables the SlowBadSpawner (a spawner that fails after a short delay)
|
||||
|
||||
Refer to the `pytest fixtures documentation <https://pytest.readthedocs.io/en/latest/fixture.html>`_ to learn how to use fixtures that exists already and to create new ones.
|
||||
|
||||
Troubleshooting Test Failures
|
||||
=============================
|
||||
|
||||
All the tests are failing
|
||||
-------------------------
|
||||
|
||||
Make sure you have completed all the steps in :ref:`contributing/setup` successfully, and are able to access JupyterHub from your browser at http://localhost:8000 after starting ``jupyterhub`` in your command line.
|
||||
|
||||
|
||||
Code formatting and linting
|
||||
===========================
|
||||
|
||||
JupyterHub automatically enforces code formatting. This means that pull requests
|
||||
with changes breaking this formatting will receive a commit from pre-commit.ci
|
||||
automatically.
|
||||
|
||||
To automatically format code locally, you can install pre-commit and register a
|
||||
*git hook* to automatically check with pre-commit before you make a commit if
|
||||
the formatting is okay.
|
||||
|
||||
.. code:: bash
|
||||
|
||||
pip install pre-commit
|
||||
pre-commit install --install-hooks
|
||||
|
||||
To run pre-commit manually you would do:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
# check for changes to code not yet committed
|
||||
pre-commit run
|
||||
|
||||
# check for changes also in already committed code
|
||||
pre-commit run --all-files
|
||||
|
||||
You may also install `black integration <https://github.com/psf/black#editor-integration>`_
|
||||
into your text editor to format code automatically.
|
@@ -1,46 +0,0 @@
|
||||
Event logging and telemetry
|
||||
===========================
|
||||
|
||||
JupyterHub can be configured to record structured events from a running server using Jupyter's `Telemetry System`_. The types of events that JupyterHub emits are defined by `JSON schemas`_ listed at the bottom of this page_.
|
||||
|
||||
.. _logging: https://docs.python.org/3/library/logging.html
|
||||
.. _`Telemetry System`: https://github.com/jupyter/telemetry
|
||||
.. _`JSON schemas`: https://json-schema.org/
|
||||
|
||||
How to emit events
|
||||
------------------
|
||||
|
||||
Event logging is handled by its ``Eventlog`` object. This leverages Python's standing logging_ library to emit, filter, and collect event data.
|
||||
|
||||
|
||||
To begin recording events, you'll need to set two configurations:
|
||||
|
||||
1. ``handlers``: tells the EventLog *where* to route your events. This trait is a list of Python logging handlers that route events to the event log file.
|
||||
2. ``allows_schemas``: tells the EventLog *which* events should be recorded. No events are emitted by default; all recorded events must be listed here.
|
||||
|
||||
Here's a basic example:
|
||||
|
||||
.. code-block::
|
||||
|
||||
import logging
|
||||
|
||||
c.EventLog.handlers = [
|
||||
logging.FileHandler('event.log'),
|
||||
]
|
||||
|
||||
c.EventLog.allowed_schemas = [
|
||||
'hub.jupyter.org/server-action'
|
||||
]
|
||||
|
||||
The output is a file, ``"event.log"``, with events recorded as JSON data.
|
||||
|
||||
|
||||
.. _page:
|
||||
|
||||
Event schemas
|
||||
-------------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
server-actions.rst
|
@@ -40,7 +40,7 @@ The rest is going to be up to your users.
|
||||
Per-user overhead from JupyterHub is typically negligible
|
||||
up to at least a few hundred concurrent active users.
|
||||
|
||||
```[figure} ../images/mybinder-hub-components-cpu-memory.png
|
||||
```{figure} /images/mybinder-hub-components-cpu-memory.png
|
||||
JupyterHub component resource usage for mybinder.org.
|
||||
```
|
||||
|
||||
@@ -68,7 +68,7 @@ but which are **less predictable**.
|
||||
|
||||
[the-littlest-jupyterhub]: https://the-littlest-jupyterhub.readthedocs.io
|
||||
|
||||
[zero-to-jupyterhub]: https://zero-to-jupyterhub.readthedocs.io
|
||||
[zero-to-jupyterhub]: https://z2jh.jupyter.org
|
||||
|
||||
(limits-requests)=
|
||||
|
||||
@@ -200,7 +200,7 @@ The limit here is actually Kubernetes' pods per node, not memory _or_ CPU.
|
||||
This is likely a extreme case, as many Binder users come from clicking links on webpages
|
||||
without any actual intention of running code.
|
||||
|
||||
```[figure} ../images/mybinder-load5.png
|
||||
```{figure} /images/mybinder-load5.png
|
||||
mybinder.org node CPU usage is low with 50-150 users sharing just 8 cores
|
||||
```
|
||||
|
||||
@@ -277,7 +277,7 @@ showing >90% of users using less than 10% CPU and 200MB,
|
||||
but a few outliers near the limit of 1 CPU and 2GB of RAM.
|
||||
This is the kind of information you can use to tune your requests and limits.
|
||||
|
||||

|
||||

|
||||
|
||||
[prometheus]: https://prometheus.io
|
||||
[grafana]: https://grafana.com
|
||||
@@ -299,10 +299,10 @@ There are lots of other resources for cost and capacity planning that may be spe
|
||||
|
||||
Here are some useful links to other resources
|
||||
|
||||
- [Zero to JupyterHub](https://zero-to-jupyterhub.readthedocs.io) documentation on
|
||||
- [projecting costs](https://zero-to-jupyterhub.readthedocs.io/en/latest/administrator/cost.html)
|
||||
- [configuring user resources](https://zero-to-jupyterhub.readthedocs.io/en/latest/jupyterhub/customizing/user-resources.html)
|
||||
- [Zero to JupyterHub](https://z2jh.jupyter.org) documentation on
|
||||
- [projecting costs](https://z2jh.jupyter.org/en/latest/administrator/cost.html)
|
||||
- [configuring user resources](https://z2jh.jupyter.org/en/latest/jupyterhub/customizing/user-resources.html)
|
||||
- Cloud platform cost calculators:
|
||||
- [Google Cloud](https://cloud.google.com/products/calculator/)
|
||||
- [Amazon AWS](https://calculator.s3.amazonaws.com)
|
||||
- [Amazon AWS](https://calculator.aws)
|
||||
- [Microsoft Azure](https://azure.microsoft.com/en-us/pricing/calculator/)
|
183
docs/source/explanation/database.md
Normal file
@@ -0,0 +1,183 @@
|
||||
(hub-database)=
|
||||
|
||||
# The Hub's Database
|
||||
|
||||
JupyterHub uses a database to store information about users, services, and other data needed for operating the Hub.
|
||||
This is the **state** of the Hub.
|
||||
|
||||
## Why does JupyterHub have a database?
|
||||
|
||||
JupyterHub is a **stateful** application (more on that 'state' later).
|
||||
Updating JupyterHub's configuration or upgrading the version of JupyterHub requires restarting the JupyterHub process to apply the changes.
|
||||
We want to minimize the disruption caused by restarting the Hub process, so it can be a mundane, frequent, routine activity.
|
||||
Storing state information outside the process for later retrieval is necessary for this, and one of the main thing databases are for.
|
||||
|
||||
A lot of the operations in JupyterHub are also **relationships**, which is exactly what SQL databases are great at.
|
||||
For example:
|
||||
|
||||
- Given an API token, what user is making the request?
|
||||
- Which users don't have running servers?
|
||||
- Which servers belong to user X?
|
||||
- Which users have not been active in the last 24 hours?
|
||||
|
||||
Finally, a database allows us to have more information stored without needing it all loaded in memory,
|
||||
e.g. supporting a large number (several thousands) of inactive users.
|
||||
|
||||
## What's in the database?
|
||||
|
||||
The short answer of what's in the JupyterHub database is "everything."
|
||||
JupyterHub's **state** lives in the database.
|
||||
That is, everything JupyterHub needs to be aware of to function that _doesn't_ come from the configuration files, such as
|
||||
|
||||
- users, roles, role assignments
|
||||
- state, urls of running servers
|
||||
- Hashed API tokens
|
||||
- Short-lived state related to OAuth flow
|
||||
- Timestamps for when users, tokens, and servers were last used
|
||||
|
||||
### What's _not_ in the database
|
||||
|
||||
Not _quite_ all of JupyterHub's state is in the database.
|
||||
This mostly involves transient state, such as the 'pending' transitions of Spawners (starting, stopping, etc.).
|
||||
Anything not in the database must be reconstructed on Hub restart, and the only sources of information to do that are the database and JupyterHub configuration file(s).
|
||||
|
||||
## How does JupyterHub use the database?
|
||||
|
||||
JupyterHub makes some _unusual_ choices in how it connects to the database.
|
||||
These choices represent trade-offs favoring single-process simplicity and performance at the expense of horizontal scalability (multiple Hub instances).
|
||||
|
||||
We often say that the Hub 'owns' the database.
|
||||
This ownership means that we assume the Hub is the only process that will talk to the database.
|
||||
This assumption enables us to make several caching optimizations that dramatically improve JupyterHub's performance (i.e. data written recently to the database can be read from memory instead of fetched again from the database) that would not work if multiple processes could be interacting with the database at the same time.
|
||||
|
||||
Database operations are also synchronous, so while JupyterHub is waiting on a database operation, it cannot respond to other requests.
|
||||
This allows us to avoid complex locking mechanisms, because transaction races can only occur during an `await`, so we only need to make sure we've completed any given transaction before the next `await` in a given request.
|
||||
|
||||
:::{note}
|
||||
We are slowly working to remove these assumptions, and moving to a more traditional db session per-request pattern.
|
||||
This will enable multiple Hub instances and enable scaling JupyterHub, but will significantly reduce the number of active users a single Hub instance can serve.
|
||||
:::
|
||||
|
||||
### Database performance in a typical request
|
||||
|
||||
Most authenticated requests to JupyterHub involve a few database transactions:
|
||||
|
||||
1. look up the authenticated user (e.g. look up token by hash, then resolve owner and permissions)
|
||||
2. record activity
|
||||
3. perform any relevant changes involved in processing the request (e.g. create the records for a running server when starting one)
|
||||
|
||||
This means that the database is involved in almost every request, but only in quite small, simple queries, e.g.:
|
||||
|
||||
- lookup one token by hash
|
||||
- lookup one user by name
|
||||
- list tokens or servers for one user (typically 1-10)
|
||||
- etc.
|
||||
|
||||
### The database as a limiting factor
|
||||
|
||||
As a result of the above transactions in most requests, database performance is the _leading_ factor in JupyterHub's baseline requests-per-second performance, but that cost does not scale significantly with the number of users, active or otherwise.
|
||||
However, the database is _rarely_ a limiting factor in JupyterHub performance in a practical sense, because the main thing JupyterHub does is start, stop, and monitor whole servers, which take far more time than any small database transaction, no matter how many records you have or how slow your database is (within reason).
|
||||
Additionally, there is usually _very_ little load on the database itself.
|
||||
|
||||
By far the most taxing activity on the database is the 'list all users' endpoint, primarily used by the [idle-culling service](https://github.com/jupyterhub/jupyterhub-idle-culler).
|
||||
Database-based optimizations have been added to make even these operations feasible for large numbers of users:
|
||||
|
||||
1. State filtering on [GET /hub/api/users?state=active](rest-api-get-users),
|
||||
which limits the number of results in the query to only the relevant subset (added in JupyterHub 1.3), rather than all users.
|
||||
2. [Pagination](api-pagination) of all list endpoints, allowing the request of a large number of resources to be more fairly balanced with other Hub activities across multiple requests (added in 2.0).
|
||||
|
||||
:::{note}
|
||||
It's important to note when discussing performance and limiting factors and that all of this only applies to requests to `/hub/...`.
|
||||
The Hub and its database are not involved in most requests to single-user servers (`/user/...`), which is by design, and largely motivated by the fact that the Hub itself doesn't _need_ to be fast because its operations are infrequent and large.
|
||||
:::
|
||||
|
||||
## Database backends
|
||||
|
||||
JupyterHub supports a variety of database backends via [SQLAlchemy][].
|
||||
The default is sqlite, which works great for many cases, but you should be able to use many backends supported by SQLAlchemy.
|
||||
Usually, this will mean PostgreSQL or MySQL, both of which are officially supported and well tested with JupyterHub, but others may work as well.
|
||||
See [SQLAlchemy's docs][sqlalchemy-dialect] for how to connect to different database backends.
|
||||
Doing so generally involves:
|
||||
|
||||
1. installing a Python package that provides a client implementation, and
|
||||
2. setting [](JupyterHub.db_url) to connect to your database with the specified implementation
|
||||
|
||||
[sqlalchemy-dialect]: https://docs.sqlalchemy.org/en/20/dialects/
|
||||
[sqlalchemy]: https://www.sqlalchemy.org
|
||||
|
||||
### Default backend: SQLite
|
||||
|
||||
The default database backend for JupyterHub is [SQLite](https://sqlite.org).
|
||||
We have chosen SQLite as JupyterHub's default because it's simple (the 'database' is a single file) and ubiquitous (it is in the Python standard library).
|
||||
It works very well for testing, small deployments, and workshops.
|
||||
|
||||
For production systems, SQLite has some disadvantages when used with JupyterHub:
|
||||
|
||||
- `upgrade-db` may not always work, and you may need to start with a fresh database
|
||||
- `downgrade-db` **will not** work if you want to rollback to an earlier
|
||||
version, so backup the `jupyterhub.sqlite` file before upgrading (JupyterHub automatically creates a date-stamped backup file when upgrading sqlite)
|
||||
|
||||
The sqlite documentation provides a helpful page about [when to use SQLite and
|
||||
where traditional RDBMS may be a better choice](https://sqlite.org/whentouse.html).
|
||||
|
||||
### Picking your database backend (PostgreSQL, MySQL)
|
||||
|
||||
When running a long term deployment or a production system, we recommend using a full-fledged relational database, such as [PostgreSQL](https://www.postgresql.org) or [MySQL](https://www.mysql.com), that supports the SQL `ALTER TABLE` statement, which is used in some database upgrade steps.
|
||||
|
||||
In general, you select your database backend with [](JupyterHub.db_url), and can further configure it (usually not necessary) with [](JupyterHub.db_kwargs).
|
||||
|
||||
## Notes and Tips
|
||||
|
||||
### SQLite
|
||||
|
||||
The SQLite database should not be used on NFS. SQLite uses reader/writer locks
|
||||
to control access to the database. This locking mechanism might not work
|
||||
correctly if the database file is kept on an NFS filesystem. This is because
|
||||
`fcntl()` file locking is broken on many NFS implementations. Therefore, you
|
||||
should avoid putting SQLite database files on NFS since it will not handle well
|
||||
multiple processes which might try to access the file at the same time.
|
||||
|
||||
### PostgreSQL
|
||||
|
||||
We recommend using PostgreSQL for production if you are unsure whether to use
|
||||
MySQL or PostgreSQL or if you do not have a strong preference.
|
||||
There is additional configuration required for MySQL that is not needed for PostgreSQL.
|
||||
|
||||
For example, to connect to a PostgreSQL database with psycopg2:
|
||||
|
||||
1. install psycopg2: `pip install psycopg2` (or `psycopg2-binary` to avoid compilation, which is [not recommended for production][psycopg2-binary])
|
||||
2. set authentication via environment variables `PGUSER` and `PGPASSWORD`
|
||||
3. configure [](JupyterHub.db_url):
|
||||
|
||||
```python
|
||||
c.JupyterHub.db_url = "postgresql+psycopg2://my-postgres-server:5432/my-db-name"
|
||||
```
|
||||
|
||||
[psycopg2-binary]: https://www.psycopg.org/docs/install.html#psycopg-vs-psycopg-binary
|
||||
|
||||
### MySQL / MariaDB
|
||||
|
||||
- You should probably use the `pymysql` or `mysqlclient` sqlalchemy provider, or another backend [recommended by sqlalchemy](https://docs.sqlalchemy.org/en/20/dialects/mysql.html#dialect-mysql)
|
||||
- You also need to set `pool_recycle` to some value (typically 60 - 300, JupyterHub will default to 60)
|
||||
which depends on your MySQL setup. This is necessary since MySQL kills
|
||||
connections serverside if they've been idle for a while, and the connection
|
||||
from the hub will be idle for longer than most connections. This behavior
|
||||
will lead to frustrating 'the connection has gone away' errors from
|
||||
sqlalchemy if `pool_recycle` is not set.
|
||||
- If you use `utf8mb4` collation with MySQL earlier than 5.7.7 or MariaDB
|
||||
earlier than 10.2.1 you may get an `1709, Index column size too large` error.
|
||||
To fix this you need to set `innodb_large_prefix` to enabled and
|
||||
`innodb_file_format` to `Barracuda` to allow for the index sizes jupyterhub
|
||||
uses. `row_format` will be set to `DYNAMIC` as long as those options are set
|
||||
correctly. Later versions of MariaDB and MySQL should set these values by
|
||||
default, as well as have a default `DYNAMIC` `row_format` and pose no trouble
|
||||
to users.
|
||||
|
||||
For example, to connect to a mysql database with mysqlclient:
|
||||
|
||||
1. install mysqlclient: `pip install mysqlclient`
|
||||
2. configure [](JupyterHub.db_url):
|
||||
|
||||
```python
|
||||
c.JupyterHub.db_url = "mysql+mysqldb://myuser:mypassword@my-sql-server:3306/my-db-name"
|
||||
```
|
14
docs/source/explanation/index.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# Explanation
|
||||
|
||||
_Explanation_ documentation provide big-picture descriptions of how JupyterHub works. This section is meant to build your understanding of particular topics.
|
||||
|
||||
```{toctree}
|
||||
:maxdepth: 1
|
||||
|
||||
capacity-planning
|
||||
database
|
||||
websecurity
|
||||
oauth
|
||||
singleuser
|
||||
../rbac/index
|
||||
```
|
@@ -1,3 +1,5 @@
|
||||
(jupyterhub-oauth)=
|
||||
|
||||
# JupyterHub and OAuth
|
||||
|
||||
JupyterHub uses [OAuth 2](https://oauth.net/2/) as an internal mechanism for authenticating users.
|
||||
@@ -255,7 +257,7 @@ To authenticate this request, the single token stored in the encrypted cookie is
|
||||
|
||||
If the user model matches who should be allowed (e.g. Danez),
|
||||
then the request is allowed.
|
||||
See {doc}`../rbac/scopes` for how JupyterHub uses scopes to determine authorized access to servers and services.
|
||||
See [Scopes in JupyterHub](jupyterhub-scopes) for how JupyterHub uses scopes to determine authorized access to servers and services.
|
||||
|
||||
_the end_
|
||||
|
109
docs/source/explanation/singleuser.md
Normal file
@@ -0,0 +1,109 @@
|
||||
(singleuser)=
|
||||
|
||||
# The JupyterHub single-user server
|
||||
|
||||
When a user logs into JupyterHub, they get a 'server', which we usually call the **single-user server**, because it's a server that's meant for a single JupyterHub user.
|
||||
Each JupyterHub user gets a different one (or more than one!).
|
||||
|
||||
A single-user server is a process running somewhere that is:
|
||||
|
||||
1. accessible over http[s],
|
||||
2. authenticated via JupyterHub using OAuth 2.0,
|
||||
3. started by a [Spawner](spawners), and
|
||||
4. 'owned' by a single JupyterHub user
|
||||
|
||||
## The single-user server command
|
||||
|
||||
The Spawner's default single-user server startup command, `jupyterhub-singleuser`, launches `jupyter-server`, the same program used when you run `jupyter lab` on your laptop.
|
||||
(_It can also launch the legacy `jupyter-notebook` server_).
|
||||
That's why JupyterHub looks familiar to folks who are already using Jupyter at home or elsewhere.
|
||||
It's the same!
|
||||
`jupyterhub-singleuser` _customizes_ that program to change (approximately) one thing: **authenticate requests with JupyterHub**.
|
||||
|
||||
(singleuser-auth)=
|
||||
|
||||
## Single-user server authentication
|
||||
|
||||
Implementation-wise, JupyterHub single-user servers are a special-case of {ref}`services`
|
||||
and as such use the same (OAuth) authentication mechanism (more on OAuth in JupyterHub at [](oauth)).
|
||||
This is primarily implemented in the {class}`~.HubOAuth` class.
|
||||
|
||||
This code resides in `jupyterhub.singleuser` subpackage of JupyterHub.
|
||||
The main task of this code is to:
|
||||
|
||||
1. resolve a JupyterHub token to a JupyterHub user (authenticate)
|
||||
2. check permissions (`access:servers`) for the token to make sure the request should be allowed (authorize)
|
||||
3. if not authorized, begin the OAuth process with a redirect to the Hub
|
||||
4. after login, store OAuth tokens in a cookie only used by this single-user server
|
||||
5. implement logout to clear the cookie
|
||||
|
||||
Most of this is implemented in the {class}`~.HubOAuth` class. `jupyterhub.singleuser` is responsible for _adapting_ the base Jupyter Server to use HubOAuth for these tasks.
|
||||
|
||||
### JupyterHub authentication extension
|
||||
|
||||
By default, `jupyter-server` uses its own cookie to authenticate.
|
||||
If that cookie is not present, the server redirects you a login page and asks you to enter a password or token.
|
||||
|
||||
Jupyter Server 2.0 introduces two new _APIs_ for customizing authentication: the [IdentityProvider](inv:jupyter-server#jupyter_server.auth.IdentityProvider) and the [Authorizer](inv:jupyter-server#jupyter_server.auth.Authorizer).
|
||||
More information can be found in the [Jupyter Server documentation](https://jupyter-server.readthedocs.io).
|
||||
|
||||
JupyterHub implements these APIs in `jupyterhub.singleuser.extension`.
|
||||
|
||||
The IdentityProvider is responsible for _authenticating_ requests.
|
||||
In JupyterHub, that means extracting OAuth tokens from the request and resolving them to a JupyterHub user.
|
||||
|
||||
The Authorizer is a _separate_ API for _authorizing_ actions on particular resources.
|
||||
Because the JupyterHub IdentityProvider only allows _authenticating_ users who already have the necessary `access:servers` permission to access the server, the default Authorizer only contains a redundant check for this same permission, and ignores the resource inputs.
|
||||
However, specifying a _custom_ Authorizer allows for granular permissions, such as read-only access to subsets of a shared server.
|
||||
|
||||
### JupyterHub authentication via subclass
|
||||
|
||||
Prior to Jupyter Server 2 (i.e. Jupyter Server 1.x or the legacy `jupyter-notebook` server), JupyterHub authentication is applied via _subclass_.
|
||||
Originally a subclass of `NotebookApp`,
|
||||
this approach works with both `jupyter-server` and `jupyter-notebook`.
|
||||
Instead of using the extension mechanisms above,
|
||||
the server application is _subclassed_. This worked well in the `jupyter-notebook` days,
|
||||
but doesn't fit well with Jupyter Server's extension-based architecture.
|
||||
|
||||
### Selecting jupyterhub-singleuser implementation
|
||||
|
||||
Using the JupyterHub singleuser-server extension is the default behavior of JupyterHub 4 and Jupyter Server 2, otherwise the subclass approach is taken.
|
||||
|
||||
You can opt-out of the extension by setting the environment variable `JUPYTERHUB_SINGLEUSER_EXTENSION=0`:
|
||||
|
||||
```python
|
||||
c.Spawner.environment.update(
|
||||
{
|
||||
"JUPYTERHUB_SINGLEUSER_EXTENSION": "0",
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
The subclass approach will also be taken if you've opted to use the classic notebook server with:
|
||||
|
||||
```
|
||||
JUPYTERHUB_SINGLEUSER_APP=notebook
|
||||
```
|
||||
|
||||
which was introduced in JupyterHub 2.
|
||||
|
||||
## Other customizations
|
||||
|
||||
`jupyterhub-singleuser` makes other small customizations to how the single-user server behaves:
|
||||
|
||||
1. logs activity on the single-user server, used in [idle-culling](https://github.com/jupyterhub/jupyterhub-idle-culler).
|
||||
2. disables some features that don't make sense in JupyterHub (trash, retrying ports)
|
||||
3. loading options such as URLs and SSL configuration from the environment
|
||||
4. customize logging for consistency with JupyterHub logs
|
||||
|
||||
## Running a single-user server that's not `jupyterhub-singleuser`
|
||||
|
||||
By default, `jupyterhub-singleuser` is the same `jupyter-server` used by JupyterLab, Jupyter notebook (>= 7), etc.
|
||||
But technically, all JupyterHub cares about is that it is:
|
||||
|
||||
1. an http server at the prescribed URL, accessible from the Hub and proxy, and
|
||||
2. authenticated via [OAuth](oauth) with the Hub (it doesn't even have to do this, if you want to do your own authentication, as is done in BinderHub)
|
||||
|
||||
which means that you can customize JupyterHub to launch _any_ web application that meets these criteria, by following the specifications in {ref}`services`.
|
||||
|
||||
Most of the time, though, it's easier to use [jupyter-server-proxy](https://jupyter-server-proxy.readthedocs.io) if you want to launch additional web applications in JupyterHub.
|
274
docs/source/explanation/websecurity.md
Normal file
@@ -0,0 +1,274 @@
|
||||
(web-security)=
|
||||
|
||||
# Security Overview
|
||||
|
||||
The **Security Overview** section helps you learn about:
|
||||
|
||||
- the design of JupyterHub with respect to web security
|
||||
- the semi-trusted user
|
||||
- the available mitigations to protect untrusted users from each other
|
||||
- the value of periodic security audits
|
||||
|
||||
This overview also helps you obtain a deeper understanding of how JupyterHub
|
||||
works.
|
||||
|
||||
## Semi-trusted and untrusted users
|
||||
|
||||
JupyterHub is designed to be a _simple multi-user server for modestly sized
|
||||
groups_ of **semi-trusted** users. While the design reflects serving
|
||||
semi-trusted users, JupyterHub can also be suitable for serving **untrusted** users,
|
||||
but **is not suitable for untrusted users** in its default configuration.
|
||||
|
||||
As a result, using JupyterHub with **untrusted** users means more work by the
|
||||
administrator, since much care is required to secure a Hub, with extra caution on
|
||||
protecting users from each other.
|
||||
|
||||
One aspect of JupyterHub's _design simplicity_ for **semi-trusted** users is that
|
||||
the Hub and single-user servers are placed in a _single domain_, behind a
|
||||
[_proxy_][configurable-http-proxy]. If the Hub is serving untrusted
|
||||
users, many of the web's cross-site protections are not applied between
|
||||
single-user servers and the Hub, or between single-user servers and each
|
||||
other, since browsers see the whole thing (proxy, Hub, and single user
|
||||
servers) as a single website (i.e. single domain).
|
||||
|
||||
## Protect users from each other
|
||||
|
||||
To protect users from each other, a user must **never** be able to write arbitrary
|
||||
HTML and serve it to another user on the Hub's domain. This is prevented by JupyterHub's
|
||||
authentication setup because only the owner of a given single-user notebook server is
|
||||
allowed to view user-authored pages served by the given single-user notebook
|
||||
server.
|
||||
|
||||
To protect all users from each other, JupyterHub administrators must
|
||||
ensure that:
|
||||
|
||||
- A user **does not have permission** to modify their single-user notebook server,
|
||||
including:
|
||||
- the installation of new packages in the Python environment that runs
|
||||
their single-user server;
|
||||
- the creation of new files in any `PATH` directory that precedes the
|
||||
directory containing `jupyterhub-singleuser` (if the `PATH` is used
|
||||
to resolve the single-user executable instead of using an absolute path);
|
||||
- the modification of environment variables (e.g. PATH, PYTHONPATH) for
|
||||
their single-user server;
|
||||
- the modification of the configuration of the notebook server
|
||||
(the `~/.jupyter` or `JUPYTER_CONFIG_DIR` directory).
|
||||
- unrestricted selection of the base environment (e.g. the image used in container-based Spawners)
|
||||
|
||||
If any additional services are run on the same domain as the Hub, the services
|
||||
**must never** display user-authored HTML that is neither _sanitized_ nor _sandboxed_
|
||||
to any user that lacks authentication as the author of a file.
|
||||
|
||||
### Sharing access to servers
|
||||
|
||||
Because sharing access to servers (via `access:servers` scopes or the sharing feature in JupyterHub 5) by definition means users can serve each other files, enabling sharing is not suitable for untrusted users without also enabling per-user domains.
|
||||
|
||||
JupyterHub does not enable any sharing by default.
|
||||
|
||||
## Mitigate security issues
|
||||
|
||||
The several approaches to mitigating security issues with configuration
|
||||
options provided by JupyterHub include:
|
||||
|
||||
(subdomains)=
|
||||
|
||||
### Enable user subdomains
|
||||
|
||||
JupyterHub provides the ability to run single-user servers on their own
|
||||
domains. This means the cross-origin protections between servers has the
|
||||
desired effect, and user servers and the Hub are protected from each other.
|
||||
|
||||
**Subdomains are the only way to reliably isolate user servers from each other.**
|
||||
|
||||
To enable subdomains, set:
|
||||
|
||||
```python
|
||||
c.JupyterHub.subdomain_host = "https://jupyter.example.org"
|
||||
```
|
||||
|
||||
When subdomains are enabled, each user's single-user server will be at e.g. `https://username.jupyter.example.org`.
|
||||
This also requires all user subdomains to point to the same address,
|
||||
which is most easily accomplished with wildcard DNS, where a single A record points to your server and a wildcard CNAME record points to your A record:
|
||||
|
||||
```
|
||||
A jupyter.example.org 192.168.1.123
|
||||
CNAME *.jupyter.example.org jupyter.example.org
|
||||
```
|
||||
|
||||
Since this spreads the service across multiple domains, you will likely need wildcard SSL as well,
|
||||
matching `*.jupyter.example.org`.
|
||||
|
||||
Unfortunately, for many institutional domains, wildcard DNS and SSL may not be available.
|
||||
|
||||
We also **strongly encourage** serving JupyterHub and user content on a domain that is _not_ a subdomain of any sensitive content.
|
||||
For reasoning, see [GitHub's discussion of moving user content to github.io from \*.github.com](https://github.blog/2013-04-09-yummy-cookies-across-domains/).
|
||||
|
||||
**If you do plan to serve untrusted users, enabling subdomains is highly encouraged**,
|
||||
as it resolves many security issues, which are difficult to unavoidable when JupyterHub is on a single-domain.
|
||||
|
||||
:::{important}
|
||||
JupyterHub makes no guarantees about protecting users from each other unless subdomains are enabled.
|
||||
|
||||
If you want to protect users from each other, you **_must_** enable per-user domains.
|
||||
:::
|
||||
|
||||
### Disable user config
|
||||
|
||||
If subdomains are unavailable or undesirable, JupyterHub provides a
|
||||
configuration option `Spawner.disable_user_config = True`, which can be set to prevent
|
||||
the user-owned configuration files from being loaded. After implementing this
|
||||
option, `PATH`s and package installation are the other things that the
|
||||
admin must enforce.
|
||||
|
||||
### Prevent spawners from evaluating shell configuration files
|
||||
|
||||
For most Spawners, `PATH` is not something users can influence, but it's important that
|
||||
the Spawner should _not_ evaluate shell configuration files prior to launching the server.
|
||||
|
||||
### Isolate packages in a read-only environment
|
||||
|
||||
The user must not have permission to install packages into the environment where the singleuser-server runs.
|
||||
On a shared system, package isolation is most easily handled by running the single-user server in
|
||||
a root-owned virtualenv with disabled system-site-packages.
|
||||
The user must not have permission to install packages into this environment.
|
||||
The same principle extends to the images used by container-based deployments.
|
||||
If users can select the images in which their servers run, they can disable all security for their own servers.
|
||||
|
||||
It is important to note that the control over the environment is only required for the
|
||||
single-user server, and not the environment(s) in which the users' kernel(s)
|
||||
may run. Installing additional packages in the kernel environment does not
|
||||
pose additional risk to the web application's security.
|
||||
|
||||
### Encrypt internal connections with SSL/TLS
|
||||
|
||||
By default, all communications within JupyterHub—between the proxy, hub, and single
|
||||
-user notebooks—are performed unencrypted. Setting the `internal_ssl` flag in
|
||||
`jupyterhub_config.py` secures the aforementioned routes. Turning this
|
||||
feature on does require that the enabled `Spawner` can use the certificates
|
||||
generated by the `Hub` (the default `LocalProcessSpawner` can, for instance).
|
||||
|
||||
It is also important to note that this encryption **does not** cover the
|
||||
`zmq tcp` sockets between the Notebook client and kernel yet. While users cannot
|
||||
submit arbitrary commands to another user's kernel, they can bind to these
|
||||
sockets and listen. When serving untrusted users, this eavesdropping can be
|
||||
mitigated by setting `KernelManager.transport` to `ipc`. This applies standard
|
||||
Unix permissions to the communication sockets thereby restricting
|
||||
communication to the socket owner. The `internal_ssl` option will eventually
|
||||
extend to securing the `tcp` sockets as well.
|
||||
|
||||
### Mitigating same-origin deployments
|
||||
|
||||
While per-user domains are **required** for robust protection of users from each other,
|
||||
you can mitigate many (but not all) cross-user issues.
|
||||
First, it is critical that users cannot modify their server environments, as described above.
|
||||
Second, it is important that users do not have `access:servers` permission to any server other than their own.
|
||||
|
||||
If users can access each others' servers, additional security measures must be enabled, some of which come with distinct user-experience costs.
|
||||
|
||||
Without the [Same-Origin Policy] (SOP) protecting user servers from each other,
|
||||
each user server is considered a trusted origin for requests to each other user server (and the Hub itself).
|
||||
Servers _cannot_ meaningfully distinguish requests originating from other user servers,
|
||||
because SOP implies a great deal of trust, losing many restrictions applied to cross-origin requests.
|
||||
|
||||
That means pages served from each user server can:
|
||||
|
||||
1. arbitrarily modify the path in the Referer
|
||||
2. make fully authorized requests with cookies
|
||||
3. access full page contents served from the hub or other servers via popups
|
||||
|
||||
JupyterHub uses distinct xsrf tokens stored in cookies on each server path to attempt to limit requests across.
|
||||
This has limitations because not all requests are protected by these XSRF tokens,
|
||||
and unless additional measures are taken, the XSRF tokens from other user prefixes may be retrieved.
|
||||
|
||||
[Same-Origin Policy]: https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy
|
||||
|
||||
For example:
|
||||
|
||||
- `Content-Security-Policy` header must prohibit popups and iframes from the same origin.
|
||||
The following Content-Security-Policy rules are _insecure_ and readily enable users to access each others' servers:
|
||||
|
||||
- `frame-ancestors: 'self'`
|
||||
- `frame-ancestors: '*'`
|
||||
- `sandbox allow-popups`
|
||||
|
||||
- Ideally, pages should use the strictest `Content-Security-Policy: sandbox` available,
|
||||
but this is not feasible in general for JupyterLab pages, which need at least `sandbox allow-same-origin allow-scripts` to work.
|
||||
|
||||
The default Content-Security-Policy for single-user servers is
|
||||
|
||||
```
|
||||
frame-ancestors: 'none'
|
||||
```
|
||||
|
||||
which prohibits iframe embedding, but not pop-ups.
|
||||
|
||||
A more secure Content-Security-Policy that has some costs to user experience is:
|
||||
|
||||
```
|
||||
frame-ancestors: 'none'; sandbox allow-same-origin allow-scripts
|
||||
```
|
||||
|
||||
`allow-popups` is not disabled by default because disabling it breaks legitimate functionality, like "Open this in a new tab", and the "JupyterHub Control Panel" menu item.
|
||||
To reiterate, the right way to avoid these issues is to enable per-user domains, where none of these concerns come up.
|
||||
|
||||
Note: even this level of protection requires administrators maintaining full control over the user server environment.
|
||||
If users can modify their server environment, these methods are ineffective, as users can readily disable them.
|
||||
|
||||
### Cookie tossing
|
||||
|
||||
Cookie tossing is a technique where another server on a subdomain or peer subdomain can set a cookie
|
||||
which will be read on another domain.
|
||||
This is not relevant unless there are other user-controlled servers on a peer domain.
|
||||
|
||||
"Domain-locked" cookies avoid this issue, but have their own restrictions:
|
||||
|
||||
- JupyterHub must be served over HTTPS
|
||||
- All secure cookies must be set on `/`, not on sub-paths, which means they are shared by all JupyterHub components in a single-domain deployment.
|
||||
|
||||
As a result, this option is only recommended when per-user subdomains are enabled,
|
||||
to prevent sending all jupyterhub cookies to all user servers.
|
||||
|
||||
To enable domain-locked cookies, set:
|
||||
|
||||
```python
|
||||
c.JupyterHub.cookie_host_prefix_enabled = True
|
||||
```
|
||||
|
||||
```{versionadded} 4.1
|
||||
|
||||
```
|
||||
|
||||
### Forced-login
|
||||
|
||||
Jupyter servers can share links with `?token=...`.
|
||||
JupyterHub prior to 5.0 will accept this request and persist the token for future requests.
|
||||
This is useful for enabling admins to create 'fully authenticated' links bypassing login.
|
||||
However, it also means users can share their own links that will log other users into their own servers,
|
||||
enabling them to serve each other notebooks and other arbitrary HTML, depending on server configuration.
|
||||
|
||||
```{versionadded} 4.1
|
||||
Setting environment variable `JUPYTERHUB_ALLOW_TOKEN_IN_URL=0` in the single-user environment can opt out of accepting token auth in URL parameters.
|
||||
```
|
||||
|
||||
```{versionadded} 5.0
|
||||
Accepting tokens in URLs is disabled by default, and `JUPYTERHUB_ALLOW_TOKEN_IN_URL=1` environment variable must be set to _allow_ token auth in URL parameters.
|
||||
```
|
||||
|
||||
## Security audits
|
||||
|
||||
We recommend that you do periodic reviews of your deployment's security. It's
|
||||
good practice to keep [JupyterHub](https://readthedocs.org/projects/jupyterhub/), [configurable-http-proxy][], and [nodejs
|
||||
versions](https://github.com/nodejs/Release) up to date.
|
||||
|
||||
A handy website for testing your deployment is
|
||||
[Qualsys' SSL analyzer tool](https://www.ssllabs.com/ssltest/analyze.html).
|
||||
|
||||
[configurable-http-proxy]: https://github.com/jupyterhub/configurable-http-proxy
|
||||
|
||||
## Vulnerability reporting
|
||||
|
||||
If you believe you have found a security vulnerability in JupyterHub, or any
|
||||
Jupyter project, please report it to
|
||||
[security@ipython.org](mailto:security@ipython.org). If you prefer to encrypt
|
||||
your security reports, you can use [this PGP public
|
||||
key](https://jupyter.org/assets/ipython_security.asc).
|
76
docs/source/faq/faq.md
Normal file
@@ -0,0 +1,76 @@
|
||||
# Frequently asked questions
|
||||
|
||||
## How do I share links to notebooks?
|
||||
|
||||
Sharing links to notebooks is a common activity,
|
||||
and can look different depending on what you mean by 'share.'
|
||||
Your first instinct might be to copy the URL you see in the browser,
|
||||
e.g. `jupyterhub.example/user/yourname/notebooks/coolthing.ipynb`,
|
||||
but this usually won't work, depending on the permissions of the person you share the link with.
|
||||
|
||||
Unfortunately, 'share' means at least a few things to people in a JupyterHub context.
|
||||
We'll cover 3 common cases here, when they are applicable, and what assumptions they make:
|
||||
|
||||
1. sharing links that will open the same file on the visitor's own server
|
||||
2. sharing links that will bring the visitor to _your_ server (e.g. for real-time collaboration, or RTC)
|
||||
3. publishing notebooks and sharing links that will download the notebook into the user's server
|
||||
|
||||
### link to the same file on the visitor's server
|
||||
|
||||
This is for the case where you have JupyterHub on a shared (or sufficiently similar) filesystem, where you want to share a link that will cause users to login and start their _own_ server, to view or edit the file.
|
||||
|
||||
**Assumption:** the same path on someone else's server is valid and points to the same file
|
||||
|
||||
This is useful in e.g. classes where you know students have certain files in certain locations, or collaborations where you know you have a shared filesystem where everyone has access to the same files.
|
||||
|
||||
A link should look like `https://jupyterhub.example/hub/user-redirect/lab/tree/foo.ipynb`.
|
||||
You can hand-craft these URLs from the URL you are looking at, where you see `/user/name/lab/tree/foo.ipynb` use `/hub/user-redirect/lab/tree/foo.ipynb` (replace `/user/name/` with `/hub/user-redirect/`).
|
||||
Or you can use JupyterLab's "copy shareable link" in the context menu in the file browser:
|
||||
|
||||

|
||||
|
||||
which will produce a correct URL with `/hub/user-redirect/` in it.
|
||||
|
||||
### link to the file on your server
|
||||
|
||||
This is for the case where you want to both be using _your_ server, e.g. for real-time collaboration (RTC).
|
||||
|
||||
**Assumption:** the user has (or should have) access to your server.
|
||||
|
||||
**Assumption:** your server is running _or_ the user has permission to start it.
|
||||
|
||||
By default, JupyterHub users don't have access to each other's servers, but JupyterHub 2.0 administrators can grant users limited access permissions to each other's servers.
|
||||
If the visitor doesn't have access to the server, these links will result in a 403 Permission Denied error.
|
||||
|
||||
In many cases, for this situation you can copy the link in your URL bar (`/user/yourname/lab`), or you can add `/tree/path/to/specific/notebook.ipynb` to open a specific file.
|
||||
|
||||
The [jupyterlab-link-share] JupyterLab extension generates these links, and even can _grant_ other users access to your server.
|
||||
|
||||
[jupyterlab-link-share]: https://github.com/jupyterlab-contrib/jupyterlab-link-share
|
||||
|
||||
:::{warning}
|
||||
Note that the way the extension _grants_ access is handing over credentials to allow the other user to **_BECOME YOU_**.
|
||||
This is usually not appropriate in JupyterHub.
|
||||
:::
|
||||
|
||||
### link to a published copy
|
||||
|
||||
Another way to 'share' notebooks is to publish copies, e.g. pushing the notebook to a git repository and sharing a download link.
|
||||
This way is especially useful for course materials,
|
||||
where no assumptions are necessary about the user's environment,
|
||||
except for having one package installed.
|
||||
|
||||
**Assumption:** The [nbgitpuller](inv:nbgitpuller#index) server extension is installed
|
||||
|
||||
Unlike the other two methods, nbgitpuller doesn't provide an extension to copy a shareable link for the document you're currently looking at,
|
||||
but it does provide a [link generator](inv:nbgitpuller#link),
|
||||
which uses the `user-redirect` approach above.
|
||||
|
||||
When visiting an nbgitpuller link:
|
||||
|
||||
- The visitor will be directed to their own server
|
||||
- Your repo will be cloned (or updated if it's already been cloned)
|
||||
- and then the file opened when it's ready
|
||||
|
||||
[nbgitpuller]: https://nbgitpuller.readthedocs.io
|
||||
[nbgitpuller-link]: https://nbgitpuller.readthedocs.io/en/latest/link.html
|
11
docs/source/faq/index.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# FAQs
|
||||
|
||||
Find answers to some of the most frequently-asked questions around JupyterHub and how it works.
|
||||
|
||||
```{toctree}
|
||||
:maxdepth: 2
|
||||
|
||||
faq
|
||||
institutional-faq
|
||||
troubleshooting
|
||||
```
|
@@ -66,12 +66,12 @@ Here is a sample of organizations that use JupyterHub:
|
||||
- **Universities and colleges**: UC Berkeley, UC San Diego, Cal Poly SLO, Harvard University, University of Chicago,
|
||||
University of Oslo, University of Sheffield, Université Paris Sud, University of Versailles
|
||||
- **Research laboratories**: NASA, NCAR, NOAA, the Large Synoptic Survey Telescope, Brookhaven National Lab,
|
||||
Minnesota Supercomputing Institute, ALCF, CERN, Lawrence Livermore National Laboratory
|
||||
Minnesota Supercomputing Institute, ALCF, CERN, Lawrence Livermore National Laboratory, HUNT
|
||||
- **Online communities**: Pangeo, Quantopian, mybinder.org, MathHub, Open Humans
|
||||
- **Computing infrastructure providers**: NERSC, San Diego Supercomputing Center, Compute Canada
|
||||
- **Companies**: Capital One, SANDVIK code, Globus
|
||||
|
||||
See the [Gallery of JupyterHub deployments](../gallery-jhub-deployments.md) for
|
||||
See the [Gallery of JupyterHub deployments](gallery-of-deployments) for
|
||||
a more complete list of JupyterHub deployments at institutions.
|
||||
|
||||
### How does JupyterHub compare with hosted products, like Google Colaboratory, RStudio.cloud, or Anaconda Enterprise?
|
||||
@@ -130,9 +130,9 @@ level for several years, and makes a number of "default" security decisions that
|
||||
users.
|
||||
|
||||
- For security considerations in the base JupyterHub application,
|
||||
[see the JupyterHub security page](https://jupyterhub.readthedocs.io/en/stable/reference/websecurity.html).
|
||||
[see the JupyterHub security page](web-security).
|
||||
- For security considerations when deploying JupyterHub on Kubernetes, see the
|
||||
[JupyterHub on Kubernetes security page](https://zero-to-jupyterhub.readthedocs.io/en/latest/security.html).
|
||||
[JupyterHub on Kubernetes security page](https://z2jh.jupyter.org/en/latest/security.html).
|
||||
|
||||
The longer answer: it depends on your deployment. Because JupyterHub is very flexible, it can be used
|
||||
in a variety of deployment setups. This often entails connecting your JupyterHub to **other** infrastructure
|
@@ -1,3 +1,5 @@
|
||||
(troubleshooting)=
|
||||
|
||||
# Troubleshooting
|
||||
|
||||
When troubleshooting, you may see unexpected behaviors or receive an error
|
||||
@@ -44,13 +46,13 @@ things like inspect other users' servers or modify the user list at runtime).
|
||||
### JupyterHub Docker container is not accessible at localhost
|
||||
|
||||
Even though the command to start your Docker container exposes port 8000
|
||||
(`docker run -p 8000:8000 -d --name jupyterhub jupyterhub/jupyterhub jupyterhub`),
|
||||
(`docker run -p 8000:8000 -d --name jupyterhub quay.io/jupyterhub/jupyterhub jupyterhub`),
|
||||
it is possible that the IP address itself is not accessible/visible. As a result,
|
||||
when you try http://localhost:8000 in your browser, you are unable to connect
|
||||
even though the container is running properly. One workaround is to explicitly
|
||||
tell Jupyterhub to start at `0.0.0.0` which is visible to everyone. Try this
|
||||
command:
|
||||
`docker run -p 8000:8000 -d --name jupyterhub jupyterhub/jupyterhub jupyterhub --ip 0.0.0.0 --port 8000`
|
||||
`docker run -p 8000:8000 -d --name jupyterhub quay.io/jupyterhub/jupyterhub jupyterhub --ip 0.0.0.0 --port 8000`
|
||||
|
||||
### How can I kill ports from JupyterHub-managed services that have been orphaned?
|
||||
|
||||
@@ -165,7 +167,7 @@ When your whole JupyterHub sits behind an organization proxy (_not_ a reverse pr
|
||||
|
||||
### Launching Jupyter Notebooks to run as an externally managed JupyterHub service with the `jupyterhub-singleuser` command returns a `JUPYTERHUB_API_TOKEN` error
|
||||
|
||||
[JupyterHub services](https://jupyterhub.readthedocs.io/en/stable/reference/services.html) allow processes to interact with JupyterHub's REST API. Example use-cases include:
|
||||
{ref}`services` allow processes to interact with JupyterHub's REST API. Example use-cases include:
|
||||
|
||||
- **Secure Testing**: provide a canonical Jupyter Notebook for testing production data to reduce the number of entry points into production systems.
|
||||
- **Grading Assignments**: provide access to shared Jupyter Notebooks that may be used for management tasks such as grading assignments.
|
||||
@@ -345,12 +347,12 @@ In order to resolve this issue, there are two potential options.
|
||||
|
||||
### Where do I find Docker images and Dockerfiles related to JupyterHub?
|
||||
|
||||
Docker images can be found at the [JupyterHub organization on DockerHub](https://hub.docker.com/u/jupyterhub/).
|
||||
The Docker image [jupyterhub/singleuser](https://hub.docker.com/r/jupyterhub/singleuser/)
|
||||
Docker images can be found at the [JupyterHub organization on Quay.io](https://quay.io/organization/jupyterhub).
|
||||
The Docker image [jupyterhub/singleuser](https://quay.io/repository/jupyterhub/singleuser)
|
||||
provides an example single-user notebook server for use with DockerSpawner.
|
||||
|
||||
Additional single-user notebook server images can be found at the [Jupyter
|
||||
organization on DockerHub](https://hub.docker.com/r/jupyter/) and information
|
||||
organization on Quay.io](https://quay.io/organization/jupyter) and information
|
||||
about each image at the [jupyter/docker-stacks repo](https://github.com/jupyter/docker-stacks).
|
||||
|
||||
### How can I view the logs for JupyterHub or the user's Notebook servers when using the DockerSpawner?
|
@@ -1,131 +0,0 @@
|
||||
# Authentication and User Basics
|
||||
|
||||
The default Authenticator uses [PAM][] (Pluggable Authentication Module) to authenticate system users with
|
||||
their username and password. With the default Authenticator, any user
|
||||
with an account and password on the system will be allowed to login.
|
||||
|
||||
## Create a set of allowed users (`allowed_users`)
|
||||
|
||||
You can restrict which users are allowed to login with a set,
|
||||
`Authenticator.allowed_users`:
|
||||
|
||||
```python
|
||||
c.Authenticator.allowed_users = {'mal', 'zoe', 'inara', 'kaylee'}
|
||||
```
|
||||
|
||||
Users in the `allowed_users` set are added to the Hub database when the Hub is
|
||||
started.
|
||||
|
||||
```{warning}
|
||||
If this configuration value is not set, then **all authenticated users will be allowed into your hub**.
|
||||
```
|
||||
|
||||
## Configure admins (`admin_users`)
|
||||
|
||||
```{note}
|
||||
As of JupyterHub 2.0, the full permissions of `admin_users`
|
||||
should not be required.
|
||||
Instead, you can assign [roles](define-role-target) to users or groups
|
||||
with only the scopes they require.
|
||||
```
|
||||
|
||||
Admin users of JupyterHub, `admin_users`, can add and remove users from
|
||||
the user `allowed_users` set. `admin_users` can take actions on other users'
|
||||
behalf, such as stopping and restarting their servers.
|
||||
|
||||
A set of initial admin users, `admin_users` can be configured as follows:
|
||||
|
||||
```python
|
||||
c.Authenticator.admin_users = {'mal', 'zoe'}
|
||||
```
|
||||
|
||||
Users in the admin set are automatically added to the user `allowed_users` set,
|
||||
if they are not already present.
|
||||
|
||||
Each Authenticator may have different ways of determining whether a user is an
|
||||
administrator. By default, JupyterHub uses the PAMAuthenticator which provides the
|
||||
`admin_groups` option and can set administrator status based on a user
|
||||
group. For example, we can let any user in the `wheel` group be an admin:
|
||||
|
||||
```python
|
||||
c.PAMAuthenticator.admin_groups = {'wheel'}
|
||||
```
|
||||
|
||||
## Give admin access to other users' notebook servers (`admin_access`)
|
||||
|
||||
Since the default `JupyterHub.admin_access` setting is `False`, the admins
|
||||
do not have permission to log in to the single user notebook servers
|
||||
owned by _other users_. If `JupyterHub.admin_access` is set to `True`,
|
||||
then admins have permission to log in _as other users_ on their
|
||||
respective machines for debugging. **As a courtesy, you should make
|
||||
sure your users know if admin_access is enabled.**
|
||||
|
||||
## Add or remove users from the Hub
|
||||
|
||||
Users can be added to and removed from the Hub via the admin
|
||||
panel or the REST API. When a user is **added**, the user will be
|
||||
automatically added to the `allowed_users` set and database. Restarting the Hub
|
||||
will not require manually updating the `allowed_users` set in your config file,
|
||||
as the users will be loaded from the database.
|
||||
|
||||
After starting the Hub once, it is not sufficient to **remove** a user
|
||||
from the allowed users set in your config file. You must also remove the user
|
||||
from the Hub's database, either by deleting the user from JupyterHub's
|
||||
admin page, or you can clear the `jupyterhub.sqlite` database and start
|
||||
fresh.
|
||||
|
||||
## Use LocalAuthenticator to create system users
|
||||
|
||||
The `LocalAuthenticator` is a special kind of Authenticator that has
|
||||
the ability to manage users on the local system. When you try to add a
|
||||
new user to the Hub, a `LocalAuthenticator` will check if the user
|
||||
already exists. If you set the configuration value, `create_system_users`,
|
||||
to `True` in the configuration file, the `LocalAuthenticator` has
|
||||
the ability to add users to the system. The setting in the config
|
||||
file is:
|
||||
|
||||
```python
|
||||
c.LocalAuthenticator.create_system_users = True
|
||||
```
|
||||
|
||||
Adding a user to the Hub that doesn't already exist on the system will
|
||||
result in the Hub creating that user via the system `adduser` command
|
||||
line tool. This option is typically used on hosted deployments of
|
||||
JupyterHub to avoid the need to manually create all your users before
|
||||
launching the service. This approach is not recommended when running
|
||||
JupyterHub in situations where JupyterHub users map directly onto the
|
||||
system's UNIX users.
|
||||
|
||||
## Use OAuthenticator to support OAuth with popular service providers
|
||||
|
||||
JupyterHub's [OAuthenticator][] currently supports the following
|
||||
popular services:
|
||||
|
||||
- [Auth0](https://oauthenticator.readthedocs.io/en/latest/api/gen/oauthenticator.auth0.html#module-oauthenticator.auth0)
|
||||
- [Azure AD](https://oauthenticator.readthedocs.io/en/latest/api/gen/oauthenticator.azuread.html#module-oauthenticator.azuread)
|
||||
- [Bitbucket](https://oauthenticator.readthedocs.io/en/latest/api/gen/oauthenticator.bitbucket.html#module-oauthenticator.bitbucket)
|
||||
- [CILogon](https://oauthenticator.readthedocs.io/en/latest/api/gen/oauthenticator.cilogon.html#module-oauthenticator.cilogon)
|
||||
- [GitHub](https://oauthenticator.readthedocs.io/en/latest/api/gen/oauthenticator.github.html#module-oauthenticator.github)
|
||||
- [GitLab](https://oauthenticator.readthedocs.io/en/latest/api/gen/oauthenticator.gitlab.html#module-oauthenticator.gitlab)
|
||||
- [Globus](https://oauthenticator.readthedocs.io/en/latest/api/gen/oauthenticator.globus.html#module-oauthenticator.globus)
|
||||
- [Google](https://oauthenticator.readthedocs.io/en/latest/api/gen/oauthenticator.google.html#module-oauthenticator.google)
|
||||
- [MediaWiki](https://oauthenticator.readthedocs.io/en/latest/api/gen/oauthenticator.mediawiki.html#module-oauthenticator.mediawiki)
|
||||
- [Okpy](https://oauthenticator.readthedocs.io/en/latest/api/gen/oauthenticator.okpy.html#module-oauthenticator.okpy)
|
||||
- [OpenShift](https://oauthenticator.readthedocs.io/en/latest/api/gen/oauthenticator.openshift.html#module-oauthenticator.openshift)
|
||||
|
||||
A [generic implementation](https://oauthenticator.readthedocs.io/en/latest/api/gen/oauthenticator.generic.html#module-oauthenticator.generic), which you can use for OAuth authentication
|
||||
with any provider, is also available.
|
||||
|
||||
## Use DummyAuthenticator for testing
|
||||
|
||||
The `DummyAuthenticator` is a simple Authenticator that
|
||||
allows for any username or password unless a global password has been set. If
|
||||
set, it will allow for any username as long as the correct password is provided.
|
||||
To set a global password, add this to the config file:
|
||||
|
||||
```python
|
||||
c.DummyAuthenticator.password = "some_password"
|
||||
```
|
||||
|
||||
[pam]: https://en.wikipedia.org/wiki/Pluggable_authentication_module
|
||||
[oauthenticator]: https://github.com/jupyterhub/oauthenticator
|
@@ -1,36 +0,0 @@
|
||||
# Frequently asked questions
|
||||
|
||||
## How do I share links to notebooks?
|
||||
|
||||
In short, where you see `/user/name/notebooks/foo.ipynb` use `/hub/user-redirect/notebooks/foo.ipynb` (replace `/user/name` with `/hub/user-redirect`).
|
||||
|
||||
Sharing links to notebooks is a common activity,
|
||||
and can look different based on what you mean.
|
||||
Your first instinct might be to copy the URL you see in the browser,
|
||||
e.g. `hub.jupyter.org/user/yourname/notebooks/coolthing.ipynb`.
|
||||
However, let's break down what this URL means:
|
||||
|
||||
`hub.jupyter.org/user/yourname/` is the URL prefix handled by _your server_,
|
||||
which means that sharing this URL is asking the person you share the link with
|
||||
to come to _your server_ and look at the exact same file.
|
||||
In most circumstances, this is forbidden by permissions because the person you share with does not have access to your server.
|
||||
What actually happens when someone visits this URL will depend on whether your server is running and other factors.
|
||||
|
||||
**But what is our actual goal?**
|
||||
|
||||
A typical situation is that you have some shared or common filesystem,
|
||||
such that the same path corresponds to the same document
|
||||
(either the exact same document or another copy of it).
|
||||
Typically, what folks want when they do sharing like this
|
||||
is for each visitor to open the same file _on their own server_,
|
||||
so Breq would open `/user/breq/notebooks/foo.ipynb` and
|
||||
Seivarden would open `/user/seivarden/notebooks/foo.ipynb`, etc.
|
||||
|
||||
JupyterHub has a special URL that does exactly this!
|
||||
It's called `/hub/user-redirect/...`.
|
||||
So if you replace `/user/yourname` in your URL bar
|
||||
with `/hub/user-redirect` any visitor should get the same
|
||||
URL on their own server, rather than visiting yours.
|
||||
|
||||
In JupyterLab 2.0, this should also be the result of the "Copy Shareable Link"
|
||||
action in the file browser.
|
@@ -1,19 +0,0 @@
|
||||
Get Started
|
||||
===========
|
||||
|
||||
This section covers how to configure and customize JupyterHub for your
|
||||
needs. It contains information about authentication, networking, security, and
|
||||
other topics that are relevant to individuals or organizations deploying their
|
||||
own JupyterHub.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
config-basics
|
||||
networking-basics
|
||||
security-basics
|
||||
authenticators-users-basics
|
||||
spawners-basics
|
||||
services-basics
|
||||
faq
|
||||
institutional-faq
|
@@ -1,254 +0,0 @@
|
||||
Security settings
|
||||
=================
|
||||
|
||||
.. important::
|
||||
|
||||
You should not run JupyterHub without SSL encryption on a public network.
|
||||
|
||||
Security is the most important aspect of configuring Jupyter.
|
||||
Three (3) configuration settings are the main aspects of security configuration:
|
||||
|
||||
1. :ref:`SSL encryption <ssl-encryption>` (to enable HTTPS)
|
||||
2. :ref:`Cookie secret <cookie-secret>` (a key for encrypting browser cookies)
|
||||
3. Proxy :ref:`authentication token <authentication-token>` (used for the Hub and
|
||||
other services to authenticate to the Proxy)
|
||||
|
||||
The Hub hashes all secrets (e.g. auth tokens) before storing them in its
|
||||
database. A loss of control over read-access to the database should have
|
||||
minimal impact on your deployment. If your database has been compromised, it
|
||||
is still a good idea to revoke existing tokens.
|
||||
|
||||
.. _ssl-encryption:
|
||||
|
||||
Enabling SSL encryption
|
||||
-----------------------
|
||||
|
||||
Since JupyterHub includes authentication and allows arbitrary code execution,
|
||||
you should not run it without SSL (HTTPS).
|
||||
|
||||
Using an SSL certificate
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This will require you to obtain an official, trusted SSL certificate or create a
|
||||
self-signed certificate. Once you have obtained and installed a key and
|
||||
certificate, you need to specify their locations in the ``jupyterhub_config.py``
|
||||
configuration file as follows:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
c.JupyterHub.ssl_key = '/path/to/my.key'
|
||||
c.JupyterHub.ssl_cert = '/path/to/my.cert'
|
||||
|
||||
|
||||
Some cert files also contain the key, in which case only the cert is needed. It
|
||||
is important that these files be put in a secure location on your server, where
|
||||
they are not readable by regular users.
|
||||
|
||||
If you are using a **chain certificate**, see also chained certificate for SSL
|
||||
in the JupyterHub `Troubleshooting FAQ <../troubleshooting.html>`_.
|
||||
|
||||
Using letsencrypt
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
It is also possible to use `letsencrypt <https://letsencrypt.org/>`_ to obtain
|
||||
a free, trusted SSL certificate. If you run letsencrypt using the default
|
||||
options, the needed configuration is (replace ``mydomain.tld`` by your fully
|
||||
qualified domain name):
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
c.JupyterHub.ssl_key = '/etc/letsencrypt/live/{mydomain.tld}/privkey.pem'
|
||||
c.JupyterHub.ssl_cert = '/etc/letsencrypt/live/{mydomain.tld}/fullchain.pem'
|
||||
|
||||
If the fully qualified domain name (FQDN) is ``example.com``, the following
|
||||
would be the needed configuration:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
c.JupyterHub.ssl_key = '/etc/letsencrypt/live/example.com/privkey.pem'
|
||||
c.JupyterHub.ssl_cert = '/etc/letsencrypt/live/example.com/fullchain.pem'
|
||||
|
||||
|
||||
If SSL termination happens outside of the Hub
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
In certain cases, for example, if the hub is running behind a reverse proxy, and
|
||||
`SSL termination is being provided by NGINX <https://www.nginx.com/resources/admin-guide/nginx-ssl-termination/>`_,
|
||||
it is reasonable to run the hub without SSL.
|
||||
|
||||
To achieve this, remove ``c.JupyterHub.ssl_key`` and ``c.JupyterHub.ssl_cert``
|
||||
from your configuration (setting them to ``None`` or an empty string does not
|
||||
have the same effect, and will result in an error).
|
||||
|
||||
.. _authentication-token:
|
||||
|
||||
Proxy authentication token
|
||||
--------------------------
|
||||
|
||||
The Hub authenticates its requests to the Proxy using a secret token that
|
||||
the Hub and Proxy agree upon. Note that this applies to the default
|
||||
``ConfigurableHTTPProxy`` implementation. Not all proxy implementations
|
||||
use an auth token.
|
||||
|
||||
The value of this token should be a random string (for example, generated by
|
||||
``openssl rand -hex 32``). You can store it in the configuration file or an
|
||||
environment variable.
|
||||
|
||||
Generating and storing token in the configuration file
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
You can set the value in the configuration file, ``jupyterhub_config.py``:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
c.ConfigurableHTTPProxy.api_token = 'abc123...' # any random string
|
||||
|
||||
Generating and storing as an environment variable
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
You can pass this value of the proxy authentication token to the Hub and Proxy
|
||||
using the ``CONFIGPROXY_AUTH_TOKEN`` environment variable:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
export CONFIGPROXY_AUTH_TOKEN=$(openssl rand -hex 32)
|
||||
|
||||
This environment variable needs to be visible to the Hub and Proxy.
|
||||
|
||||
Default if token is not set
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
If you do not set the Proxy authentication token, the Hub will generate a random
|
||||
key itself. This means that any time you restart the Hub, you **must also
|
||||
restart the Proxy**. If the proxy is a subprocess of the Hub, this should happen
|
||||
automatically (this is the default configuration).
|
||||
|
||||
.. _cookie-secret:
|
||||
|
||||
Cookie secret
|
||||
-------------
|
||||
|
||||
The cookie secret is an encryption key, used to encrypt the browser cookies,
|
||||
which are used for authentication. Three common methods are described for
|
||||
generating and configuring the cookie secret.
|
||||
|
||||
Generating and storing as a cookie secret file
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The cookie secret should be 32 random bytes, encoded as hex, and is typically
|
||||
stored in a ``jupyterhub_cookie_secret`` file. Below, is an example command to generate the
|
||||
``jupyterhub_cookie_secret`` file:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
openssl rand -hex 32 > /srv/jupyterhub/jupyterhub_cookie_secret
|
||||
|
||||
In most deployments of JupyterHub, you should point this to a secure location on
|
||||
the file system, such as ``/srv/jupyterhub/jupyterhub_cookie_secret``.
|
||||
|
||||
The location of the ``jupyterhub_cookie_secret`` file can be specified in the
|
||||
``jupyterhub_config.py`` file as follows:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
c.JupyterHub.cookie_secret_file = '/srv/jupyterhub/jupyterhub_cookie_secret'
|
||||
|
||||
If the cookie secret file doesn't exist when the Hub starts, a new cookie
|
||||
secret is generated and stored in the file. The file must not be readable by
|
||||
``group`` or ``other``, otherwise the server won't start. The recommended permissions
|
||||
for the cookie secret file are ``600`` (owner-only rw).
|
||||
|
||||
Generating and storing as an environment variable
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
If you would like to avoid the need for files, the value can be loaded in the
|
||||
Hub process from the ``JPY_COOKIE_SECRET`` environment variable, which is a
|
||||
hex-encoded string. You can set it this way:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
export JPY_COOKIE_SECRET=$(openssl rand -hex 32)
|
||||
|
||||
For security reasons, this environment variable should only be visible to the
|
||||
Hub. If you set it dynamically as above, all users will be logged out each time
|
||||
the Hub starts.
|
||||
|
||||
Generating and storing as a binary string
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
You can also set the cookie secret, as a binary string,
|
||||
in the configuration file (``jupyterhub_config.py``) itself:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
c.JupyterHub.cookie_secret = bytes.fromhex('64 CHAR HEX STRING')
|
||||
|
||||
.. _cookies:
|
||||
|
||||
Cookies used by JupyterHub authentication
|
||||
-----------------------------------------
|
||||
|
||||
The following cookies are used by the Hub for handling user authentication.
|
||||
|
||||
This section was created based on this post_ from Discourse.
|
||||
|
||||
.. _post: https://discourse.jupyter.org/t/how-to-force-re-login-for-users/1998/6
|
||||
|
||||
jupyterhub-hub-login
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This is the login token used when visiting Hub-served pages that are
|
||||
protected by authentication, such as the main home, the spawn form, etc.
|
||||
If this cookie is set, then the user is logged in.
|
||||
|
||||
Resetting the Hub cookie secret effectively revokes this cookie.
|
||||
|
||||
This cookie is restricted to the path ``/hub/``.
|
||||
|
||||
jupyterhub-user-<username>
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This is the cookie used for authenticating with a single-user server.
|
||||
It is set by the single-user server, after OAuth with the Hub.
|
||||
|
||||
Effectively the same as ``jupyterhub-hub-login``, but for the
|
||||
single-user server instead of the Hub. It contains an OAuth access token,
|
||||
which is checked with the Hub to authenticate the browser.
|
||||
|
||||
Each OAuth access token is associated with a session id (see ``jupyterhub-session-id`` section
|
||||
below).
|
||||
|
||||
To avoid hitting the Hub on every request, the authentication response is cached.
|
||||
The cache key is comprised of both the token and session id, to avoid a stale cache.
|
||||
|
||||
Resetting the Hub cookie secret effectively revokes this cookie.
|
||||
|
||||
This cookie is restricted to the path ``/user/<username>``,
|
||||
to ensure that only the user’s server receives it.
|
||||
|
||||
jupyterhub-session-id
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This is a random string, meaningless in itself, and the only cookie
|
||||
shared by the Hub and single-user servers.
|
||||
|
||||
Its sole purpose is to coordinate the logout of the multiple OAuth cookies.
|
||||
|
||||
This cookie is set to ``/`` so all endpoints can receive it, clear it, etc.
|
||||
|
||||
jupyterhub-user-<username>-oauth-state
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
A short-lived cookie, used solely to store and validate OAuth state.
|
||||
It is only set while OAuth between the single-user server and the Hub
|
||||
is processing.
|
||||
|
||||
If you use your browser development tools, you should see this cookie
|
||||
for a very brief moment before you are logged in,
|
||||
with an expiration date shorter than ``jupyterhub-hub-login`` or
|
||||
``jupyterhub-user-<username>``.
|
||||
|
||||
This cookie should not exist after you have successfully logged in.
|
||||
|
||||
This cookie is restricted to the path ``/user/<username>``, so that only
|
||||
the user’s server receives it.
|
@@ -79,7 +79,7 @@ server {
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8000;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
# websocket headers
|
@@ -6,14 +6,14 @@ Only do this if you are very sure you must.
|
||||
|
||||
## Overview
|
||||
|
||||
There are many [Authenticators](../getting-started/authenticators-users-basics) and [Spawners](../getting-started/spawners-basics) available for JupyterHub. Some, such
|
||||
There are many [Authenticators](authenticators) and [Spawners](spawners) available for JupyterHub. Some, such
|
||||
as [DockerSpawner](https://github.com/jupyterhub/dockerspawner) or [OAuthenticator](https://github.com/jupyterhub/oauthenticator), do not need any elevated permissions. This
|
||||
document describes how to get the full default behavior of JupyterHub while
|
||||
running notebook servers as real system users on a shared system, without
|
||||
running the Hub itself as root.
|
||||
|
||||
Since JupyterHub needs to spawn processes as other users, the simplest way
|
||||
is to run it as root, spawning user servers with [setuid](http://linux.die.net/man/2/setuid).
|
||||
is to run it as root, spawning user servers with [setuid](https://linux.die.net/man/2/setuid).
|
||||
But this isn't especially safe, because you have a process running on the
|
||||
public web as root.
|
||||
|
||||
@@ -114,7 +114,7 @@ sudo: a password is required
|
||||
|
||||
## Enable PAM for non-root
|
||||
|
||||
By default, [PAM authentication](http://en.wikipedia.org/wiki/Pluggable_authentication_module)
|
||||
By default, [PAM authentication](https://en.wikipedia.org/wiki/Pluggable_authentication_module)
|
||||
is used by JupyterHub. To use PAM, the process may need to be able to read
|
||||
the shadow password database.
|
||||
|
||||
@@ -159,13 +159,13 @@ sudo setcap 'cap_net_bind_service=+ep' /usr/bin/node
|
||||
```
|
||||
|
||||
However, you may want to further understand the consequences of this.
|
||||
([Further reading](http://man7.org/linux/man-pages/man7/capabilities.7.html))
|
||||
([Further reading](https://man7.org/linux/man-pages/man7/capabilities.7.html))
|
||||
|
||||
You may also be interested in limiting the amount of CPU any process can use
|
||||
on your server. `cpulimit` is a useful tool that is available for many Linux
|
||||
distributions' packaging system. This can be used to keep any user's process
|
||||
from using too much CPU cycles. You can configure it accoring to [these
|
||||
instructions](http://ubuntuforums.org/showthread.php?t=992706).
|
||||
instructions](https://ubuntuforums.org/showthread.php?t=992706).
|
||||
|
||||
### Shadow group (FreeBSD)
|
||||
|
@@ -45,7 +45,7 @@ additional packages.
|
||||
|
||||
## Configuring Jupyter and IPython
|
||||
|
||||
[Jupyter](https://jupyter-notebook.readthedocs.io/en/stable/config_overview.html)
|
||||
[Jupyter](https://jupyter-notebook.readthedocs.io/en/stable/configuring/config_overview.html)
|
||||
and [IPython](https://ipython.readthedocs.io/en/stable/development/config.html)
|
||||
have their own configuration systems.
|
||||
|
||||
@@ -57,6 +57,24 @@ The typical locations for these config files are:
|
||||
- **system-wide** in `/etc/{jupyter|ipython}`
|
||||
- **env-wide** (environment wide) in `{sys.prefix}/etc/{jupyter|ipython}`.
|
||||
|
||||
### Jupyter environment configuration priority
|
||||
|
||||
When Jupyter runs in an environment (conda or virtualenv), it prefers to load configuration from the environment over each user's own configuration (e.g. in `~/.jupyter`).
|
||||
This may cause issues if you use a _shared_ conda environment or virtualenv for users, because e.g. jupyterlab may try to write information like workspaces or settings to the environment instead of the user's own directory.
|
||||
This could fail with something like `Permission denied: $PREFIX/etc/jupyter/lab`.
|
||||
|
||||
To avoid this issue, set `JUPYTER_PREFER_ENV_PATH=0` in the user environment:
|
||||
|
||||
```python
|
||||
c.Spawner.environment.update(
|
||||
{
|
||||
"JUPYTER_PREFER_ENV_PATH": "0",
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
which tells Jupyter to prefer _user_ configuration paths (e.g. in `~/.jupyter`) to configuration set in the environment.
|
||||
|
||||
### Example: Enable an extension system-wide
|
||||
|
||||
For example, to enable the `cython` IPython extension for all of your users, create the file `/etc/ipython/ipython_config.py`:
|
||||
@@ -153,11 +171,11 @@ c.JupyterHub.allow_named_servers = True
|
||||
Named servers were implemented in the REST API in JupyterHub 0.8,
|
||||
and JupyterHub 1.0 introduces UI for managing named servers via the user home page:
|
||||
|
||||

|
||||

|
||||
|
||||
as well as the admin page:
|
||||
|
||||

|
||||

|
||||
|
||||
Named servers can be accessed, created, started, stopped, and deleted
|
||||
from these pages. Activity tracking is now per server as well.
|
||||
@@ -184,6 +202,8 @@ This can be useful for quota service implementations. The example above limits t
|
||||
|
||||
If `named_server_limit_per_user` is set to `0`, no limit is enforced.
|
||||
|
||||
When using named servers, Spawners may need additional configuration to take the `servername` into account. Whilst `KubeSpawner` takes the `servername` into account by default in [`pod_name_template`](https://jupyterhub-kubespawner.readthedocs.io/en/latest/spawner.html#kubespawner.KubeSpawner.pod_name_template), other Spawners may not. Check the documentation for the specific Spawner to see how singleuser servers are named, for example in `DockerSpawner` this involves modifying the [`name_template`](https://jupyterhub-dockerspawner.readthedocs.io/en/latest/api/index.html) setting to include `servername`, eg. `"{prefix}-{username}-{servername}"`.
|
||||
|
||||
(classic-notebook-ui)=
|
||||
|
||||
## Switching back to the classic notebook
|
||||
@@ -192,13 +212,31 @@ By default, the single-user server launches JupyterLab,
|
||||
which is based on [Jupyter Server][].
|
||||
|
||||
This is the default server when running JupyterHub ≥ 2.0.
|
||||
To switch to using the legacy Jupyter Notebook server, you can set the `JUPYTERHUB_SINGLEUSER_APP` environment variable
|
||||
To switch to using the legacy Jupyter Notebook server (notebook < 7.0), you can set the `JUPYTERHUB_SINGLEUSER_APP` environment variable
|
||||
(in the single-user environment) to:
|
||||
|
||||
```bash
|
||||
export JUPYTERHUB_SINGLEUSER_APP='notebook.notebookapp.NotebookApp'
|
||||
```
|
||||
|
||||
:::{note}
|
||||
|
||||
```
|
||||
JUPYTERHUB_SINGLEUSER_APP='notebook.notebookapp.NotebookApp'
|
||||
```
|
||||
|
||||
is only valid for notebook < 7. notebook v7 is based on jupyter-server,
|
||||
and the default jupyter-server application must be used.
|
||||
Selecting the new notebook UI is no longer a matter of selecting the server app to launch,
|
||||
but only the default URL for users to visit.
|
||||
To use notebook v7 with JupyterHub, leave the default singleuser app config alone (or specify `JUPYTERHUB_SINGLEUSER_APP=jupyter-server`) and set the default _URL_ for user servers:
|
||||
|
||||
```python
|
||||
c.Spawner.default_url = '/tree/'
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
[jupyter server]: https://jupyter-server.readthedocs.io
|
||||
[jupyter notebook]: https://jupyter-notebook.readthedocs.io
|
||||
|
34
docs/source/howto/index.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# How-to
|
||||
|
||||
The _How-to_ guides provide practical step-by-step details to help you achieve a particular goal. They are useful when you are trying to get something done but require you to understand and adapt the steps to your specific usecase.
|
||||
|
||||
Use the following guides when:
|
||||
|
||||
```{toctree}
|
||||
:maxdepth: 1
|
||||
|
||||
api-only
|
||||
proxy
|
||||
rest
|
||||
separate-proxy
|
||||
templates
|
||||
upgrading
|
||||
log-messages
|
||||
|
||||
```
|
||||
|
||||
(config-examples)=
|
||||
|
||||
## Configuration
|
||||
|
||||
The following guides provide examples, including configuration files and tips, for the
|
||||
following:
|
||||
|
||||
```{toctree}
|
||||
:maxdepth: 1
|
||||
|
||||
configuration/config-user-env
|
||||
configuration/config-ghoauth
|
||||
configuration/config-proxy
|
||||
configuration/config-sudo
|
||||
```
|
@@ -1,4 +1,4 @@
|
||||
(rest-api)=
|
||||
(using-jupyterhub-rest-api)=
|
||||
|
||||
# Using JupyterHub's REST API
|
||||
|
||||
@@ -19,11 +19,12 @@ Hub.
|
||||
|
||||
## What you can do with the API
|
||||
|
||||
Using the [JupyterHub REST API][], you can perform actions on the Hub,
|
||||
Using the [JupyterHub REST API](jupyterhub-rest-API), you can perform actions on the Hub,
|
||||
such as:
|
||||
|
||||
- Checking which users are active
|
||||
- Adding or removing users
|
||||
- Adding or removing services
|
||||
- Stopping or starting single user notebook servers
|
||||
- Authenticating services
|
||||
- Communicating with an individual Jupyter server's REST API
|
||||
@@ -33,36 +34,13 @@ such as:
|
||||
To send requests using the JupyterHub API, you must pass an API token with
|
||||
the request.
|
||||
|
||||
The preferred way of generating an API token is by running:
|
||||
|
||||
```bash
|
||||
openssl rand -hex 32
|
||||
```
|
||||
|
||||
This `openssl` command generates a potential token that can then be
|
||||
added to JupyterHub using `.api_tokens` configuration setting in
|
||||
`jupyterhub_config.py`.
|
||||
|
||||
```{note}
|
||||
The api_tokens configuration has been softly deprecated since the introduction of services.
|
||||
```
|
||||
|
||||
Alternatively, you can use the `jupyterhub token` command to generate a token
|
||||
for a specific hub user by passing the **username**:
|
||||
|
||||
```bash
|
||||
jupyterhub token <username>
|
||||
```
|
||||
|
||||
This command generates a random string to use as a token and registers
|
||||
it for the given user with the Hub's database.
|
||||
|
||||
In [version 0.8.0](../changelog.md), a token request page for
|
||||
generating an API token is available from the JupyterHub user interface:
|
||||
While JupyterHub is running, any JupyterHub user can request a token via the `token` page.
|
||||
This is accessible via a `token` link in the top nav bar from the JupyterHub home page,
|
||||
or at the URL `/hub/token`.
|
||||
|
||||
:::{figure-md}
|
||||
|
||||

|
||||

|
||||
|
||||
JupyterHub's API token page
|
||||
:::
|
||||
@@ -74,6 +52,40 @@ JupyterHub's token page after successfully requesting a token.
|
||||
|
||||
:::
|
||||
|
||||
### Register API tokens via configuration
|
||||
|
||||
Sometimes, you'll want to pre-generate a token for access to JupyterHub,
|
||||
typically for use by external services,
|
||||
so that both JupyterHub and the service have access to the same value.
|
||||
|
||||
First, you need to generate a good random secret.
|
||||
A good way of generating an API token is by running:
|
||||
|
||||
```bash
|
||||
openssl rand -hex 32
|
||||
```
|
||||
|
||||
This `openssl` command generates a random token that can be added to the JupyterHub configuration in `jupyterhub_config.py`.
|
||||
|
||||
For external services, this would be registered with JupyterHub via configuration:
|
||||
|
||||
```python
|
||||
c.JupyterHub.services = [
|
||||
{
|
||||
"name": "my-service",
|
||||
"api_token": the_secret_value,
|
||||
},
|
||||
]
|
||||
```
|
||||
|
||||
At this point, requests authenticated with the token will be associated with The service `my-service`.
|
||||
|
||||
```{note}
|
||||
You can also load additional tokens for users via the `JupyterHub.api_tokens` configuration.
|
||||
|
||||
However, this option has been deprecated since the introduction of services.
|
||||
```
|
||||
|
||||
## Assigning permissions to a token
|
||||
|
||||
Prior to JupyterHub 2.0, there were two levels of permissions:
|
||||
@@ -87,9 +99,46 @@ In JupyterHub 2.0,
|
||||
specific permissions are now defined as '**scopes**',
|
||||
and can be assigned both at the user/service level,
|
||||
and at the individual token level.
|
||||
The previous behavior is represented by the scope `inherit`,
|
||||
and is still the default behavior for requesting a token if limited permissions are not specified.
|
||||
|
||||
This allows e.g. a user with full admin permissions to request a token with limited permissions.
|
||||
|
||||
In JupyterHub 5.0, you can specify scopes for a token when requesting it via the `/hub/tokens` page as a space-separated list.
|
||||
In JupyterHub 3.0 and later, you can also request tokens with limited scopes via the JupyterHub API (provided you already have a token!):
|
||||
|
||||
```python
|
||||
import json
|
||||
from urllib.parse import quote
|
||||
|
||||
import requests
|
||||
|
||||
def request_token(
|
||||
username, *, api_token, scopes=None, expires_in=0, hub_url="http://127.0.0.1:8081"
|
||||
):
|
||||
"""Request a new token for a user"""
|
||||
request_body = {}
|
||||
if expires_in:
|
||||
request_body["expires_in"] = expires_in
|
||||
if scopes:
|
||||
request_body["scopes"] = scopes
|
||||
url = hub_url.rstrip("/") + f"/hub/api/users/{quote(username)}/tokens"
|
||||
r = requests.post(
|
||||
url,
|
||||
data=json.dumps(request_body),
|
||||
headers={"Authorization": f"token {api_token}"},
|
||||
)
|
||||
if r.status_code >= 400:
|
||||
# extract error message for nicer error messages
|
||||
r.reason = r.json().get("message", r.text)
|
||||
r.raise_for_status()
|
||||
# response is a dict and will include the token itself in the 'token' field,
|
||||
# as well as other fields about the token
|
||||
return r.json()
|
||||
|
||||
request_token("myusername", scopes=["list:users"], api_token="abc123")
|
||||
```
|
||||
|
||||
## Updating to admin services
|
||||
|
||||
```{note}
|
||||
@@ -153,7 +202,7 @@ Authorization header.
|
||||
### Use requests
|
||||
|
||||
Using the popular Python [requests](https://docs.python-requests.org)
|
||||
library, an API GET request is made, and the request sends an API token for
|
||||
library, an API GET request is made to [/users](rest-api-get-users), and the request sends an API token for
|
||||
authorization. The response contains information about the users, here's example code to make an API request for the users of a JupyterHub deployment
|
||||
|
||||
```python
|
||||
@@ -171,7 +220,7 @@ r.raise_for_status()
|
||||
users = r.json()
|
||||
```
|
||||
|
||||
This example provides a slightly more complicated request, yet the
|
||||
This example provides a slightly more complicated request (to [/groups/formgrade-data301/users](rest-api-post-group-users)), yet the
|
||||
process is very similar:
|
||||
|
||||
```python
|
||||
@@ -205,7 +254,7 @@ provided by notebook servers managed by JupyterHub if it has the necessary `acce
|
||||
|
||||
Pagination is available through the `offset` and `limit` query parameters on
|
||||
list endpoints, which can be used to return ideally sized windows of results.
|
||||
Here's example code demonstrating pagination on the `GET /users`
|
||||
Here's example code demonstrating pagination on the [`GET /users`](rest-api-get-users)
|
||||
endpoint to fetch the first 20 records.
|
||||
|
||||
```python
|
||||
@@ -276,7 +325,7 @@ Pagination is enabled on the `GET /users`, `GET /groups`, and `GET /proxy` REST
|
||||
|
||||
## Enabling users to spawn multiple named-servers via the API
|
||||
|
||||
Support for multiple servers per user was introduced in JupyterHub [version 0.8.](../changelog.md)
|
||||
Support for multiple servers per user was introduced in JupyterHub [version 0.8.](changelog)
|
||||
Prior to that, each user could only launch a single default server via the API
|
||||
like this:
|
||||
|
||||
@@ -294,7 +343,7 @@ First you must enable named-servers by including the following setting in the `j
|
||||
|
||||
If you are using the [zero-to-jupyterhub-k8s](https://github.com/jupyterhub/zero-to-jupyterhub-k8s) set-up to run JupyterHub,
|
||||
then instead of editing the `jupyterhub_config.py` file directly, you could pass
|
||||
the following as part of the `config.yaml` file, as per the [tutorial](https://zero-to-jupyterhub.readthedocs.io/en/latest/):
|
||||
the following as part of the `config.yaml` file, as per the [tutorial](https://z2jh.jupyter.org/en/latest/):
|
||||
|
||||
```bash
|
||||
hub:
|
||||
@@ -304,12 +353,18 @@ hub:
|
||||
|
||||
With that setting in place, a new named-server is activated like this:
|
||||
|
||||
```{parsed-literal}
|
||||
[POST /api/users/:username/servers/:servername](rest-api-post-user-server-name)
|
||||
```
|
||||
|
||||
e.g.
|
||||
|
||||
```bash
|
||||
curl -X POST -H "Authorization: token <token>" "http://127.0.0.1:8081/hub/api/users/<user>/servers/<serverA>"
|
||||
curl -X POST -H "Authorization: token <token>" "http://127.0.0.1:8081/hub/api/users/<user>/servers/<serverB>"
|
||||
```
|
||||
|
||||
The same servers can be stopped by substituting `DELETE` for `POST` above.
|
||||
The same servers can be [stopped](rest-api-delete-user-server-name) by substituting `DELETE` for `POST` above.
|
||||
|
||||
### Some caveats for using named-servers
|
||||
|
||||
@@ -320,7 +375,7 @@ or kubernetes pods.
|
||||
|
||||
## Learn more about the API
|
||||
|
||||
You can see the full [JupyterHub REST API][] for more details.
|
||||
You can see the full [JupyterHub REST API](jupyterhub-rest-api) for more details.
|
||||
|
||||
[openapi initiative]: https://www.openapis.org/
|
||||
[jupyterhub rest api]: ./rest-api
|
@@ -1,3 +1,5 @@
|
||||
(separate-proxy)=
|
||||
|
||||
# Running proxy separately from the hub
|
||||
|
||||
## Background
|
||||
@@ -68,7 +70,7 @@ need to configure the options there.
|
||||
## Docker image
|
||||
|
||||
You can use [jupyterhub configurable-http-proxy docker
|
||||
image](https://hub.docker.com/r/jupyterhub/configurable-http-proxy/)
|
||||
image](https://quay.io/repository/jupyterhub/configurable-http-proxy)
|
||||
to run the proxy.
|
||||
|
||||
## See also
|
144
docs/source/howto/upgrading-v5.md
Normal file
@@ -0,0 +1,144 @@
|
||||
(upgrading-v5)=
|
||||
|
||||
# Upgrading to JupyterHub 5
|
||||
|
||||
This document describes the specific considerations.
|
||||
For general upgrading tips, see the [docs on upgrading jupyterhub](upgrading).
|
||||
|
||||
You can see the [changelog](changelog) for more detailed information.
|
||||
|
||||
## Python version
|
||||
|
||||
JupyterHub 5 requires Python 3.8.
|
||||
Make sure you have at least Python 3.8 in your user and hub environments before upgrading.
|
||||
|
||||
## Database upgrades
|
||||
|
||||
JupyterHub 5 does have a database schema upgrade,
|
||||
so you should backup your database and run `jupyterhub upgrade-db` after upgrading and before starting JupyterHub.
|
||||
The updated schema only adds some columns, so is one that should be not too disruptive to roll back if you need to.
|
||||
|
||||
## User subdomains
|
||||
|
||||
All JupyterHub deployments which care about protecting users from each other are encouraged to enable per-user domains, if possible,
|
||||
as this provides the best isolation between user servers.
|
||||
|
||||
To enable subdomains, set:
|
||||
|
||||
```python
|
||||
c.JupyterHub.subdomain_host = "https://myjupyterhub.example.org"
|
||||
```
|
||||
|
||||
If you were using subdomains before, some user servers and all services will be on different hosts in the default configuration.
|
||||
|
||||
JupyterHub 5 allows complete customization of the subdomain scheme via the new {attr}`.JupyterHub.subdomain_hook`,
|
||||
and changes the default subdomain scheme.
|
||||
.
|
||||
|
||||
You can provide a completely custom subdomain scheme, or select one of two default implementations by name: `idna` or `legacy`. `idna` is the default.
|
||||
|
||||
The new default behavior can be selected explicitly via:
|
||||
|
||||
```python
|
||||
c.JupyterHub.subdomain_hook = "idna"
|
||||
```
|
||||
|
||||
Or to delay any changes to URLs for your users, you can opt-in to the pre-5.0 behavior with:
|
||||
|
||||
```python
|
||||
c.JupyterHub.subdomain_hook = "legacy"
|
||||
```
|
||||
|
||||
The key differences of the new `idna` scheme:
|
||||
|
||||
- It should always produce valid domains, regardless of username (not true for the legacy scheme when using characters that might need escaping or usernames that are long)
|
||||
- each Service gets its own subdomain on `service--` rather than sharing `services.`
|
||||
|
||||
Below is a table of examples of users and services with their domains with the old and new scheme, assuming the configuration:
|
||||
|
||||
```python
|
||||
c.JupyterHub.subdomain_host = "https://jupyter.example.org"
|
||||
```
|
||||
|
||||
| kind | name | legacy | idna |
|
||||
| ------- | ------------------ | ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
|
||||
| user | laudna | `laudna.jupyter.example.org` | `laudna.jupyter.example.org` |
|
||||
| service | bells | `services.jupyter.example.org` | `bells--service.jupyter.example.org` |
|
||||
| user | jester@mighty.nein | `jester_40mighty.nein.jupyter.example.org` (may not work!) | `u-jestermi--8037680.jupyter.example.org` (not as pretty, but guaranteed to be valid and not collide) |
|
||||
|
||||
## Tokens in URLs
|
||||
|
||||
JupyterHub 5 does not accept `?token=...` URLs by default in single-user servers.
|
||||
These URLs allow one user to force another to login as them,
|
||||
which can be the start of an inter-user attack.
|
||||
|
||||
There is a valid use case for producing links which allow starting a fully authenticated session,
|
||||
so you may still opt in to this behavior by setting:
|
||||
|
||||
```python
|
||||
c.Spawner.environment.update({"JUPYTERHUB_ALLOW_TOKEN_IN_URL": "1"})
|
||||
```
|
||||
|
||||
if you are not concerned about protecting your users from each other.
|
||||
If you have subdomains enabled, the threat is substantially reduced.
|
||||
|
||||
## Sharing
|
||||
|
||||
The big new feature in JupyterHub 5.0 is sharing.
|
||||
Check it out in [the sharing docs](sharing-tutorial).
|
||||
|
||||
## Authenticator.allow_all and allow_existing_users
|
||||
|
||||
Prior to JupyterHub 5, JupyterHub Authenticators had the _implicit_ default behavior to allow any user who successfully authenticates to login **if no users are explicitly allowed** (i.e. `allowed_users` is empty on the base class).
|
||||
This behavior was considered a too-permissive default in Authenticators that source large user pools like OAuthenticator, which would accept e.g. all users with a Google account by default.
|
||||
As a result, OAuthenticator 16 introduced two configuration options: `allow_all` and `allow_existing_users`.
|
||||
|
||||
JupyterHub 5 adopts these options for all Authenticators:
|
||||
|
||||
1. `Authenticator.allow_all` (default: False)
|
||||
2. `Authenticator.allow_existing_users` (default: True if allowed_users is non-empty, False otherwise)
|
||||
|
||||
having the effect that _some_ allow configuration is required for anyone to be able to login.
|
||||
If you want to preserve the pre-5.0 behavior with no explicit `allow` configuration, set:
|
||||
|
||||
```python
|
||||
c.Authenticator.allow_all = True
|
||||
```
|
||||
|
||||
`allow_existing_users` defaults are meant to be backward-compatible, but you can now _explicitly_ allow or not based on presence in the database by setting `Authenticator.allow_existing_users` to True or False.
|
||||
|
||||
:::{seealso}
|
||||
|
||||
[Authenticator config docs](authenticators) for details on these and other Authenticator options.
|
||||
:::
|
||||
|
||||
## Bootstrap 5
|
||||
|
||||
JupyterHub uses the CSS framework [bootstrap](https://getbootstrap.com), which is upgraded from 3.4 to 5.3.
|
||||
If you don't have any custom HTML templates, you are likely to only see relatively minor aesthetic changes.
|
||||
If you have custom HTML templates or spawner options forms, they may need some updating to look right.
|
||||
|
||||
See the bootstrap documentation. Since we upgraded two major versions, you might need to look at both v4 and v5 documentation for what has changed since 3.x:
|
||||
|
||||
- [migrating to v4](https://getbootstrap.com/docs/4.6/migration/)
|
||||
- [migrating to v5](https://getbootstrap.com/docs/5.3/migration/)
|
||||
|
||||
If you customized the JupyterHub CSS by recompiling from LESS files, bootstrap migrated to SCSS.
|
||||
You can start by autoconverting your LESS to SCSS (it's not that different) with [less2sass](https://github.com/ekryski/less2sass):
|
||||
|
||||
```bash
|
||||
npm install --global less2scss
|
||||
# converts less/foo.less to scss/foo.scss
|
||||
less2scss --src ./less --dst ./scss
|
||||
```
|
||||
|
||||
Bootstrap also allows configuring things with [CSS variables](https://getbootstrap.com/docs/5.3/customize/css-variables/), so depending on what you have customized, you may be able to get away with just adding a CSS file defining variables without rebuilding the whole SCSS.
|
||||
|
||||
## groups required with Authenticator.manage_groups
|
||||
|
||||
Setting `Authenticator.manage_groups = True` allows the Authenticator to manage group membership by returning `groups` from the authentication model.
|
||||
However, this option is available even on Authenticators that do not support it, which led to confusion.
|
||||
Starting with JupyterHub 5, if `manage_groups` is True `authenticate` _must_ return a groups field, otherwise an error is raised.
|
||||
This prevents confusion when users enable managed groups that is not implemented.
|
||||
|
||||
If an Authenticator _does_ support managing groups but was not providing a `groups` field in order to leave membership unmodified, it must specify `"groups": None` to make this explicit instead of implicit (this is backward-compatible).
|
149
docs/source/howto/upgrading.md
Normal file
@@ -0,0 +1,149 @@
|
||||
(upgrading-jupyterhub)=
|
||||
|
||||
# Upgrading JupyterHub
|
||||
|
||||
JupyterHub offers easy upgrade pathways between minor versions. This
|
||||
document describes how to do these upgrades.
|
||||
|
||||
If you are using {ref}`a JupyterHub distribution <index/distributions>`, you
|
||||
should consult the distribution's documentation on how to upgrade. This documentation is
|
||||
for those who have set up their JupyterHub without using a distribution.
|
||||
|
||||
This documentation is lengthy because it is quite detailed. Most likely, upgrading
|
||||
JupyterHub is painless, quick and with minimal user interruption.
|
||||
|
||||
The steps are discussed in detail, so if you get stuck at any step you can always refer to this guide.
|
||||
|
||||
For specific version migrations:
|
||||
|
||||
```{toctree}
|
||||
:maxdepth: 1
|
||||
|
||||
./upgrading-v5
|
||||
```
|
||||
|
||||
## Read the Changelog
|
||||
|
||||
The [changelog](changelog) contains information on what has
|
||||
changed with the new JupyterHub release and any deprecation warnings.
|
||||
Read these notes to familiarize yourself with the coming changes. There
|
||||
might be new releases of the authenticators & spawners you use, so
|
||||
read the changelogs for those too!
|
||||
|
||||
## Notify your users
|
||||
|
||||
If you use the default configuration where `configurable-http-proxy`
|
||||
is managed by JupyterHub, your users will see service disruption during
|
||||
the upgrade process. You should notify them, and pick a time to do the
|
||||
upgrade where they will be least disrupted.
|
||||
|
||||
If you use a different proxy or run `configurable-http-proxy`
|
||||
independent of JupyterHub, your users will be able to continue using notebook
|
||||
servers they had already launched, but will not be able to launch new servers or sign in.
|
||||
|
||||
## Backup database & config
|
||||
|
||||
Before doing an upgrade, it is critical to back up:
|
||||
|
||||
1. Your JupyterHub database (SQLite by default, or MySQL / Postgres if you used those).
|
||||
If you use SQLite (the default), you should backup the `jupyterhub.sqlite` file.
|
||||
2. Your `jupyterhub_config.py` file.
|
||||
3. Your users' home directories. This is unlikely to be affected directly by
|
||||
a JupyterHub upgrade, but we recommend a backup since user data is critical.
|
||||
|
||||
## Shut down JupyterHub
|
||||
|
||||
Shut down the JupyterHub process. This would vary depending on how you
|
||||
have set up JupyterHub to run. It is most likely using a process
|
||||
supervisor of some sort (`systemd` or `supervisord` or even `docker`).
|
||||
Use the supervisor-specific command to stop the JupyterHub process.
|
||||
|
||||
## Upgrade JupyterHub packages
|
||||
|
||||
There are two environments where the `jupyterhub` package is installed:
|
||||
|
||||
1. The _hub environment_: where the JupyterHub server process
|
||||
runs. This is started with the `jupyterhub` command, and is what
|
||||
people generally think of as JupyterHub.
|
||||
2. The _notebook user environments_: where the user notebook
|
||||
servers are launched from, and is probably custom to your own
|
||||
installation. This could be just one environment (different from the
|
||||
hub environment) that is shared by all users, one environment
|
||||
per user, or the same environment as the hub environment. The hub
|
||||
launched the `jupyterhub-singleuser` command in this environment,
|
||||
which in turn starts the notebook server.
|
||||
|
||||
You need to make sure the version of the `jupyterhub` package matches
|
||||
in both these environments. If you installed `jupyterhub` with pip,
|
||||
you can upgrade it with:
|
||||
|
||||
```bash
|
||||
python3 -m pip install --upgrade jupyterhub==<version>
|
||||
```
|
||||
|
||||
Where `<version>` is the version of JupyterHub you are upgrading to.
|
||||
|
||||
If you used `conda` to install `jupyterhub`, you should upgrade it
|
||||
with:
|
||||
|
||||
```bash
|
||||
conda install -c conda-forge jupyterhub==<version>
|
||||
```
|
||||
|
||||
You should also check for new releases of the authenticator & spawner you
|
||||
are using. You might wish to upgrade those packages, too, along with JupyterHub
|
||||
or upgrade them separately.
|
||||
|
||||
## Upgrade JupyterHub database
|
||||
|
||||
Once new packages are installed, you need to upgrade the JupyterHub
|
||||
database. From the hub environment, in the same directory as your
|
||||
`jupyterhub_config.py` file, you should run:
|
||||
|
||||
```bash
|
||||
jupyterhub upgrade-db
|
||||
```
|
||||
|
||||
This should find the location of your database, and run the necessary upgrades
|
||||
for it.
|
||||
|
||||
### SQLite database disadvantages
|
||||
|
||||
SQLite has some disadvantages when it comes to upgrading JupyterHub. These
|
||||
are:
|
||||
|
||||
- `upgrade-db` may not work, and you may need to delete your database
|
||||
and start with a fresh one.
|
||||
- `downgrade-db` **will not** work if you want to rollback to an
|
||||
earlier version, so backup the `jupyterhub.sqlite` file before
|
||||
upgrading.
|
||||
|
||||
### What happens if I delete my database?
|
||||
|
||||
Losing the Hub database is often not a big deal. Information that
|
||||
resides only in the Hub database includes:
|
||||
|
||||
- active login tokens (user cookies, service tokens)
|
||||
- users added via JupyterHub UI, instead of config files
|
||||
- info about running servers
|
||||
|
||||
If the following conditions are true, you should be fine clearing the
|
||||
Hub database and starting over:
|
||||
|
||||
- users specified in the config file, or login using an external
|
||||
authentication provider (Google, GitHub, LDAP, etc)
|
||||
- user servers are stopped during the upgrade
|
||||
- don't mind causing users to log in again after the upgrade
|
||||
|
||||
## Start JupyterHub
|
||||
|
||||
Once the database upgrade is completed, start the `jupyterhub`
|
||||
process again.
|
||||
|
||||
1. Log in and start the server to make sure things work as
|
||||
expected.
|
||||
2. Check the logs for any errors or deprecation warnings. You
|
||||
might have to update your `jupyterhub_config.py` file to
|
||||
deal with any deprecated options.
|
||||
|
||||
Congratulations, your JupyterHub has been upgraded!
|
BIN
docs/source/images/collaboration-admin-ui.png
Normal file
After Width: | Height: | Size: 141 KiB |
BIN
docs/source/images/jupyterlab-rtc.png
Normal file
After Width: | Height: | Size: 81 KiB |
BIN
docs/source/images/shareable_link.webp
Normal file
After Width: | Height: | Size: 8.1 KiB |
BIN
docs/source/images/sharing-token.png
Normal file
After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 103 KiB After Width: | Height: | Size: 137 KiB |
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 99 KiB |
Before Width: | Height: | Size: 52 KiB |
@@ -1,15 +0,0 @@
|
||||
=====
|
||||
About
|
||||
=====
|
||||
|
||||
JupyterHub is an open source project and community. It is a part of the
|
||||
`Jupyter Project <https://jupyter.org>`_. JupyterHub is an open and inclusive
|
||||
community, and invites contributions from anyone. This section covers information
|
||||
about our community, as well as ways that you can connect and get involved.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
contributor-list
|
||||
changelog
|
||||
gallery-jhub-deployments
|
@@ -1,15 +0,0 @@
|
||||
=====================
|
||||
Administrator's Guide
|
||||
=====================
|
||||
|
||||
This guide covers best-practices, tips, common questions and operations, as
|
||||
well as other information relevant to running your own JupyterHub over time.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
troubleshooting
|
||||
admin/capacity-planning
|
||||
admin/upgrading
|
||||
admin/log-messages
|
||||
changelog
|
137
docs/source/index.md
Normal file
@@ -0,0 +1,137 @@
|
||||
# JupyterHub
|
||||
|
||||
[JupyterHub] is the best way to serve [Jupyter notebook] for multiple users.
|
||||
Because JupyterHub manages a separate Jupyter environment for each user,
|
||||
it can be used in a class of students, a corporate data science group, or a scientific
|
||||
research group. It is a multi-user **Hub** that spawns, manages, and proxies multiple
|
||||
instances of the single-user [Jupyter notebook] server.
|
||||
|
||||
(index/distributions)=
|
||||
|
||||
## Distributions
|
||||
|
||||
JupyterHub can be used in a collaborative environment by both small (0-100 users) and
|
||||
large teams (more than 100 users) such as a class of students, corporate data science group
|
||||
or scientific research group.
|
||||
It has two main distributions which are developed to serve the needs of each of these teams respectively.
|
||||
|
||||
1. [The Littlest JupyterHub](https://github.com/jupyterhub/the-littlest-jupyterhub) distribution is suitable if you need a small number of users (1-100) and a single server with a simple environment.
|
||||
2. [Zero to JupyterHub with Kubernetes](https://github.com/jupyterhub/zero-to-jupyterhub-k8s) allows you to deploy dynamic servers on the cloud if you need even more users.
|
||||
This distribution runs JupyterHub on top of [Kubernetes](https://k8s.io).
|
||||
|
||||
```{note}
|
||||
It is important to evaluate these distributions before you can continue with the
|
||||
configuration of JupyterHub.
|
||||
```
|
||||
|
||||
## Subsystems
|
||||
|
||||
JupyterHub is made up of four subsystems:
|
||||
|
||||
- a **Hub** (tornado process) that is the heart of JupyterHub
|
||||
- a **configurable http proxy** (node-http-proxy) that receives the requests from the client's browser
|
||||
- multiple **single-user Jupyter notebook servers** (Python/IPython/tornado) that are monitored by Spawners
|
||||
- an **authentication class** that manages how users can access the system
|
||||
|
||||
Additionally, optional configurations can be added through a `config.py` file and manage users
|
||||
kernels on an admin panel. A simplification of the whole system is displayed in the figure below:
|
||||
|
||||
```{image} images/jhub-fluxogram.jpeg
|
||||
:align: center
|
||||
:alt: JupyterHub subsystems
|
||||
:width: 80%
|
||||
```
|
||||
|
||||
JupyterHub performs the following functions:
|
||||
|
||||
- The Hub launches a proxy
|
||||
- The proxy forwards all requests to the Hub by default
|
||||
- The Hub handles user login and spawns single-user servers on demand
|
||||
- The Hub configures the proxy to forward URL prefixes to the single-user
|
||||
notebook servers
|
||||
|
||||
For convenient administration of the Hub, its users, and services,
|
||||
JupyterHub also provides a {doc}`REST API <reference/rest-api>`.
|
||||
|
||||
The JupyterHub team and Project Jupyter value our community, and JupyterHub
|
||||
follows the Jupyter [Community Guides](https://jupyter.readthedocs.io/en/latest/community/content-community.html).
|
||||
|
||||
---
|
||||
|
||||
## Documentation structure
|
||||
|
||||
### Tutorials
|
||||
|
||||
This section of the documentation contains step-by-step tutorials that help outline the capabilities of JupyterHub and how you can achieve specific aims, such as installing it. The tutorials are recommended if you do not have much experience with JupyterHub.
|
||||
|
||||
```{toctree}
|
||||
:maxdepth: 2
|
||||
|
||||
tutorial/index.md
|
||||
```
|
||||
|
||||
### How-to guides
|
||||
|
||||
The _How-to_ guides provide more in-depth details than the tutorials. They are recommended for those already familiar with JupyterHub and have a specific goal. The guides help answer the question _"How do I ...?"_ based on a particular topic.
|
||||
|
||||
```{toctree}
|
||||
:maxdepth: 2
|
||||
|
||||
howto/index.md
|
||||
```
|
||||
|
||||
### Explanation
|
||||
|
||||
The _Explanation_ section provides further details that can be used to better understand JupyterHub, such as how it can be used and configured. They are intended for those seeking to expand their knowledge of JupyterHub.
|
||||
|
||||
```{toctree}
|
||||
:maxdepth: 2
|
||||
|
||||
explanation/index.md
|
||||
```
|
||||
|
||||
### Reference
|
||||
|
||||
The _Reference_ section provides technical information about JupyterHub, such as monitoring the state of your installation and working with JupyterHub's API modules and classes.
|
||||
|
||||
```{toctree}
|
||||
:maxdepth: 2
|
||||
|
||||
reference/index.md
|
||||
```
|
||||
|
||||
### Frequently asked questions
|
||||
|
||||
Find answers to the most frequently asked questions about JupyterHub such as how to troubleshoot an issue.
|
||||
|
||||
```{toctree}
|
||||
:maxdepth: 2
|
||||
|
||||
faq/index.md
|
||||
```
|
||||
|
||||
### Contributing
|
||||
|
||||
JupyterHub welcomes all contributors, whether you are new to the project or know your way around. The _Contributing_ section provides information on how you can make your contributions.
|
||||
|
||||
```{toctree}
|
||||
:maxdepth: 2
|
||||
|
||||
contributing/index
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Indices and tables
|
||||
|
||||
- {ref}`genindex`
|
||||
- {ref}`modindex`
|
||||
|
||||
## Questions? Suggestions?
|
||||
|
||||
All questions and suggestions are welcome. Please feel free to use our [Jupyter Discourse Forum](https://discourse.jupyter.org/) to contact our team.
|
||||
|
||||
Looking forward to hearing from you!
|
||||
|
||||
[jupyter notebook]: https://jupyter-notebook.readthedocs.io/en/latest/
|
||||
[jupyterhub]: https://github.com/jupyterhub/jupyterhub
|
@@ -1,161 +0,0 @@
|
||||
==========
|
||||
JupyterHub
|
||||
==========
|
||||
`JupyterHub`_ is the best way to serve `Jupyter notebook`_ for multiple users.
|
||||
Because JupyterHub manages a separate Jupyter environment for each user,
|
||||
it can be used in a class of students, a corporate data science group, or a scientific
|
||||
research group. It is a multi-user **Hub** that spawns, manages, and proxies multiple
|
||||
instances of the single-user `Jupyter notebook`_ server.
|
||||
|
||||
JupyterHub offers distributions for different use cases. As of now, you can find two main cases:
|
||||
|
||||
1. `The Littlest JupyterHub <https://github.com/jupyterhub/the-littlest-jupyterhub>`__ distribution is suitable if you need a small number of users (1-100) and a single server with a simple environment.
|
||||
2. `Zero to JupyterHub with Kubernetes <https://github.com/jupyterhub/zero-to-jupyterhub-k8s>`__ allows you to deploy dynamic servers on the cloud if you need even more users.
|
||||
|
||||
|
||||
JupyterHub can be used in a collaborative environment by both both small (0-100 users) and
|
||||
large teams (more than 100 users) such as a class of students, corporate data science group
|
||||
or scientific research group. It has distributions which are developed to serve the needs of
|
||||
each of these teams respectively.
|
||||
|
||||
JupyterHub is made up of four subsystems:
|
||||
|
||||
* a **Hub** (tornado process) that is the heart of JupyterHub
|
||||
* a **configurable http proxy** (node-http-proxy) that receives the requests from the client's browser
|
||||
* multiple **single-user Jupyter notebook servers** (Python/IPython/tornado) that are monitored by Spawners
|
||||
* an **authentication class** that manages how users can access the system
|
||||
|
||||
Additionally, optional configurations can be added through a `config.py` file and manage users
|
||||
kernels on an admin panel. A simplification of the whole system is displayed in the figure below:
|
||||
|
||||
.. image:: images/jhub-fluxogram.jpeg
|
||||
:alt: JupyterHub subsystems
|
||||
:width: 80%
|
||||
:align: center
|
||||
|
||||
|
||||
JupyterHub performs the following functions:
|
||||
|
||||
- The Hub launches a proxy
|
||||
- The proxy forwards all requests to the Hub by default
|
||||
- The Hub handles user login and spawns single-user servers on demand
|
||||
- The Hub configures the proxy to forward URL prefixes to the single-user
|
||||
notebook servers
|
||||
|
||||
For convenient administration of the Hub, its users, and services,
|
||||
JupyterHub also provides a :doc:`REST API <reference/rest-api>`.
|
||||
|
||||
The JupyterHub team and Project Jupyter value our community, and JupyterHub
|
||||
follows the Jupyter `Community Guides <https://jupyter.readthedocs.io/en/latest/community/content-community.html>`_.
|
||||
|
||||
Contents
|
||||
========
|
||||
|
||||
.. _index/distributions:
|
||||
|
||||
Distributions
|
||||
-------------
|
||||
|
||||
A JupyterHub **distribution** is tailored
|
||||
towards a particular set of use cases. These are generally easier
|
||||
to set up than setting up JupyterHub from scratch, assuming they fit your use case.
|
||||
|
||||
Today, you can find two main use cases:
|
||||
|
||||
1. If you need a simple case for a small amount of users (0-100) and single server
|
||||
take a look at
|
||||
`The Littlest JupyterHub <https://github.com/jupyterhub/the-littlest-jupyterhub>`__ distribution.
|
||||
2. If you need to allow for a larger number of machines and users,
|
||||
a dynamic amount of servers can be used on a cloud,
|
||||
take a look at the `Zero to JupyterHub with Kubernetes <https://github.com/jupyterhub/zero-to-jupyterhub-k8s>`__ distribution.
|
||||
This distribution runs JupyterHub on top of `Kubernetes <https://k8s.io>`_.
|
||||
|
||||
*It is important to evaluate these distributions before you can continue with the
|
||||
configuration of JupyterHub*.
|
||||
|
||||
Installation Guide
|
||||
------------------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
installation-guide
|
||||
|
||||
Getting Started
|
||||
---------------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
getting-started/index
|
||||
|
||||
Technical Reference
|
||||
-------------------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
reference/index
|
||||
|
||||
Administrators guide
|
||||
--------------------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
index-admin
|
||||
|
||||
API Reference
|
||||
-------------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
api/index
|
||||
|
||||
RBAC Reference
|
||||
--------------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
rbac/index
|
||||
|
||||
Contributing
|
||||
------------
|
||||
|
||||
We welcome you to contribute to JupyterHub in ways that are most exciting
|
||||
& useful to you. We value documentation, testing, bug reporting & code equally
|
||||
and are glad to have your contributions in whatever form you wish :)
|
||||
|
||||
Our `Code of Conduct <https://github.com/jupyter/governance/blob/HEAD/conduct/code_of_conduct.md>`_ and `reporting guidelines <https://github.com/jupyter/governance/blob/HEAD/conduct/reporting_online.md>`_
|
||||
help keep our community welcoming to as many people as possible.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
contributing/index
|
||||
|
||||
About JupyterHub
|
||||
----------------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
index-about
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`modindex`
|
||||
|
||||
|
||||
Questions? Suggestions?
|
||||
=======================
|
||||
All questions and suggestions are welcome. Please feel free to use our `Jupyter Discourse Forum <https://discourse.jupyter.org/>`_ to contact our team.
|
||||
|
||||
Looking forward to hearing from you!
|
||||
|
||||
.. _JupyterHub: https://github.com/jupyterhub/jupyterhub
|
||||
.. _Jupyter notebook: https://jupyter-notebook.readthedocs.io/en/latest/
|
7
docs/source/installation-guide-hard.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
orphan: true
|
||||
---
|
||||
|
||||
# JupyterHub the hard way
|
||||
|
||||
This guide has moved to <https://github.com/jupyterhub/jupyterhub-the-hard-way/blob/HEAD/docs/installation-guide-hard.md>
|
@@ -1,6 +0,0 @@
|
||||
:orphan:
|
||||
|
||||
JupyterHub the hard way
|
||||
=======================
|
||||
|
||||
This guide has moved to https://github.com/jupyterhub/jupyterhub-the-hard-way/blob/HEAD/docs/installation-guide-hard.md
|
@@ -1,13 +0,0 @@
|
||||
Installation
|
||||
============
|
||||
|
||||
These sections cover how to get up-and-running with JupyterHub. They cover
|
||||
some basics of the tools needed to deploy JupyterHub as well as how to get it
|
||||
running on your own infrastructure.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 3
|
||||
|
||||
quickstart
|
||||
quickstart-docker
|
||||
installation-basics
|
@@ -1,69 +0,0 @@
|
||||
Install JupyterHub with Docker
|
||||
==============================
|
||||
|
||||
|
||||
The JupyterHub `docker image <https://hub.docker.com/r/jupyterhub/jupyterhub/>`_ is the fastest way to set up Jupyterhub in your local development environment.
|
||||
|
||||
.. note::
|
||||
This ``jupyterhub/jupyterhub`` docker image is only an image for running
|
||||
the Hub service itself. It does not provide the other Jupyter components,
|
||||
such as Notebook installation, which are needed by the single-user servers.
|
||||
To run the single-user servers, which may be on the same system as the Hub or
|
||||
not, `JupyterLab <https://jupyterlab.readthedocs.io/>`_ or Jupyter Notebook must be installed.
|
||||
|
||||
|
||||
.. important::
|
||||
We strongly recommend that you follow the `Zero to JupyterHub`_ tutorial to
|
||||
install JupyterHub.
|
||||
|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
You should have `Docker`_ installed on a Linux/Unix based system.
|
||||
|
||||
|
||||
Run the Docker Image
|
||||
--------------------
|
||||
|
||||
To pull the latest JupyterHub image and start the `jupyterhub` container, run this command in your terminal.
|
||||
::
|
||||
|
||||
docker run -d -p 8000:8000 --name jupyterhub jupyterhub/jupyterhub jupyterhub
|
||||
|
||||
|
||||
This command exposes the Jupyter container on port:8000. Navigate to `http://localhost:8000` in a web browser to access the JupyterHub console.
|
||||
|
||||
You can stop and resume the container by running `docker stop` and `docker start` respectively.
|
||||
::
|
||||
|
||||
# find the container id
|
||||
docker ps
|
||||
|
||||
# stop the running container
|
||||
docker stop <container-id>
|
||||
|
||||
# resume the paused container
|
||||
docker start <container-id>
|
||||
|
||||
|
||||
If you want to run docker on a computer that has a public IP then you should
|
||||
(as in MUST) **secure it with ssl** by adding ssl options to your docker
|
||||
configuration or using an ssl enabled proxy.
|
||||
|
||||
`Mounting volumes <https://docs.docker.com/engine/admin/volumes/volumes/>`_
|
||||
enables you to persist and store the data generated by the docker container, even when you stop the container.
|
||||
The persistent data can be stored on the host system, outside the container.
|
||||
|
||||
|
||||
Create System Users
|
||||
-------------------
|
||||
|
||||
Spawn a root shell in your docker container by running this command in the terminal.::
|
||||
|
||||
docker exec -it jupyterhub bash
|
||||
|
||||
The created accounts will be used for authentication in JupyterHub's default
|
||||
configuration.
|
||||
|
||||
.. _Zero to JupyterHub: https://zero-to-jupyterhub.readthedocs.io/en/latest/
|
||||
.. _Docker: https://www.docker.com/
|
@@ -13,6 +13,7 @@ The files are:
|
||||
This file is JupyterHub's REST API schema. Both a version and the RBAC
|
||||
scopes descriptions are updated in it.
|
||||
"""
|
||||
|
||||
import os
|
||||
from collections import defaultdict
|
||||
from pathlib import Path
|
||||
|
@@ -1,4 +1,9 @@
|
||||
(RBAC)=
|
||||
<!---
|
||||
RBAC docs are part of the Explanation section of the JupyterHub documentation.
|
||||
As a result, this index file is referenced in the toctree within the explanation/index.md file.
|
||||
--->
|
||||
|
||||
(rbac)=
|
||||
|
||||
# JupyterHub RBAC
|
||||
|
||||
|
@@ -1,8 +1,10 @@
|
||||
(jupyterhub-scopes)=
|
||||
|
||||
# Scopes in JupyterHub
|
||||
|
||||
A scope has a syntax-based design that reveals which resources it provides access to. Resources are objects with a type, associated data, relationships to other resources, and a set of methods that operate on them (see [RESTful API](https://restful-api-design.readthedocs.io/en/latest/resources.html) documentation for more information).
|
||||
|
||||
`<resource>` in the RBAC scope design refers to the resource name in the [JupyterHub's API](../reference/rest-api.rst) endpoints in most cases. For instance, `<resource>` equal to `users` corresponds to JupyterHub's API endpoints beginning with _/users_.
|
||||
`<resource>` in the RBAC scope design refers to the resource name in the [JupyterHub's API](jupyterhub-rest-API) endpoints in most cases. For instance, `<resource>` equal to `users` corresponds to JupyterHub's API endpoints beginning with _/users_.
|
||||
|
||||
(scope-conventions-target)=
|
||||
|
||||
@@ -176,6 +178,57 @@ Note that only the {ref}`horizontal filtering <horizontal-filtering-target>` can
|
||||
Metascopes `self` and `all`, `<resource>`, `<resource>:<subresource>`, `read:<resource>`, `admin:<resource>`, and `access:<resource>` scopes are predefined and cannot be changed otherwise.
|
||||
```
|
||||
|
||||
(access-scopes)=
|
||||
|
||||
### Access scopes
|
||||
|
||||
An **access scope** is used to govern _access_ to a JupyterHub service or a user's single-user server.
|
||||
This means making API requests, or visiting via a browser using OAuth.
|
||||
Without the appropriate access scope, a user or token should not be permitted to make requests of the service.
|
||||
|
||||
When you attempt to access a service or server authenticated with JupyterHub, it will begin the [oauth flow](jupyterhub-oauth) for issuing a token that can be used to access the service.
|
||||
If the user does not have the access scope for the relevant service or server, JupyterHub will not permit the oauth process to complete.
|
||||
If oauth completes, the token will have at least the access scope for the service.
|
||||
For minimal permissions, this is the _only_ scope granted to tokens issued during oauth by default,
|
||||
but can be expanded via {attr}`.Spawner.oauth_client_allowed_scopes` or a service's [`oauth_client_allowed_scopes`](service-credentials) configuration.
|
||||
|
||||
:::{seealso}
|
||||
[Further explanation of OAuth in JupyterHub](jupyterhub-oauth)
|
||||
:::
|
||||
|
||||
If a given service or single-user server can be governed by a single boolean "yes, you can use this service" or "no, you can't," or limiting via other existing scopes, access scopes are enough to manage access to the service.
|
||||
But you can also further control granular access to servers or services with [custom scopes](custom-scopes), to limit access to particular APIs within the service, e.g. read-only access.
|
||||
|
||||
#### Example access scopes
|
||||
|
||||
Some example access scopes for services:
|
||||
|
||||
access:services
|
||||
: access to all services
|
||||
|
||||
access:services!service=somename
|
||||
: access to the service named `somename`
|
||||
|
||||
and for user servers:
|
||||
|
||||
access:servers
|
||||
: access to all user servers
|
||||
|
||||
access:servers!user
|
||||
: access to all of a user's _own_ servers (never in _resolved_ scopes, but may be used in configuration)
|
||||
|
||||
access:servers!user=name
|
||||
: access to all of `name`'s servers
|
||||
|
||||
access:servers!group=groupname
|
||||
: access to all servers owned by a user in the group `groupname`
|
||||
|
||||
access:servers!server
|
||||
: access to only the issuing server (only relevant when applied to oauth tokens associated with a particular server, e.g. via the {attr}`Spawner.oauth_client_allowed_scopes` configuration.
|
||||
|
||||
access:servers!server=username/
|
||||
: access to only `username`'s _default_ server.
|
||||
|
||||
(custom-scopes)=
|
||||
|
||||
### Custom scopes
|
||||
@@ -296,8 +349,24 @@ class MyHandler(HubOAuthenticated, BaseHandler):
|
||||
Existing scope filters (`!user=`, etc.) may be applied to custom scopes.
|
||||
Custom scope _filters_ are NOT supported.
|
||||
|
||||
:::{warning}
|
||||
JupyterHub allows you to define custom scopes,
|
||||
but it does not enforce that your services apply them.
|
||||
|
||||
For example, if you enable read-only access to servers via custom JupyterHub
|
||||
(as seen in the `read-only` example),
|
||||
it is the administrator's responsibility to enforce that they are applied.
|
||||
If you allow users to launch servers without that custom Authorizer,
|
||||
read-only permissions will not be enforced, and the default behavior of unrestricted access via the `access:servers` scope will be applied.
|
||||
:::
|
||||
|
||||
### Scopes and APIs
|
||||
|
||||
The scopes are also listed in the [](../reference/rest-api.rst) documentation. Each API endpoint has a list of scopes which can be used to access the API; if no scopes are listed, the API is not authenticated and can be accessed without any permissions (i.e., no scopes).
|
||||
The scopes are also listed in the [](jupyterhub-rest-API) documentation.
|
||||
Each API endpoint has a list of scopes which can be used to access the API;
|
||||
if no scopes are listed, the API is not authenticated and can be accessed without any permissions (i.e., no scopes).
|
||||
|
||||
Listed scopes by each API endpoint reflect the "lowest" permissions required to gain any access to the corresponding API. For example, posting user's activity (_POST /users/:name/activity_) needs `users:activity` scope. If scope `users` is passed during the request, the access will be granted as the required scope is a subscope of the `users` scope. If, on the other hand, `read:users:activity` scope is passed, the access will be denied.
|
||||
Listed scopes by each API endpoint reflect the "lowest" permissions required to gain any access to the corresponding API.
|
||||
For example, posting user's activity (_POST /users/:name/activity_) needs `users:activity` scope.
|
||||
If scope `users` is held by the request, the access will be granted as the required scope is a subscope of the `users` scope.
|
||||
If, on the other hand, `read:users:activity` scope is the only scope held, the request will be denied.
|
||||
|