1 ##############################################################################
2 # Copyright (c) 2017 ZTE corporation and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9 heat_template_version: 2015-04-30
12 Used to run VMs with DPDK pktgen
17 description: Name of the image
18 default: yardstick-wily-server
22 description: Timeout in seconds for WaitCondition, depends on your image and environment
27 description: Name of the external network which management network will connect to
28 default: admin_floating_net
32 type: OS::Nova::Flavor
39 type: OS::Neutron::Net
44 type: OS::Neutron::Subnet
49 network: { get_resource: network }
52 type: OS::Neutron::Router
54 name: management_router
55 external_gateway_info:
56 network: { get_param: external_net_name }
58 management_router_interface:
59 type: OS::Neutron::RouterInterface
61 router: { get_resource: management_router }
62 subnet: { get_resource: subnet }
65 type: OS::Neutron::FloatingIP
67 floating_network: { get_param: external_net_name }
69 floating_ip_association:
70 type: OS::Nova::FloatingIPAssociation
72 floating_ip: { get_resource: floating_ip }
73 server_id: {get_resource: dpdk_vm}
76 type: OS::Nova::KeyPair
79 public_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD0RkXfW6pksd1cZmXuvXZF/Mlqqq3ahIGcGoULOC97XMpu0vdxMpcUwdjwGqMwEXTVyfHidu0l99bLqOCpSUKCmbWx3ONJ+1kqFx4HwsKEWLiyDYqsuMrDeZT1eFjC5avCoTcrIw2wq5NaBb00lDGagNZOeopaL5YIa4+PizEY23+cir24D67NU21Fg3JE92AIeGlNa4j66L3a+lL0hZq74Dilmp42wm4GsbplRO6KJfyaraowHb1X+TmhCjBgHk6M/OJ9yPAroZyJNcwjMAuuxhAYWRuT3SdbnoUR0RG2VhfDh0qNid7vOqLbhKPeaLLFmzkN+9w3WdCp6LbSYt87 yardstick@yardstick.opnfv.org
82 type: OS::Heat::WaitConditionHandle
85 type: OS::Heat::WaitCondition
87 handle: { get_resource: wait_handle }
89 timeout: { get_param: timeout }
92 type: OS::Nova::Server
93 depends_on: [subnet, keypair, flavor]
95 name: { get_param: "OS::stack_name" }
96 image: { get_param: image }
97 flavor: { get_resource: flavor }
98 key_name: {get_resource: keypair}
100 - network: { get_resource: network }
102 user_data_format : RAW
107 cat <<'CEOF' > /tmp/dpdk_post_build.sh
109 export RTE_TARGET=x86_64-native-linuxapp-gcc
111 make install T=x86_64-native-linuxapp-gcc DESTDIR=destdir
113 insmod /dpdk/x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
114 insmod /dpdk/x86_64-native-linuxapp-gcc/kmod/rte_kni.ko
118 rm -rf /var/lib/cloud/instances
120 ls /dpdk/x86_64-native-linuxapp-gcc/kmod/
121 $NOTIFY --data-binary '{"status": "SUCCESS"}'
123 chmod +x /tmp/dpdk_post_build.sh
125 nohup /tmp/dpdk_post_build.sh &
127 $NOTIFY: { get_attr: ['wait_handle', 'curl_cli'] }
131 description: uuid of the VM
132 value: { get_attr: [ dpdk_vm, show,id ] }