<commit_before>
# Overview 
NetArbiter enables you to stitch multiple OpenStack clusters and emulate the network delay and bandwidth.

For details, see <https://github.com/att/netarbiter/blob/master/netarbiter.pdf>.

# Prerequisites
For Ubuntu:
```
$ sudo apt-get install ansible
```
For Mac OS X:
```
$ brew install ansible
```

# How to run 
1. Setup
 1. Add your private key (e.g., id_rsa.pub) to each server's authorized_keys.
 2. Store all hosts' domain names (or IP addresses) to an inventory file "all"
 3. Create an inventory file for each link between two sites. 
  This file is for route-create.yml and route-destroy.yml

2. Create/destroy a qrouter (and an ovs bridge) in a host
   ```
   $ ansible-playbook -K -i hosts/all qrouter-create.yml -e HOST=<hostname> 
   $ ansible-playbook -K -i hosts/all qrouter-destroy.yml -e HOST=<hostname> 
   ```

3. Create/destroy routes (and tunnels) to connect two sites 
   ```
   $ ansible-playbook -K -i hosts/<inventory> route-create.yml
   $ ansible-playbook -K -i hosts/<inventory> route-destroy.yml
   ```

4. Create delay, rate, and ceil with tc/netem
   ```
   $ ansible-playbook -K -i hosts/<inventory> netemu-create.yml [-e DELAY=<delay> -e RATE=<rate> CEIL=<ceil>]
   $ ansible-playbook -K -i hosts/<inventory> netemu-destroy.yml [-e DELAY=<delay> -e RATE=<rate> CEIL=<ceil>]
   ```

   NOTE:
    - Default delay and bandwidth are configured in each link's inventroy file. 
    - Refer to tc manual(i.e., $ man tc) for the units of delay, rate, and ceil. <commit_msg>overview updated<commit_after>
# Overview 
NetArbiter enables you to stitch multiple OpenStack clusters and emulate the network delay and bandwidth.

For details, see <https://github.com/att/netarbiter/blob/master/netarbiter.pdf>.

# Prerequisites
For Ubuntu:
```
$ sudo apt-get install ansible
```
For Mac OS X:
```
$ brew install ansible
```

# How to run 
1. Setup
 1. Copy your public key (i.e., id_rsa.pub) to each server's authorized_keys.
 2. Store all hosts' domain names (or IP addresses) to an inventory file "all"
 3. Create an inventory file for each link between two sites. 
  This file is for route-create.yml and route-destroy.yml

2. Create/destroy a qrouter (and an ovs bridge) in a host
   ```
   $ ansible-playbook -K -i hosts/all qrouter-create.yml -e HOST=<hostname> 
   $ ansible-playbook -K -i hosts/all qrouter-destroy.yml -e HOST=<hostname> 
   ```

3. Create/destroy routes (and tunnels) to connect two sites 
   ```
   $ ansible-playbook -K -i hosts/<inventory> route-create.yml
   $ ansible-playbook -K -i hosts/<inventory> route-destroy.yml
   ```

4. Create delay, rate, and ceil with tc/netem
   ```
   $ ansible-playbook -K -i hosts/<inventory> netemu-create.yml [-e DELAY=<delay> -e RATE=<rate> CEIL=<ceil>]
   $ ansible-playbook -K -i hosts/<inventory> netemu-destroy.yml [-e DELAY=<delay> -e RATE=<rate> CEIL=<ceil>]
   ```

   NOTE:
    - Default delay and bandwidth are configured in each link's inventroy file. 
    - Refer to tc manual(i.e., $ man tc) for the units of delay, rate, and ceil. 
{'fraction_non_alphanumeric': 0.12291598561621445, 'fraction_numerical': 0.004576659038901602, 'mean_word_length': 3.358974358974359, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5761996', 'n_tokens_mistral': 1094, 'n_tokens_neox': 1026, 'n_words': 363}