1 # Copyright (c) 2018 Intel Corporation.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
18 yardstick_dir: "{{ YARDSTICK_DIR | default('/home/opnfv/repos/yardstick') }}"
19 virtual_environment: "{{ VIRTUAL_ENVIRONMENT | default(False) }}"
20 nsb_dir: "{{ NSB_DIR | default('/opt/nsb_bin/') }}"
24 - name: Create NSB binaries directory, accesible to any user
31 - installation_mode != inst_mode_container_pull
34 - { role: add_repos_jumphost, when: installation_mode != inst_mode_container_pull }
35 - { role: install_dependencies_jumphost, when: installation_mode != inst_mode_container_pull }
36 - { role: install_yardstick, when: installation_mode != inst_mode_container_pull }
37 - { role: configure_uwsgi, when: installation_mode != inst_mode_container_pull }
38 - { role: configure_nginx, when: installation_mode != inst_mode_container_pull }
39 - { role: configure_gui, when: installation_mode != inst_mode_container_pull }
40 - { role: download_trex, when: installation_mode != inst_mode_container_pull }
41 - { role: install_trex, when: installation_mode != inst_mode_container_pull }
42 - { role: configure_rabbitmq, when: installation_mode != inst_mode_container_pull }
50 when: installation_mode == inst_mode_baremetal
52 - shell: uwsgi -i /etc/yardstick/yardstick.ini
53 when: installation_mode == inst_mode_baremetal
56 - name: Prepare baremetal and standalone servers
57 hosts: yardstick-baremetal,yardstick-standalone
59 environment: "{{ proxy_env }}"
63 - role: set_package_installer_proxy
64 when: proxy_env is defined and proxy_env
65 # can't update grub in chroot/docker
66 # ?? - enable_iommu_on_boot
67 - enable_hugepages_on_boot
68 # needed for collectd plugins
69 - increase_open_file_limits
70 - install_image_dependencies
72 # dpdk_version: "17.02"
79 - role: install_samplevnf
81 - role: install_samplevnf
83 - role: install_samplevnf
85 - role: install_samplevnf
87 - role: install_samplevnf
89 # build shared DPDK for collectd only, required DPDK downloaded already
92 - download_intel_cmt_cat
93 - install_intel_cmt_cat
103 img_prop_item: "{{ IMG_PROPERTY }}"
104 img_arch: "{{ YARD_IMG_ARCH }}"
107 - name: Include pre-build
109 name: build_yardstick_image
110 tasks_from: pre_build.yml
111 when: installation_mode != inst_mode_container
114 - hosts: chroot_image
118 img_property: "{{ IMG_PROPERTY }}"
119 environment: "{{ proxy_env }}"
122 - name: Include image build
124 name: build_yardstick_image
125 tasks_from: "cloudimg_modify_{{ img_property }}.yml"
126 when: installation_mode != inst_mode_container
133 - name: Include post-build
135 name: build_yardstick_image
136 tasks_from: post_build.yml
137 when: installation_mode != inst_mode_container
140 - name: start yardstick container on jumphost
145 name: install_dependencies_jumphost
146 when: installation_mode == inst_mode_container_pull
150 when: installation_mode == inst_mode_container_pull
152 - name: Start yardstick container
157 image: "{{ yardstick_docker_image|default('opnfv/yardstick:latest') }}"
159 restart_policy: always
163 - "{{ openrc_file|default('/dev/null') }}:/etc/yardstick/openstack.creds:ro"
164 - /var/run/docker.sock:/var/run/docker.sock
166 - /etc/localtime:/etc/localtime:ro
167 when: installation_mode == inst_mode_container_pull