Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Machine driver for Rancher #12

Open
neuroserve opened this issue Feb 1, 2018 · 6 comments · May be fixed by #14
Open

Machine driver for Rancher #12

neuroserve opened this issue Feb 1, 2018 · 6 comments · May be fixed by #14

Comments

@neuroserve
Copy link

I'd like to add the triton machine driver to Rancher (rancher.com).
Docs: http://rancher.com/docs/rancher/v1.3/en/configuration/machine-drivers/

Where can I find the "machine driver binary 64-bit Linux" or how can I create it?
Sorry, I'm not a go master (yet).

@neuroserve
Copy link
Author

Sorry - my go version was to old. I got a binary now

@neuroserve neuroserve reopened this Feb 1, 2018
@neuroserve
Copy link
Author

OK. Having compiled docker-machine-driver-triton I tried to add it as a custom docker-machine driver to rancher (s. http://rancher.com/docs/rancher/v1.3/en/configuration/machine-drivers/). That worked OK. Problem is, that we have to add "A path to an SSH private key file that has been added to $SDC_ACCOUNT" to provision a VM. I guess, this path would be inside the rancher server (which is a docker container, as well). I've tried to add it (by mapping a volume inside the rancher server) but get

Error with pre-create check: "error creating SSH private key signer: Error PEM-decoding private key material: nil block received

back from the cloudapi.
I know, that this is probably a rancher question but at the same time I suspect that here are more Joyent users than in the rancher-community.
Can I provide the key instead of the path to the key?

@jwreagor
Copy link
Contributor

jwreagor commented Feb 1, 2018

The error you've described, error creating SSH private key signer: Error PEM-decoding private key material: nil block received, typically comes from a string value being input into our Go client library (triton-go) but not in a format that can be parsed. That would be the Error PEM-decoding private key material part.

Verify the key input into the Docker Machine driver. Make sure you are handling newlines properly or transforming newlines before it is used by Docker Machine. I'm not sure how this can be done with Rancher.

Let me know what you find, interested in helping debug this.

@jwreagor
Copy link
Contributor

jwreagor commented Feb 1, 2018

As another example, the same Go client library (triton-go) that Docker Machine driver is using is also used by Minio. In order to pass a key into a container to run Minio I had to transform newlines into # than back into newlines. Here's the relevant bits.

@blackwood821
Copy link

@neuroserve I'm a little late to the party but did you ever get this working? I'm interested in a rancher machine driver for triton as well.

@blackwood821
Copy link

@neuroserve I recently worked on getting this machine driver working in Rancher and IIRC I also encountered this error in the beginning:

error creating SSH private key signer: Error PEM-decoding private key material: nil block received

and I think I worked around it by generating a new SSH key in PEM format (ssh-keygen -m PEM ...) and added that to my Triton account. Then triton-go didn't complain about the key. The key that it didn't like started with:

-----BEGIN OPENSSH PRIVATE KEY-----

and the PEM key that it liked started with:

-----BEGIN RSA PRIVATE KEY-----

I guess, this path would be inside the rancher server (which is a docker container, as well). I've tried to add it (by mapping a volume inside the rancher server)

Since this is a very old issue with no recent activity I opened a new issue (#13) related to this that will be followed up by a PR for making this driver compatible with Rancher.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants