diff --git a/.travis.yml b/.travis.yml index 8cf2f37..bb64323 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,9 +4,15 @@ language: go go_import_path: github.com/Spirals-Team/docker-machine-driver-g5k env: + # Linux - GIMME_OS=linux GIMME_ARCH=amd64 + - GIMME_OS=linux GIMME_ARCH=386 + # MacOS - GIMME_OS=darwin GIMME_ARCH=amd64 + - GIMME_OS=darwin GIMME_ARCH=386 + # Windows - GIMME_OS=windows GIMME_ARCH=amd64 + - GIMME_OS=windows GIMME_ARCH=386 install: - go get -d -v ./... @@ -19,9 +25,7 @@ deploy: provider: releases skip_cleanup: true file: "docker-machine-driver-g5k-$GIMME_OS-$GIMME_ARCH" - on: tags: true - api_key: secure: Dbz7sdvLuyPFThLoTZCf3SeTTAxJgXWQ3q8Jdz4KEBJtPJQH1Q+9c7nEq/A2iI2GLvyMzntSB7BqCz8+XxIRTa1WwSkWIFC81KDnjS6Y2QtKzsn2SXprKDDkueK+9H5hsTjM6sw9CWgb5y8vWTF6ZeCW0wViUm4Sz8XzDGa4mcvCL6om6SWuKgHmfFBgj1qkhrrOzistxYDZHM6UjEAw8XYlZ0Q1peRleHZ+JbFyArkVak5XOOt6EtOCfztad9uNgWWqnfGoSDs+hE9++NVy5AO7jhzwln4scIsSjntnrjlgTSBGCH9WyhnuwTbY3Z0IcO3sQa6cKi5FNiVKFT27fj7nsh4fuqMW894Fq/dOS+fKuwzQnqZAtJvzPjoy1rDqmP19D1UfMelI+l7Qb7XRoYqt7oGgEiZQp6xJx9U3g45iKQibLBaL/Quhqc/a94YLdskoZ54JbuaNoKGimESvmAua8oRbIc9hg9Fh9XfSWdgw7ZP8Ivz18G+r5W6JnqpTlgjC6k/2PIqXuHO0Ll2ryeQL7T803OPThMSS0CDgKsxDH27tiFsKLMsdnYb8SUgA82NaMIAL3RKWGWbegFWlfPobebhKyM4YDt6Q88VRWgZ6RTfU+TbTg47Xoljx2W6RUEtOj1W8SBYeFNE17VJlsEYslQrmSJsFte9x80/mIas= diff --git a/README.md b/README.md index 25bd1a0..6bda0cb 100644 --- a/README.md +++ b/README.md @@ -6,15 +6,15 @@ A Docker Machine driver for the Grid5000 testbed infrastructure. It can be used ## Requirements * [Docker](https://www.docker.com/products/overview#/install_the_platform) * [Docker Machine](https://docs.docker.com/machine/install-machine) -* [Go tools](https://golang.org/doc/install) +* [Go tools (Only for installation from sources)](https://golang.org/doc/install) You need a Grid5000 account to use this driver. See [this page](https://www.grid5000.fr/mediawiki/index.php/Grid5000:Get_an_account) to create an account. ## Installation from GitHub releases -Binary releases are available for Linux, MacOS and Windows from the [releases page](https://github.com/Spirals-Team/docker-machine-driver-g5k/releases). +Binary releases for Linux, MacOS and Windows using x86/x86_64 CPU architectures are available in the [releases page](https://github.com/Spirals-Team/docker-machine-driver-g5k/releases). You can use the following commands to install or upgrade the driver: ```bash -# download the binary for your OS +# download the binary for your OS and CPU architecture : sudo curl -L -o /usr/local/bin/docker-machine-driver-g5k "" # grant execution rigths to the driver for everyone : diff --git a/api/utils.go b/api/utils.go deleted file mode 100644 index da1671f..0000000 --- a/api/utils.go +++ /dev/null @@ -1,14 +0,0 @@ -package api - -import "fmt" - -// ConvertDuration take a string "hh:mm:ss" and convert it in seconds -func ConvertDuration(t string) (int, error) { - var h, m, s int - - if _, err := fmt.Sscanf(t, "%d:%d:%d", &h, &m, &s); err != nil { - return 0, err - } - - return (h * 3600) + (m * 60) + s, nil -} diff --git a/driver/driver.go b/driver/driver.go index 90846ae..d1e73a4 100644 --- a/driver/driver.go +++ b/driver/driver.go @@ -249,16 +249,10 @@ func (d *Driver) PreCreateCheck() (err error) { // skip job reservation if an ID is already set if d.G5kJobID == 0 { - // convert walltime to seconds - seconds, err := api.ConvertDuration(d.G5kWalltime) - if err != nil { - return err - } - // creating a new job with 1 node jobReq := api.JobRequest{ Resources: fmt.Sprintf("nodes=1,walltime=%s", d.G5kWalltime), - Command: fmt.Sprintf("sleep %v", seconds), + Command: "sleep 365d", Properties: d.G5kResourceProperties, Types: []string{"deploy"}, }