-
Notifications
You must be signed in to change notification settings - Fork 243
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
Adds documentation on Devfile file reference #3487
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Please NOTE: The file formatting in this PR will be reflected within the I do need help with regards to figuring out which parts are implemented and not implemented yet, see: https://github.com/openshift/odo/pull/3487/files#diff-cbdbdd6ef8f9eed70da67b2888a01b64R116 |
Document is best viewed in the markdown format: https://github.com/openshift/odo/blob/8da8401ae08f4a9b358dbe12c0855836b849323c/docs/file-reference/index.md Specifically, the reason for the |
docs/file-reference/index.md
Outdated
|
||
# Introduction | ||
|
||
> A full odo Devfile example using Spring Boot |
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.
Should we move this example to somewhere below? I think it flows better if we describe what odo and devfiles are first before we start giving out devfile example.
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.
Hi Elson, the example needs to remain as the first thing since this is consumed by https://github.com/slatedocs/slate
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.
Could you elaborate, @cdrage, please? How is this document supposed to be consumed?
docs/file-reference/index.md
Outdated
|
||
**odo** | ||
|
||
odo is a fast, iterative, and straightforward CLI tool for developers who write, build, and deploy applications on OpenShift. |
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.
We support both Kubernetes and OpenShfit.
docs/file-reference/index.md
Outdated
|
||
What is a devfile? | ||
|
||
A devfile is a portable file that describes your development environment. It allows for a portable developmental environment without the need of reconfiguration. |
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.
Consider to change "It allows for a portable developmental environment.. " to "It allows reproducing a portable developmental environment... "
docs/file-reference/index.md
Outdated
|
||
With a devfile you can describe: | ||
|
||
* The source code being used |
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.
Consider to remove since I think it is the same as the last item (project).
docs/file-reference/index.md
Outdated
With a devfile you can describe: | ||
|
||
* The source code being used | ||
* Development components such as IDE tools (VSCode) and application runtimes (Yarn / NPM) |
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.
Given that for odo usage, our focus is on the container components (we don't even use IDE tools info in odo), consider to change to something like "Development components such as container definition for build and application runtimes."
docs/file-reference/index.md
Outdated
| name | string | yes | Name of your endpoint | | ||
| targetPort | integer | yes | Port number that you are targeting | | ||
| configuration | [configurationObject](#configurationobject) | no | Configuration attributes regarding the port number and protocol(s) being used | | ||
| attributes | [attributesObject](#attributesobject) | no | UNKNOWN, TODO: FILL IN HERE! | |
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.
Attributes are optional map of free-form additional info.
Note: this applies to all attributes fields in all levels with a devfile, not specific to this one
| github | [githubObject](#githubobject) | Pull from GitHub | | ||
| zip | [zipObject](#zipobject) | Get from a zip location | | ||
|
||
## gitObject |
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.
Consider to make all these object titles to be consistent, e.g. "git Object" instead of "gitObject".
Note: this comment applies to all object section titles
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.
The reasoning for the camelCase is to fit with the other string
, integer
and boolean
listings of variable types.
docs/file-reference/index.md
Outdated
|
||
| Key | Type | Description | | ||
|------------|---------------------------|---------------------------| | ||
| execObject | [execObject](#execobject) | The CLI command to be ran | |
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.
The key should be "exec"
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.
Ah, you're right. Thanks
docs/file-reference/index.md
Outdated
| Key | Type | Required | Description | | ||
|-----------|---------|----------|--------------------------------------------------------------------------------| | ||
| kind | string | yes | Kind of group the command is part of. Options: `build`, `run`, `test`, `debug` | | ||
| isDefault | boolean | no | Identifies that it is the default command to be ran | |
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.
Add: Only one default command can be defined for each group.
| kind | string | yes | Kind of group the command is part of. Options: `build`, `run`, `test`, `debug` | | ||
| isDefault | boolean | no | Identifies that it is the default command to be ran | | ||
|
||
# Universal objects |
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.
attributes can be added to univerisal objects
docs/file-reference/index.md
Outdated
> Download the application | ||
|
||
```sh | ||
$ odo create nodejs --downloadSource |
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.
Should be --starter
now with #3425 merged
Thanks for reviewing @elsony I've addressed your requested changes! |
If you haven't used odo yet, we recommend going through our [Deploying a devfile using odo guide](https://odo.dev/docs/deploying-a-devfile-using-odo/). | ||
|
||
|
||
# Devfile Properties |
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.
Wouldn't be better to just link to official devfile reference? How are we going to keep this updated as devfile spec changes?
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.
Agreed, as it stands, this is more a devfile doc which should probably live under the devfile project as it doesn't really have much information pertaining to what can be done with odo and devfiles…
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.
@metacosm I do agree as well. I'm hoping we get this document upstream instead of the odo site, but unsure if we will be able to with time constraints regarding the alpha release of odo / Devfile v2.
Hey all, to preview this please visit: https://charliedrage.com/odo/file-reference/ |
docs/file-reference/index.md
Outdated
|
||
# Introduction | ||
|
||
> A full odo Devfile example using Spring Boot |
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.
Could you elaborate, @cdrage, please? How is this document supposed to be consumed?
isDefault: true | ||
``` | ||
|
||
> Download the application |
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.
That seems randomly put and completely unrelated to the perceived (at least by me) intent of the document…
docs/file-reference/index.md
Outdated
$ odo push | ||
``` | ||
|
||
**odo** |
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.
Why is this section needed?
docs/file-reference/index.md
Outdated
|
||
What is a devfile? | ||
|
||
A devfile is a portable file that describes your development environment. It allows reproducing a portable developmental environment without the need of reconfiguration. |
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.
Portable how? What kind of development environment?
docs/file-reference/index.md
Outdated
* A list of pre-defined commands that can be run | ||
* Projects to initially clone | ||
|
||
Odo takes this devfile and transforms it into a workspace of multiple containers running on OpenShift, Kubernetes or Docker. |
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's a workspace?
docs/file-reference/index.md
Outdated
|
||
Odo takes this devfile and transforms it into a workspace of multiple containers running on OpenShift, Kubernetes or Docker. | ||
|
||
Devfiles are YAML files with a defined schema. |
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 still be helpful to repeat it here because that's where the information is needed.
|
||
Devfiles are YAML files with a defined schema. | ||
|
||
## Unsupported features |
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 be better to start with supported features, in my opinion.
If you haven't used odo yet, we recommend going through our [Deploying a devfile using odo guide](https://odo.dev/docs/deploying-a-devfile-using-odo/). | ||
|
||
|
||
# Devfile Properties |
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.
Agreed, as it stands, this is more a devfile doc which should probably live under the devfile project as it doesn't really have much information pertaining to what can be done with odo and devfiles…
b1fd3bf
to
b383808
Compare
@cdrage: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Why all the force pushes? Why are the tests run? It all makes it very difficult to follow up on the review… 😢 |
Force of habit haha! Should of put in separate commits. Unfortunately tests are ran regardless even though it's only doc changes :( Did you also have a look at the website preview with regards how to consume the file? https://charliedrage.com/odo/file-reference/ |
Especially for docs, there really is no need to force push. This should only be reserved to cases where there is a conflict that needs to be fixed and, if possible, only after the review process is finished (though fixing the conflict might require a second pass).
You can specify that tests shouldn't run by adding
Yes, thank you. |
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.
Mostly naming suggestions.
**What type of PR is this?** > Uncomment only one ` /kind` line, and delete the rest. > For example, `> /kind bug` would simply become: `/kind bug` > Documentation changes: Please include [skip ci] in your commit message as well /kind documentation [skip ci] **What does does this PR do / why we need it**: This PR adds documentation regarding each section of Devfile and what we support / do not support **Which issue(s) this PR fixes**: N/A **How to test changes / Special notes to the reviewer**: N/A Signed-off-by: Charlie Drage <charlie@charliedrage.com>
I will have to merge this as-is for now in order to get documentation in time for alpha release. We can update / edit this at a later date / go through this with the docs team @boczkowska @Preeticp |
* Adds documentation on Devfile file reference (#3487) **What type of PR is this?** > Uncomment only one ` /kind` line, and delete the rest. > For example, `> /kind bug` would simply become: `/kind bug` > Documentation changes: Please include [skip ci] in your commit message as well /kind documentation [skip ci] **What does does this PR do / why we need it**: This PR adds documentation regarding each section of Devfile and what we support / do not support **Which issue(s) this PR fixes**: N/A **How to test changes / Special notes to the reviewer**: N/A Signed-off-by: Charlie Drage <charlie@charliedrage.com> * Update file reference documentation (#3675) **What type of PR is this?** > Uncomment only one ` /kind` line, and delete the rest. > For example, `> /kind bug` would simply become: `/kind bug` /kind documentation [skip ci] **What does does this PR do / why we need it**: Updates the file reference documentation to not have the introductory section and move unsupported features to the bottom. **Which issue(s) this PR fixes**: N/A **PR acceptance criteria**: N/A **How to test changes / Special notes to the reviewer**: N/A Signed-off-by: Charlie Drage <charlie@charliedrage.com> * make odo delete work on s2i components in experimental mode (#3649) * Fixes GetRunningPodNameByComponent for the CLI runners (#3666) * increase ResponseHeaderTimeout (#3674) * Make the file sync destination more consistent (#3662) * Make the file sync destination more consistent Signed-off-by: John Collier <John.J.Collier@ibm.com> * Update tests to use PROJECTS_ROOT Signed-off-by: John Collier <John.J.Collier@ibm.com> * Fix workdir in tests Signed-off-by: John Collier <John.J.Collier@ibm.com> * Remove more references to nodejs-starter Signed-off-by: John Collier <John.J.Collier@ibm.com> * Update more sample devfiles Signed-off-by: John Collier <John.J.Collier@ibm.com> * make odo catalog list components work outside of experimental mode (#3669) * make odo catalog list components work outside of experimental mode * moved the logic to cli * Ignore error while checking for imagestream support * rearranged the catalog list * Validate exec subcommands in a composite (#3658) * Validate exec subcommands in composite * Add integration test * added --s2i flag for `odo create` command * corrected error messages * Corrected flag description and validation * added --s2i flag for `odo create` command * Make Devfile the default deployment mechanism for odo **What type of PR is this?** > Uncomment only one ` /kind` line, and delete the rest. > For example, `> /kind bug` would simply become: `/kind bug` /kind feature **What does does this PR do / why we need it**: Makes Devfile the default deployment mechanism, removing S2I in favour of Devfile deployment. **Which issue(s) this PR fixes**: Closes #3550 **How to test changes / Special notes to the reviewer**: Run: ```sh odo preference set experimental false odo create --starter nodejs odo push ``` Co-authored-by: Girish Ramnani <girishramnani95@gmail.com> Co-authored-by: Mrinal Das <mrinald7@gmail.com> Co-authored-by: Tomas Kral <tkral@redhat.com> Co-authored-by: John Collier <John.J.Collier@ibm.com> Co-authored-by: Devang Gaur <devang.gaur.7@gmail.com>
What type of PR is this?
/kind documentation
[skip ci]
TO PREVIEW: Click on: https://charliedrage.com/odo/file-reference/
What does does this PR do / why we need it:
This PR adds documentation regarding each section of Devfile and what we
support / do not support
Which issue(s) this PR fixes:
N/A
How to test changes / Special notes to the reviewer:
N/A
Signed-off-by: Charlie Drage charlie@charliedrage.com