tests: import benchmark reproduction setup playbook
Incomplete, also needs to mess around with Gcloud routing and handle box setup/teardown, because that's another "well engineered" waste of time.
This commit is contained in:
parent
a99c7a12f9
commit
b0aa413173
|
@ -0,0 +1,6 @@
|
|||
|
||||
# Command line.
|
||||
|
||||
````
|
||||
time LANG=C LC_ALL=C ANSIBLE_STRATEGY=mitogen MITOGEN_GCLOUD_GROUP=debops_all_hosts debops common
|
||||
```
|
|
@ -0,0 +1,3 @@
|
|||
[defaults]
|
||||
inventory = hosts
|
||||
retry_files_enabled = False
|
|
@ -0,0 +1,86 @@
|
|||
|
||||
- hosts: controller
|
||||
tasks:
|
||||
- shell: "rsync -a ~/.ssh {{inventory_hostname}}:"
|
||||
connection: local
|
||||
|
||||
- lineinfile:
|
||||
line: "net.ipv4.ip_forward=1"
|
||||
path: /etc/sysctl.conf
|
||||
register: sysctl_conf
|
||||
become: true
|
||||
|
||||
- shell: /sbin/sysctl -p
|
||||
when: sysctl_conf.changed
|
||||
become: true
|
||||
|
||||
- shell: |
|
||||
iptables -t nat -F;
|
||||
iptables -t nat -X;
|
||||
iptables -t nat -A POSTROUTING -j MASQUERADE;
|
||||
become: true
|
||||
|
||||
- apt: name={{item}} state=installed
|
||||
become: true
|
||||
with_items:
|
||||
- python-pip
|
||||
- python-virtualenv
|
||||
- strace
|
||||
- libldap2-dev
|
||||
- libsasl2-dev
|
||||
- build-essential
|
||||
- git
|
||||
|
||||
- git:
|
||||
dest: ~/mitogen
|
||||
repo: https://github.com/dw/mitogen.git
|
||||
version: dmw
|
||||
|
||||
- git:
|
||||
dest: ~/ansible
|
||||
repo: https://github.com/dw/ansible.git
|
||||
version: lazy-vars
|
||||
|
||||
- pip:
|
||||
virtualenv: ~/venv
|
||||
requirements: ~/mitogen/dev_requirements.txt
|
||||
|
||||
- pip:
|
||||
virtualenv: ~/venv
|
||||
editable: true
|
||||
name: ~/mitogen
|
||||
|
||||
- pip:
|
||||
virtualenv: ~/venv
|
||||
editable: true
|
||||
name: ~/ansible
|
||||
|
||||
- lineinfile:
|
||||
line: "source $HOME/venv/bin/activate"
|
||||
path: ~/.profile
|
||||
|
||||
- name: debops-init
|
||||
shell: ~/venv/bin/debops-init ~/prj
|
||||
args:
|
||||
creates: ~/prj
|
||||
|
||||
- name: grpvars
|
||||
copy:
|
||||
dest: "{{ansible_user_dir}}/prj/ansible/inventory/group_vars/all/dhparam.yml"
|
||||
content: |
|
||||
---
|
||||
dhparam__bits: [ '256' ]
|
||||
|
||||
- blockinfile:
|
||||
path: ~/prj/.debops.cfg
|
||||
insertafter: '\[ansible defaults\]'
|
||||
block: |
|
||||
strategy_plugins = {{ansible_user_dir}}/mitogen/ansible_mitogen/plugins/strategy
|
||||
forks = 50
|
||||
host_key_checking = False
|
||||
|
||||
- file:
|
||||
path: ~/prj/ansible/inventory/gcloud.py
|
||||
state: link
|
||||
src: ~/mitogen/tests/ansible/lib/inventory/gcloud.py
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
[controller]
|
||||
35.206.145.240
|
Loading…
Reference in New Issue