andrewchilds / overcast

Orchestrate VMs from your terminal
MIT License
478 stars 36 forks source link

Windows support #7

Closed jdiamond closed 10 years ago

jdiamond commented 10 years ago

Hey man, sorry to bother you with this, but would you accept a PR that makes running overcast work on Windows (as long as you have bash, SSH, etc, installed)?

I got overcast init to work by creating a real simple wrapper function around child_process.exec along with a few other modifications, trying really hard to be as unobtrusive as possible. After that, a bunch of the other commands just worked to where I was able to create a cluster and new droplet.

I can create a proper fork so you can see the diff if you're interested. If it's not something you want, I'll just force the other devs here to Putty into a Linux environment if they want to manage our DigitalOcean servers.

jdiamond commented 10 years ago

Decided to check it in in case I felt like hacking on it this weekend:

https://github.com/jdiamond/overcast/commit/e3549bd4a4f001f597ceae195a322ba58b7cc18b

I can init, create a droplet, and run scripts on it so far.

andrewchilds commented 10 years ago

Whoa, nice work! The thing is, Windows support isn't something I'll be able to maintain, so the idea of being on the hook for code I can't easily test, or the "Why isn't this working on my Windows machine?" questions that I won't be able to answer, doesn't sound great. I think official support should stay limited to OS X/Linux for now so I can be confident that Overcast does what it says on the tin. How about if in the README I link to your fork for "experimental" Windows support for now?

jdiamond commented 10 years ago

Totally understand. I was actually thinking about it during my drive home and I think I can remove the Windows-isms. I'll play with it a bit and get back to you.

jdiamond commented 10 years ago

I was able to get as far as deploying overcast-charts. Even though the changes required to get it to work are pretty minor, I'm not sure it's worth submitting yet so closing this for now.

If anybody wants to check it out, branch is here:

https://github.com/jdiamond/overcast/tree/windows-support

mscdex commented 10 years ago

There's always ssh2 for cross platform, non-child process-based ssh/sftp capabilities :-)

jdiamond commented 10 years ago

That's really interesting.

The problem is actually executing scripts and commands on the local machine. Overcast spawns ssh, scp, ssh-keygen, bash, mkdir, and chmod.

Maybe ssh2, scp2, ssh-keygen2, and ShellJS could replace spawning processes locally.

(Except ssh-keygen2 is just a wrapper around ssh-keygen so that would still have to be in the PATH.)

andrewchilds commented 10 years ago

@jdiamond: I changed my mind. Even though I don't want to officially support Windows, I can still use your code to make Overcast more Windows-friendly. I've created a PR using your code: #10. Take a look and let me know what you think.

jdiamond commented 10 years ago

Wow, very cool! I will test it out tomorrow at work.