Merge "Grafana Dashboard update for Prox Tests"
[yardstick.git] / ansible / roles / install_samplevnf / tasks / main.yml
1 # Copyright (c) 2017 Intel Corporation
2 #
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
6 #
7 #      http://www.apache.org/licenses/LICENSE-2.0
8 #
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.
14 ---
15 - set_fact:
16     vnf_build_dir: "{{ samplevnf_path }}/VNFs/{{ vnf_build_dirs[vnf_name] }}"
17
18 - set_fact:
19     vnf_app_name: "{{ vnf_app_names[vnf_name] }}"
20
21 - name: Install extra build dependencies
22   action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
23   with_items: "{{ vnf_build_dependencies.get(vnf_name, {}).get(ansible_os_family, []) }}"
24
25
26 - name: set build env vars
27   set_fact:
28       build_env_vars:
29         RTE_SDK: "{{ RTE_SDK }}"
30         RTE_TARGET: "{{ RTE_TARGET }}"
31         VNF_CORE: "{{ samplevnf_path }}"
32
33 - name: set soft CRC for PROX when building in VM
34   set_fact:
35       build_env_vars: "{{ build_env_vars|combine({'crc': 'soft'}) }}"
36   when: vnf_name == "PROX" and image_type is defined and image_type == "vm"
37
38 - name: "make {{ vnf_name }} clean"
39   command: make -j {{ ansible_processor_vcpus }} clean
40   args:
41     chdir: "{{ vnf_build_dir }}"
42   environment: "{{ build_env_vars }}"
43
44 - name: "make {{ vnf_name }}"
45   command: make -j {{ ansible_processor_vcpus }}
46   args:
47     chdir: "{{ vnf_build_dir }}"
48   environment: "{{ build_env_vars }}"
49
50 #- command: cp "{{ vnf_build_dir }}/{{ vnf_name }}/build/ip_pipeline" "{{ INSTALL_BIN_PATH }}/vACL_vnf"
51
52 - name: "Install {{ vnf_name }} VNF"
53   copy:
54     src: "{{ vnf_build_dir }}/build/{{ vnf_app_name }}"
55     dest: "{{ INSTALL_BIN_PATH }}/{{ vnf_app_name }}"
56     remote_src: True
57     # make executable
58     mode: 0755
59