Merge pull request #222 from mheon/kpod

Add basic skeleton of kpod executable
This commit is contained in:
Mrunal Patel 2016-12-01 20:37:32 -08:00 committed by GitHub
commit 529bebbe68
4 changed files with 45 additions and 1 deletions

1
.gitignore vendored
View file

@ -1,5 +1,6 @@
/ocid /ocid
/ocic /ocic
/kpod
conmon/conmon conmon/conmon
conmon/conmon.o conmon/conmon.o
pause/pause pause/pause

View file

@ -52,12 +52,16 @@ ocid: $(GO_SRC) | ${OCID_LINK}
ocic: $(GO_SRC) | ${OCID_LINK} ocic: $(GO_SRC) | ${OCID_LINK}
$(GO) build -o $@ ./cmd/client/ $(GO) build -o $@ ./cmd/client/
kpod: $(GO_SRC) | ${OCID_LINK}
$(GO) build -o $@ ./cmd/kpod/
ocid.conf: ocid ocid.conf: ocid
./ocid --config="" config --default > ocid.conf ./ocid --config="" config --default > ocid.conf
clean: clean:
rm -f ocid.conf rm -f ocid.conf
rm -f ocic ocid rm -f ocic ocid
rm -f kpod
rm -f ${OCID_LINK} rm -f ${OCID_LINK}
rm -f docs/*.5 docs/*.8 rm -f docs/*.5 docs/*.8
find . -name \*~ -delete find . -name \*~ -delete
@ -77,7 +81,7 @@ integration: ocidimage
localintegration: binaries localintegration: binaries
./test/test_runner.sh ${TESTFLAGS} ./test/test_runner.sh ${TESTFLAGS}
binaries: ocid ocic conmon pause binaries: ocid ocic kpod conmon pause
MANPAGES_MD := $(wildcard docs/*.md) MANPAGES_MD := $(wildcard docs/*.md)
MANPAGES := $(MANPAGES_MD:%.md=%) MANPAGES := $(MANPAGES_MD:%.md=%)

16
cmd/kpod/launch.go Normal file
View file

@ -0,0 +1,16 @@
package main
import (
"fmt"
"github.com/urfave/cli"
)
// TODO implement
var launchCommand = cli.Command{
Name: "launch",
Usage: "launch a pod",
Action: func(context *cli.Context) error {
return fmt.Errorf("this functionality is not yet implemented")
},
}

23
cmd/kpod/main.go Normal file
View file

@ -0,0 +1,23 @@
package main
import (
"os"
"github.com/Sirupsen/logrus"
"github.com/urfave/cli"
)
func main() {
app := cli.NewApp()
app.Name = "kpod"
app.Usage = "manage pods and images"
app.Version = "0.0.1"
app.Commands = []cli.Command{
launchCommand,
}
if err := app.Run(os.Args); err != nil {
logrus.Fatal(err)
}
}