Skip to content
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 create: force s2i components and cleanup #3403

Closed
5 tasks
kadel opened this issue Jun 23, 2020 · 1 comment · Fixed by #3545
Closed
5 tasks

odo create: force s2i components and cleanup #3403

kadel opened this issue Jun 23, 2020 · 1 comment · Fixed by #3545
Assignees
Labels
kind/user-story An issue of user-story kind priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)). v2 Issue or PR that applies to the v2 of odo

Comments

@kadel
Copy link
Member

kadel commented Jun 23, 2020

/kind user-story

User Story

As an odo v2 user, I want to be able to create old s2i builder image (LocalConfig) components so I can work as with odo v1.

Acceptance Criteria

  • It should be possible to force odo create command to create LocalConfig component even if it has the component type with the same name as devfile component. For example, using a new flag (odo create java --s2i)
  • If there is a devfile component with a given name but no s2i component odo create --s2i should fail.
  • flags that are valid only for s2i components should have a note in help message ( odo create --help)
  • if the user provides a flag that is valid only s2i components without --s2i the command should error out
  • remove --cpu, --max-cpu,--max-memory,--memory,--max-memory,--min-memory flags to simplify odo create command. They were rarely used and the same can be achieved using odo config command after the component is created.

Example:

component creation

▶  odo preference set experimental true

▶ odo catalog list components
Odo OpenShift Components:
NAME              PROJECT       TAGS                        SUPPORTED
java              openshift     11,8,latest                 YES
nodejs            openshift     10-SCL,8,8-RHOAR,latest     YES

Odo Devfile Components:
NAME                 DESCRIPTION                            REGISTRY                   SUPPORTED
maven                Upstream Maven and OpenJDK 11          DefaultDevfileRegistry     YES
nodejs               Stack with NodeJS 10                   DefaultDevfileRegistry     YES

▶ odo create nodejs
# this currently creates nodejs devfile component, which is OK
# but there is no way to create nodejs OpenShift component

▶ odo create nodejs --s2i
# this new proposed flag would create nodejs OpenShift component 

example of help output

Flags:
      --app string                                       Application, defaults to active application
  -b, --binary string                                    (valid only with --s2i) Create a binary file component component using given artifact. Works only with Java components. File needs to be in the context directory.
      --context string                                   Use given context directory as a source for component settings
      --devfile string                                   Path to the user specify devfile
      --downloadSource string[="devfile-project-name"]   Download sample project from devfile.
      --env strings                                      (valid only with --s2i) Environmental variables for the component. For example --env VariableName=Value
  -g, --git string                                       (valid only with --s2i) Create a git component using this repository.
  -h, --help                                             Help for create
      --now                                              Push changes to the cluster immediately
  -p, --port strings                                     (valid only with --s2i) Ports to be used when the component is created (ex. 8080,8100/tcp,9100/udp)
      --project string                                   Project, defaults to active project
  -r, --ref string                                       (valid only with --s2i) Use a specific ref e.g. commit, branch or tag of the git repository
      --registry string                                  Create devfile component from specific registry

/kind user-story
/priority medium

@openshift-ci-robot openshift-ci-robot added the kind/user-story An issue of user-story kind label Jun 23, 2020
@kadel kadel changed the title odo create: force s2i components odo create: force s2i components and cleanup Jun 24, 2020
@girishramnani girishramnani added the triage/needs-information Indicates an issue needs more information in order to work on it. label Jun 24, 2020
@devang-gaur
Copy link
Contributor

devang-gaur commented Jun 25, 2020

For this issue, I'll have to understand to flags in the cobra cli framework are implemented. After this the business logic should not be that hard to implement.

flags that are valid only for s2i components should have a note in help message ( odo create --help)

^This one looks like a quick win.

remove --cpu, --max-cpu,--max-memory,--memory,--max-memory,--min-memory flags to simplify odo create command. They were rarely used and the same can be achieved using odo config command after the component is created.

^For this point, a separate PR can be created I think.

And ofcourse, the tests and docs will have to be added, modified and deleted (if applicable).

@girishramnani girishramnani added triage/ready priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)). and removed triage/needs-information Indicates an issue needs more information in order to work on it. labels Jun 25, 2020
openshift-merge-robot pushed a commit that referenced this issue Jul 31, 2020
…-min-cpu, --max-cpu flags from 'odo create' command (#3475)

* removed --cpu, --max-cpu,--max-memory,--memory,--max-memory,--min-memory flags to simplify odo create command

* add memory and cpu validation for 'config set' and 'push' commands

* Corrected test cases
openshift-merge-robot pushed a commit that referenced this issue Aug 6, 2020
* added --s2i flag for `odo create` command

* corrected error messages

* Corrected flag description and validation

* Modified a testcase for odo registry list
cdrage pushed a commit to cdrage/odo that referenced this issue Aug 7, 2020
…mand (redhat-developer#3545)

* added --s2i flag for `odo create` command

* corrected error messages

* Corrected flag description and validation

* Modified a testcase for odo registry list
@rm3l rm3l added the v2 Issue or PR that applies to the v2 of odo label Jun 18, 2023
@rm3l rm3l added this to odo Project Jun 18, 2023
@rm3l rm3l moved this to Done ✅ in odo Project Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/user-story An issue of user-story kind priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)). v2 Issue or PR that applies to the v2 of odo
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants