summaryrefslogtreecommitdiffstats
path: root/utils/infra_setup
diff options
context:
space:
mode:
authorMatthewLi <matthew.lijun@huawei.com>2015-12-16 00:02:57 -0800
committerMatthewLi <matthew.lijun@huawei.com>2015-12-17 19:08:41 -0800
commit4f2edbf0bf21e3fec88b4267b1be045e5184afa8 (patch)
tree83805bd4d0313927b5037e4c7e5a07f95b48a8ee /utils/infra_setup
parentbe5e6189c8cff0eaf8bd69ca1136b30131c2476b (diff)
add heat template for bottlenecks
JIRA: BOTTLENECK-33 Change-Id: Ia01b5d44bd33f0192c0dc629e1d428d8894c1dc2 Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
Diffstat (limited to 'utils/infra_setup')
-rwxr-xr-xutils/infra_setup/heat_template/bottlenecks_template1.yaml104
1 files changed, 104 insertions, 0 deletions
diff --git a/utils/infra_setup/heat_template/bottlenecks_template1.yaml b/utils/infra_setup/heat_template/bottlenecks_template1.yaml
new file mode 100755
index 00000000..7c6dd8e7
--- /dev/null
+++ b/utils/infra_setup/heat_template/bottlenecks_template1.yaml
@@ -0,0 +1,104 @@
+heat_template_version: 2014-10-16
+
+description: template to deploy a instance used for bottlenecks project
+
+parameters:
+ image:
+ type: string
+ label: Image name or ID
+ description: Image to be used for deploying instance
+ default: your_image_name
+ flavor:
+ type: string
+ label: Flavor
+ description: Type of instance (flavor) to be used
+ default: m1.medium
+ key:
+ type: string
+ label: Key name
+ description: Name of key-pair to be used for deploying instance
+ default: your_key
+ public_network:
+ type: string
+ label: Public network name or ID
+ description: Network to attach instance to.
+ default: your_public_net
+
+resources:
+ web_server_security_group:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ name: web_server_security_group
+ rules:
+ - protocol: tcp
+ port_range_min: 80
+ port_range_max: 80
+ - protocol: tcp
+ port_range_min: 443
+ port_range_max: 443
+ - protocol: icmp
+ - protocol: tcp
+ port_range_min: 22
+ port_range_max: 22
+ private_network:
+ type: OS::Neutron::Net
+
+ private_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network_id: {get_resource: private_network }
+ cidr: 10.10.10.0/24 #change it according to your own requirement
+ dns_nameservers:
+ - 8.8.8.8
+
+ router:
+ type: OS::Neutron::Router
+ properties:
+ external_gateway_info:
+ network: { get_param: public_network }
+
+ router-interface:
+ type: OS::Neutron::RouterInterface
+ properties:
+ router_id: { get_resource: router }
+ subnet: { get_resource: private_subnet }
+
+ floating_ip:
+ type: OS::Neutron::FloatingIP
+ properties:
+ floating_network: { get_param: public_network }
+
+ floating_ip_assoc:
+ type: OS::Neutron::FloatingIPAssociation
+ properties:
+ floatingip_id: { get_resource: floating_ip }
+ port_id: { get_resource: bottlenecks_port }
+
+ bottlenecks_port:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: private_network }
+ security_groups:
+ - { get_resource: web_server_security_group }
+
+ bottlenecks_instance:
+ type: OS::Nova::Server
+ properties:
+ image: { get_param: image }
+ flavor: { get_param: flavor }
+ key_name: { get_param: key }
+ networks:
+ - port: { get_resource: bottlenecks_port }
+ user_data_format: RAW
+ user_data: |
+ #!/bin/sh -ex
+
+ echo "hello world"
+
+outputs:
+ instance_name:
+ description: Name of the instance
+ value: { get_attr: [bottlenecks_instance, name] }
+ instance_ip:
+ description: IP address of the deployed instance
+ value: { get_attr: [floating_ip, floating_ip_address] }