[ARVADOS] created: 13375ee4058444cdb3389ee089df933c297ef672
git at public.curoverse.com
git at public.curoverse.com
Wed Dec 23 15:15:41 EST 2015
at 13375ee4058444cdb3389ee089df933c297ef672 (commit)
commit 13375ee4058444cdb3389ee089df933c297ef672
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Wed Dec 23 15:15:36 2015 -0500
7816: First commit
diff --git a/services/crunch-exec/crunchexec.go b/services/crunch-exec/crunchexec.go
new file mode 100644
index 0000000..e9afa3a
--- /dev/null
+++ b/services/crunch-exec/crunchexec.go
@@ -0,0 +1,59 @@
+package main
+
+import (
+ "fmt"
+ "git.curoverse.com/arvados.git/sdk/go/arvadosclient"
+ "git.curoverse.com/arvados.git/sdk/go/keepclient"
+ "log"
+ "os"
+ "os/exec"
+ "os/signal"
+ "strings"
+ "syscall"
+)
+
+type IArvadosClient interface {
+ Create(resourceType string, parameters arvadosclient.Dict, output interface{}) error
+ Update(resourceType string, uuid string, parameters arvadosclient.Dict, output interface{}) (err error)
+}
+
+type Mount struct { }
+
+type Container struct {
+ Uuid string `json:"uuid"`,
+ Command []string `json:"command"`,
+ ContainerImage string `json:"container_image`,
+ Cwd string `json:"cwd"`,
+ Environment map[string]string `json:"environment"`,
+ Mounts map[string]Mount `json:"mounts"`,
+ OutputPath string `json:"output_path"`,
+ Priority int `json:"priority"`,
+ RuntimeConstraints map[string]string `json:"runtime_constraints"`
+}
+
+func runner(api IArvadosClient,
+ kc IKeepClient,
+ containerUuid string) error {
+}
+
+func main() {
+ api, err := arvadosclient.MakeArvadosClient()
+ if err != nil {
+ log.Fatal(err)
+ }
+
+ var containerStruct Container
+ err = api.Get("containers", containerUuid, nil, &containerStruct)
+ if err != nil {
+ log.Fatal(err)
+ }
+
+ var kc IKeepClient
+ kc, err = keepclient.MakeKeepClient(&api)
+ if err != nil {
+ log.Fatal(err)
+ }
+
+ err = runner(api, kc, jobStruct)
+
+}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list