jupyter-on-openshift / jupyter-notebooks

OpenShift compatible S2I builder for basic notebook images.
Apache License 2.0
54 stars 111 forks source link

Failure of downloading oc client via assamble script won't result in an failed build. #22

Closed BlueCog closed 1 year ago

BlueCog commented 4 years ago

Hi GrahamDumpleton,

First off, many thanks for your provided code! We succeeded to deploy an running Jupyter Notebooks environment on OpenShift (3.11).

We like to share an issue we did encounter by deploying minimal-notebook.

Context:

The oc command line client for OpenShift cluster is downloaded in the assemble script (from line 58): https://github.com/jupyter-on-openshift/jupyter-notebooks/blob/5564af22692984a8fb4f6e76e24cc0d1361788bf/minimal-notebook/.s2i/bin/assemble#L58

We are operating in an closed down environment, so https://mirror.openshift.com is not available to download from.

Situation:

Even when https://mirror.openshift.com is not avaiable the curl command succeeds (so the build will also continue). This results in an non 'spawnable' minimal-notebook.

Workaround:

We temporarily fixed it by making the deployment code available on or iternal repository, changing the assemble script (the URL) and adding the oc binaries to our internal Nexus repository.

Fix:

Up to you off course but a solution for an closed down environtment would be by making the curl commands configurable by environment variables. And extra: by adding the --fail flag to curl (Fail silently (no output at all) on HTTP errors (H)). So the build will fail and the end user is informed of problems.

GrahamDumpleton commented 4 years ago

Why even try to build it yourself? Usually for a disconnected environment, you would use whatever sanctioned means you have to pull the pre-built images from the quay.io registry and get them into your own internal image registry. Then modify the templates etc to use the images from your own internal registry.

BlueCog commented 4 years ago

Why even try to build it yourself? Usually for a disconnected environment, you would use whatever sanctioned means you have to pull the pre-built images from the quay.io registry and get them into your own internal image registry. Then modify the templates etc to use the images from your own internal registry.

Thanks for the quick reply! We are building it ourself becasue basing it on RHEL and not the default CentOS images.

GrahamDumpleton commented 4 years ago

Just be aware that some Python packages used in data science may not work on RHEL as the required system packages aren't available for RHEL. It is quite likely that at some point in the future will only support using official Jupyter project notebook images, as RHEL/CentOS base images cause too many restrictions and aren't what most people want.

BlueCog commented 4 years ago

So far it seems to work without any problems on RHEL (required Python packages).

Do you agree on my points about the curl command in the assemble script?

BlueCog commented 1 year ago

Hey @GrahamDumpleton, hope youre doing well. We are for some time over to the https://z2jh.jupyter.org/ project. Still going strong on RHEL based image's and OpenShift (4.10)

Ill close this issue

Greets!