summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/database/tasks/mongodb_config.yml
blob: 321c38d540ebb1576f6e7b6cbbf12c702de5a870 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
- name: copy replica js
  template:
    src: replica.js
    dest: /opt/replica.js

- name: init replica servers
  shell: mongo compass /opt/replica.js

- name: wait replica servers are ready
  shell: mongo compass --eval 'printjson(rs.status())'|grep -E 'PRIMARY|SECONDARY'|wc -l
  register: servers
  until: servers.stdout|int == 3
  retries: 60
  delay: 10

- debug: msg='{{ servers.stdout |int }}'

- name: create mongodb user and db
  mongodb_user:
    login_host: "{{ internal_vip.ip }}"
    database: ceilometer
    name: ceilometer
    password: "{{ CEILOMETER_DBPASS }}"
    roles: 'readWrite,dbAdmin'
    state: present

- name: grant user privilege
  mongodb_user:
    login_host: "{{ internal_vip.ip }}"
    database: ceilometer
    name: ceilometer
    password: "{{ CEILOMETER_DBPASS }}"
    roles: 'readWrite,dbAdmin'
    state: present
"c1"># 1. src=1.x.x.x(x.x.x =random from 1..255) dst=10.x.x.x (random from 1..512) # 2. src=1.x.x.x(x.x.x =random from 1..255) dst=10.x.x.x (random from 1..512) # ... # 512. src=1.x.x.x(x.x.x =random from 1..255) dst=10.x.x.x (random from 1..512) # # not all combination should be filled # Any other field with random range will be added to flow definition # # the example.yaml provides all possibilities for traffic generation # # the profile defines a public and private side to make limited traffic correlation # between private and public side same way as it is made by IXIA solution. # schema: "isb:traffic_profile:0.1" # This file is a template, it will be filled with values from tc.yaml before passing to the traffic generator name: rfc2544 description: Traffic profile to run RFC2544 latency traffic_profile: traffic_type : IXIARFC2544Profile # defines traffic behavior - constant or look for highest possible throughput frame_rate : 100 # pc of linerate # that specifies a range (e.g. ipv4 address, port) uplink_0: ipv4: outer_l2: framesize: 64B: "{{ get(imix, 'imix.uplink.imix_small', '0') }}" 128B: "{{ get(imix, 'imix.uplink.imix_128B', '0') }}" 256B: "{{ get(imix, 'imix.uplink.imix_256B', '0') }}" 373b: "{{ get(imix, 'imix.uplink.imix_373B', '0') }}" 570B: "{{get(imix, 'imix.uplink.imix_570B', '0') }}" 1400B: "{{get(imix, 'imix.uplink.imix_1400B', '0') }}" 1518B: "{{get(imix, 'imix.uplink.imix_1500B', '0') }}" QinQ: S-VLAN: id: 128 priority: 0 cfi: 0 C-VLAN: id: 512 priority: 0 cfi: 0 outer_l3v4: proto: "tcp" srcip4: "{{get(flow, 'flow.src_ip_0', '192.168.0.0-192.168.255.255') }}" dstip4: "{{get(flow, 'flow.dst_ip_0', '192.16.0.0-192.16.0.31') }}" count: "{{get(flow, 'flow.count', '1') }}" ttl: 32 dscp: 32 outer_l4: srcport: "{{get(flow, 'flow.src_port_0', '0') }}" dstport: "{{get(flow, 'flow.dst_port_0', '0') }}" count: "{{get(flow, 'flow.count', '1') }}" downlink_0: ipv4: outer_l2: framesize: 64B: "{{ get(imix, 'imix.uplink.imix_small', '0') }}" 128B: "{{ get(imix, 'imix.uplink.imix_128B', '0') }}" 256B: "{{ get(imix, 'imix.uplink.imix_256B', '0') }}" 373b: "{{ get(imix, 'imix.uplink.imix_373B', '0') }}" 570B: "{{get(imix, 'imix.uplink.imix_570B', '0') }}" 1400B: "{{get(imix, 'imix.uplink.imix_1400B', '0') }}" 1518B: "{{get(imix, 'imix.uplink.imix_1500B', '0') }}" outer_l3v4: proto: "tcp" srcip4: "{{get(flow, 'flow.dst_ip_0', '192.16.0.0-192.16.0.31') }}" dstip4: "{{get(flow, 'flow.src_ip_0', '192.168.0.0-192.168.255.255') }}" count: "{{get(flow, 'flow.count', '1') }}" ttl: 32 dscp: 32 outer_l4: srcport: "{{get(flow, 'flow.dst_port_0', '0') }}" dstport: "{{get(flow, 'flow.src_port_0', '0') }}" count: "{{get(flow, 'flow.count', '1') }}" uplink_1: ipv4: outer_l2: framesize: 64B: "{{ get(imix, 'imix.uplink.imix_small', '0') }}" 128B: "{{ get(imix, 'imix.uplink.imix_128B', '0') }}" 256B: "{{ get(imix, 'imix.uplink.imix_256B', '0') }}" 373b: "{{ get(imix, 'imix.uplink.imix_373B', '0') }}" 570B: "{{get(imix, 'imix.uplink.imix_570B', '0') }}" 1400B: "{{get(imix, 'imix.uplink.imix_1400B', '0') }}" 1518B: "{{get(imix, 'imix.uplink.imix_1500B', '0') }}" QinQ: S-VLAN: id: 128 priority: 0 cfi: 0 C-VLAN: id: 512 priority: 0 cfi: 0 outer_l3v4: proto: "tcp" srcip4: "{{get(flow, 'flow.srcip1', '192.168.0.0-192.168.255.255') }}" dstip4: "{{get(flow, 'flow.dstip1', '192.16.0.0-192.16.0.31') }}" ttl: 32 dscp: 32 outer_l4: srcport: "{{get(flow, 'flow.src_port1', '0') }}" dstport: "{{get(flow, 'flow.dst_port1', '0') }}" count: "{{get(flow, 'flow.count', '1') }}" downlink_1: ipv4: outer_l2: framesize: 64B: "{{ get(imix, 'imix.uplink.imix_small', '0') }}" 128B: "{{ get(imix, 'imix.uplink.imix_128B', '0') }}" 256B: "{{ get(imix, 'imix.uplink.imix_256B', '0') }}" 373b: "{{ get(imix, 'imix.uplink.imix_373B', '0') }}" 570B: "{{get(imix, 'imix.uplink.imix_570B', '0') }}" 1400B: "{{get(imix, 'imix.uplink.imix_1400B', '0') }}" 1518B: "{{get(imix, 'imix.uplink.imix_1500B', '0') }}" outer_l3v4: proto: "tcp" srcip4: "{{get(flow, 'flow.dst_ip1', '192.16.0.0-192.16.0.31') }}" dstip4: "{{get(flow, 'flow.src_ip1', '192.168.0.0-192.168.255.255') }}" count: "{{get(flow, 'flow.count', '1') }}" ttl: 32 dscp: 32 outer_l4: srcport: "{{get(flow, 'flow.dst_port1', '0') }}" dstport: "{{get(flow, 'flow.src_port1', '0') }}" count: "{{get(flow, 'flow.count', '1') }}"