deckarep / blade Goto Github PK
View Code? Open in Web Editor NEWa remote SSH command-line runner based on YAML recipe files.
Home Page: https://deckarep.github.io/blade/
License: MIT License
a remote SSH command-line runner based on YAML recipe files.
Home Page: https://deckarep.github.io/blade/
License: MIT License
HCL is HashiCorp’s DSL
If you have a recipe with an arg, you should be able to define it without a default value. This means, that Blade should error out and let the user know that the arg MUST be supplied at the command line as a result.
This will allow you to define args without a bogus default value and causing an unnecessary situation where things can error out.
I was playing around with bladerunner and I think I ran into an issue related with having multiple ssh keys in my ~/.ssh
directory.
hostname.blade.toml
[Required]
Commands = [
"hostname"
]
Hosts = ["165.227.192.60"]
In my .ssh/config
file I have the following
Host 165.227.192.60
Hostname 165.227.192.60
Port 22
User root
IdentityFile /home/vendion/.ssh/some_ssh_key
Trying to run my hostname command results in a panic
bladerunner run ceph-test hostname --verbose
2017/09/14 19:22:31 Starting recipe: ceph-test.hostname
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x6118d2]
goroutine 6 [running]:
github.com/deckarep/blade/vendor/golang.org/x/crypto/ssh.(*connection).clientAuthenticate(0xc4200c2300, 0xc4200c8180, 0x0, 0xa)
/home/vendion/gocode/src/github.com/deckarep/blade/vendor/golang.org/x/crypto/ssh/client_auth.go:54 +0x312
github.com/deckarep/blade/vendor/golang.org/x/crypto/ssh.(*connection).clientHandshake(0xc4200c2300, 0xc4200187c0, 0x11, 0xc4200c8180, 0x0, 0x0)
/home/vendion/gocode/src/github.com/deckarep/blade/vendor/golang.org/x/crypto/ssh/client.go:112 +0x2d9
github.com/deckarep/blade/vendor/golang.org/x/crypto/ssh.NewClientConn(0x86fce0, 0xc42000e0d0, 0xc4200187c0, 0x11, 0xc4200c8000, 0x86fce0, 0xc42000e0d0, 0x0, 0x0, 0xc420030528, ...)
/home/vendion/gocode/src/github.com/deckarep/blade/vendor/golang.org/x/crypto/ssh/client.go:82 +0xfd
github.com/deckarep/blade/vendor/golang.org/x/crypto/ssh.Dial(0x6fe513, 0x3, 0xc4200187c0, 0x11, 0xc4200c8000, 0xa587ebce15ee000, 0x59bb0f37, 0xc420030580)
/home/vendion/gocode/src/github.com/deckarep/blade/vendor/golang.org/x/crypto/ssh/client.go:176 +0xb3
github.com/deckarep/blade/lib/ssh.startSSHSession(0xc4200c8000, 0xc4200187c0, 0x11, 0xc420044920, 0x1, 0x1, 0x0, 0x0)
/home/vendion/gocode/src/github.com/deckarep/blade/lib/ssh/session.go:129 +0xe0
github.com/deckarep/blade/lib/ssh.executeSession.func1(0xc42000d300, 0xc42000d300)
/home/vendion/gocode/src/github.com/deckarep/blade/lib/ssh/session.go:112 +0x57
github.com/deckarep/blade/vendor/github.com/cenkalti/backoff.RetryNotify(0xc42005e840, 0x86c180, 0xc42000d300, 0x70f990, 0x0, 0x663d19)
/home/vendion/gocode/src/github.com/deckarep/blade/vendor/github.com/cenkalti/backoff/retry.go:37 +0x88
github.com/deckarep/blade/lib/ssh.executeSession(0xc4200c8000, 0xc4200187c0, 0x11, 0xc420044920, 0x1, 0x1)
/home/vendion/gocode/src/github.com/deckarep/blade/lib/ssh/session.go:111 +0x132
github.com/deckarep/blade/lib/ssh.consumeAndLimitConcurrency.func1(0xc4200c8000, 0xc420044920, 0x1, 0x1, 0xc4200187c0, 0x11)
/home/vendion/gocode/src/github.com/deckarep/blade/lib/ssh/utils.go:75 +0x7d
created by github.com/deckarep/blade/lib/ssh.consumeAndLimitConcurrency
/home/vendion/gocode/src/github.com/deckarep/blade/lib/ssh/utils.go:70 +0xe3
This is HashiCorp’s string interpolation language
re: @deckarep
I would consider this tool very early stages alpha and barely usable at this point
Are there plans to continue development into a stable production ready release?
What would it take to mature this project?
Should there be a roadmap in the wiki or something?
It would help contributors with moving this project along
Maybe call it Elle or eleven or simply 11? Too strange?
If you keep with Stranger Things theme do an Eleven Gopher.
Current behavior:
root
[Overrides]
User = "ubuntu"
would override every ssh connection to connect as user ubuntu
Desired behavior:
example recipe:
[Overrides]
User = "admin"
[Required]
Hosts = [
"localhost:221",
"root@localhost:222",
"customuser@localhost:223",
"localhost:224"
]
1st connection will connect as user admin
2nd connection will connect as user root
3rd connection will connect as user customuser
4th connection will connect as user admin
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.