Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Conda-Store to QHub #967

Merged
merged 11 commits into from
Jan 18, 2022
Merged

Adding Conda-Store to QHub #967

merged 11 commits into from
Jan 18, 2022

Conversation

costrouc
Copy link
Member

@costrouc costrouc commented Dec 9, 2021

Changes:

This PR bring the new Conda-Store to QHub. In the process of adding Conda-Store we needed a database along with s3 storage. This requires adding the minio and postgres helm charts included in this PR.

Put an x in the boxes that apply

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds a feature)
  • Breaking change (fix or feature that would cause existing features to not work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • Other (please describe):

Testing

Requires testing

  • Yes
  • No

In case you checked yes, did you write tests?

  • Yes
  • No

@costrouc costrouc changed the title Adding Conda-Store to QHub [WIP] Adding Conda-Store to QHub Dec 9, 2021
@costrouc costrouc changed the title [WIP] Adding Conda-Store to QHub Adding Conda-Store to QHub Dec 22, 2021
@viniciusdc
Copy link
Contributor

Hello @costrouc, I will have a look and review this

Copy link
Contributor

@viniciusdc viniciusdc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is just one thing I could find and I noticed that you used, var.conda-store-image I couldn't spot its reference anywhere, and you seem to use that to retrieve the tag and name components from it

docs/source/dev_guide/minikube.md Show resolved Hide resolved
docs/source/installation/existing.md Show resolved Hide resolved
flake.lock Show resolved Hide resolved
flake.nix Show resolved Hide resolved
external-url = var.endpoint

{% if cookiecutter.certificate.type == "existing" %}
certificate-secret-name = "{{ cookiecutter.certificate.secret_name }}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will follow the same approach we did for clearml right? when using a provisioned certificate

@viniciusdc
Copy link
Contributor

Service Unavailable when deploying on GCP, hub is on CrashLoop caused by:

│ Loading extra config: jupyterhub_extra_config                                                                                                                                                                               │
│ [E 2022-01-05 13:45:16.825 JupyterHub app:2973]                                                                                                                                                                             │
│     Traceback (most recent call last):                                                                                                                                                                                      │
│       File "/opt/conda/lib/python3.7/site-packages/jupyterhub/app.py", line 2970, in launch_instance_async                                                                                                                  │
│         await self.initialize(argv)                                                                                                                                                                                         │
│       File "/opt/conda/lib/python3.7/site-packages/jupyterhub/app.py", line 2461, in initialize                                                                                                                             │
│         self.load_config_file(self.config_file)                                                                                                                                                                             │
│       File "/opt/conda/lib/python3.7/site-packages/traitlets/config/application.py", line 88, in inner                                                                                                                      │
│         return method(app, *args, **kwargs)                                                                                                                                                                                 │
│       File "/opt/conda/lib/python3.7/site-packages/traitlets/config/application.py", line 777, in load_config_file                                                                                                          │
│         raise_config_file_errors=self.raise_config_file_errors,                                                                                                                                                             │
│       File "/opt/conda/lib/python3.7/site-packages/traitlets/config/application.py", line 738, in _load_config_files                                                                                                        │
│         config = loader.load_config()                                                                                                                                                                                       │
│       File "/opt/conda/lib/python3.7/site-packages/traitlets/config/loader.py", line 614, in load_config                                                                                                                    │
│         self._read_file_as_dict()                                                                                                                                                                                           │
│       File "/opt/conda/lib/python3.7/site-packages/traitlets/config/loader.py", line 646, in _read_file_as_dict                                                                                                             │
│         exec(compile(f.read(), conf_filename, 'exec'), namespace, namespace)                                                                                                                                                │
│       File "/usr/local/etc/jupyterhub/jupyterhub_config.py", line 446, in <module>                                                                                                                                          │
│         exec(config_py)                                                                                                                                                                                                     │
│       File "<string>", line 28, in <module>                                                                                                                                                                                 │
│     ImportError: cannot import name 'theme_extra_handlers' from 'qhub_jupyterhub_theme' (/opt/conda/lib/python3.7/site-packages/qhub_jupyterhub_theme/__init__.py)

@danlester
Copy link
Contributor

Service Unavailable when deploying on GCP, hub is on CrashLoop caused by... qhub-jupyterhub-theme

This must be because you are using an older Docker image for hub. It needs to include qhub-jupyterhub-theme v0.3.3 as is specified on main here.

So you need to work out which tag of quansight/qhub-jupyterhub is needed to pick this up. In theory this is quansight/qhub-jupyterhub:fix-798 to pick up the images based on the PR. But it is possible that the PR needs to be rebased - the strange thing is that it has picked up the commit to jupyterhub_config.py.j2 that attempts import theme_extra_handlers from qhub_jupyterhub_theme but does not have the correct version built into the image. Or it's possible you just have an older tag left in your qhub-config.yaml that picks up an older Docker image.

@viniciusdc
Copy link
Contributor

Service Unavailable when deploying on GCP, hub is on CrashLoop caused by... qhub-jupyterhub-theme

This must be because you are using an older Docker image for hub. It needs to include qhub-jupyterhub-theme v0.3.3 as is specified on main here.

So you need to work out which tag of quansight/qhub-jupyterhub is needed to pick this up. In theory this is quansight/qhub-jupyterhub:fix-798 to pick up the images based on the PR. But it is possible that the PR needs to be rebased - the strange thing is that it has picked up the commit to jupyterhub_config.py.j2 that attempts import theme_extra_handlers from qhub_jupyterhub_theme but does not have the correct version built into the image. Or it's possible you just have an older tag left in your qhub-config.yaml that picks up an older Docker image.

That might be the case Dan, thanks for the pointer

@danlester danlester mentioned this pull request Jan 11, 2022
92 tasks
@viniciusdc
Copy link
Contributor

viniciusdc commented Jan 13, 2022

Hi @costrouc , I just tested the deployment for this PR it seems that there might be some changes with the Jupyterhub docker image as the following error showed up during deployment:

│ Loading /usr/local/etc/jupyterhub/secret/values.yaml
│ No config at /usr/local/etc/jupyterhub/existing-secret/values.yaml
│ Loading extra config: jupyterhub_extra_config 
│ [C 2022-01-13 17:15:39.728 JupyterHub application:90] Bad config encountered during initialization: 
The 'spawner_class' trait of <jupyterhub.app.JupyterHub object at 0x7fd9af233110> instance must be a type, but 
cdsdashboards.hubextension.spawners.variablekube.VariableKubeSpawner' could not be imported    

Using the main one instead resulted in any issues.

@viniciusdc
Copy link
Contributor

Hi @costrouc, by some reason the icons for some buttons are not showing up correctly
image

@viniciusdc
Copy link
Contributor

viniciusdc commented Jan 14, 2022

Just finished testing, all seems fine with conda-store. I will proceed to test the minio port changes, then will test on GCP as well to confirm. My only concern is within the issue with the main jupyterhub image..

ps. Also, not sure about this one, but there might be a duplicate constraint somewhere in the postsql config:
ERROR: duplicate key value violates unique constraint "_conda_package_uc"

* FEAT: Add additional port to handle Minio object storage

* Add missing vars

* Update minio entrypoint and disable tls

* Exclude traitlets config from pre-commit

* Update conda-store minio service eternal endpoint

Co-authored-by: viniciusdc <vinivdc2009@hotmail.com>
@costrouc costrouc merged commit b27a14f into main Jan 18, 2022
@costrouc costrouc deleted the fix-798 branch January 18, 2022 19:00
@dharhas
Copy link
Member

dharhas commented Jan 19, 2022

Per #987

minio is AGPLv3 which means might we can't include it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants