Comments (7)
Rake + sshkit work nice. I've managed to extend sshkit behavior to capture output of concurrent commands. This was a bit hard, since it has required to implement threaded dispatcher which consumes output of concurrent processes, mangles it and finally outputs in a nice and readable way.
Talking about batch tools and parallel ssh command executors, I can say none of them supports parallel execution on a "single host". Neither sshkit nor fabric.
So what I come with is rake with a build-in enhanced sshkit which allows a user easily define parallel jobs and get all the power of ssh connections via sshkit. Here's an example DSL:
require 'rake'
require './rake/remote'
ssh_options = {
keys: %w(/root/.ssh/busybee),
auth_methods: %w(publickey)
}
buildnode = ENV['BUILDNODE']
# testnodes = ENV['TESTNODES']
Remote.output_verbosity = :debug
remote = Remote.new(ssh_options)
# =============================================================================
# Run shellout dispatcher thread
ShellOut.run
# Flushes shellout when tasks are finished, finalization is required
# to write out any messages left in the queue.
multitask :build => [:first, :second] { ShellOut.finalize }
task default: :build
task :first do
remote.ssh hostname: buildnode do
options label: 'build st2common'
execute :bash, '-c', %q("ls -l /bin | head -n15")
end
end
task :second do
remote.ssh hostname: buildnode do
options label: 'build st2auth'
execute :bash, '-c', %q("ls -l /bin | head -n15")
execute :bash, '-c', %q("echo fail it; /bin/false"), label: 'fail it'
execute :true
end
end
This kind of DSL makes is easy to understand and far much better then any killing bash stuff, just have a look at the picture of parallel tasks example:
from st2-packages.
^^ 👍 Really nice output!
from st2-packages.
Okay this was merged into master. Build for wheezy takes 9 min on a 2CPU instance!
from st2-packages.
Cool thing to have 👍
Probably candidate for closing or you plan to extend it like build 1 package = 1 node
approach for future horizontal scaling?
from st2-packages.
Okay, we've reached the same performance on CircleCI. So far I'm satisfied with the current results, further improvements can be delayed for now.
from st2-packages.
implemented
from st2-packages.
https://stackstorm.slack.com/archives/stackstorm/p1454357997003953
from st2-packages.
Related Issues (20)
- Bug in echo command on st2bootstrap-deb.sh HOT 4
- EL8: convert RabbitMQ install to EPEL rpm when released
- 'repoquery -y' fails on EL6 and EL7 HOT 2
- Move MongoDB 3.4 -> 4.0 for EL7/U16 due to EOL
- packagingrunner failed at ppc linux - exec user process caused "exec format error" HOT 2
- EWC OSS: RBAC assignments and definitions integration HOT 2
- (action file most likely doesn't exist or contains invalid syntax): No module named cx_Oracle HOT 1
- Move packaging into the st2 repo
- Remove the st2resultstracker service from packaging
- Migrate Ubuntu 16.04 LTS (Xenial) from py2 to py3 HOT 1
- The st2 port is configured in the config file. But directly fixed in files such as service, socket, client, etc. HOT 2
- Installing st2 v3.4dev does not wait for the y/n input to confirm the python3.6 installation form the deadsnakes repository
- Use bash -n to check scripts
- rabbitMQ version on EL8 hardcoded HOT 3
- Review build process for ldap and rbac HOT 2
- Drop Ubuntu 18.04 support from packaging
- Add RockyLinux 9 (RHEL9)
- Drop CentOS7 (RHEL7) support
- Add Ubuntu 22.04 support
- Remove all references of CentOS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from st2-packages.