summaryrefslogtreecommitdiffstats
path: root/jjb/cperf/cirros-upload.yaml.ansible
blob: 855bb1f3d2e1037f1ebce9db8f6973c04cd0589e (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
36
37
38
39
---
- hosts: all
  tasks:
    - copy:
        src: "{{ lookup('env', 'WORKSPACE') }}/{{ item }}"
        dest: "/home/heat-admin/{{ item }}"
        owner: heat-admin
        group: heat-admin
        mode: 0775
      with_items:
        - cirros-0.3.5-x86_64-disk.img
        - overcloudrc
    - name: Upload cirros glance image
      shell: >
        source /home/heat-admin/overcloudrc && openstack image create
        cirros-0.3.5-x86_64-disk --public
        --file /home/heat-admin/cirros-0.3.5-x86_64-disk.img
        --disk-format qcow2 --container-format bare
    - name: Create nano flavor
      shell: >
        source /home/heat-admin/overcloudrc && openstack flavor create
        --id 42 --ram 64 --disk 0 --vcpus 1 m1.nano
    - name: Open CSIT TCP port for netcat
      iptables:
        chain: INPUT
        action: insert
        protocol: tcp
        destination_port: 12345
        jump: ACCEPT
      become: yes
    - name: Open CSIT UDP port for netcat
      iptables:
        chain: INPUT
        action: insert
        protocol: udp
        destination_port: 12345
        jump: ACCEPT
      become: yes