Skip to content

Commit

Permalink
fix: improve documentation (#3150)
Browse files Browse the repository at this point in the history
* fix: improve documentation

* fix: wording
  • Loading branch information
metacosm authored May 12, 2020
1 parent a3f0d4f commit 2da58f4
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions docs/public/deploying-a-devfile-using-odo.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ With a devfile you can describe:

* The source code being used
* Development components such as IDE tools (VSCode) and application runtimes (Yarn / NPM)
* A list of pre-defined commands that can be ran
* 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.

Devfile's are YAML files with a defined structure, take a look at the general https://github.com/redhat-developer/devfile/blob/master/docs/devfile.md[schema] of devfile.
Devfiles are YAML files with a defined https://github.com/redhat-developer/devfile/blob/master/docs/devfile.md[schema].

== Odo and devfile

When deploying a devfile using odo, odo will automatically look at the default https://github.com/elsony/devfile-registry[devfile] https://github.com/eclipse/che-devfile-registry/[registries]. Interacting with the devfile registries allows a user to pull a standard `devfile.yaml` and begin development immediately.
Odo can now create components from devfiles as recorded in registries. Odo automatically consults the default https://github.com/elsony/devfile-registry[devfile] https://github.com/eclipse/che-devfile-registry/[registries] but users can also add their own registries. Devfiles contribute new component types that users can pull to begin development immediately.

An example deployment scenario:

. `odo create` will look at devfile registry and pull down the `devfile.yaml` file
. odo push parses and then deploys the component in the following order:
. `odo create` will consult the recorded devfile registries to offer the user a selection of available component types and pull down the associated `devfile.yaml` file
. `odo push` parses and then deploys the component in the following order:
.. Parses and validates the YAML file
.. Deploys the development environment to your OpenShift cluster
.. Synchronizes your source code to the containers
Expand Down Expand Up @@ -91,7 +91,7 @@ In our example, we will be using `java-spring-boot` to deploy a sample https://s

== Deploying a Java Spring Boot® component to an OpenShift cluster

In this example we will be deploying an https://github.com/odo-devfiles/springboot-ex[example Springboot component] that uses https://maven.apache.org/install.html[Maven] and Java 8 JDK.
In this example we will be deploying an https://github.com/odo-devfiles/springboot-ex[example Spring Boot® component] that uses https://maven.apache.org/install.html[Maven] and Java 8 JDK.

. Download the example Spring Boot® component
+
Expand All @@ -107,15 +107,15 @@ In this example we will be deploying an https://github.com/odo-devfiles/springbo
$ cd <directory-name>
----

. List the contents of the directory to see that the front end is a Java application:
. List the contents of the directory to confirm that the front end is indeed a Java application:
+
[source,sh]
----
$ ls
chart Dockerfile Dockerfile-build Dockerfile-tools Jenkinsfile pom.xml README.md src
----

. Create a component configuration of Spring Boot component-type named myspring:
. Create a component configuration using the `java-spring-boot` component-type named `myspring`:
+
[source,sh]
----
Expand Down Expand Up @@ -194,15 +194,15 @@ In this example we will be deploying an https://github.com/odo-devfiles/nodejs-e
$ cd <directory-name>
----

. List the contents of the directory to see that the front end is a Node.js application:
. List the contents of the directory to confirm that the application is indeed a Node.js® application:
+
[source,sh]
----
$ ls
app LICENSE package.json package-lock.json README.md
----

. Create a component configuration of Node.js component-type named mynodejs:
. Create a component configuration using the `nodejs` component-type named `mynodejs`:
+
[source,sh]
----
Expand Down Expand Up @@ -269,17 +269,16 @@ In this example, we will be deploying the same Java Spring Boot® component we d

*Prerequisites:* Docker `17.05` or higher installed

. Enabling the separate pushtarget preference:
. Enabling a separate push target, using the `pushtarget` preference:
+
[source,sh]
----
$ odo preference set pushtarget docker
Global preference was successfully updated
----
+
You can configure a separate push target by making use of the `pushtarget` preference.

. Create a component configuration of Spring Boot component-type named mydockerspringboot:
. Create a component configuration using the `java-spring-boot` component-type named `mydockerspringboot`:
+
[source,sh]
----
Expand All @@ -305,7 +304,7 @@ You can configure a separate push target by making use of the `pushtarget` prefe
+
In order to access the docker application, exposed ports are required and automatically generated by odo.

. Deploy the Spring Boot devfile component to Docker:
. Deploy the Spring Boot® devfile component to Docker:
+
[source,sh]
----
Expand Down

0 comments on commit 2da58f4

Please sign in to comment.