-
Notifications
You must be signed in to change notification settings - Fork 244
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
odo init #5297
Comments
So are we settling upon renaming what's currently called as a "component" to an "application"? Under
I'm asking because I don't see it clearly stated anywhere. |
I need to update it. We will still call it a "component" to avoid conflicts with "application" (group of components) or "project" (openshift's term for namespace). I'll update it |
Is there such an "active Devfile registry"? I cannot see how to select an active registry with |
That was bad wording, sorry. It should get languages from all registries that are configured. |
What is the logic behind having the devfile registry optional when |
If odo is configured with multiple registries it means that it should use all registries that are available. The order in which the registries are configured is significant. They are ordered by priority. If there are multiple registries in odo, it should simply pick the devfile from the first registry that has it. The |
description by @kadel:
Which functionality do you think we should add?
Odo needs a new clean command with a nice interactive mode to help users bootstrap new project.
Example
Proof of concept was implemented in https://github.com/kadel/odo-v3-prototype/blob/main/cmd/init.go
User prompts
"Select language:"
Shows list of all values of
metadata.language
fields from all devfiles in the current active Devfile registry. (every language only once)"Select project type:"
Select all possible values of
metadata.projectType
fields from all Devfiles that have selected language.If there is a Devfile that doesn't have
metadata.projectType
it should display itsmetadata.name
.If there there is more than one devfile with the same projectType the list item should include the
metadata.name
and registry name. For example if there are the same devfiles in multiple registriesor if there is the same projectType in mulitple Devfiles
"Which starter project do you want to use:"
At this point, the previous answers should be enough to uniquely select one Devfile from registry.
List of all starter projects defined in selected devfile.
"Enter component name:"
Name of the component.
This should be saved in the local
devfile.yaml
as a value formetadata.name
field.Flags
--name
- name of the component (required)--devfile
- name of the devfile in devfile registry (required if--devfile-path
is not defined)--registry
- name of the devfile registry (as configured inodo registry
). It can be used in combination with--devfile
, but not with--devfile-path
(optional)--starter
- name of the starter project (optional)--devfile-path
- path to a devfile. This is alternative to using devfile from Devfile registry. It can be local filesystem path or http(s) URL (required if--devfile
is not defined)If no flag is specified it should enter interactive mode.
If even a single optional flag is specified then run in non-interactive mode and requires all required flags.
command behavior and error states
odo init
command should be local devfile.yaml saved in the current directory, and starter project extracted in the current directory (if user picked one)odo init
in non-empty directory exits with errorodo registry
command. If there is multiple registries configured it should use all of them.The text was updated successfully, but these errors were encountered: