Commit graph

199 commits

Author SHA1 Message Date
Daniel J Walsh
c0f3e02bae Merge pull request #765 from baude/format
Format
2017-08-19 04:10:40 -04:00
baude
78c6151519 Modify kpod diff --json to --format json
We want all kpod subcommands to use the formats code to output
formats like json.  Altering kpod diff --json to kpod diff --format json
like the kpod images command.

Signed-off-by: baude <bbaude@redhat.com>
2017-08-18 21:05:58 -05:00
Nalin Dahyabhai
05985ff2f7 kpod: make --debug work
The --debug flag is a global CLI flag, so parse it like one.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-08-17 15:27:04 -04:00
Mrunal Patel
f82fe5691a Merge pull request #706 from 14rcole/kpod-stats
Kpod stats
2017-08-17 11:24:38 -07:00
Mrunal Patel
a5591d34b7 Merge pull request #772 from 14rcole/kpod-rename
implement kpod rename
2017-08-17 10:04:16 -07:00
Ryan Cole
ceeed6c32e add kpod stats function
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-08-17 11:34:10 -04:00
Ryan Cole
1eb21f8e15 implement kpod rename
rename a container

Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-08-17 09:00:41 -04:00
Ryan Cole
ba07bfb932 Make kpod images use text/template by default
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-08-17 08:32:38 -04:00
Ryan Cole
08c3d241a4 Add format functions
Add functions to go templates such as truncating a field.  Also add
the table keyword, which, if placed at the beginning of a format string,
adds headers to the output

Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-08-16 15:45:13 -04:00
Ryan Cole
07572e85f5 Add kpod logs command
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-08-16 08:55:23 -04:00
Mrunal Patel
36fd0a7208 Merge pull request #744 from rhatdan/debug
Add --debug flag to kpod to turn up logging level to debug
2017-08-14 16:21:22 -07:00
Antonio Murdaca
95165063bd Merge pull request #758 from mrunalp/inotify_exit_watch
Inotify exit watch
2017-08-14 16:00:35 +02:00
Mrunal Patel
30ded83096 Add inotify watcher for container exits
This allows the container list API to return updated status
for exited container without having to call container status first.

Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2017-08-13 08:01:48 -07:00
Mrunal Patel
4311020c36 Merge pull request #653 from baude/images_json
cmd/kpod/images.go: Add JSON output option
2017-08-13 07:19:04 -07:00
baude
01b71393e3 cmd/kpod/images.go: Add structured format ouput
For kpod images, we need to output in JSON format so that consumers
(programatic) have structured input to work with.

kpod images --format json

Signed-off-by: baude <bbaude@redhat.com>
2017-08-12 19:09:49 -05:00
Daniel J Walsh
464d6852de Add --debug flag to kpod to turn up logging level to debug
Also set default level of logging to errors,  we should not see
info messages in the kpod command line.

While adding this patch, I found missing options in kpod command line
and bash completions, so I added them in.

Also fixed some sorting issues in the way commands are displayer in help or in
bash completions.

Finally fixed the error message to be output on failure using logrus.Errorf, so
we don't get the stack any longer.

Also updated README.md with missing kpod commands.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-08-11 16:41:25 -04:00
Ryan Cole
949268f958 Add kpod diff command
kpod diff reports on differences between two layers, specified as
layer IDs, containers, or images.  In the case of containers or
images, kpod diff produces a diff for the top layer

Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-08-11 16:08:41 -04:00
Mrunal Patel
fb2ee59225 Merge pull request #737 from umohnani8/kpod_export
Add 'kpod export' command
2017-08-11 10:54:34 -07:00
Mrunal Patel
43bc359fc0 Add metrics endpoint support to server
We add two flags --enable-metrics and --metrics-port
to enable metrics endpoint and allow specifying the
port which defaults to 9090.

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-08-10 13:44:42 -04:00
Mrunal Patel
4310e6d86f Merge pull request #741 from 14rcole/kpod-inspect-update
have server update list of containers on creation
2017-08-10 05:23:39 -07:00
umohnani8
be8ba17534 Add 'kpod export' command
kpod export exports the container's filesystem to a tar archive

Signed-off-by: umohnani8 <umohnani@redhat.com>
2017-08-08 16:46:01 -04:00
Dan Walsh
0cc45cf26a Add kpod-mount and kpod-umount to mount and umount container images
This command will allow users to manipulate and examine the container
images from outside of the container.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-08-08 15:46:50 -04:00
Ryan Cole
bfbb99e05c have server update list of containers on creation
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-08-08 10:23:32 -04:00
Daniel J Walsh
63a218a458 Move to new github.com/sirupsen/logrus.
Need to mv to latest released and supported version of logrus
switch github.com/Sirupsen/logrus github.com/sirupsen/logrus

