-
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
Documents steps for component creation #4982
Documents steps for component creation #4982
Conversation
✔️ Deploy Preview for odo-docusaurus-preview ready! 🔨 Explore the source changes: e15c6c3 🔍 Inspect the deploy log: https://app.netlify.com/sites/odo-docusaurus-preview/deploys/61128577150507000729e565 😎 Browse the preview: https://deploy-preview-4982--odo-docusaurus-preview.netlify.app |
✔️ Deploy Preview for odo-docusaurus-preview ready! 🔨 Explore the source changes: 6a4e77e 🔍 Inspect the deploy log: https://app.netlify.com/sites/odo-docusaurus-preview/deploys/611373c2ae6c6e0007618166 😎 Browse the preview: https://deploy-preview-4982--odo-docusaurus-preview.netlify.app |
This is to ensure relevant folks are pinged for reviews.
Changelog.md
Outdated
@@ -11,10 +11,11 @@ | |||
|
|||
### Tests | |||
|
|||
- runs nightly test of main branch of odo against [SBO master branch](https://github.com/redhat-developer/service-binding-operator) ([4942](https://github.com/openshift/odo/issues/4942)) | |||
- runs nightly test of main branch of odo against [SBO master branch](https://github.com/redhat-developer/service-binding-operator) ([#4942](https://github.com/openshift/odo/issues/4942)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would help if you elaborate beyond a "?".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this change? It is completely unrelated to this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Among the various ways described above, irrespective of how you created the component, the next step to create the resources for our component on the cluster would be to run `odo push` | ||
|
||
Note that first run of `odo push` could take a long time for the Spring Boot petclinic project. This is because of the dependencies being pulled by Spring Boot framework. Subsequent `odo push` runs shouldn't take longer when working on the same Kubernetes cluster. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spring Boot framework is not pulling any dependencies. Spring boot is one of the dependency.
petclinic uses maven to manage java dependencies
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have reworded it. PTAL.
Co-authored-by: Tomas Kral <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall the doc looks good to me. Good work :)
``` | ||
Now you will have a `devfile.yaml` in your current working directory. But odo is just not done asking you questions yet. | ||
4. Lastly, odo asks you if you would like to download a starter project. Since we already cloned the petclinic project, we answer in No by typing `n` and hitting the return key: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lastly, odo asks you if you would like to download a starter project.
Asking from a reader's perspective: What is a starter project?
I had this question a lot of times when I was getting started with odo; it might help to give starter project
an alias, say example project
in the brackets. Or better yet, add the hyperlink to the starter project section in the doc.
hitting the return key
Return key? Shouldn't it be the enter key?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Asking from a reader's perspective: What is a starter project?
I had this question a lot of times when I was getting started with odo; it might help to give
starter project
an alias, sayexample project
in the brackets. Or better yet, add the hyperlink to the starter project section in the doc.
Thanks for the catch! I had put a reference in the beginning of the doc. So I didn't put it here. But then I removed that statement and didn't remember to put it here. Updated. PTAL.
Return key? Shouldn't it be the enter key?
They are the same. I have observed "Return" used more widely in docs.
$ odo create |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would &&
work on windows/mac? If not, should we separate the 2 commands?
Also, it would help with copying the command if you separate odo create
in a different code block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would
&&
work on windows/mac? If not, should we separate the 2 commands?
I'm inclined to think it will work. @kadel can you help check if this works on Windows?
Also, it would help with copying the command if you separate
odo create
in a different code block.
I intentionally put it in the same block because the entire thing works just fine. But I'm on Fedora. Worth checking if it works on Windows. Mac, I would be surprised if it doesn't work.
## Push the component to Kubernetes | ||
|
||
odo follows a "create & push" workflow for almost all the commands. Meaning, most odo commands won't create resources on Kubernetes cluster unless you run `odo push` command. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
most odo commands won't create resources on Kubernetes cluster
I am still confused whether we should mention just the K8s cluster or OCP as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO k8s. OCP is for docs.openshift.com, not for upstream.
Among the various ways described above, irrespective of how you created the component, the next step to create the resources for our component on the cluster would be to run `odo push` | ||
|
||
Note that first run of `odo push` could take a long time for the Spring Boot petclinic project. This is because of the dependencies being pulled by maven for Spring Boot framework. Subsequent `odo push` runs shouldn't take longer when working on the same Kubernetes cluster. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Subsequent
odo push
runs shouldn't take longer when working on the same Kubernetes cluster.
Again, should it just be K8s or OCP as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Component](../getting-started/basics#component) is the most basic unit of operation for odo. And the way to create one is using `odo create` (short for `odo component create`) command. | ||
|
||
In simplest terms, when you "create" an odo component, you populate your current working directory with the file `devfile.yaml`. It is a manifest file that contains information about various resources (URL, Storage, Services, etc.) that correspond to your component, and will be created on the Kubernetes cluster when you execute `odo push` command. Most odo commands will first modify (add or remove configuration from) this file, and then subsequent `odo push` will create or delete the resources from the Kubernetes cluster. However, odo users are not expected to know how the `devfile.yaml` is organized; it is the odo commands that would create, update, or delete it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a manifest file that
I would rather prefer we say Devfile is a manifest file
than calling it It
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However, odo users are not expected to know how the
devfile.yaml
is organized; it is the odo commands that would create, update, or delete it.
What do you think about highlighting this line in a separate para perhaps or just highlighting it here? It would sort of take away the pressure of learning a new thing i.e. Devfile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Done both.
One more thing; I think you forgot to mention that a single directory can contain only one component. |
I forgot. But I'm not sure if adding that info in this doc makes sense. I'm more inclined to put it in Anyhow, I have added it in 6a4e77e. PTAL. @kadel PTAL. Let me know if you folks would like to word it differently. |
The doc lgtm to me for now, I don't see any immediate change we need to make to it. |
Why does it seem that way? I have mentioned that it is "not" expected to work well. I can change it to "not supported" instead of |
This lookgs good, but I think that there is one important piece missing. "How to access the application". |
That will be put up in doc for URL. At the moment, we have kept doc for env vars after the component creation doc. But I think it makes more sense to write doc for creating and accessing URL. |
Kudos, SonarCloud Quality Gate passed! |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kadel The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind documentation
What does this PR do / why we need it:
what: $subject
why: because it helps users new to odo
Which issue(s) this PR fixes:
Fixes part of #4895
PR acceptance criteria:
Unit test
Integration test
Documentation
Update changelog
I have read the test guidelines
How to test changes / Special notes to the reviewer: