Commit graph

55 commits

Author SHA1 Message Date
Daniel J Walsh 5770dc2640 Rename all references to kpod to podman
The decision is in, kpod is going to be named podman.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #145
Approved by: umohnani8
2017-12-18 16:46:05 +00:00
Matthew Heon 34c1ea390d Fix top tests
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #109
Approved by: mheon
2017-12-14 23:59:22 +00:00
Matthew Heon 21bcd770db Fix kpod exec tests
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #109
Approved by: mheon
2017-12-14 23:59:21 +00:00
Matthew Heon 9e5637f9e8 Fix network configurations to have a valid CIDR subnet
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #109
Approved by: mheon
2017-12-14 23:59:21 +00:00
Matthew Heon 316341a81d Fix kpod images tests
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #109
Approved by: mheon
2017-12-14 23:59:21 +00:00
Matthew Heon 5e1549b056 Prepare network configs when setting up tests
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #109
Approved by: mheon
2017-12-14 23:59:21 +00:00
Matthew Heon 72e8efccc9 Fix Travis tests
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #109
Approved by: mheon
2017-12-14 23:59:21 +00:00
baude 3ba2c3e117 kpod top
Display information about processes in a running container.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #121
Approved by: rhatdan
2017-12-14 22:22:56 +00:00
umohnani8 d2ab53aa5f Add support for dir transport to kpod save
kpod save can now save images to directories using the
dir transport. Manifest conversion is also possible.
To save with the oci manifest type set --format to oci-dir
and to save with the v2s2(docker) manifest type, set --format
to docker-dir.
The layers can be compressed as well when saving to a directory
using the --compress flag.
Added functionality to kpod load to be able to load image from
a directory

Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #137
Approved by: rhatdan
2017-12-14 22:22:16 +00:00
umohnani8 1e7d880b56 Add manifest type conversion to kpod push
User can select from 3 manifest types: oci, v2s1, or v2s2
e.g kpod push --format v2s2 alpine dir:my-directory
Added "compress" flag to enable compression when true

Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #126
Approved by: rhatdan
2017-12-14 18:37:17 +00:00
umohnani8 d8f099bb5a Check for mutually exclusive flags
Error out if more than one mutually exclusive flags are passed
in to kpod ps

Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #128
Approved by: rhatdan
2017-12-14 14:14:34 +00:00
baude 9cc0c8ae14 kpod stats
Move kpod stats to the libpod backend.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #113
Approved by: baude
2017-12-13 21:15:09 +00:00
umohnani8 74ee579375 Update kpod inspect to use the new container state
kpod inspect now uses the new libpod container state
and closely matches the output of docker inspect
some aspects of it are still WIP as the libpod container state
is still being worked on

Signed-off-by: umohnani8 <umohnani@redhat.com>
2017-12-12 09:46:23 -05:00
baude e8a32e3722 kpod exec
Initial wiring of kpod exec. We wont support the following options
for exec:

* detach -- unsure of use case
* detach-keys -- not supported by runc
* interactive -- all terminals will be interactive

Not adding exec tests as we need to think about how to support a
test that requires console access but our CI tests have no console.

Signed-off-by: baude <bbaude@redhat.com>
2017-12-11 08:24:30 -06:00
umohnani8 34696c55e9 Add Linux Root Propagation to kpod create and run
Add [r]shared, [r]private, [r]slave functionality to the --volume flag
for kpod create and kpod run
This sets the root propagation for each bind mount

Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #87
Approved by: rhatdan
2017-12-05 10:23:13 +00:00
Matthew Heon 9147a56a01 Remove kpod rename
Libpod containers are immutable once created. They cannot be
renamed after created. As such remove kpod rename.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #101
Approved by: baude
2017-12-04 23:48:22 +00:00
baude 3db735c6d1 Short options!
Any subcommand that has two or more booleon short options can
now combine those two options.  For example:

