gocircuit / circuit

Circuit: Dynamic cloud orchestration http://gocircuit.org
Apache License 2.0
1.98k stars 160 forks source link

CIRCUIT_HMAC and CIRCUIT environment variables problems on Windows OS #24

Open omac777 opened 8 years ago

omac777 commented 8 years ago

On LInux everything as documented works as expected. Hats off!

On windows 8.1 on the other hand. These work: CIRCUIT_HMAC="C:\dev\msys64\home\Workstation\circuittests.hmac" CIRCUIT="C:\dev\msys64\home\Workstation\circuittests.circuit" circuit start -a 192.168.1.3:7777 circuit ls -d circuit://192.168.1.3:7777/2236/Q1753601169a58798 -hmac "C:\dev\msys64\home\Workstation\circuittests.hmac" /...

But environment variable usage as suggested in the documentation doesn't from within an msys2 shell. It just hangs: export CIRCUIT_HMAC="C:\dev\msys64\home\Workstation\circuittests.hmac" export CIRCUIT="C:\dev\msys64\home\Workstation\circuittests.circuit" circuit ls

FYI This works but necessitates passing the files on the command line. circuit start -a 192.168.1.3:7777 -hmac "C:\dev\msys64\home\Workstation\circuittests.hmac" CIRCUIT 2015 gocircuit.org 2016/02/18 16:58:56 Using symmetric HMAC authentication and RC4 encryption. circuit://192.168.1.3:7777/6304/Q77eae8d775184dfe 2016/02/18 16:58:56 Attaching /Xff6f649cfbf68200 as server 2016/02/18 16:58:56 Using UDP multicast discovery on address 228.8.8.8:8822

set PATH=%PATH%;"C:\dev\msys64\home\Workstation\Code\bin" set GOPATH="C:\dev\msys64\home\Workstation\Code" circuit ls -d circuit://192.168.1.3:7777/6304/Q77eae8d775184dfe -hmac "C:\dev\msys64\home\Workstation\circuittests.hmac" /... /Xff6f649cfbf68200

One question: when I start the first node on the circuit, it generates a new circuit id all the time. Is there a way to tell the first node to use the same circuit id somehow? Otherwise it means having to always change commands based on the newly generated circuit ids every time I restart the nodes.

ghost commented 8 years ago

About using msys2, I have a project where i need to run on Linux and Windows, and i ended up getting rid of all shell scripts and wrapping it all in go code. For me, i started with scripts to kick everything off as .sh scripts, and on windows i used msys2, because it could then call the .sh scripts. But it grows to be too many scripts etc, and these days you can replace them all with golang code that can call anything, but also can co-ordinate the start up of different services. Thee are even golang libs that act as OS services and accont for the differences between a Windows Service and a Linux SystemD service.

Of course, all of this become moot, if you just use DOkcer containers instead, because inside the containers its all Lnux, and the ability to orchestrate them it what Circuit (and other things out there these days also do).

A cross platform Startup lib. https://github.com/kardianos/service

SO maybe this helps with the current problem ??

Lastly, i have been wanting to try out Circuit and Escher in Anger, but i just never get enough time because of work commitments. I work in Machine Learning as well as standard sorts of projects, and even after months of Circuit having no progress, i still see it as being a compelling solution to the problem of ML and Big data and so all computation in general.

maymounkov commented 8 years ago

Hi David,

Unfortunately, I can't help with Windows-related questions as I don't have a Windows box or detailed knowledge of the system.

If this is just an environment variable issue (from what I can tell?) you might try using other ways of exporting variables. Like:

declare -x CIRCUIT=...

I am not sure if this helps.

P

On 18 February 2016 at 16:16, David Marceau notifications@github.com wrote:

On LInux everything as documented works as expected. Hats off!

On windows 8.1 on the other hand. These work: CIRCUIT_HMAC="C:\dev\msys64\home\Workstation\circuittests.hmac" CIRCUIT="C:\dev\msys64\home\Workstation\circuittests.circuit" circuit start -a 192.168.1.3:7777 circuit ls -d circuit://192.168.1.3:7777/2236/Q1753601169a58798 -hmac "C:\dev\msys64\home\Workstation\circuittests.hmac" /...

But environment variable usage as suggested in the documentation doesn't from within an msys2 shell. It just hangs: export CIRCUIT_HMAC="C:\dev\msys64\home\Workstation\circuittests.hmac" export CIRCUIT="C:\dev\msys64\home\Workstation\circuittests.circuit" circuit ls

— Reply to this email directly or view it on GitHub https://github.com/gocircuit/circuit/issues/24.