Also vendor in latest containers/storage and containers/image

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-08-07 11:50:04 -04:00
Mrunal Patel
3b888a54d3 Merge pull request #720 from 14rcole/containerserver-integration
Move functions in libkpod to ContainerServer
2017-08-07 08:09:53 -07:00
Mrunal Patel
ce8bd648de Merge pull request #730 from 14rcole/kpod-image-filter
fix bug with creation time in ParseFilter()
2017-08-04 19:24:37 -07:00
Ryan Cole
c6dc7d3e22 Fix bug resulting in kpod images --quiet only printing one image
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-08-04 11:50:38 -04:00
Ryan Cole
0d8f015675 Allow password for docker registry to be inputted silently
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-08-04 09:35:36 -04:00
Ryan Cole
b1eb754ef5 Move functions in libkpod to ContainerServer
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-08-03 13:05:44 -04:00
Antonio Murdaca
a35727c80b
*: implement additional pull registries
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-08-02 16:38:11 +02:00
Matthew Heon
9529f565b2 Add option to use file-based locking for libkpod state
Signed-off-by: Matthew Heon <mheon@redhat.com>
2017-07-31 15:58:29 -04:00
umohnani8
412b98be26 Add 'kpod load' command
Signed-off-by: umohnani8 <umohnani@redhat.com>
2017-07-28 22:30:48 -04:00
Nalin Dahyabhai
40117e8bfe Use inspected creation dates
We already parse every image if there's a label filter so that we can
check against the filter, so when we do that, go ahead and read the
OCI-format configuration and inspection data as well, and use an image's
creation date as recorded in inspection data everywhere.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-07-28 16:58:12 -04:00
Ryan Cole
2cb57e0cb5 Switch kpod save to use config
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-07-28 15:51:11 -04:00
Mrunal Patel
d2a82a28c1 Merge pull request #678 from umohnani8/kpod_save
Add 'kpod save' command
2017-07-28 10:49:49 -07:00
Mrunal Patel
13c874753c Merge pull request #693 from 14rcole/libkpod-config
add basic config struct to libkpod
2017-07-28 06:24:45 -07:00
Ryan Cole
a8b6f2ad8a Update kpod commands to use getConfig()
Make getStore() take a config struct from which it pulls the store
options, then update the kpod commands so that they call getConfig()
and pass the config into getStore()

Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-07-27 15:58:55 -04:00
umohnani8
ff5eda509a Add 'kpod save' command
Signed-off-by: umohnani8 <umohnani@redhat.com>
2017-07-27 13:35:30 -04:00
Mrunal Patel
9dbd60a0df Merge pull request #698 from nalind/kpod-updates
kpod: avoid digging into unpublished formats
2017-07-27 10:20:46 -07:00
Ryan Cole
0c8f106ee8 add basic config struct to libkpod
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-07-27 11:12:50 -04:00
Nalin Dahyabhai
cb0bb94c68 Avoid parsing image metadata
Avoid parsing metadata that the image library keeps in order to find an
image's top layer and creation date; instead, use the values which the
storage library now makes available, which will be correct once we merge
PR #654 or something like it.

Instead of assuming the last blob which was added for the image was the
manifest, read it directly and compute its digest ourselves.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-07-26 16:33:02 -04:00
Mrunal Patel
1f40531dca Make the profile port configurable
Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2017-07-26 10:57:55 -07:00
Nalin Dahyabhai
2e50006f1c Avoid using lower-level storage APIs
Switch from using the lower-level storage APIs (accessing LayerStore,
ImageStore, and ContainerStore types directly) in favor of the
higher-level ones that take care of synchronization and locking for us.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-07-25 13:29:49 -04:00
Ryan Cole
18f94f38ba Remove GetImage() and make rmi use more robust FindImage()
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-07-25 09:02:45 -04:00
Ryan Cole
c1706475c0 move functions supporting rmi command to libkpod/image
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-07-24 16:17:26 -04:00
Ryan Cole
0f44ff1d3b move functions supporting images command to libkpod/image
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-07-24 14:35:36 -04:00
Ryan Cole
df7536e3c0 move PushImage and PullImage to libkpod/image
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-07-24 14:35:36 -04:00
Ryan Cole
14864f820e move code supporting push, pull, and inspect to libkpod and libkpod/image
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-07-24 14:35:36 -04:00
Ryan Cole
2c1fd1ad3f move container-related functions out of kpod and into libkpod
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-07-24 14:34:55 -04:00
Ryan Cole
a68a981d0b move image-related functions out of cmd/kpod/common.go and into libkpod/image
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-07-24 14:34:55 -04:00