kpod rmi -af (Remove all images forceably)

Signed-off-by: baude <bbaude@redhat.com>

Closes: #100
Approved by: rhatdan
2017-12-04 20:03:16 +00:00
Daniel J Walsh 95cb7a11f1 kpod create should not do an OCI Init
We need to differentiate between a kpod create and a kpod start
kpod create should create all of the data for libpod, but kpod start should
generate content for OCI Runtime (runc) in order to run.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #96
Approved by: mheon
2017-12-04 17:35:14 +00:00
baude 5c9694a0c1 kpod attach
Attach to a running container

Signed-off-by: baude <bbaude@redhat.com>

Closes: #95
Approved by: rhatdan
2017-12-04 17:00:48 +00:00
Daniel J Walsh adf8809521 Add NetMode, UTSMode and IPCMode
Allow kpod create/run to create contianers in different network namespaces, uts namespaces and
IPC Namespaces.

This patch just handles the simple join the host, or another containers namespaces.

Lots more work needed to full integrate  --net

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #64
Approved by: mheon
2017-12-02 15:32:56 +00:00
baude 1f01faf437 kpod stop -a
Stop all running containers with single switch.  Useful for
maintainence of a system or integration tests.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #90
Approved by: rhatdan
2017-12-01 13:18:32 +00:00
baude 742475885e kpod_start
Starts one or more containers.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #83
Approved by: rhatdan
2017-11-29 22:01:47 +00:00
umohnani8 ad255533d4 Fix --volume flag for kpod create and run
Enable the --volume flag to validate user input
and add functionality for :z and :Z options

Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #84
Approved by: mheon
2017-11-29 21:40:12 +00:00
Matthew Heon 4a68a5303c Attempt fix for persistent bash parameter expansion issues
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #68
Approved by: rhatdan
2017-11-29 12:15:16 +00:00
Matthew Heon 3180e38795 Move removal of containers into teardown helper
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #68
Approved by: rhatdan
2017-11-29 12:15:16 +00:00
Matthew Heon 63c09d1017 Fix kpod rm tests returning error code when they should not
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #68
Approved by: rhatdan
2017-11-29 12:15:16 +00:00
Matthew Heon e36483b1e6 Fix tests - use rm -a -f instead of nested commands
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #68
Approved by: rhatdan
2017-11-29 12:15:15 +00:00
Matthew Heon 0e3dd5f687 Update container-based tests
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #68
Approved by: rhatdan
2017-11-29 12:15:15 +00:00
baude 342ce4db50 kpod ps
Wire up kpod ps with the new libpod container backend.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #67
Approved by: rhatdan
2017-11-28 14:47:35 +00:00
TomSweeneyRedHat d43f786728 Add docker transport to push image before final failure
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #42
Approved by: rhatdan
2017-11-28 12:53:25 +00:00
Daniel J Walsh 55167ef982
Merge pull request #79 from mheon/fix_create
Make 'kpod create' also create the container in runc
2017-11-27 17:11:22 -05:00
Matthew Heon 7c2a75335f Temporarily disable kpod create tests until kpod rm is ready
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-11-27 14:54:30 -05:00
Matthew Heon d0f3f1fcad Fix kpod pause tests - pausing a created container is valid
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-11-27 14:40:58 -05:00
baude 52ea0deee6 kpod_wait
Convert to libpod container backend

Signed-off-by: baude <bbaude@redhat.com>

Closes: #70
Approved by: rhatdan
2017-11-27 19:05:59 +00:00
baude dd88ce005f kpod_rm: Add option for --all
Remove all containers with -a, --all.

Enable kpod rm tests which were all set to skip. Add two
tests for -a

Signed-off-by: baude <bbaude@redhat.com>

Closes: #74
Approved by: rhatdan
2017-11-27 16:46:06 +00:00
umohnani8 b1a3b03068 Update kpod pause and unpause to use new container state
Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #66
Approved by: mheon
2017-11-24 15:53:17 +00:00
Urvashi Mohnani ee4051db61 Update kpod logs to use the new container state and runtime
Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>

