diff options
author | 2019-11-28 11:26:39 +0100 | |
---|---|---|
committer | 2019-11-29 15:08:18 +0000 | |
commit | 0551898080e85a2af6bb9442459ee548e58bd21b (patch) | |
tree | 0bde2d833c576e968bf990f65b198f33e0bf1bf6 /docs/guides/onap-user/design/parameter_resolution/ubuntu_example/ubuntuCDS_heat | |
parent | 4de8b081b1d461e5435fea66705789d141d93ad4 (diff) |
major update for simplest and working example
Issue-ID: DOC-569
with Andreas remarks
modify parameter mapping image
rst correction
Signed-off-by: Rene_Robert <rene.robert@orange.com>
Change-Id: I852c75c6dd4619bb1c2e96ea9e257a5319917dad
Diffstat (limited to 'docs/guides/onap-user/design/parameter_resolution/ubuntu_example/ubuntuCDS_heat')
3 files changed, 124 insertions, 0 deletions
diff --git a/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/ubuntuCDS_heat/base_ubuntuCDS.env b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/ubuntuCDS_heat/base_ubuntuCDS.env new file mode 100755 index 000000000..b9e55fa7f --- /dev/null +++ b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/ubuntuCDS_heat/base_ubuntuCDS.env @@ -0,0 +1,14 @@ +parameters: +# Metadata required by ONAP + vnf_id: ubuntuCDS-VNF + vf_module_id: ubuntuCDS-VF-module + vnf_name: ubuntuCDS-VNF-name + +# Server parameters, naming required by ONAP + ubuntuCDS_image_name: ubuntu-18 + ubuntuCDS_flavor_name: onap.small + ubuntuCDS_pub_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDY15cdBmIs2XOpe4EiFCsaY6bmUmK/GysMoLl4UG51JCfJwvwoWCoA+6mDIbymZxhxq9IGxilp/yTA6WQ9s/5pBag1cUMJmFuda9PjOkXl04jgqh5tR6I+GZ97AvCg93KAECis5ubSqw1xOCj4utfEUtPoF1OuzqM/lE5mY4N6VKXn+fT7pCD6cifBEs6JHhVNvs5OLLp/tO8Pa3kKYQOdyS0xc3rh+t2lrzvKUSWGZbX+dLiFiEpjsUL3tDqzkEMNUn4pdv69OJuzWHCxRWPfdrY9Wg0j3mJesP29EBht+w+EC9/kBKq+1VKdmsXUXAcjEvjovVL8l1BrX3BY0R8D imported-openssh-key + ubuntuCDS_name_0: ubuntuCDS + +# Network parameters, naming required by ONAP + admin_plane_net_name: admin diff --git a/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/ubuntuCDS_heat/base_ubuntuCDS.yaml b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/ubuntuCDS_heat/base_ubuntuCDS.yaml new file mode 100755 index 000000000..ad250fa52 --- /dev/null +++ b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/ubuntuCDS_heat/base_ubuntuCDS.yaml @@ -0,0 +1,110 @@ +heat_template_version: 2013-05-23 + +description: Heat template to deploy a ubuntuCDS VM + +parameters: + # Metadata required by ONAP + vnf_name: + type: string + label: VM name + description: The VM name + vnf_id: + type: string + label: VNF ID + description: The VNF ID is provided by ONAP + vf_module_id: + type: string + label: VF module ID + description: The VF Module ID is provided by ONAP + +# Server parameters, naming required by ONAP + ubuntuCDS_image_name: + type: string + label: Image name or ID + description: Image to be used for compute instance + ubuntuCDS_flavor_name: + type: string + label: Flavor + description: Type of instance (flavor) to be used + ubuntuCDS_pub_key: + type: string + label: Public key + description: Public key to be installed on the compute instance + ubuntuCDS_name_0: + type: string + label: VM name + description: The VM name + +# Network parameters, naming required by ONAP + admin_plane_net_name: + type: string + label: management network + description: The external management network + +resources: + random-str: + type: OS::Heat::RandomString + properties: + length: 4 + + ubuntuCDS_instantiated_key_name: + type: OS::Nova::KeyPair + properties: + name: + str_replace: + template: pre_base_rand + params: + pre: key_ + base: { get_param: vnf_name } + rand: { get_resource: random-str } + public_key: { get_param: ubuntuCDS_pub_key } + save_private_key: false + + ubuntuCDS_admin_security_group: + type: OS::Neutron::SecurityGroup + properties: + description: security group + name: + str_replace: + template: pre_base_rand + params: + pre: sg_ + base: { get_param: vnf_name } + rand: { get_resource: random-str } + rules: [ + {remote_ip_prefix: 0.0.0.0/0, protocol: tcp, port_range_min: 22, port_range_max: 22}, + {remote_ip_prefix: 0.0.0.0/0, protocol: icmp}] + + ubuntuCDS_0_admin_plane_port_0: + type: OS::Neutron::Port + properties: + name: + str_replace: + template: pre_base_rand + params: + pre: port_ + base: { get_param: vnf_name } + rand: { get_resource: random-str } + network: { get_param: admin_plane_net_name } + security_groups: [{ get_resource: ubuntuCDS_admin_security_group }] + + ubuntuCDS_VM_settings: + type: OS::Heat::SoftwareConfig + properties: + config: | + #!/bin/bash + sudo apt-get update + + ubuntuCDS_server_0: + type: OS::Nova::Server + properties: + image: { get_param: ubuntuCDS_image_name } + flavor: { get_param: ubuntuCDS_flavor_name } + name: { get_param: ubuntuCDS_name_0 } + metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }, vnf_name: { get_param: vnf_name }} + key_name: { get_resource: ubuntuCDS_instantiated_key_name } + networks: + - port: { get_resource: ubuntuCDS_0_admin_plane_port_0 } + user_data_format: RAW + user_data: + get_resource: ubuntuCDS_VM_settings diff --git a/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/ubuntuCDS_heat/ubuntuCDS_heat.zip b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/ubuntuCDS_heat/ubuntuCDS_heat.zip Binary files differnew file mode 100755 index 000000000..ad359bf32 --- /dev/null +++ b/docs/guides/onap-user/design/parameter_resolution/ubuntu_example/ubuntuCDS_heat/ubuntuCDS_heat.zip |