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

Adds .NET 6.0 as a quickstart example #5774

Merged
merged 3 commits into from Jun 1, 2022

Conversation

cdrage
Copy link
Member

@cdrage cdrage commented May 30, 2022

What type of PR is this:

/kind documentation

What does this PR do / why we need it:

Adds .NET to the quickstart guide as an example. Including building the
container, running dev as well as deploy.

Which issue(s) this PR fixes:

Fixes 1/2 of #5746

PR acceptance criteria:

  • Documentation

How to test changes / Special notes to the reviewer:

Signed-off-by: Charlie Drage charlie@charliedrage.com

<!--
Thank you for opening a PR! Here are some things you need to know before submitting:

1. Please read our developer guideline: https://github.com/redhat-developer/odo/wiki/Dev:-odo-Dev-Guidelines
2. Label this PR accordingly with the '/kind' line
3. Ensure you have written and ran the appropriate tests: https://github.com/redhat-developer/odo/wiki/Dev:-Writing-and-running-tests
4. Read how we approve and LGTM each PR: https://github.com/redhat-developer/odo/wiki/Pull-Requests:-Review-guideline

Documentation:

If you are pushing a change to documentation, please read: https://github.com/redhat-developer/odo/wiki/Documentation:-Contributing
-->

**What type of PR is this:**

<!--
Add one of the following kinds:
/kind bug
/kind feature
/kind cleanup
/kind tests