Closes: #62
Approved by: rhatdan
2017-11-22 19:33:13 +00:00
umohnani8 40dce698d3 Update kpod mount and umount to use the new state
The new state for containers has been added
moved kpod mount and umount over to use it

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>

Closes: #57
Approved by: rhatdan
2017-11-22 18:23:19 +00:00
Daniel J Walsh bd4e106de3 Add support for pid ns
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #54
Approved by: umohnani8
2017-11-22 16:46:53 +00:00
Urvashi Mohnani 2a3934f1da Update kpod export to use the new container state and runtime
Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>

Closes: #59
Approved by: rhatdan
2017-11-22 16:17:06 +00:00
Urvashi Mohnani 768fb6fe0f Update kpod rm to use new container state
kpod rm now uses the new container state and runtime

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>

Closes: #58
Approved by: mheon
2017-11-21 22:03:13 +00:00
Daniel J Walsh c75c319ea2 Add support for oom functions
Add tests for oom-kill-disable and oom-kill-adj

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #52
Approved by: TomSweeneyRedHat
2017-11-21 15:33:16 +00:00
Daniel J Walsh 5d52f74d21 Add support for Ulimits/Rlimits to kpod create/run
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #24
Approved by: mheon
2017-11-20 20:12:43 +00:00
baude 3e04604dc2 Use cached images for integration tests
Add alpine and busybox as the two seeded images that can
be put into the tests' storage without the need to pull
it over the network.  Add the following to the kpod_TEST.bats
file:

function setup() {
    copy_images
}

Also, export several image names for shorter reference:

* BB -> docker.io/library/busybox:latest
* BB_GLIBC -> docker.io/library/busybox:glibc
* ALPINE -> docker.io/library/alpine:latest
* FEDORA_MINIMAL -> registry.fedoraproject.org/fedora-minimal:latest

And finally, there were two pervasive changes I made in
tests:

* Because we use temporary storage, we do not need to rmi at the end of each test
* We no longer need to pull most images because they are added via copy_images

Signed-off-by: baude <bbaude@redhat.com>

Closes: #43
Approved by: mheon
2017-11-20 18:11:08 +00:00
Daniel J Walsh 57599f0075 Fix up handling of environment variables
The way docker works is if a user specifies a non `-e Name=Value`, IE
just a `-e Name`, then the environment variable Name from the clients
OS.ENV is used.

Also by default Docker containers run with the HOSTNAME environment set
to the HOSTNAME specified for the container.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #21
Approved by: baude
2017-11-20 16:25:31 +00:00
baude d2eda1a864 Enhancements to papr tests
The PR contains several enhancements to our CI testing.

- enable lint testing on Fedora
- add Centos Atomic as test platform
- integration tests on run on the OS natively (uncontainerized)
- builds are done in containers
- inclusion of Vagrant file for local testing

Signed-off-by: baude <bbaude@redhat.com>

Closes: #18
Approved by: mheon
2017-11-17 02:07:18 +00:00
baude 7df3221232 Remove all images
Add -a/--all to rmi so a user can remove
all images quickly.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #41
Approved by: mheon
2017-11-14 16:46:26 +00:00
Urvashi Mohnani 23979f8e06 Add 'kpod import' command
Imports a tarball and saves it as a filesystem image

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>

Closes: #12
Approved by: rhatdan
2017-11-07 19:16:31 +00:00
Daniel J Walsh a39ec628e7 SELinux tests are mistakenly not running.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #22
Approved by: rhatdan
2017-11-07 13:33:07 +00:00
Daniel J Walsh 619637a919 Handle Linux Capabilities from command line
Had to revendor in docker/docker again, which dropped a bunch of packages

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-11-04 09:07:47 +00:00