You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Possibility to specify template on service creation #1470
The user should be able to create a service based upon a template like this: serverless create --name my-service --template aws-java-maven or this: serverless create --name my-service --template aws-node43.
Note: This also implies that Services are runtime bound (one service only supports one runtime)
The templates should live in our core framework (might be moved to somewhere else such as an own npm package later on).
The syntax for subfolder is PROVIDER-LANGUAGE-BUILDTOOL (where BUILDTOOL isn’t necessary for each language, but e.g. necessary for java).
Each template folder also includes serverless.yaml and serverless.env.yaml.
Aside: Templates might also be "installed" with the help of a gitUrl later on so that users can point the template option to their repository when they don't want to go with core ones.
The serverless command name might change to something different like serverless scaffold or serverless install.
Getting started with this. Here's what we settled with:
create command is serverless create --template aws-node where aws-node is the template name. It could be aws-python or any other template we might add later on based on runtime/provider or even boilerplates
drop the --name option. the service name by default will be the template name (ie. aws-node)
scaffolding will happen in the cwd. We won't need to create a new folder for the service and cd into it.
Document which templates are available
serverless create --help should print a list with all available templates
Activity
Resolve serverless#1470 - Possibility to specify template on service …
pmuens commentedon Jul 8, 2016
I think that this issue needs to be resolved until we can jump in the implementation of different programming languages / providers.
/cc @eahefnawy @flomotlik
flomotlik commentedon Jul 8, 2016
Agreed, Imho goal for next week.
pmuens commentedon Jul 8, 2016
Sounds good. Added it to the weekly goals.
@eahefnawy would you jump on this (as you already had an implementation in mind the other day) or should I take it?
flomotlik commentedon Jul 8, 2016
@pmuens Sorry I might have been unclear, imho we should implement this in the next sprint, so starting on Tuesday
pmuens commentedon Jul 10, 2016
Yep. Updated the weekly goals accordingly.
Notice that we should discuss #1517 before starting this one.
pmuens commentedon Jul 11, 2016
@eahefnawy the service now has a
runtimeproperty you should be aware of (see #1536).eahefnawy commentedon Jul 11, 2016
Getting started with this. Here's what we settled with:
serverless create --template aws-nodewhereaws-nodeis the template name. It could beaws-pythonor any other template we might add later on based on runtime/provider or even boilerplates--nameoption. the service name by default will be the template name (ie.aws-node)cdinto it.serverless create --helpshould print a list with all available templatesIn Progress in PR 1537...
pmuens commentedon Jul 12, 2016
Done with #1537