Feel free to use other [labels](https://github.com/redhat-developer/odo/labels) as needed. However one of the above labels must be present or the PR will not be reviewed. This instruction is for reviewers as well.
-->
/kind documentation

**What does this PR do / why we need it:**

Adds .NET to the quickstart guide as an example. Including building the
container, running dev as well as deploy.

**Which issue(s) this PR fixes:**
<!--
Specifying the issue will automatically close it when this PR is merged
-->

Fixes 1/2 of redhat-developer#5746

**PR acceptance criteria:**

- [X] Documentation

**How to test changes / Special notes to the reviewer:**

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
@netlify
Copy link

netlify bot commented May 30, 2022

Deploy Preview for odo-docusaurus-preview ready!

Name Link
🔨 Latest commit fc0a40f
🔍 Latest deploy log https://app.netlify.com/sites/odo-docusaurus-preview/deploys/62975880d2ae43000a1ba073
😎 Deploy Preview https://deploy-preview-5774--odo-docusaurus-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@odo-robot
Copy link

odo-robot bot commented May 30, 2022

Unit Tests on commit 7980b7e finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented May 30, 2022

Windows Tests (OCP) on commit 7980b7e finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented May 30, 2022

Kubernetes Tests on commit 7980b7e finished with errors.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented May 30, 2022

OpenShift Tests on commit 7980b7e finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented May 30, 2022

Validate Tests on commit 7980b7e finished successfully.
View logs: TXT HTML

Copy link
Member

@rm3l rm3l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after testing this guide. I added a few comments.

Based on the files in the current directory odo detected
Language: javascript
Project type: nodejs
The devfile "nodejs" from the registry "DefaultDevfileRegistry" will be downloaded.
Copy link
Member

@rm3l rm3l May 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it depends on Alizer, but it is weird to me that "nodejs" was detected, and not "dotnet" :-)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know :( Alizer wasn't able to detect it correctly. I'll be opening up an issue for this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, I just found a similar issue: redhat-developer/alizer#83

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
Copy link
Member

@rm3l rm3l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes. After re-reading, I added a few more comments.

Also, we could change the intro sentence since there are now multiple languages in this guide. It currently reads:

In this guide, we will be using odo to create a "Hello World" application with Node.js

Even if users select a .NET tab..

image

@cdrage
Copy link
Member Author

cdrage commented Jun 1, 2022

Good catches! I've gone ahead and updated it again. I completely missed those parts. Thanks :)

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
@sonarcloud
Copy link

sonarcloud bot commented Jun 1, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.9% 0.9% Duplication

Copy link
Member

@rm3l rm3l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Jun 1, 2022
@openshift-ci
Copy link

openshift-ci bot commented Jun 1, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rm3l

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. label Jun 1, 2022
@cdrage
Copy link
Member Author

cdrage commented Jun 1, 2022

Manual merge (sorry!) since Kubernetes integration tests are failing which they really shouldn't have. Need to have this merged for tomorrow.

@cdrage cdrage merged commit f3cd3e9 into redhat-developer:main Jun 1, 2022
Copy link
Member

@dharmit dharmit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cdrage sorry for reviewing this after it got merged. A few things here could be addressed in subsequent PRs. Let me know if you would prefer opening issue(s) for it.

* Node.js
* .NET

A full list of example applications can be viewed with the `odo registry` command.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think about this as a user. If I want to see example applications, how does it make sense to run a registry command? IMO, we are having a terrible UX where commands don't map to the actual thing. This is not feedback for this PR, but something that we should really think about when revamping odo to v3. @kadel @deboer-tim @serenamarie125

Comment on lines +82 to +99
```console
$ dotnet new mvc --name app

Welcome to .NET 6.0!
---------------------
SDK Version: 6.0.104

...

The template "ASP.NET Core Web App (Model-View-Controller)" was created successfully.
This template contains technologies from parties other than Microsoft, see https://aka.ms/aspnetcore/6.0-third-party-notices for details.

Processing post-creation actions...
Running 'dotnet restore' on /Users/user/app/app.csproj...
Determining projects to restore...
Restored /Users/user/app/app.csproj (in 84 ms).
Restore succeeded.
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cdrage this should have been tabbed. If you look at how it's rendered, it's not really under the point 1 that you have written above. Something like this:

Suggested change
```console
$ dotnet new mvc --name app
Welcome to .NET 6.0!
---------------------
SDK Version: 6.0.104
...
The template "ASP.NET Core Web App (Model-View-Controller)" was created successfully.
This template contains technologies from parties other than Microsoft, see https://aka.ms/aspnetcore/6.0-third-party-notices for details.
Processing post-creation actions...
Running 'dotnet restore' on /Users/user/app/app.csproj...
Determining projects to restore...
Restored /Users/user/app/app.csproj (in 84 ms).
Restore succeeded.
```
```console
$ dotnet new mvc --name app
Welcome to .NET 6.0!
---------------------
SDK Version: 6.0.104
...
The template "ASP.NET Core Web App (Model-View-Controller)" was created successfully.
This template contains technologies from parties other than Microsoft, see https://aka.ms/aspnetcore/6.0-third-party-notices for details.
Processing post-creation actions...
Running 'dotnet restore' on /Users/user/app/app.csproj...
Determining projects to restore...
Restored /Users/user/app/app.csproj (in 84 ms).
Restore succeeded.
```


</TabItem>
</Tabs>

You can now access the application at [127.0.0.1:40001](http://127.0.0.1:40001) in your local browser and start your development loop. `odo` will watch for changes and push the code for real-time updates.


## Step 3. Deploying your application to the world (`odo deploy`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"to the world", really? We still don't claim odo to be a production ready tool. Inner loop and outer loop, that's it. Nitpicking, I know. Also, not a part of this PR, I know. 😉

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Want to open a PR to fix it 😜

@@ -389,6 +492,204 @@ Your Devfile has been successfully deployed

Your application has now been deployed to the Kubernetes cluster with Deployment, Service, and Ingress resources.

Test your application by visiting the `DOMAIN_NAME` variable that you had set in the `devfile.yaml`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder why this statement doesn't show up on the quickstart guide on the site. 🤔

It shows up only once at the end of the guide. Maybe I'm missing something.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup! Since this is part of odo deploy, you can visit the ingress you made with the domain name at the end of the quickstart guide.

cdrage added a commit to cdrage/odo that referenced this pull request Aug 31, 2022
* Adds .NET 6.0 as a quickstart example

<!--
Thank you for opening a PR! Here are some things you need to know before submitting:

1. Please read our developer guideline: https://github.com/redhat-developer/odo/wiki/Dev:-odo-Dev-Guidelines
2. Label this PR accordingly with the '/kind' line
3. Ensure you have written and ran the appropriate tests: https://github.com/redhat-developer/odo/wiki/Dev:-Writing-and-running-tests
4. Read how we approve and LGTM each PR: https://github.com/redhat-developer/odo/wiki/Pull-Requests:-Review-guideline

Documentation:

If you are pushing a change to documentation, please read: https://github.com/redhat-developer/odo/wiki/Documentation:-Contributing
-->

**What type of PR is this:**

<!--
Add one of the following kinds:
/kind bug
/kind feature
/kind cleanup
/kind tests

Feel free to use other [labels](https://github.com/redhat-developer/odo/labels) as needed. However one of the above labels must be present or the PR will not be reviewed. This instruction is for reviewers as well.
-->
/kind documentation

**What does this PR do / why we need it:**

Adds .NET to the quickstart guide as an example. Including building the
container, running dev as well as deploy.

**Which issue(s) this PR fixes:**
<!--
Specifying the issue will automatically close it when this PR is merged
-->

Fixes 1/2 of redhat-developer#5746

**PR acceptance criteria:**

- [X] Documentation

**How to test changes / Special notes to the reviewer:**

Signed-off-by: Charlie Drage <charlie@charliedrage.com>

* Update based on review

Signed-off-by: Charlie Drage <charlie@charliedrage.com>

* Upddate based on review

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. lgtm Indicates that a PR is ready to be merged. Required by Prow.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants