odo
odo copied to clipboard
As a user, I need guidance on how to add devfiles to existing apps (`odo init --dry-run -o yaml`)
/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 yamlshould skip creation of thefrontendcomponent, AND print a fresh devfile to standard out - [ ] Running
odo init nodejs frontend --dry-run -o yaml > devfile.yamlshould bypass creation of thefrontendcomponent, and write a newdevfile.yamlfile to disk - [ ] The resulting
devfile.yaml(when added to my repo folder), should allow me to create a newfrontendcomponent by runningodo create frontend
Links
- Feature Request:
- Related issue:
/kind user-story
@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.
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 -
@kadel can you please share your thoughts on the --dry-run request here from @ryanj?
I like --dry-run, it makes sense and I can see it being quite useful.
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
/remove-lifecycle stale /lifecycle frozen still valid
On Thu, 20 May 2021 at 21:37, OpenShift Bot @.***> wrote:
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
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/openshift/odo/issues/4435#issuecomment-845420234, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAN65W6XTV4MIYAMPPQVS3TOVQFRANCNFSM4XVKK3IQ .