-
Notifications
You must be signed in to change notification settings - Fork 439
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Make location of config.json file configurable using environment variables (#350) * Make location of config.json file configurable using environment variables * Update minor version to 0.11.3 * Fix column drop issue when first row has missing value (#353) * Remove extra line * initial fix of dropping columns * add unit tests * revert sql query test change * revert sql query test change 2 * bump versions * move outside if * Adding a working Docker setup for developing sparkmagic (#361) * Adding a working Docker setup for developing sparkmagic It includes the Jupyter notebook as well as the Livy+Spark endpoint. Documentation is in the README * Pre-configure the ~/.sparkmagic/config.json Now you can just launch a PySpark wrapper kernel and have it work out of the box. * Add R to Livy container Also added an R section to example_config.json to make it work out of the box - and I think it's just a good thing to have it anyway, otherwise how would users ever know it was meant to be there? * Add more detail to the README container section * Add dev_mode build-arg. Disabled by default. When enabled, builds the container using your local copy of sparkmagic, so that you can test your development changes inside the container. * Adding missing kernels Was missing Scala and Python2. Confirmed that Python2 and Python3 are indeed separate environments on the spark container. * Kerberos authentication support (#355) * Enabled kerberos authentication on sparkmagic and updated test cases. * Enabled hide and show username/password based on auth_type. * Updated as per comments. * Updated documentation for kerberos support * Added test cases to test backward compatibility of auth in handlers * Update README.md Change layout and add build status * Bump version to 0.12.0 (#365) * Remove extra line * bump version * Optional coerce (#367) * Remove extra line * added optional configuration to have optional coercion * fix circular dependency between conf and utils * add gcc installation for dev build * fix parsing bug for coerce value * fix parsing bug for coerce value 2 * Automatically configure wrapper-kernel endpoints in widget (#362) * Add pre-configured endpoints to endpoint widget automatically * Fix crash on partially-defined kernel configurations * Use LANGS_SUPPORTED constant to get list of possible kernel config sections * Rename is_default attr to implicitly_added * Adding blank line between imports and class declaration * Log failure to connect to implicitly-defined endpoints * Adding comment explaining implicitly_added * Pass auth parameter through * Fix hash and auth to include auth parameter (#370) * Fix hash and auth to include auth parameter * fix endpoint validation * remove unecessary commit * Ability to add custom headers to HTTP calls (#371) * Abiulity to add custom headers to rest call * Fix import * Ad basic conf test * Fix tests * Add test * Fix tests * Fix indent * Addres review comments * Add custom headers to example config
- Loading branch information
Showing
37 changed files
with
678 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
FROM jupyter/base-notebook:d0b2d159cc6c | ||
|
||
ARG dev_mode=false | ||
|
||
USER root | ||
|
||
# This is needed because requests-kerberos fails to install on debian due to missing linux headers | ||
RUN conda install requests-kerberos -y | ||
|
||
USER $NB_USER | ||
|
||
# Install sparkmagic - if DEV_MODE is set, use the one in the host directory. | ||
# Otherwise, just install from pip. | ||
COPY hdijupyterutils hdijupyterutils/ | ||
COPY autovizwidget autovizwidget/ | ||
COPY sparkmagic sparkmagic/ | ||
RUN if [ "$dev_mode" = "true" ]; then \ | ||
cd hdijupyterutils && pip install . && cd ../ && \ | ||
cd autovizwidget && pip install . && cd ../ && \ | ||
cd sparkmagic && pip install . && cd ../ ; \ | ||
else pip install sparkmagic ; fi | ||
|
||
RUN mkdir /home/$NB_USER/.sparkmagic | ||
COPY sparkmagic/example_config.json /home/$NB_USER/.sparkmagic/config.json | ||
RUN sed -i 's/localhost/spark/g' /home/$NB_USER/.sparkmagic/config.json | ||
RUN jupyter nbextension enable --py --sys-prefix widgetsnbextension | ||
RUN jupyter-kernelspec install --user $(pip show sparkmagic | grep Location | cut -d" " -f2)/sparkmagic/kernels/sparkkernel | ||
RUN jupyter-kernelspec install --user $(pip show sparkmagic | grep Location | cut -d" " -f2)/sparkmagic/kernels/pysparkkernel | ||
RUN jupyter-kernelspec install --user $(pip show sparkmagic | grep Location | cut -d" " -f2)/sparkmagic/kernels/pyspark3kernel | ||
RUN jupyter-kernelspec install --user $(pip show sparkmagic | grep Location | cut -d" " -f2)/sparkmagic/kernels/sparkrkernel | ||
RUN jupyter serverextension enable --py sparkmagic | ||
|
||
USER root | ||
RUN chown $NB_USER /home/$NB_USER/.sparkmagic/config.json | ||
RUN rm -rf hdijupyterutils/ autovizwidget/ sparkmagic/ | ||
USER $NB_USER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
FROM gettyimages/spark:2.1.0-hadoop-2.7 | ||
|
||
RUN apt-get update && apt-get install -yq --no-install-recommends --force-yes \ | ||
git \ | ||
openjdk-7-jdk \ | ||
maven \ | ||
python2.7 \ | ||
python3.4 \ | ||
r-base \ | ||
r-base-core && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
ENV LIVY_BUILD_VERSION livy-server-0.3.0 | ||
ENV LIVY_APP_PATH /apps/$LIVY_BUILD_VERSION | ||
ENV LIVY_BUILD_PATH /apps/build/livy | ||
ENV PYSPARK_PYTHON python2.7 | ||
ENV PYSPARK3_PYTHON python3.4 | ||
|
||
RUN mkdir -p /apps/build && \ | ||
cd /apps/build && \ | ||
git clone https://github.com/cloudera/livy.git && \ | ||
cd $LIVY_BUILD_PATH && \ | ||
git checkout v0.3.0 && \ | ||
mvn -DskipTests -Dspark.version=$SPARK_VERSION clean package && \ | ||
ls -al $LIVY_BUILD_PATH && ls -al $LIVY_BUILD_PATH/assembly && ls -al $LIVY_BUILD_PATH/assembly/target && \ | ||
unzip $LIVY_BUILD_PATH/assembly/target/$LIVY_BUILD_VERSION.zip -d /apps && \ | ||
rm -rf $LIVY_BUILD_PATH && \ | ||
mkdir -p $LIVY_APP_PATH/upload && \ | ||
mkdir -p $LIVY_APP_PATH/logs | ||
|
||
|
||
EXPOSE 8998 | ||
|
||
CMD ["/apps/livy-server-0.3.0/bin/livy-server"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '0.11.4' | ||
__version__ = '0.12.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
version: "3" | ||
services: | ||
spark: | ||
image: jupyter/sparkmagic-livy | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.spark | ||
hostname: spark | ||
ports: | ||
- "8998:8998" | ||
jupyter: | ||
image: jupyter/sparkmagic | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.jupyter | ||
args: | ||
dev_mode: "false" | ||
links: | ||
- spark | ||
ports: | ||
- "8888:8888" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '0.11.4' | ||
__version__ = '0.12.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.