pagerduty / blender Goto Github PK
View Code? Open in Web Editor NEWA modular orchestration engine
Home Page: https://github.com/PagerDuty/blender
License: Other
A modular orchestration engine
Home Page: https://github.com/PagerDuty/blender
License: Other
What's the preferred way to run Blender tasks from plain Ruby or Rake instead of using the Thor DSL?
I'd like to integrate Blender in a different project. This is what I have so far but I'm running into errors.
require 'blender'
include Blender::SchedulerDSL
list = %w(host1 host2 host3)
ssh_task 'update' do
execute 'sudo apt-get update'
members list
end
ssh_task 'upgrade' do
execute 'sudo apt-get upgrade -y'
members list
end
concurrency 2
~/.rvm/gems/ruby-1.9.3-p194/gems/pd-blender-0.0.1/lib/blender/scheduler/dsl.rb:84:in `build_task': undefined local variable or method `metadata' for main:Object (NameError)
from ~/.rvm/gems/ruby-1.9.3-p194/gems/pd-blender-0.0.1/lib/blender/scheduler/dsl.rb:114:in `ssh_task'
from test.rb:6:in `<main>'
Thanks in advance!
Hi,
while trying it out, I just create a simple /tmp/exampe.rb and executed:
USER=root blend -f /tmp/example.rb
and got the following trace:
3 job(s) computed using 'Default' strategy
Run failed (0.000161113 s)
blender/lib/blender/lock/flock.rb:48:in `release': undefined method `flock' for nil:NilClass (NoMethodError)
from blender/lib/blender/lock/flock.rb:60:in `ensure in with_lock'
from blender/lib/blender/lock/flock.rb:60:in `with_lock'
from blender/lib/blender/scheduler/dsl.rb:150:in `lock'
from blender/lib/blender/scheduler.rb:58:in `run'
from blender/lib/blender.rb:44:in `blend'
from blender/lib/blender/cli.rb:54:in `from_file'
moving the file elsewhere solved the issue.
We would like to see a feature where you can define a logfile for each member. With lots of members it is now quite difficult to see what is going on and what is happening on each member.
Our workaround right now is to add the HOSTNAME prefix to the output of the command like this:
ssh_task '/usr/bin/chef-client | while read i ; do [[ -n "$i" ]] && printf "%b" "[$HOSTNAME]\t$i\n"; done ; exit ${PIPESTATUS[0]}'
However, a more convenient solution would be that blender supports a seperate logfile for each member.
Hi,
we use blender in an ant task and the output in the build.log has these ANSI color codes in it, like this:
[exec] �[32mRun finished (10.458212424 s)�[0m
Is there a way to deactivate this colorful output?
Thanks!
Hi,
is there a way to get the stdout/stderr Output of the ssh-Job?
Right now i just found the debug Option for the Tool itself. (json-File with "log_level": "debug")
But i didnt found a way to redirect the stdout/stderr of the SSH-Job.
Thanks for your help.
MfG Johann
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.