Commit graph

111 commits

Author SHA1 Message Date
Mrunal Patel
22babd5bcd Bump up to version 0.3
Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2017-04-28 08:13:00 -07:00
Suraj Deshmukh
2699198610 Add flag --cpu-profile to enable pprof
To collect CPU profile information added a flag `--cpu-profile`
which is a path to file where this collected information will be
dumped.

Fixes #464

Signed-off-by: Suraj Deshmukh <surajssd009005@gmail.com>
2017-04-27 11:17:56 +05:30
Samuel Ortiz
c676b7b6c3 ocic: Initial implementation for ocic ctr exec
We use the k8s remotecommand client API to create a
streaming executor, and then stream the executed process
into stdout/stderr.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2017-04-24 18:44:49 +02:00
Jacek J. Łakis
3babbf0de1 ocic: Add container exec command
Signed-off-by: Jacek J. Łakis <jacek.lakis@intel.com>
2017-04-24 18:44:40 +02:00
Mrunal Patel
32b546cf0b Release version 0.2
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-04-13 09:50:14 -07:00
Daniel J Walsh
19620f3d1e Switch to using opencontainers/selinux
We have moved selinux support out of opencontainers/runc into its
own package.  This patch moves to using the new selinux go bindings.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-03-23 15:53:09 -04:00
Mrunal Patel
e147601584 Bump up version to 0.1
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-03-20 14:12:09 -07:00
Samuel Ortiz
2fc4d0cac1 config: Add host privileged runtime configuration
Not all runtimes are able to handle some of the kubelet
security context options, in particular the ones granting
host privileges to containers.

By adding a host privileged runtime path configuration, we
allow ocid to use a different runtime for host privileged
operations like e.g. host namespaces access.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2017-03-03 17:22:09 +01:00
Daniel J Walsh
cf5b0ae57f Deprecate --storage-option for --storage-opt
container-storage-setup (Formerly docker-storage-setup) is being converted to
run with container runtimes outside of docker.  Specifically we want to use it
with CRI-O/ocid.  It does not know anything about the container runtimes it
is generating options for, so it generates them based on the storage CLI of
docker.  I see no reason to have the storage option for ocid to be different
and we can just depracate the option for now.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-02-25 09:09:50 -05:00
Michał Żyłowski
5c81217e09 Applying k8s.io v3 API for ocic and ocid
Signed-off-by: Michał Żyłowski <michal.zylowski@intel.com>
2017-02-06 13:05:10 +01:00
Nalin Dahyabhai
c0333b102b Integrate containers/storage
Use containers/storage to store images, pod sandboxes, and containers.
A pod sandbox's infrastructure container has the same ID as the pod to
which it belongs, and all containers also keep track of their pod's ID.

The container configuration that we build using the data in a
CreateContainerRequest is stored in the container's ContainerDirectory
and ContainerRunDirectory.

We catch SIGTERM and SIGINT, and when we receive either, we gracefully
exit the grpc loop.  If we also think that there aren't any container
filesystems in use, we attempt to do a clean shutdown of the storage
driver.

The test harness now waits for ocid to exit before attempting to delete
the storage root directory.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-01-18 10:23:30 -05:00
Nalin Dahyabhai
caee4a99c9 Vendor containers/image and containers/storage
Vendor updated containers/image and containers/storage, along
with any new dependencies they drag in, and updated versions of other
dependencies that happen to get pulled in.

github.com/coreos/go-systemd/daemon/SdNotify() now takes a boolean to
control whether or not it unsets the NOTIFY_SOCKET variable from the
calling process's environment.  Adapt.

github.com/opencontainers/runtime-tools/generate/Generator.AddProcessEnv()
now takes the environment variable name and value as two arguments, not
one.  Adapt.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-01-18 10:21:59 -05:00
Jonathan Yu
6c9628cdb1
Build and install from GOPATH
* Rename 'vendor/src' -> 'vendor'
  * Ignore vendor/ instead of vendor/src/ for lint
* Rename 'cmd/client' -> 'cmd/ocic' to make it 'go install'able
* Rename 'cmd/server' -> 'cmd/ocid' to make it 'go install'able
* Update Makefile to build and install from GOPATH
* Update tests to locate ocid/ocic in GOPATH/bin
* Search for binaries in GOPATH/bin instead of PATH
* Install tools using `go get -u`, so they are updated on each run

