-
Notifications
You must be signed in to change notification settings - Fork 13
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
Packaging end-game. #27
Comments
I think conda and containers are the simplest. I createf a conda recipe for cylc before. Without components, but I think it had gtk. Will search for it tomorrow. |
Couldn't find it, but I remember doing it while working on Cylc packaging issues. This probably needs to be done after the GraphQL work is merged. We can use wheel packages (e.g. tensorflow uses a wheel package). But if we pointed to a branch in GitHub, for instance, the build command would fail with:
As conda won't download setuptools dependencies automatically. Instead we need to define which dependencies we want in conda - again. e.g. bokeh has everything in a single repo (which makes it easier to write a conda recipe, with other downsides), and its conda recipe calls a function to load data from setup.py. To avoid re-writing all dependencies there. This is much harder in our case as we have multiple repositories. There is a general recommendation to upload individual packages to conda, instead of using pip. And then just adding the channel used to upload them, and add each project as a requirement.
So we would end up having to upload Some quick draft of a possible reference work for myself or whoever works on this issue: https://github.com/kinow/conda-recipes/tree/master In this draft, the And I believe containers will be easier than Conda or RPM's. NB running Bruno |
For the Cylc UI I think we can use GitHub releases instead of NPM. e.g. https://github.com/kinow/cylc-ui/releases/tag/0.6-special When creating a release in GitHub you can include binary files. This way our tag in GitHub would include both source code and the result of The issue I have with NPM is that I haven't seen any web application deployed to NPM, only libraries. A quick search and found at least one SO about it. And if Cylc UI was available in NPM, we - or other users - could run With this, Python dependencies go to PYPI. Any JS/TS component we may develop can go to NPM. Our UI goes to GitHub releases. And solutions like Conda (or Docker, Terraform, Ansible, etc) can be used to orchestrate the setup process. |
Sounds good to me. |
I had started some work on conda recipes while working on The recipes are still work-in-progress. The main recipe is
Doesn't look too complicated. The main issue that I have now is that as we cannot use Which means we need to have the dependencies that we need - in this case, cylc-flow, cylc-uiserver, etc, our stuff - published not only to PYPI, but to Anaconda Cloud as well. I've published a few to my channel today: https://anaconda.org/kinow/repo Will finish uploading the remaining packages until Monday I think. Then the next step will be to do a |
Not too sure what to do about Meaning that running For now I think the recipe will install everything, but the configuration file will be an extra and manual step. |
Your Conda recipes are looking good. Do you want to move them to live under the Do we need a simple wrapper for Do we intend to have (our instance of) JupyterHub serve anything else other than Cylc UIS? |
I wasn't sure if we would keep it under an existing repository in our organisation, or create a new one. My guess is we will need a new one, as it involves multiple projects. If others think this looks to be going in the right direction, +1 from me for a new repo under cylc/ (not sure about name though, I went with cylc-conda for lack of creativity + laziness). One question for later would be, how to maintain these recipes. I'm reverse-engineering them from PYPI. Conda doesn't reverse engineer
Could be. Maybe an alias like
I don't think so. That's doable I believe. The only scenario where a user could come with such a request, I think, is if they already have JupyterHub in their organisation, and for some reason want to re-use the same instance, but a bit far-fetched I guess. |
That's good. It gives us more freedom to wrap/alias/etc if we are only going to serve Cylc UIS under our own instance of JupyterHub. |
It worked! 🎉 Once installed in my conda environment, the commands The location for Cylc UI is the same as @hjoliver if you have time next week for a quick VC, I should be able to send you the list of commands (less than a handful I think?) to create a Conda env and try to install it from my channel. If that works, the only pending issue would be the Cheers (*): I messed up isodatetime, and created a package for the old module 😭 so will have to re-build the package next week and re-build other packages that depend on it and so it goes (basically, re-do everything) |
I tried The reason is that
@matthewrmshin I think wheel is preferable, as this avoids running the setup/build/test etc on the user environment
Having both, however, I think would be even better, as it gives users the possibility to use the sources if necessary - to generate Conda meta files automatically for example, but there may be other cases. I believe
So I think it would be good if we could always release to PYPI with wheel + sources, as you did with |
It worked, but I cheated by passing the spawner and other configuration settings via the command line (just so I didn't have to worry about Testing instructions at https://github.com/kinow/cylc-conda#testing. If anyone with Anaconda Python 3 could test it, we should be able to at least confirm it works. Then next steps would be
Cheers |
Not sure why we have missed the source dist for metomi-isodatetime. Now added. Looking at JupyterHub's recipe in Anaconda Cloud... It simply points back to Conda Forge. Not sure whether we need to do the same or not. |
Yes anytime (if this is still relevant?) Do you want to go ahead and create the new repo? (cylc-packaging, or cylc-conda? ... could it potentially be used for multiple packaging methods in future, e.g. containers, or does it need to be conda-specific?) |
See also: #39 |
It probably is. It worked on my machine, but nobody besides myself has tested it :) I think it should work. And the solution I found for Cylc 8 with Conda, was to use everything as a Conda package, except Cylc UI... Cylc UI is the "source" of the Cylc 8 Conda package... So I just wanted to go over this with somebody else that was interested in packaging to see if everything makes sense.
Sure. I hadn't thought about keeping other than Conda recipes in the repository. No strong opinion on this, what do you think would work best here? I think triaging issues might be simple for this new repo, and we probably won't have milestones as this is a multi-project repository anyway. |
Well remembered! 👍 |
I forgot we already have |
Almost forgot it, sorry. Done https://github.com/cylc/cylc-conda. It might need that permission fix @hjoliver , so that others can assign tickets, etc. |
Done |
update 24 September 2019We now have:
Conda will probably be our main vector for release distribution TODO
|
Just finished reading about Conda Pack, and it's really useful. I think we can give both options, and an internal conda repo, as alternatives when there is no Internet available.
|
I think so. Or manually as they do in the HPC with some modules like Probably having a standard way, and adopting a single solution (probably Conda?) would make things simpler to manage and supports users for site admins. Unless a) they are able to use the web UI for that, or b) they use something like
I missed this one before creating cylc/cylc-flow#3410, sorry, and thanks for pointing it out. Once we have an environment with multiple versions of Cylc, it might be helpful if the environments are named with some sort of pattern that is easy to understand, like If using Conda, users should be able to fire a workflow without activating an environment too, by simply running:
Not sure how to do that for For containers, it's possible for users to create aliases that execute commands against a specific container or image, in which case the wrapper would be redundant I think.
I think it depends on the site configuration. If installing via Conda, we can investigate what can be further done in the recipe to customize the environment (I think we can really only alter anything after the environment has been activated). We can't do much with Otherwise it will be up to site admins to create the extra configuration layer post Cylc installation. Using tools like shell, ansible, puppet, containers, AWS tools, terraform, etc. |
Even if Plus on job hosts, where the UI is not needed, The more I think about this, the more I like the wrapper. It is simple and generic. So long as admins install cylc versions side-by-side in some sensible pattern, and each version is only installed in one place, the site wrapper could easily be made to activate the right environment for the right version. Then it should just work, and normal users don't need to know that cylc is in a virtual environment or where it is installed. If there is a way to make it "just work" for multiple cylc versions without even needing to modify a wrapper script, then that would be even better of course - but I'm not seeing it yet. And the wrapper is pretty simple. (I guess this is quite an unusual or even cylc-specific requirement: a program that submits detached jobs - even on remote hosts - that have to invoke the same program again, at the same version). |
@hjoliver should we close this issue and maybe start new issues for things like installation to environments without internet, supporting multiple cylc version, etc? Even though I think we are pretty settled on using Conda for now when Internet is available, and also for multiple versions of Cylc and/or Python. |
Yes we should. Let me just read through above before creating the new issues though... |
(UPDATE: will close this and create new issues after the 8.0b0 meta-package release) |
Superseded by #130 |
For cylc-8, the cylc-flow workflow service can now be installed as a Python package using
pip
(library plus CLI scripts).In due course we need to consider, test, and document how to install cylc-8 (all components) by other packaging systems too (noting that
pip
is only for Python packages):yum
,apt
, ...The text was updated successfully, but these errors were encountered: