Comments (5)
I'll try and update it this weekend. In the meantime, here's the quick version: Check out the repository somewhere and cd into it. Use go build
then in order to generate an executable (make sure the result is named docker-machine-driver-hetzner
).
Put this executable somewhere into your PATH then. You should be able to type docker-machine-driver-hetzner
from some other directory and still execute the file (it'll generate an error, that's fine).
Then use docker-machine
as described in the Usage
section. It'll auto-execute the corresponding driver file, given that it is in path.
from docker-machine-driver-hetzner.
Cool, thanks! I tried it out and was able to build stuff. Some input (due to errors I saw on Linux):
- There is a minimum version of Go required (when I used go 1.6.2 that was installed by my Linux distribution, I got errors like
main.go:4:2: cannot find package "github.com/docker/machine/libmachine/drivers/plugin"
).go build
worked fine when using go version 1.9.3 from https://golang.org/dl/. When the binary was renamed and available via $PATH, I was able to make docker-machine use the driver. - When I changed the usage description of the
hetzner-api-token
indriver/driver.go
fromProject-specific Hetzner API token
toProject-specific Hetzner API token (HAHA)
indriver\driver.go
, didgo build
andmv ...
again, this had no effect on the output ofdocker-machine create --driver hetzner
. Do I need to builddriver/driver.go
separately?
I'll continue trying out what I have so far, no need to hurry :-)
from docker-machine-driver-hetzner.
Little self-disclosure here, I'm not the most fluent go-speaker either, but it's by far the easiest way to interact with the whole docker ecosystem. That being said, I mostly leave the organizational work over to GoLand and hope it doesn't break stuff.
My answer wasn't really complete last night, but in self-defense, I had spent 10 hours of system moving for the 'you work with computers, don't you?'-type relative before.
So let me elaborate a bit more: In go
, you usually work in a fixed directory structure, the root of which is indicated by $GOPATH
. You then have a src
sub-folder there, where packages' sources go in. The folder structure should match the package structure (that is, this driver should be in src/github.com/jonasprogrammer/docker-machine-driver-hetzner
). Most likely your build command downloaded the driver
-subpackage there, thus ignoring your changes. As for dependencies, you should run go get -d
from the package's main directory once, in order to download all required dependencies.
Instead of this manual checkout, you can also just go get -d github.com/jonasprogrammer/docker-machine-driver-hetzner
.
It gets even easier with go get github.com/jonasprogrammer/docker-machine-driver-hetzner
(UPDATE: no -i flag, just plain go get
without -d
), which automatically builds everything and drops the executable to $GOPATH/bin
.
Again sorry for the inconvenience, I'm used to my build environment, where stuff mostly 'just works'.
As for the (HAHA) part, has something changed about this? The documentation is still from the cloud-beta stages and the only changes I made were the new default server type and location disclaimer. Correct me, if something is wrong there.
from docker-machine-driver-hetzner.
Thanks for the explanation! I was able to build the driver and use it to create a server via docker-machine. Don't mind the (HAHA) it was just a not-random-enough random string to modify the code. I should have used (FOO) or so ...
I find it a bit confusing to checkout sources and have the build download and use other sources then. I'll try to assemble a pull request to change that :-).
from docker-machine-driver-hetzner.
Thanks a lot for your contribution and fixing it in #2. Feel free to reopen, if there's more to do
from docker-machine-driver-hetzner.
Related Issues (20)
- wrong naming of wait-on-error HOT 4
- make driver rancher compatible HOT 1
- image has incompatible architecture HOT 2
- Support int64 IDs HOT 1
- panic: runtime error: invalid memory address or nil pointer dereference HOT 7
- unknown location / unable to find ssh-keys HOT 2
- Provide fallback server type HOT 3
- Hetzner: Cloud API Change: GET /actions endpoint HOT 2
- Error creating machine HOT 13
- Lots of machines in cloud but only a few in docker-machine HOT 3
- Rancher - error scaling up servers HOT 7
- Rancher - VMs are not removed from Hetzner, when got storage
- Rancher - It is not possible to create Node/Clusters using RKE2/K3s, only RKE1 is available HOT 7
- Wait on srv.NextActions after creating server HOT 3
- Apple M3 Max HOT 1
- Fleeting plugin for Hetzner HOT 3
- Problem with Rancher when scaling up HOT 2
- Adding a flag for RDNS domain HOT 2
- Hetzer debian/ubuntu provisioning fails HOT 4
- Suggestion: `--hetzner-user-data-from-file` could be string instead of boolean HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-machine-driver-hetzner.