Skip to content
New issue

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

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

Already on GitHub? # to your account

Initializing new applications #16

Open
radu-matei opened this issue Jan 26, 2022 · 8 comments
Open

Initializing new applications #16

radu-matei opened this issue Jan 26, 2022 · 8 comments

Comments

@radu-matei
Copy link
Member

Currently, Spin has no concept of "initializing" a new application without using a template (re #15).

Is there a need for a spin init command? What would it do?

@radu-matei radu-matei added this to the v0.1.0 milestone Feb 7, 2022
@radu-matei radu-matei added the P1 label Feb 7, 2022
@radu-matei radu-matei removed this from the v0.1.0 milestone Mar 23, 2022
@kate-goldenring kate-goldenring moved this to 🆕 Triage Needed in Spin Triage Aug 16, 2022
@kate-goldenring kate-goldenring moved this from 🆕 Triage Needed to 📋 Investigating in Spin Triage Aug 24, 2022
@mikkelhegn
Copy link
Member

I can only see two reasons:

  1. Do not need source, but will just reference a pre-built .wasm module for components.
  2. A very opinionated directory layout is preferred.

For 1. I believe the feature to re-use components with a URL reference is the best option to promote. We could have a template supporting this scenario, where the template would require the URL and Digest as part of the template creation flow.

For 2. The only thing we coudl do was to create a spin.toml file with no components (a few lines). This could also be a template, e.g., empty app.

@itowlson
Copy link
Contributor

FWIW there is a http-empty template, which is a spin.toml with no components, but it does set the application trigger to HTTP.

@michelleN
Copy link
Member

@radu-matei What is the use case you're targeting for initializing a new application? What kind of workflow are you envisioning?

@michelleN
Copy link
Member

Thinking about this more, I would use this now if spin init was just creating a spin.toml file in the current directory.

@itowlson
Copy link
Contributor

Additional context: #1525 (comment)

@rylev rylev moved this from 🆕 New to Nice to have in Spin 2.0 Oct 24, 2023
@michelleN
Copy link
Member

Considering we have an --init flag on spin new now, do we still want to have a new top level command for 2.0? Should we try out spin new --init for a while and come back to this post 2.0?

@itowlson
Copy link
Contributor

itowlson commented Nov 2, 2023

At this stage I would be strongly in favour of not attempting this for 2.0. With Manifest 2, it becomes a lot more practical than it was with Manifest 1 though, so getting rid of what is now a slightly artificial http-empty template seems like a good plan!

@calebschoepp
Copy link
Collaborator

Is this still something we want @radu-matei @michelleN? I happened across this issue and it feels like possibly this use case is no longer valid and we could close this issue.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
Status: 📋 Investigating / Open for Comment
Status: Nice to have
Development

No branches or pull requests

6 participants