Adds a list of different examples (using each language that OpenShift
catalog supports) as well as updates the `create.go` command to list
each and every one of them!
Separates the commands into appropriate categories.
Example:
```sh
Usage:
odo [command]
Examples:
# Creating and deploying a Node.js project
git clone https://github.com/openshift/nodejs-ex && cd nodejs-ex
odo create nodejs
odo push
# Accessing your Node.js component
odo url create
Component Commands:
component Components of application.
create Create a new component
delete Delete an existing component
describe Describe the given component
link Link target component to source component
list List all components in the current application
log Retrieve the log for the given component.
push Push source code to a component
update Update the source code path of a component
watch Watch for changes, update component on change
Other Commands:
app Perform application operations
catalog Catalog related operations
project Perform project operations
storage Perform storage operations
url Expose component to the outside world
Utility Commands:
completion Output shell completion code
help Help about any command
version Print the client version information
Flags:
-h, --help help for odo
-v, --verbose Verbose output
Use "odo [command] --help" for more information about a command.
```
Partially fixes#444, This PR will port Delete function to client-go, so that it will remove dependency of `oc` binary
to client-go. so that it will remove dependency of oc binary.
This commit adds `ocdev storage unmount` command, which will
unmount the given storage from a component. For implementing this,
an Unmount() function has been introduced in the storage package.
Other parts of code have also been refactored to use the Unmount()
function for much clearer logic.
storage.Delete() has been refactored to first find the component to which it is attached if any, use Unmount() if mounted, and
then delete the PVC. The logic looks much cleaner now.
Also, introducing the unmount command led to a refactor in the List function so that it gives a list of storages mounted to the current component and also the unmounted storages in the current application.
Signed-off-by: mdas <mrinald7@gmail.com>
This adds a new command `odo log` which will display the
DeploymentConfig logs for that particular component.
For example:
```sh
github.com/redhat-developer/odo add-logs ✔ 15h55m
▶ ./odo list
ACTIVE NAME TYPE
* nodejs3 nodejs
github.com/redhat-developer/odo add-logs ✔ 15h57m
▶ ./odo log
Environment:
DEV_MODE=false
NODE_ENV=production
DEBUG_PORT=5858
Launching via npm...
npm info it worked if it ends with ok
npm info using npm@3.10.9
npm info using node@v6.11.3
npm info lifecycle nodejs-ex@0.0.1~prestart: nodejs-ex@0.0.1
npm info lifecycle nodejs-ex@0.0.1~start: nodejs-ex@0.0.1
> nodejs-ex@0.0.1 start /opt/app-root/src
> node server.js
Server running on http://0.0.0.0:8080
```
This commit also changes the implementation of the Update function in the component.go by adding the annotation for sourceType.
Signed-off-by: mdas <mrinald7@gmail.com>
It configures the component source to be a binary file. It also adds checks for verifying if the given path is a file or a directory. Also implementation of the push command for binary is also added.
Signed-off-by: mdas <mrinald7@gmail.com>