1 ##########################################################################
3 #==================LICENSE_START==========================================
6 # Copyright 2017 AT&T Intellectual Property. All rights reserved.
8 # Licensed under the Apache License, Version 2.0 (the "License");
9 # you may not use this file except in compliance with the License.
10 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
19 #==================LICENSE_END============================================
21 # ECOMP is a trademark and service mark of AT&T Intellectual Property.
23 ##########################################################################
25 heat_template_version: 2013-05-23
27 description: Heat template to build vCPE virtual Broadband Network Gateway (vBNG)
38 label: Image name or ID
39 description: Image to be used for compute instance
43 description: Type of instance (flavor) to be used
46 label: Public network name or ID
47 description: Public network that enables remote connection to VNF
51 description: Name of the vBNG
55 description: The VNF ID is provided by ONAP
59 description: The vCPE Module ID is provided by ONAP
63 description: Public/Private key pair name
67 description: Public key to be installed on the compute instance
70 label: Build script version number
71 description: Version number of the scripts that build the vFW demo app
72 demo_artifacts_version:
74 label: Artifacts version used in demo vnfs
75 description: Artifacts (jar, tar.gz) version used in demo vnfs
78 description: Root URL for the Nexus repository for Maven artifacts.
79 default: "https://nexus.onap.org"
82 label: Cloud environment
83 description: Cloud environment (e.g., openstack, rackspace)
86 label: VPP Source Git Repo
87 description: URL for VPP source codes
88 vpp_source_repo_release_tag:
90 label: VPP Source Git Release Tag
91 description: Git Release Tag for the VPP source codes
95 description: URL for VPP patch for vBNG
99 description: State to compile code or not; included for backwards compatibility
111 type: OS::Heat::RandomString
116 type: OS::Nova::KeyPair
122 base: { get_param: key_name }
123 rand: { get_resource: random-str }
124 public_key: { get_param: pub_key }
125 save_private_key: false
129 type: OS::Nova::Server
131 image: { get_param: vcpe_image_name }
132 flavor: { get_param: vcpe_flavor_name }
133 name: { get_param: vbng_name_0 }
134 key_name: { get_resource: my_keypair }
136 - network: { get_param: public_net_id }
137 metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
138 user_data_format: RAW
142 __demo_artifacts_version__ : { get_param: demo_artifacts_version }
143 __script_version__ : { get_param: script_version }
144 __cloud_env__ : { get_param: cloud_env }
145 __vpp_source_repo_url__ : { get_param: vpp_source_repo_url }
146 __vpp_source_repo_release_tag__ : { get_param: vpp_source_repo_release_tag }
147 __vpp_patch_url__ : { get_param: vpp_patch_url }
148 __compile_state__ : { get_param: compile_state }
149 __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
153 # Create configuration files
155 echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
156 echo "__script_version__" > /opt/config/script_version.txt
157 echo "__cloud_env__" > /opt/config/cloud_env.txt
158 echo "__vpp_source_repo_url__" > /opt/config/vpp_source_repo_url.txt
159 echo "__vpp_source_repo_release_tag__" > /opt/config/vpp_source_repo_release_tag.txt
160 echo "__vpp_patch_url__" > /opt/config/vpp_patch_url.txt
161 echo "__compile_state__" > /opt/config/compile_state.txt
162 echo "__nexus_artifact_repo__" > /opt/config/nexus_artifact_repo.txt
164 # Download and run install script
165 apt-get -y install unzip
166 if [[ "__script_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
167 curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=__script_version__" -o /opt/vcpe-scripts-__script_version__.zip
168 unzip -j /opt/vcpe-scripts-__script_version__.zip -d /opt v_bng_build.sh
170 chmod +x v_bng_build.sh