From 6e7e58e236b7a6fdbc3140209cf43c232fec7c3b Mon Sep 17 00:00:00 2001 From: Dan Walsh Date: Wed, 28 Sep 2016 14:33:53 -0400 Subject: [PATCH] Add man page for ocid Signed-off-by: Dan Walsh --- Makefile | 25 +++++++++++++++++-- docs/ocid.8.md | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+), 2 deletions(-) create mode 100644 docs/ocid.8.md diff --git a/Makefile b/Makefile index 2ebce81c..ba93edc0 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,7 @@ OCID_INSTANCE := ocid_dev SYSTEM_GOPATH := ${GOPATH} PREFIX ?= ${DESTDIR}/usr INSTALLDIR=${PREFIX}/bin +GO_MD2MAN ?= /usr/bin/go-md2man export GOPATH := ${CURDIR}/vendor default: help @@ -42,6 +43,9 @@ clean: rm -f ocic ocid rm -f ${OCID_LINK} rm -f conmon/conmon.o conmon/conmon + rm -f docs/*.1 docs/*.8 + find . -name \*~ -delete + find . -name \#\* -delete ocidimage: docker build -t ${OCID_IMAGE} . @@ -61,14 +65,28 @@ localintegration: binaries binaries: ${OCID_LINK} ocid ocic conmon -install: +MANPAGES_MD = $(wildcard docs/*.md) + +docs/%.1: docs/%.1.md + $(GO_MD2MAN) -in $< -out $@.tmp && touch $@.tmp && mv $@.tmp $@ + +docs/%.8: docs/%.8.md + $(GO_MD2MAN) -in $< -out $@.tmp && touch $@.tmp && mv $@.tmp $@ + +docs: $(MANPAGES_MD:%.md=%) + +install: binaries docs install -D -m 755 ocid ${INSTALLDIR}/ocid install -D -m 755 ocic ${INSTALLDIR}/ocic install -D -m 755 conmon/conmon ${INSTALLDIR}/conmon + install -d $(PREFIX)/share/man/man8 + install -m 644 $(basename $(MANPAGES_MD)) $(PREFIX)/share/man/man8 uninstall: rm -f ${INSTALLDIR}/{ocid,ocic,conmon} - + for i in $(basename $(MANPAGES_MD)); do \ + rm -f $(PREFIX)/share/man/man8/$$(basename $${i}); \ + done .PHONY: .gitvalidation # When this is running in travis, it will only check the travis commit range @@ -94,9 +112,12 @@ install.tools: .install.gitvalidation .install.gometalinter .PHONY: \ binaries \ conmon \ + default \ + docs \ ocid \ ocic \ clean \ lint \ + help \ install \ uninstall diff --git a/docs/ocid.8.md b/docs/ocid.8.md new file mode 100644 index 00000000..d111c783 --- /dev/null +++ b/docs/ocid.8.md @@ -0,0 +1,67 @@ +% ocid(8) Open Container Initiative Daemon +% Dan Walsh +% SEPTEMBER 2016 +# NAME +ocid - Enable OCI Kubernetes Container Runtime daemon + +# SYNOPSIS +**ocid** +[**--root**=[*value*]] +[**--sandboxdir**=[*value*]] +[**--containerdir**=[*value*]] +[**--socket**=[*value*]] +[**--runtime**=[*value*]] +[**--debug**] +[**--log**=[*value*]] +[**--log-format value**] +[**--help**|**-h**] +[**--version**|**-v**] + +# DESCRIPTION +OCI-based implementation of Kubernetes Container Runtime Interface Daemon + +ocid is meant to provide an integration path between OCI conformant runtimes and the kubelet. Specifically, it implements the Kubelet Container Runtime Interface (CRI) using OCI conformant runtimes. The scope of ocid is tied to the scope of the CRI. + + * Support multiple image formats including the existing Docker image format + * Support for multiple means to download images including trust & image verification + * Container image management (managing image layers, overlay filesystems, etc) + * Container process lifecycle management + * Monitoring and logging required to satisfy the CRI + * Resource isolation as required by the CRI + +**ocid [OPTIONS]** + +# OPTIONS + +**--root**="" + OCID root dir (default: "/var/lib/ocid") + +**--sandboxdir**="" + OCID pod sandbox dir (default: "/var/lib/ocid/sandboxes") + +**--containerdir**="" + OCID container dir (default: "/var/lib/ocid/containers") + +**--socket**="" + Path to ocid socket (default: "/var/run/ocid.sock") + +**--runtime**="" + OCI runtime path (default: "/usr/bin/runc") + +**--debug** + Enable debug output for logging + +**--log**="" + Set the log file path where internal debug information is written + +**--log-format**="" + Set the format used by logs ('text' (default), or 'json') (default: "text") + +**--help, -h** + Print usage statement + +**--version, -v** + Print the version + +# HISTORY +Sept 2016, Originally compiled by Dan Walsh