diff options
author | Michal Zegan <m.zegan@samsung.com> | 2019-08-22 14:43:11 +0200 |
---|---|---|
committer | Michal Zegan <m.zegan@samsung.com> | 2019-09-04 11:24:46 +0200 |
commit | 07479cbc38ef4bf15ea0c4854c8af08e1201a53d (patch) | |
tree | 205be6bab64184a6f1746aa5618c782f4e27807f /tools/cicdansible/heat/instance.yaml | |
parent | 666d3a9009dcdb770ee0f4de736f7d10d33db29d (diff) |
Add heat template to deploy onap infrastructure
This change adds a heat template that
deploys empty onap infrastructure on open stack.
Infrastructure consists of an installer instance + infra instance +
specified number of kubernetes nodes.
All instances are empty after creation, and live in the internal network with
cidr 10.1.0.0/24.
They are isolated by security groups in order not to have
external network access except possibly the intranet, but
it is possible to enable internet access if required.
Change-Id: I70024e1e2344ed75f443f03b2239b460a71d0151
Issue-ID: OOM-2042
Signed-off-by: Michal Zegan <m.zegan@samsung.com>
Diffstat (limited to 'tools/cicdansible/heat/instance.yaml')
-rw-r--r-- | tools/cicdansible/heat/instance.yaml | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/tools/cicdansible/heat/instance.yaml b/tools/cicdansible/heat/instance.yaml new file mode 100644 index 00000000..2734704d --- /dev/null +++ b/tools/cicdansible/heat/instance.yaml @@ -0,0 +1,58 @@ +#Template for instances. +heat_template_version: 2017-02-24 +description: "template instantiating and configuring a single instance (any)" +parameters: + instance_name: + type: string + network: + type: string + subnet: + type: string + image_name: + type: string + flavor_name: + type: string + key_name: + type: string + notify_command: + type: string + security_group: + type: string +#Resources. +resources: + #This is the network port to attach instance to. + port: + type: OS::Neutron::Port + properties: + network: { get_param: network } + security_groups: [ { get_param: security_group } ] + fixed_ips: + - { subnet: { get_param: subnet }} + #cloudinit configuration stuff. + config: + type: OS::Heat::SoftwareConfig + properties: + config: + str_replace_strict: + template: { get_file: config.yaml } + params: + "%{NOTIFY_COMMAND}": { get_param: notify_command } + #Actual instance to create. + instance: + type: OS::Nova::Server + properties: + name: { get_param: instance_name } + image: { get_param: image_name } + flavor: { get_param: flavor_name } + key_name: { get_param: key_name } + networks: + - port: { get_resource: port } + user_data_format: SOFTWARE_CONFIG + user_data: { get_resource: config } +outputs: + OS::stack_id: + value: { get_resource: instance } + port_id: + value: { get_resource: port } + ip: + value: { get_attr: ["port", "fixed_ips", 0, "ip_address"] } |