Coder Social home page Coder Social logo

Comments (6)

rgl avatar rgl commented on July 20, 2024 1

My ansible task is only taking care of ensuring that a given template is installed. The template dependencies, like j2wasm, are ensured by another ansible task. Both tasks are used in tandem (like in https://github.com/rgl/my-ubuntu-ansible-playbooks/blob/c0a0c22acd9185e167ef6e8593f80a8d0fea85f9/roles/spin/tasks/main.yml#L26-L29). But, indeed, this whole ansible thingy is still very rough, fragile and a big ball of mud. In fact, from my viewpoint, generally speaking, installing software, their dependencies, and upgrades, is a hell on its own, unfortunately. Hopefully, Web Assembly will fix that? But I digress. :-D

from spin.

itowlson avatar itowlson commented on July 20, 2024

@rgl Thanks for raising this. To help us address this, could you clarify the problem with having the "extra" templates, e.g.

  • It's clutter when choosing from the list
  • Disk space
  • Download time
  • Principled objection to having stuff on your computer that you don't use
  • etc.

The reason I ask is that we manage templates at the repo level and that's unlikely to change in the short term, so I'd like to understand the underlying goal / requirement. Thanks!

from spin.

rgl avatar rgl commented on July 20, 2024

I'm fiddling with ansible automatic installation of spin and related tools. For that, having a way to target specific tools seems more appropriate, as it would be a one to one mapping between the thing that appears when listing with the list command and the thing that we actually install with the install command. When that happens, I could just skip the installation when the list command says it is already installed. Does that make sense?

PS have a look at how I declare the install using an ansible task at https://github.com/rgl/my-ubuntu-ansible-playbooks/blob/c0a0c22acd9185e167ef6e8593f80a8d0fea85f9/roles/spin/tasks/main.yml#L35

PPS or this is the wrong approach, and what we should have is a proper Debian package.

PPPS spin like tools will have a tendency to install a lot of things that I particularly do not use, like support for programming languages that I do not use. As such, having separate templates would help reduce the clutter.

from spin.

itowlson avatar itowlson commented on July 20, 2024

Ooh, Ansible-based install sounds intriguing! However, I'm afraid your specific requirement still isn't quite clicking for me. It sounds like you hope to use spin templates list to identify which "packages" (sorry, don't know the Ansible term) are already installed - like, as a kind of "if I see that the http-go template is installed, then I know my whole Go package is installed, and I can skip re-installing it." Is that correct? If so, that inference seems risky, even with the "install a single template" change.

I appreciate what you're saying about the clutter - my first thought on seeing the issue was the visual clutter of the spin new interactive list. For interactive users the actual artefacts are hopefully out of sight out of mind, but I see how trying to reconcile different tasks adding supposedly disjoint stuff could dislike it. And yes fair point that install and list are not symmetric!

from spin.

rgl avatar rgl commented on July 20, 2024

Yes, that was my hope. But in the end, it's faulty because there is no obvious way to know the installed versions. If there was a way, why would it be risky? The listing code path should only list something when it's actually fully installed, right?

from spin.

itowlson avatar itowlson commented on July 20, 2024

My comment about 'risky' was that Spin templates don't guarantee the presence of tools. A user might install the Go template but not TinyGo. A user might install the JavaScript "template and tools" package but then uninstall js2wasm. I don't know if Ansible prevents that; it just seemed to me that it would be safer to check directly for the 'other stuff' than to rely on the presence or absence of a template. But I know nothing about Ansible so I may well be missing something obvious - if I seem obtuse then I apologise in advance!

And yeah, you make a great point about versions...

from spin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.