Skip to content

added doc for how to develop with devfiles #119

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

Merged
merged 20 commits into from
Jan 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
fc93668
added doc for how to develop with devfiles
Jan 5, 2022
2573f64
Update docs/modules/user-guide/partials/proc_developing-with-devfiles…
jc-berger Jan 7, 2022
cd46b8f
Update docs/modules/user-guide/partials/proc_developing-with-devfiles…
jc-berger Jan 7, 2022
9e30275
Update docs/modules/user-guide/partials/proc_developing-with-devfiles…
jc-berger Jan 7, 2022
0137579
Update docs/modules/user-guide/partials/proc_developing-with-devfiles…
jc-berger Jan 7, 2022
b2feb0a
Update docs/modules/user-guide/partials/proc_developing-with-devfiles…
jc-berger Jan 7, 2022
4ae221c
Update docs/modules/user-guide/partials/proc_developing-with-devfiles…
jc-berger Jan 7, 2022
23c8cac
Update docs/modules/user-guide/partials/proc_developing-with-devfiles…
jc-berger Jan 7, 2022
4802e23
Update docs/modules/user-guide/partials/proc_developing-with-devfiles…
jc-berger Jan 7, 2022
475bc69
Update docs/modules/user-guide/partials/proc_developing-with-devfiles…
jc-berger Jan 7, 2022
ba8aaef
Update docs/modules/user-guide/partials/proc_developing-with-devfiles…
jc-berger Jan 7, 2022
85f6a8e
Update docs/modules/user-guide/partials/proc_developing-with-devfiles…
jc-berger Jan 7, 2022
49cec91
Update docs/modules/user-guide/partials/proc_developing-with-devfiles…
jc-berger Jan 7, 2022
262b827
Update docs/modules/user-guide/partials/proc_developing-with-devfiles…
jc-berger Jan 7, 2022
4d2df50
applied doc feedback to make instructions consistent and expand prereqs
Jan 7, 2022
382c94b
addressed dev review for prereqs and instructions
Jan 10, 2022
3af45e2
Update docs/modules/user-guide/partials/proc_developing-with-devfiles…
jc-berger Jan 12, 2022
1419fff
Update docs/modules/user-guide/partials/proc_developing-with-devfiles…
jc-berger Jan 12, 2022
e9678d2
removed unnecessary step in procedure
Jan 12, 2022
edd3545
changed prereqs and tightened procedure steps
Jan 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/modules/user-guide/nav.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
* xref:index.adoc[]

* Developer
** xref:developing-with-devfiles.adoc[]
** xref:using-devfiles.adoc[]
*** xref:adding-schema-version-to-a-devfile.adoc[]
*** xref:adding-a-name-to-a-devfile.adoc[]
Expand Down
5 changes: 5 additions & 0 deletions docs/modules/user-guide/pages/developing-with-devfiles.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
:description: Developing with devfiles
:navtitle: Developing with devfiles
:keywords: developing, devfiles

include::partial$proc_developing-with-devfiles.adoc[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[id="proc_developing-with-devfiles_{context}"]
= Developing with devfiles
[role="_abstract"]

Use the devfile specification to develop a Node.js “Hello World” application. Developing this application introduces you to how a devfile automates and simplifies your development process.

.Prerequisites

To make developing with the devfile specification easier, consider doing the following:

* Install link:https://minikube.sigs.k8s.io/docs/start/[minikube] to create a Kubernetes cluster on your local machine.
* Download link:https://kubernetes.io/docs/tasks/tools/install-kubectl-macos/[kubectl] to access your namespace.
* Enable link:https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/[ingress on minikube] to access your devfile project.
* Install the link:https://access.redhat.com/documentation/en-us/openshift_container_platform/4.6/html/cli_tools/developer-cli-odo#installing-odo[odo command line interface (CLI) tool] to execute the devfile specification.

.Procedure

. View the available devfiles:
+
----
$ odo catalog list components
----
. Run `odo create nodejs _<name of your project>_ --starter` to create a devfile project.
* Add the `--starter` parameter to include the starter project currently inside the Node.js devfile specification, which makes it easier for you to develop an application.
. Run `minikube IP` to find your cluster IP address.
. Run `odo url create _<name you give the url>_ --ingress --host _<IP address>_.nip.io`. Doing so creates an ingress inside your cluster that you can use to access your application using the cluster IP address.
* Example: `odo url create myfirstproject --ingress --host 192.168.64.2.nip.io`.
. Run `odo push` to build the URL.

.Verification

* To verify that you built your Node.js "Hello World" application successfully, view the application in a web browser by copying and pasting the URL that was produced by running the `odo push` command. Go to the URL and view your "Hello World" application.

.Additional resources

To continue working with devfiles, go to xref:authoring-devfiles.adoc[Authoring devfiles].