Comments (2)
I have been working on this and wanted to see what people thought. This is also including functionality for #668.
Two new options to the upgrade task.
-C, --concurrency - Specifies the max number of nodes that can be converged concurrently.
-b, --bootstrap-order - Specifies that nodes are converged in the order specified in the stack_order.
Here is how these things work together. Consider the stack order
stack_order do
bootstrap 'app::database'
bootstrap 'app::service'
end
and a manifest
{
"nodes": [
{
"groups": ["app::database"],
"hosts": ["db1", "db2", "db3"]
},
{
"groups": ["app::service"],
"hosts": ["app1", "app2", "app3"]
}
]
}
The first thing I am doing is getting the task_queue from the bootstrap_routine and then using that to group all hostnames in the correct order. So, in the above example I have
[["db1", "db2", "db3"], ["app1", "app2", "app3"]]
Now depending on the combination of the --concurrency and --bootstrap flags this array is transformed into an array of "concurrency groups". In other words it is an array of arrays where each sub array can be converged in parallel.
If --concurrency 2
# We don't care that db nodes and app nodes are converged in parallel.
# We just are restricting the max number of parallel converges
[["db1", "db2"], ["db3", "app1"], ["app2", "app3"]]
if --concurrency 2 and --bootstrap-order
# We want all the database nodes to go first followed by all of the app nodes but we want
# at most 2 nodes converging at any given time
[["db1", "db2"], ["db3"], ["app1", "app2"], ["app3"]]
If just --bootstrap-order
# We want all the db nodes to converge in parallel then the app nodes in parallel
[["db1", "db2", "db3"], ["app1", "app2", "app3"]]
And finally the behavior when neither flag is specified
# All nodes can be converged in parallel.
[["db1", "db2", "db3", "app1", "app2", "app3"]]
I would love to get some feedback on this. Thanks.
from motherbrain.
Given the associated PR was merged, I'm closing this for now. Let me know if there's more to do on this front.
from motherbrain.
Related Issues (20)
- If the chef client key configured in mb is incorrect, purge, disable, enable will hang HOT 1
- Lock cookbook versions based on Berksfile.lock HOT 17
- Authentication errors cause #node_name to return nil
- Upgrade should support a max concurrent nodes option HOT 1
- Add documentation for gears HOT 1
- Broken tests from #672
- Support ssh gateway HOT 2
- When a file in the config file is not found, mb can hang. HOT 1
- Squiggles and Berkshelf Beta dependency on mb 1.1.1 HOT 4
- Issues running init... HOT 1
- mb do not modify run_list on chef server HOT 2
- mb is not registering the node in chef HOT 3
- When finding nodes, we should bail on nodes without a proper hostname HOT 2
- MB API jobs endpoint broken HOT 4
- No connector ports open HOT 2
- failure: undefined method `match' for nil:NilClass HOT 5
- Pin buff-config version to >= 1.0.0 HOT 3
- uninitialized constant in environments_endpoint.rb HOT 1
- unable to parse aws response
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 motherbrain.