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

As a user, I need guidance on how to add devfiles to existing apps (odo init --dry-run -o yaml) #4435

Open
3 tasks
ryanj opened this issue Feb 15, 2021 · 6 comments
Labels
kind/user-story An issue of user-story kind lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. needs-triage Indicates an issue or PR lacks a `triage/*` and requires one.

Comments

@ryanj
Copy link

ryanj commented Feb 15, 2021

/kind user-story

User Story

As a developer and/or team lead, I want to make it easier for team members to get started with devfiles by adding a valid devfile.yaml to any existing repo.

Acceptance Criteria

  • Running odo init nodejs frontend --dry-run -o yaml should skip creation of the frontend component, AND print a fresh devfile to standard out
  • Running odo init nodejs frontend --dry-run -o yaml > devfile.yaml should bypass creation of the frontend component, and write a new devfile.yaml file to disk
  • The resulting devfile.yaml (when added to my repo folder), should allow me to create a new frontend component by running odo create frontend

Links

  • Feature Request:
  • Related issue:

/kind user-story

@openshift-ci-robot openshift-ci-robot added the kind/user-story An issue of user-story kind label Feb 15, 2021
@dharmit
Copy link
Member

dharmit commented Feb 16, 2021

@ryanj thanks for describing the requirements/criteria so clearly.

I think what you're looking for should be addressed to a good extent when #4436 gets merged. That PR is about not requiring cluster access to create a component. What it will do is only create devfile.yaml in your pwd. The creation of a component on the k8s/ocp cluster happens when the user runs odo push.

@ryanj
Copy link
Author

ryanj commented Feb 17, 2021

Thanks @dharmit

I'll see if I can test the new build

I forgot to mention that kubectl and oc both avoid making any other writes when the --dry-run flag is used. For odo, this flag would likely bypass creation or updates for devfile.yaml, config.yaml, env.yaml, .gitignore, or any files under .odo/.

The flag is designed to provide a repeatable, no-op simulation that only writes to the standard output.

Examples:

  • Add an example deployment yaml to a repo by redirecting standard out to a local file:
    kubectl create deploy metrics-k8s --image=quay.io/ryanj/metrics-k8s --dry-run -o yaml > deployment.yaml
  • Pipe standard out to standard input, so the "push" of changes is a separate step:
    kubectl create deploy metrics-k8s --image=quay.io/ryanj/metrics-k8s --dry-run -o yaml | kubectl create -f -

@dharmit
Copy link
Member

dharmit commented Feb 18, 2021

@kadel can you please share your thoughts on the --dry-run request here from @ryanj?

@kadel
Copy link
Member

kadel commented Feb 19, 2021

I like --dry-run, it makes sense and I can see it being quite useful.

@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 20, 2021
@kadel
Copy link
Member

kadel commented May 21, 2021 via email

@openshift-ci openshift-ci bot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 21, 2021
@ryanj ryanj changed the title As a user, I need guidance on how to add devfiles to existing apps (--dry-run -o yaml) As a user, I need guidance on how to add devfiles to existing apps (odo init --dry-run -o yaml) Aug 17, 2022
@rm3l rm3l added this to odo Project Oct 3, 2022
@rm3l rm3l moved this to To Do 📝 in odo Project Oct 3, 2022
@rm3l rm3l removed the status in odo Project Oct 3, 2022
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 lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. needs-triage Indicates an issue or PR lacks a `triage/*` and requires one.
Projects
Status: No status
Development

No branches or pull requests

5 participants