Signed-off-by: Jonathan Yu <jawnsy@redhat.com>
2017-01-17 12:09:09 -08:00
Jonathan Yu
d5d297d50b
Promote DefaultConfig() to server package
The default configuration can only be accessed from the cmd/server
package, which cannot be imported (since it's a "package main").
This change promotes DefaultConfig() to the "server" package.

Closes: #315

Signed-off-by: Jonathan Yu <jawnsy@redhat.com>
2017-01-16 16:22:35 -08:00
Xianglin Gao
088c53579a Remove byName in cmd/server/main.go, since urfave/cli#544 has been in.
Signed-off-by: Xianglin Gao <xlgao@zju.edu.cn>
2017-01-05 15:42:22 +08:00
Antonio Murdaca
ac7943c707 Merge pull request #285 from sameo/topic/network-bats
Add Initial networking BATs
2016-12-20 16:49:04 +01:00
Nalin Dahyabhai
5e28e20213 Fix client size reporting
The client size field that we get back when we inspect an image is a
pointer to a number, not just a number, so we need to dereference it for
display.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-12-20 09:06:07 -05:00
Samuel Ortiz
c525459000
main: Add CNI options
We add 2 ocid options for choosing the CNI configuration and plugin
binaries directories: --cni-config-dir and --cni-plugin-dir.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2016-12-20 12:50:17 +01:00
Mrunal Patel
edad8f866d Add configuration for specifying cgroup manager
Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2016-12-19 15:04:34 -08:00
Nalin Dahyabhai
d45ff58056 Initialize the reexec package
Any binary that will be managing storage needs to initialize the reexec
package in order to be able to apply or read image layers.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-12-19 11:44:34 -05:00
Antonio Murdaca
e1054cf28e
cmd/client: move pod create to pod run
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-12-14 18:15:37 +01:00
Antonio Murdaca
430297dd81
store annotations and image for a container
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-12-12 11:12:03 +01:00
Mrunal Patel
79073df3c2 Merge pull request #215 from xlgao-zju/support-apparmor
support apparmor
2016-12-05 21:24:50 -08:00
Mrunal Patel
529bebbe68 Merge pull request #222 from mheon/kpod
Add basic skeleton of kpod executable
2016-12-01 20:37:32 -08:00
Matthew Heon
f512f211d0 Add basic skeleton of kpod executable
Signed-off-by: Matthew Heon <mheon@redhat.com>
2016-12-01 22:42:54 -05:00
Mrunal Patel
0d0b70a475 Add README for kpod
Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2016-12-01 07:31:36 -08:00
Xianglin Gao
06cc0ba6ba Add docs about apparmor profile setting
Signed-off-by: Xianglin Gao <xlgao@zju.edu.cn>
2016-12-01 13:26:59 +08:00
Xianglin Gao
26645c90ac Make the profile configurable
Signed-off-by: Xianglin Gao <xlgao@zju.edu.cn>
2016-12-01 13:26:59 +08:00
Antonio Murdaca
78ee03a8fc
add seccomp support
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-11-28 22:05:34 +01:00
Mrunal Patel
5c1adcbf6a Add client implementation for exec sync
Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2016-11-17 16:42:08 -08:00
Mrunal Patel
b62a150151 Update to the latest upstream API
Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2016-11-16 17:20:37 -08:00
Crazykev
82a01cbdda fix ocic time display
Signed-off-by: Crazykev <crazykev@zju.edu.cn>
2016-11-16 15:36:32 +08:00
Antonio Murdaca
02ec8754f5 Merge pull request #169 from cyphar/make-configurable
server: make more things configurable
2016-11-10 14:55:29 +01:00
Crazykev
295c32331a sort all map type result in ocic
Signed-off-by: Crazykev <crazykev@zju.edu.cn>
2016-11-02 14:36:42 +08:00
Crazykev
ca59eaf1a4 display container metadata on the client for container list and status
Signed-off-by: Crazykev <crazykev@zju.edu.cn>
2016-11-02 00:37:40 +08:00
Aleksa Sarai
96c0966ce9
server: make logDir configurable
While logDir isn't currently used (until the conmon implementation
lands) it's probably not a great idea to hardcode our defaults. The main
issue with this setting is that the kubelet can override it at will.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-10-31 23:26:42 +11:00
Aleksa Sarai
33f47d6a6b
server: make ImageStore configurable
It's a bit odd to have ImageStore be part of the config and yet we don't
allow people to modify it. However, leave it out of the commented
version because it's currently unused.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-10-31 23:26:42 +11:00
Mrunal Patel
e4b76edd96 Add timestamps to logs
Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2016-10-26 12:45:29 -07:00
Nalin Dahyabhai
346553312e Add "image list/remove/status" to the client
Add "image list", "image status", and "image remove" subcommands to the
client.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-10-26 13:19:36 -04:00
HaoZhang
9c11cc7dba make conmon inherit env from ocid
Signed-off-by: HaoZhang <crazykev@zju.edu.cn>
2016-10-23 19:22:27 +08:00
Mrunal Patel
68a350d9ae Merge pull request #157 from YaoZengzeng/ocic-timeout
add timeout for ocic connect to server
2016-10-18 09:32:09 -07:00
YaoZengzeng
8f91c149e2 add timeout for ocic connect to server
Signed-off-by: Yao Zengzeng <yaozengzeng@zju.edu.cn>
2016-10-18 13:50:16 +08:00
Mrunal Patel
1694591f6c Add support for adding labels at pod creation time
Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2016-10-17 12:33:48 -07:00
Mrunal Patel
2cc40ef9ef Add client support for filtering pods
Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2016-10-17 12:25:30 -07:00
Mrunal Patel
52dc8e4865 Add support for adding labels at ctr create time
Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2016-10-14 12:05:47 -07:00
Mrunal Patel
f12d94100c Add client changes for filtering containers by labels
Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2016-10-13 17:02:02 -07:00
Mrunal Patel
8d88bf1ab1 Add client support for filtering containers
Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2016-10-13 12:40:07 -07:00
Mrunal Patel
da4cc11077 Merge pull request #135 from runcom/sdnotify
Sdnotify
2016-10-13 11:00:22 -07:00
Antonio Murdaca
93ba37d00b
vendor go-systemd
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-10-13 19:40:18 +02:00
Antonio Murdaca
cf677a20f6
cmd/server: sort flags
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-10-13 16:57:48 +02:00