|
| 1 | +For deploy and test postgres over a cluster we use ansible. |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | +Running tests on local cluster |
| 6 | +------------------------------ |
| 7 | + |
| 8 | +To use it one need ansible hosts file with following groups: |
| 9 | + |
| 10 | +farms/cluster.example: |
| 11 | + |
| 12 | + [clients] # benchmark will start simultaneously on that nodes |
| 13 | + |
| 14 | + [nodes] # all that nodes will run postgres, dtmd will be deployed to first |
| 15 | + |
| 16 | +After you have proper hosts file you can deploy all stuff to servers: |
| 17 | + |
| 18 | +# cd pg_dtm/tests |
| 19 | +# ansible-playbook -i farms/sai deploy_layouts/cluster.yml |
| 20 | + |
| 21 | +To perform dtmbench run: |
| 22 | + |
| 23 | +# ansible-playbook -i farms/sai perf.yml -e nnodes=3 -e nconns=100 |
| 24 | + |
| 25 | +here nnodes is number of nudes that will be used for that test, nconns is the |
| 26 | +number of connections to the backend. |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | +Running tests on Amazon ec2 |
| 31 | +--------------------------- |
| 32 | + |
| 33 | +In the case of amazon cloud there is no need in specific hosts file. Instead of it |
| 34 | +we use script farms/ec2.py to get current instances running on you account. To use |
| 35 | +that script you need to specify you account key and access_key in ~/.boto.cfg (or in |
| 36 | +any other place that described at http://boto.cloudhackers.com/en/latest/boto_config_tut.html) |
| 37 | + |
| 38 | +To create VMs in cloud run: |
| 39 | +# ansible-playbook -i farms/ec2.py deploy_layouts/ec2.yml |
| 40 | + |
| 41 | +After that you should wait few minutes to have info about that instances in Amazon API. After |
| 42 | +that you can deploy postgres as usual: |
| 43 | + |
| 44 | +# ansible-playbook -i farms/ec2.py deploy_layouts/cluster-ec2.yml |
| 45 | + |
| 46 | +And to run a benchmark: |
| 47 | + |
| 48 | +# ansible-playbook -i farms/sai perf-ec2.yml -e nnodes=3 -e nconns=100 |
| 49 | + |
| 50 | + |
0 commit comments