Sha256: 7a0e54f5318e1de0470cc36f7ec3b177b73521cd5cc6eddd61f7ed9285b76731
Contents?: true
Size: 1.7 KB
Versions: 6
Compression:
Stored size: 1.7 KB
Contents
# Clusterfuck Clusterfuck is a library for setting up a networked cluster of servers to test failure conditions against. It's a library to fuck with clusters. Currently it ships with a DSL for EBGP leaf-spine architectures, but has a generic backend that allows configuring any topology. It's currently using Virtualbox for probably no good reason other than `network_lab`, which this works derives from, used it. VMWare will be investigated in the future. ## Usage Install the `vagrant-clusterfuck` Vagrant plugin: ```bash $ vagrant plugin install vagrant-clusterfuck ``` Create a `cluster.rb` file to define your cluster (see below). This must be a separate file, because it needs to be loaded in your test environment which does not implement the Vagrant DSL. In your `Vagrantfile`, build your cluster: ```ruby cluster = Clusterfuck::Cluster[:test] cluster[:host1].build(config) do |box| box.vm.provision :shell, inline: "echo 1 > /tmp/test" end cluster[:host2].build(config) ``` For a complete example, see the `Vagrantfile` and `cluster.rb` in this repository. ```bash $ vagrant up --provider virtualbox ``` When making changes to `cluster.rb` and `Vagrantfile` make sure to reload and reprovision the cluster: ```bash $ vagrant reload --provision ``` ## Building Clusters Defining a cluster consists of two steps: 1. **Creating instances.** You must specify which VMs your topology requires. 2. **Layer 2 network.** You must specify the relationships between the VMs, that is, the layer 2 network of which nodes belong to the same subnets and can thus directly communicate with each other. Please see `./cluster.rb` for an annotated example. In the future we may build DSLs on top of the low-level graph DSL.
Version data entries
6 entries across 6 versions & 1 rubygems