This repository has been archived by the owner on Jun 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
104 changed files
with
20,542 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
docker-machine-driver-vscale | ||
*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Changelog | ||
|
||
## 1.0.0 (2016-04-11) | ||
|
||
Initial public release |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
GODEP_BIN := $(GOPATH)/bin/godep | ||
GODEP := $(shell [ -x $(GODEP_BIN) ] && echo $(GODEP_BIN) || echo '') | ||
|
||
# Initialize version flag | ||
GO_LDFLAGS := -X $(shell go list ./).GitCommit=$(shell git rev-parse --short HEAD 2>/dev/null) | ||
|
||
default: build | ||
|
||
bin/docker-machine-driver-vscale: | ||
go build -i -ldflags "$(GO_LDFLAGS)" \ | ||
-o ./bin/docker-machine-driver-vscale ./bin | ||
|
||
build: clean bin/docker-machine-driver-vscale | ||
|
||
clean: | ||
$(RM) bin/docker-machine-driver-vscale | ||
|
||
install: bin/docker-machine-driver-vscale | ||
cp -f ./bin/docker-machine-driver-vscale $(GOPATH)/bin/ | ||
|
||
test-acceptance: | ||
test/integration/run-bats.sh test/integration/bats/ | ||
|
||
dep-save: | ||
$(if $(GODEP), , \ | ||
$(error Please install godep: go get github.com/tools/godep)) | ||
$(GODEP) save $(shell go list ./... | grep -v vendor/) | ||
|
||
dep-restore: | ||
$(if $(GODEP), , \ | ||
$(error Please install godep: go get github.com/tools/godep)) | ||
$(GODEP) restore -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,61 @@ | ||
# docker-machine-vscale | ||
# Docker Machine Vscale Driver | ||
|
||
This is a plugin for [Docker Machine](https://docs.docker.com/machine/) allowing | ||
to create Doker hosts on [Vscale]( http://vscale.io ) cloud services. | ||
|
||
## Installation | ||
|
||
To install this plugin manually, download the binary `docker-machine-driver-vscale` | ||
and make it available by `$PATH`, for example by putting it to `/usr/local/bin/`: | ||
|
||
```console | ||
$ curl -L https://github.com/vahaah/docker-machine-vscale/releases/download/v1.0.0/docker-machine-driver-vscale > /usr/local/bin/docker-machine-driver-vscale | ||
|
||
$ chmod +x /usr/local/bin/docker-machine-driver-vscale | ||
``` | ||
|
||
The latest version of `docker-machine-driver-vscale` binary is available on | ||
the ["Releases"](https://github.com/vahaah/docker-machine-vscale/releases) page. | ||
|
||
## Usage | ||
|
||
After compile you can use driver for creating docker hosts. | ||
Get Vscale access token from [your profile](https://vscale.io/panel/settings/tokens/) then run: | ||
|
||
```console | ||
$ docker-machine create -d vscale --vscale-access-token YOUR_VSCALE_ACCESS_TOKEN machine_name | ||
``` | ||
|
||
Available options: | ||
|
||
- `--vscale-access-token`: Access token. | ||
- `--vscale-location`: Server location. | ||
- `--vscale-rplan`: Server size. | ||
- `--vscale-made-from`: Server type | ||
|
||
Environment variables and default values: | ||
|
||
| CLI option | Environment variable | Default | | ||
|-------------------------------|-----------------------------|-----------------------------| | ||
| `--vscale-access-token` | `VSCALE_ACCESS_TOKEN` | - | | ||
| `--vscale-location` | `VSCALE_LOCATION` | `spb0` | | ||
| `--vscale-rplan` | `VSCALE_RPLAN` | `small` | | ||
| `--vscale-made-from` | `VSCALE_MADE_FROM` | `ubuntu_14.04_64_002_master`| | ||
|
||
## Development | ||
|
||
### Build from Source | ||
If you wish to work on Parallels Driver for Docker machine, you'll first need | ||
[Go](http://www.golang.org) installed (version 1.5+ is required). | ||
Make sure Go is properly installed, including setting up a [GOPATH](http://golang.org/doc/code.html#GOPATH). | ||
|
||
Run these commands to build the plugin binary: | ||
|
||
```bash | ||
$ go get -d github.com/vahaah/docker-machine-vscale | ||
$ cd $GOPATH/github.com/vahaah/docker-machine-vscale | ||
$ make build | ||
``` | ||
|
||
After the build is complete, `bin/docker-machine-driver-vscale` binary will | ||
be created. If you want to copy it to the `${GOPATH}/bin/`, run `make install`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package main | ||
|
||
import ( | ||
"os" | ||
"path" | ||
|
||
"github.com/vahaah/docker-machine-vscale" | ||
"github.com/codegangsta/cli" | ||
"github.com/docker/machine/libmachine/drivers/plugin" | ||
) | ||
|
||
var appHelpTemplate = `This is a Docker Machine plugin for Vscale. | ||
Plugin binaries are not intended to be invoked directly. | ||
Please use this plugin through the main 'docker-machine' binary. | ||
Version: {{.Version}}{{if or .Author .Email}} | ||
Author:{{if .Author}} | ||
{{.Author}}{{if .Email}} - <{{.Email}}>{{end}}{{else}} | ||
{{.Email}}{{end}}{{end}} | ||
{{if .Flags}} | ||
Options: | ||
{{range .Flags}}{{.}} | ||
{{end}}{{end}} | ||
Commands: | ||
{{range .Commands}}{{.Name}}{{with .ShortName}}, {{.}}{{end}}{{ "\t" }}{{.Usage}} | ||
{{end}} | ||
` | ||
|
||
func main() { | ||
cli.AppHelpTemplate = appHelpTemplate | ||
app := cli.NewApp() | ||
app.Name = path.Base(os.Args[0]) | ||
app.Usage = "This is a Docker Machine plugin binary. Please use it through the main 'docker-machine' binary." | ||
app.Author = "Alex Vakhitov" | ||
app.Email = "https://github.com/vahaah/docker-machine-vscale/" | ||
app.Version = vscale.FullVersion() | ||
app.Action = func(c *cli.Context) { | ||
plugin.RegisterDriver(vscale.NewDriver("", "")) | ||
} | ||
|
||
app.Run(os.Args) | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.