-
Notifications
You must be signed in to change notification settings - Fork 924
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
IDEA: WASM build to deploy-to & manage different clouds without a separate Python server #2045
Comments
@SamuelMarks That sounds like an interesting and cool idea (I know there were / are many SaaS products which include functionality like that, including mist.io which is / used to be open source), but I'm not fully sure if it should directly be part of Libcloud core. To me it sounds like a perfect addon / app built on top of Libcloud. We don't want to get into secure credentials storage and in general this sounds like something which should be built on top of and not bundled with the core library. How did they used to say about Python stdlib modules - that's where packages go to die, granted this has changed and improved a bit over the years, but something like that should be a standalone and separate project so it's not tied to Libcloud release schedule, development process, etc. Of course, if there is anything we can do to make integration / compatibility with wasm runtimes easier, we are welcome to help and contributed are more than welcome :) |
@Kami For reference, here's the latest thing I'm working on https://verman.io (redoing the sidebar right now so mind the mess) E.g., 1-click and 2-click deploys of PostgreSQL To make it functional there are various available mechanisms. The basically undocumented one is where I think I'll end up; namely your A while back I did make these https://github.com/offscale?q=off&language=python#org-profile-repositories all of which are built atop Apache Libcloud and/or Fabric. They accept a simple JSON format and use it to do things like: create/delete {networks, firewalls, [e.g., EC2] instances}; and use Fabric to SSH in—with paramiko—to install & configure different things. FYI: My new version; though still open-source; is much more cross-platform and requires nothing to be installed to bootstrap, been based on You might've seen the recent JupyterLite. It's Jupyter Notebook but in the browser with nothing installed (just served locally or with, e.g., a CDN). Both Jupyter [https://jupyterlite.github.io/demo/lab/index.html] and numpy now have it on their homepages as a "quickly get started with [project]" What I'm thinking @Kami is a similar "quickly get started with Apache Libcloud" You would only need a teeny bit of JavaScript+HTML to prompt and store/load cloud auth secrets in Now with this new context and pitch; will you reconsider this proposal? 🤗 |
Thanks for the additional context. I didn't have time to dig in deeply, but the project looks interesting :) As far as the original idea goes - if I understand it correctly, it would be more like "repl in a browser" aka a way for people to try out and play with Libcloud? If that is the case, it could indeed be interesting and we could perhaps host it at https://try.libcloud.org or similar. In fact, I worked on a prototype for something like that many, many years ago. That was long before WASM so there was a server side component + client (browser + JavaScript), but securely sandboxing Python interpreter was anything but trivial so it has never seen wide use due to potential of abuse. And yes, if the secrets are stored locally (browser storage), I don't see a problem with it. If it would be anything more than that, my original comment still stands - it's not something which should be bundled with the core library, but built as an application on top of it which can be developed and live independently :) |
Great. No exactly— On my own site I might extend it to accept Now that it has your approval, what're the next steps? FWIW: Just starting to play around with it here https://verman.io/repl.html |
So my literally 10-year old solution for marshalling libcloud constructs into JSON is what I'm using https://github.com/offscale/offutils-strategy-register/blob/master/offutils_strategy_register/__init__.py#L97C1-L101C2 I've also moved the content to this page https://verman.io/multicloud.html as its name better defines its function. Will see how far I can get with CORS and everything else in the way. (here's the code ) But here's what I'm thinking:
Once this is working I might do something similar for Object Storage like S3. If CORS ends up being too much of a struggle to the point of impossibility without incorporating some crazy overlay network [e.g., webvm uses tailscale] then it might be easier—and possibly more user-friend—to wrap this up with tauri as a desktop web-app. What do you think of the plan? PS: As for the libcloud homepage, I suppose this should suffice: 0. Specify provider; 1. Set provider auth details; 2. Show Python REPL to user with libcloud already imported |
Feature Request
Aside from a basic web interface, the main thing this would need is a way of setting and storing secrets (like cloud provider auth keys).
As for official CPython support see: https://github.com/python/cpython/blob/main/Tools/wasm/README.md
Now there are plenty of unofficial implementations that don't have those same limitations, for example: cheerpx webvm; py2wasm; pyodide; spin+CPython official approach
Advantage:
The text was updated successfully, but these errors were encountered: