366 Commits

Author SHA1 Message Date
Tomas Kral
ee258eb859 v0.0.7 2018-06-25 17:15:54 +02:00
Charlie Drage
72783e8808 Add --skip-connection-check parameter
Adds --skip-connection-check parameter to ignore `oc` checking for
logged in status / cluster is online
2018-06-18 09:45:46 -04:00
Charlie Drage
277c598868 Add namespacing
Adds namespacing to Odo by hyphenating applicationName-componentName to
OpenShift deployments.
2018-06-11 15:50:25 -04:00
Tomas Kral
f528d59645 Merge pull request #492 from mik-dass/unmount_path
Adds the functionality of unmounting storage using the mounted path.
2018-06-11 16:48:10 +02:00
Tomas Kral
5b998da0fe Merge pull request #515 from cdrage/add-more-examples
Add new examples
2018-06-11 16:45:14 +02:00
mdas
529f5deee2 Adds the functionality of unmounting storage using the mounted path. A function GetStorageNameFromMountPath is added which returns the storageName mounted to the given path in the given component and application or returns the error.
Signed-off-by: mdas <mrinald7@gmail.com>
2018-06-11 18:48:27 +05:30
Charlie Drage
b77f7427c0 Add new examples
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!
2018-06-11 08:48:32 -04:00
Charlie Drage
ac534ef6d6 Adds --follow / -f command to odo log
This adds the --follow or -f command to `odo log` in order to stream logs
as they are being built for DeploymentConfig.
2018-06-06 12:39:55 -04:00
Tomas Kral
3b5940e7dc Merge pull request #509 from mik-dass/store_list_fix
Fixed the problem of storage list when no component is created or selected
2018-06-06 15:37:04 +02:00
Tomas Kral
935f3da325 Merge pull request #497 from cdrage/change-up-help
Improve CLI --help documentation
2018-06-06 15:12:25 +02:00
mdas
6ec3fb1233 Fixed the problem of storage list when no component is created or selected
Signed-off-by: mdas <mrinald7@gmail.com>
2018-06-05 16:41:14 +05:30
Charlie Drage
04f9fe80f3 Update the deletion / component description output
Makes the output description less repetitive by removing "This
Component".
2018-06-04 11:31:44 -04:00
Charlie Drage
9a6edcb1f4 Improve CLI --help documentation
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.
```
2018-06-01 09:15:46 -04:00
Piyush Garg
51af953785 Adds an alias umount for unmout command
#484
2018-05-31 17:24:28 +05:30
Tomas Kral
476f9fcf25 v0.0.6 2018-05-30 10:28:01 +02:00
Tomas Kral
50110642a8 Merge pull request #481 from kadel/add-missing-component-for-mount
Add missing --component flag to 'odo storage unmount'
2018-05-30 08:16:30 +02:00
Tomas Kral
e1e8d6e1e2 Add missing --component flag to 'odo storage unmount'
Fix examples formatting for couple of storage commands.
2018-05-29 12:30:44 +02:00
Suraj Narwade
2051a7b318 Added confirmation before deleting URL
Solves #474

```
odo url delete nodejs
Are you sure you want to delete the url nodejs? [y/N] y
Deleted URL: nodejs
```
2018-05-29 13:18:19 +05:30
Charlie Drage
ce67bb1858 Add more help documentation, automatically generate CLI reference
- Adds more help documentation
- Adds script to generate CLI reference
2018-05-28 10:07:27 -04:00
mdas
7968df8942 Added the storage mount command implementation for which a Mount function is added in storage/storage.go
Signed-off-by: mdas <mrinald7@gmail.com>
2018-05-28 16:41:27 +05:30
Tomas Kral
87d79b3ad8 Merge pull request #455 from surajnarwade/port-deletefunc
Porting `Delete` function to client-go
2018-05-28 11:22:16 +02:00
Tomas Kral
bd6a1df98d Fix confirmation message when deleting storage
Also fixes descriptions for --component flag and removes this flag from
'storage delete' command
2018-05-25 14:49:28 +02:00
Suraj Narwade
dde881521b Porting Delete function to client-go
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.
2018-05-25 13:19:29 +05:30
Suraj Narwade
508b2d93ec Added confirmation for storage deletion 2018-05-25 12:50:37 +05:30
Tomas Kral
7a4a9616fc Merge pull request #469 from mik-dass/storage_list
Fixed the formatting of storage list
2018-05-24 13:58:42 +02:00
mdas
148747686e Fixed the formatting of storage list to display the mounted storages in the active component and also the unmounted storages in the active application.
Signed-off-by: mdas <mrinald7@gmail.com>
2018-05-24 14:59:10 +05:30
Tomas Kral
af29488808 Merge pull request #421 from surajnarwade/consistency
Added consistency in commands for project, application & components
2018-05-23 16:43:20 +02:00
Shubham Minglani
078b018ef9 Add ocdev storage umount command
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>
2018-05-23 18:06:16 +05:30
Suraj Narwade
7a5ae72105 Added consistency in commands for project, application & components
Fixes #274

Now,

```
odo project xyz

odo component abc

odo application pqr
```

they will work same as `set` operation.
2018-05-23 14:27:00 +05:30
Tomas Kral
710857408c Merge pull request #463 from piyush1594/iss_449
This will fix the issue of  deleting all storage
2018-05-21 13:52:53 +02:00
Tomas Kral
b7f9ccad35 Merge pull request #429 from cdrage/add-logs
Adds DeploymentConfig log functionality to Odo
2018-05-18 14:06:31 +02:00
Charlie Drage
b3110cd80d Adds DeploymentConfig log functionality to Odo
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
```
2018-05-18 07:15:55 -04:00
Piyush Garg
4c14f1164a This will fix the issue of deleting all storage
In spite of that, it will throw error #449
2018-05-18 12:29:11 +05:30
Tomas Kral
73d61333ca Merge pull request #461 from cdrage/modify-cli
Update CLI information
2018-05-18 08:11:55 +02:00
Charlie Drage
155427f07a Update CLI information
Updates CLI information / grammar.
2018-05-17 09:17:05 -04:00
Charlie Drage
db6da0b5aa Swap componentName and applicationName in storage
Swaps the applicationName and componentName function parameters for
storage, so it is aligned with all other functions of Odo.
2018-05-16 10:33:19 -04:00
Tomas Kral
0fdce0d15b release v0.0.5 2018-05-14 14:13:17 +02:00
Charlie Drage
0de038dab4 Merge pull request #425 from mik-dass/check_create
Adds checks for checking that a directory or a file exists
2018-05-10 11:39:46 -04:00
mdas
bcff84c2c5 Adds checks for checking that a directory or a file exists in create.go and update.go
Signed-off-by: mdas <mrinald7@gmail.com>
2018-05-10 20:48:25 +05:30
Suraj Narwade
f8f5f27060 Added validation for component and application
Fixes #431
Reference taken from Kubernetes: https://github.com/kubernetes/kubernetes/blob/master/pkg/apis/core/validation/validation.go#L3296
Kubernetes resource name criteria: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/
2018-05-10 16:45:47 +05:30
Tomas Kral
a1286d7aef Do not automatically push after binary component is created.
Fixes #436
2018-05-04 14:47:11 +02:00
Tomas Kral
1aa0b912f8 fail when build fails 2018-05-04 13:58:43 +02:00
Tomas Kral
d4264f2cc8 Skip BuildConfig process when pushing to local/binary component
For quick and iterative way we can skip BuildConfig process and build
component directly inside running Pod
2018-05-04 13:56:26 +02:00
Charlie Drage
74d81a9fb3 Rename cmpnt to currentComponent
Renames cmpnt to currentComponent.
2018-05-01 09:47:04 -04:00
Tomas Kral
40b04d15b0 Merge pull request #418 from mik-dass/update_binary
Adds the implementation of update for binary files
2018-04-30 10:56:19 +02:00
mdas
485f0103ad Adds the implementation of update for binary files.
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>
2018-04-26 15:57:01 +05:30
Suraj Narwade
8d63ad1aa1 Removed multiple util file from cmd directory 2018-04-26 12:35:18 +05:30
mdas
b25b2cfc38 Adds the binary flag implementation for the create and push command
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>
2018-04-24 12:44:45 +05:30
Suraj Narwade
8f7073cf45 Application Deletion will show what will be deleted
Fixes #204
2018-04-23 19:06:56 +05:30
Suraj Narwade
77b46d8970 Merge pull request #404 from syamgk/patch-1
reformat output of odo list cmd using tabwriter
2018-04-23 13:10:52 +05:30