Comments (6)
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.
@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.
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.
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.
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.
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)
- Add an S3 key/value storage provider interface HOT 3
- Added flexibility to Spin allowed outbound hosts
- inconsistencies when making outbound http requests HOT 1
- Custom trigger with other WASI worlds requires trait implementation for `spin_core::Data<T>` HOT 2
- SQLITE error after update from 2.5.1 to 2.6.0 HOT 3
- spin can not login docker private registry while docker login success HOT 5
- Follow OCI container image annotation standards when generating containers HOT 2
- Generate and sign SBOM through spin HOT 5
- Maintain a CHANGELOG.md file? HOT 2
- Spin (Re)Factors tracking issue
- Add native support for Golang, Python, and JavaScript Azure SDKs HOT 3
- Add native support for Golang and Python AWS SDKs
- Registry metadata support in application manifest HOT 3
- add MAINTAINERS.md file to each repository in Spin project HOT 1
- `spin update` An easier way to update to latest spin version HOT 1
- Endless re-compile in `spin watch` for Spin Apps that consist of multiple components HOT 1
- Hide old plugin versions in `spin plugins list`
- Spin-telemetry: consider eliminating the use of `set_global_default` HOT 1
- inconsistent preopened dirs between wasmtime and spin HOT 8
- Abstract pg client type in factor-outbound-pg
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spin.