diff --git a/centos_iso_image.inc b/centos_iso_image.inc index 9caf8e8d..7ef9c37b 100644 --- a/centos_iso_image.inc +++ b/centos_iso_image.inc @@ -25,9 +25,6 @@ python2-openstackclient # openstack-ras openstack-ras -# wrs-heat-templates -wrs-heat-templates - # python-django-horizon python-django-horizon openstack-dashboard diff --git a/centos_pkg_dirs b/centos_pkg_dirs index aed65756..4610053e 100644 --- a/centos_pkg_dirs +++ b/centos_pkg_dirs @@ -20,7 +20,6 @@ openstack/python-glanceclient openstack/python-gnocchi openstack/python-gnocchiclient openstack/python-heat/openstack-heat -openstack/python-heat/wrs-heat-template openstack/python-heatclient openstack/python-horizon openstack/python-keystone diff --git a/openstack/python-heat/python-heat/.yamllint b/openstack/python-heat/python-heat/.yamllint deleted file mode 100644 index 293c2bd9..00000000 --- a/openstack/python-heat/python-heat/.yamllint +++ /dev/null @@ -1,10 +0,0 @@ ---- -extends: default -rules: - braces: {min-spaces-inside: 0, max-spaces-inside: 1} - brackets: {min-spaces-inside: 0, max-spaces-inside: 1} - #comments: disable - #comments-indentation: disable - document-start: disable - #indentation: disable - #line-length: disable diff --git a/openstack/python-heat/python-heat/README.template b/openstack/python-heat/python-heat/README.template deleted file mode 100644 index e69de29b..00000000 diff --git a/openstack/python-heat/python-heat/templates/LICENSE b/openstack/python-heat/python-heat/templates/LICENSE deleted file mode 100644 index d6456956..00000000 --- a/openstack/python-heat/python-heat/templates/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/openstack/python-heat/python-heat/templates/README b/openstack/python-heat/python-heat/templates/README deleted file mode 100644 index 30dcd056..00000000 --- a/openstack/python-heat/python-heat/templates/README +++ /dev/null @@ -1,201 +0,0 @@ -Copyright © 2014-2018 Wind River Systems, Inc. - -SPDX-License-Identifier: Apache-2.0 ------------------------------------------------------------------------ - - -DESCRIPTION -=========== -This SDK Module provides example HEAT templates to assist Titanium Cloud -users in writing their own HEAT templates. Simple examples of the -more commonly used HEAT resources can be found in heat/simple/ directory, -in a YAML file named after the heat resource. More complex examples of -heat templates, involving several different inter-related heat resources -can be found in heat/scenarios/ directory. - -NOTE that the contents of this SDK Module can also be found on the -controllers, at /etc/heat/templates/ . - - -BACKGROUND -========== -HEAT is an Orchestration service that is meant to simplify the launching and -basic management of complex applications or application 'Services' (or using -Heat terminology, a 'Stack'). An application Service consists of a set of related -resources (VMs, Flavors, Images, Volumes, Networks, Subnets, Routers, Load -Balancers, Firewalls, Scaling Policies, etc.) that collectively provide a higher -order Application Function (e.g. Evolved Packet Core, Class 5 Call Server, Signaling -and Media Session Border Controller, etc.). Nearly all of the individual OpenStack -commands that are executed to create the individual resources of an application service -can be described in a HEAT template. HEAT also provides a means of auto-scaling the -application service. VMs or other resource types can be scaled horizontally or -vertically based on measurements of cloud-platform-monitored metrics or -guest-application-monitored metrics. In regard to VM for example, scaling -horizontally (in/out) means decreasing/increasing number of VMs, whereas scaling -vertically (up/down) means resizing the VM by increasing or decreasing its resources -(e.g. vcpus). - -Titanium Cloud utilizes HEAT templates to enable customers to easily launch and -manage application Services. A set of Titanium Cloud templates are provided that can -be used as a reference to create application Service templates. - - -DELIVERABLE -=========== -The Heat Template SDK Module is delivered as source YAML files in a compressed -tarball called "wrs-heat-templates-#.#.#.tgz". - - -Simple examples of the more commonly used HEAT resources can be found in -the hot/simple/ directory, in a YAML file named after the heat resource. - -./hot/simple: - OS_Ceilometer_Alarm.yaml - Creates a Ceilometer Threshold Alarm; - specifying the meter name, the criteria of the - threshold ( > x or < x ), evaluation period, etc. - OS_Cinder_Volume.yaml - Creates a Cinder Volume of a particular size - (in GBytes). - OS_Cinder_VolumeAttachment.yaml - Given a VM Instance and a Cinder Volume, this - creates an attachment or a mount point within the - VM to the Cinder Volume. - OS_Glance_Image.yaml - Creates a Glance Image specifying the image file, - container format, disk format, etc. . - OS_Heat_AccessPolicy.yaml - Specifies which resources are shown on a - 'heat stack-show ' and a - 'heat resource-show '. - OS_Heat_AutoScalingGroup.yaml - Creates an In/Out Autoscaling group; specifying - the min/max size, cooldown period, etc., and - the resource being scaled (defined by referencing - another heat template / yaml file). - OS_Heat_Stack.yaml - Creates a HEAT Stack Resource, in place, within - a Heat template, specifying the version, parameters - and resources of the inner Heat Stack. - OS_Neutron_FloatingIP.yaml - Creates a source NAT type relationship with an - External IP (from a specified external tenant - network) and an Internal IP (from a specified - internal port). - WR_Neutron_Port_Forwarding.yaml - Creates a destination NAT type relationship - with an External IP and Port (of a router) and - an Internal IP and Port (of a VM). - OS_Neutron_Net.yaml - Creates a Tenant Network. Other resources such as - Port, Subnet and VM Instances can refer to a - Tenant Network. - OS_Neutron_Port.yaml - Creates a VM Instance Port on a particular Tenant - Network. VM Instance can use this object to create - its specific port / attachment to a particular - Tenant Network. - OS_Neutron_Router.yaml - Creates an IP Router for Tenant Networks. - IP Interfaces on the Router to different Subnets - of particular Tenant Networks is done as shown - in OS_Neutron_RouterInterface.yaml and - OS_Neutron_RouterGateway.yaml. - OS_Neutron_RouterGateway.yaml - Creates the Router Gateway Interface for the - specified router and the specified external network. - The IP Address for the interface is allocated from - the external network's subnet and a default IP Route - is created using the gateway_ip of the subnet. - OS_Neutron_RouterInterface.yaml - Creates an IP Interface on an existing Router for - an existing IP Subnet. - OS_Neutron_SecurityGroup.yaml - Creates a Neutron Security Group, specifying the - ingress and/or egress ACL rules. Use - security_groups inside of OS::Nova::Server to assign - the security group to a VM. - OS_Neutron_Subnet.yaml - Creates an IP Subnet on a specified Tenant Network. - Requires the specification of the IP Subnet and mask, - and dhcp support. Can optionally specify DNS NameServers. - OS_Nova_Flavor.yaml - Creates a Nova Flavor describing the resource - requirements for a VM. I.e. specifying required RAM, - vCPUs, disk size, etc. . - OS_Nova_KeyPair.yaml - Creates a SSH key pair to enable secure initial login - to a launched VM. The created key pair should be - referenced in OS::Nova::Server. - OS_Nova_Server.yaml - Creates a VM Instance, specifying flavor, image and - network attachments. - OS_Nova_ServerGroup.yaml - Creates a Server Group; i.e. a container of multiple - VM Instances with group attributes such as - compute-node affinity or anti-affinity. - Use NovaSchedulerHints: - [{Key: 'group', Value: {Ref: }}] - inside of OS::Nova::Server to assign a VM Instance - to a ServerGroup. - WR_Neutron_ProviderNet.yaml - Creates a Provider Network specifying the name and - type (i.e. flat, vlan or vxlan). - WR_Neutron_ProviderNetRange.yaml - Creates a segment id range for a Provider Network; - specifying the providerNet, and the min and max values - of the segment id range. - - - -More complex examples of heat templates, involving several different inter-related -heat resources can be found in hot/scenarios/ directory. - -./hot/scenarios: - BootFromCinder.yaml - A small single VM Instance scenario; intended to - illustrate the creation of a Cinder Volume and then - the launching / creation of a VM Instance using this - Cinder Volume as its boot device. - CombinationAutoScaling.yaml - A single template that creates a simple VM In/Out - auto-scaling use case. A single Load Balancer VM is - created and an AutoScalingGroup of server VMs is - created which scales in or out based on link - utilization. - NestedAutoScale.yaml - A more complex In/Out autoscaling use case that - scales a Stack In/Out. A single Load Balancer VM is - created and an AutoScalingGroup of a Heat Stack - (containing a Cinder Volume and a VM) is created - which scales in or out based on link utilization. - NestedStack.yaml - The Heat Stack being scaled In/Out in the above - use case. A Stack containing a Cinder Volume and - a VM. - Networking_and_Servers.yaml - Two different examples of creating VMs attached - to a Tenant Network containing two Subnets; - illustrating how to specify the exact subnet to - attach to, if required. - PortForwarding.yaml - An example of 3 VMs/Servers sharing 1 External IP - address, using a unique External Port to forward - traffic to the correct VM/Server. - VMAutoScaling.yaml - A template that creates a typical resource - Up/Down auto-scaling use case. The size of a VM in - terms of number of guest vcpus is scaled up or down - based on average cpu utilization. - LabSetup.yaml - A complex example of setting up a large virtual - LAB with a number of resources and resource types. - The Stack contains/creates 2 provider networks, - a keypair, 2 flavors, 4 networks, 5 subnets and - 2 routers with gateways setup. - -USAGE -===== -The HEAT template (YAML) files can be used to create a 'Stack' by using either the -HEAT CLI, Heat Rest APIs and/or the Heat Horizon panel (Orchestration). - -For example, to create a 'Stack' using the HEAT CLI: - heat stack-create -f - -Refer to the Titanium Cloud Administration Guide, Managing Stacks Section, for -additional information on using HEAT: - * Overview of YAML Template format, - * Description on how to pass 'parameters' to a HEAT stack, - * Description of TiS-specific Extensions to HEAT, - * Examples of how to launch a HEAT Stack using the CLI and Horizon, - * How to pass User Data to a VM/Server/Guest in a HEAT template, - * Overview of HEAT Autoscaling; both In/Out and Up/Down, - * Examples of using heat-cfntools in Guest to report Guest Metrics - to Ceilometer and optionally use for HEAT Autoscaling, - * and more. - - -CAVEATS -======= - -TiS-specific Extensions to HEAT are only provided for the Heat Orchestration Template -(HOT) format; NOT for the CloudFormatioN (CFN) format. HEAT in Titanium Cloud will still accept -and work with CFN-formatted heat templates; this CFN format is just simply not -extended with additional Titanium Cloud HEAT capabilities. - -Example CFN-formatted HEAT templates are no longer provided in this SDK Module. Example -CFN-formatted HEAT template files can be found at - https://github.com/openstack/heat-templates/tree/master/cfn - - - diff --git a/openstack/python-heat/python-heat/templates/hot/scenarios/BootFromCinder.yaml b/openstack/python-heat/python-heat/templates/hot/scenarios/BootFromCinder.yaml deleted file mode 100644 index 3346c188..00000000 --- a/openstack/python-heat/python-heat/templates/hot/scenarios/BootFromCinder.yaml +++ /dev/null @@ -1,118 +0,0 @@ -################################################################################ -# Copyright (c) 2013 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ -# -# Objectives: -# Create a cinder volume from a glance image -# Boot a nova server from the glance image -# -# Pre-Reqs: -# A keypair called: controller-0 (nova keypair-list) -# A nova flavor called: m1.tiny (nova flavor-list) -# A glance image called: wrl6 (glance image-list) -# 2 networks called: private-net0 and internal-net0 (neutron net-list) -# -# Mandatory Template Parameters: -# None -# -# Tenant Considerations: -# None -# -# Sample CLI syntax: -# heat stack-create -f BootFromCinder.yaml STACK -# -# Expected Outcome: -# A new 1GB cinder volume called: cinder-volume -# cinder list -# A new nova instance called: cinder-vm -# nova list -# -################################################################################ -heat_template_version: 2015-04-30 - -description: > - Demonstrate launching an instance from a cinder volume - -parameters: - - VOLUME_NAME: - description: name for the new cinder volume - type: string - default: cinder-volume - - VOLUME_SIZE: - description: size for the new cinder volume - type: number - default: 2 - - VM_NAME: - description: name for the new VM - type: string - default: cinder-vm - - KEYPAIR: - description: keypair to use. (nova keypair-list) - type: string - default: controller-0 - constraints: - - custom_constraint: nova.keypair - - KEYPAIR_ADMIN_USER: - type: string - description: Name of user account to inject ssh keys from keypair - default: 'ec2-user' - - FLAVOR: - description: Nova flavor to use. (nova flavor-list) - type: string - default: m1.tiny - constraints: - - custom_constraint: nova.flavor - - IMAGE: - description: Glance image to create cinder volume (glance image-list) - type: string - default: wrl6 - constraints: - - custom_constraint: glance.image - - PRIVATE_NET: - description: private network to use (neutron net-list) - type: string - default: private-net0 - constraints: - - custom_constraint: neutron.network - - INTERNAL_NET: - description: internal network to use (neutron net-list) - type: string - default: internal-net0 - constraints: - - custom_constraint: neutron.network - -resources: - - Cinder_Volume: - type: OS::Cinder::Volume - properties: - description: A bootable cinder image - name: { get_param: VOLUME_NAME } - image: { get_param: IMAGE} - size: { get_param: VOLUME_SIZE } - - Nova_Server: - type: OS::Nova::Server - properties: - name: { get_param: VM_NAME } - key_name: { get_param: KEYPAIR } - admin_user: { get_param: KEYPAIR_ADMIN_USER } - flavor: { get_param: FLAVOR } - block_device_mapping: - - device_name: vda - volume_id: { get_resource: Cinder_Volume } - networks: - - network: { get_param: PRIVATE_NET} - - network: { get_param: INTERNAL_NET} diff --git a/openstack/python-heat/python-heat/templates/hot/scenarios/CombinationAutoScaling.yaml b/openstack/python-heat/python-heat/templates/hot/scenarios/CombinationAutoScaling.yaml deleted file mode 100644 index f020ee43..00000000 --- a/openstack/python-heat/python-heat/templates/hot/scenarios/CombinationAutoScaling.yaml +++ /dev/null @@ -1,259 +0,0 @@ -################################################################################ -# Copyright (c) 2013-2018 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ -# -# Objective: -# Demonstrates creating: -# A static nova instance that acts as a load balancer -# An autoscaling stack of nova instances -# Use of the WRS autoscaling naming enhancement -# -# Pre-Reqs: -# Normal lab setup. Capable of launching 3 VMs -# A keypair setup for the current user. (nova keypair-list) -# A flavor called: m1.small (nova flavor-list) -# A glance image called: wrl6 (glance image-list) -# -# Optional Template Parameters: -# KEYPAIR: A keypair setup for the current user (nova keypair-list) -# KEYPAIR_ADMIN_USER: The account to use when doing ssh to the VM (ssh keys -# injected from the keypair) -# FLAVOR: A nova flavor to use in launching the VMs and load balancer -# (nova flavor-list) -# IMAGE: A glance image to use in launching the VMs (glance image-list) -# LB_IMAGE: A glance image to use in launching the load balancer -# (glance image-list) -# LB_NETWORK: UUID of the network to use for the load balancer VM -# (neutron net-list) -# VM_NETWORK: UUID of the network to use for the scaling VMs -# (neutron net-list) -# PUBLIC_NETWORK: UUID of public network to use for all VMs -# (neutron net-list) -# INTERNAL_NETWORK: UUID of the internal network to use for all VMs -# (neutron net-list) -# METER_NAME: name of the gnocchi metric to trigger autoscaling -# (gnocchi metric list) -# -# Tenant Considerations: -# The default meters (vswitch) are not accessible to tenants -# -# Sample CLI syntax: -# heat stack-create -f CombinationAutoScaling.yaml STACK -# -# Expected Outcome: -# A VM running the load balancer (nova list) -# An auto-scaling stack of server VMs (nova list) -# New aodh alarm triggers (aodh alarm list) -# -# Note: there is no communication between the load balancer and the VMs -# -################################################################################ - -heat_template_version: 2015-04-30 - -description: Demonstrate mixture of regular and autoscaling VMs - -parameters: - - KEYPAIR: - description: Name of an existing KeyPair for the VMs - type: string - default: controller-0 - constraints: - - custom_constraint: nova.keypair - - KEYPAIR_ADMIN_USER: - type: string - description: Name of user account to inject ssh keys from keypair - default: 'ec2-user' - - FLAVOR: - description: Instance flavor - type: string - default: m1.small - constraints: - - custom_constraint: nova.flavor - - LB_IMAGE: - description: the name or uuid of the loadbalancer glance image - type: string - default: wrl6 - constraints: - - custom_constraint: glance.image - - IMAGE: - description: the name or uuid of the server image in glance - type: string - default: wrl6 - constraints: - - custom_constraint: glance.image - - PUBLIC_NETWORK: - type: string - description: Public network name - constraints: - - custom_constraint: neutron.network - - INTERNAL_NETWORK: - type: string - description: Internal network name - constraints: - - custom_constraint: neutron.network - - VM_NETWORK: - type: string - description: Server network name - constraints: - - custom_constraint: neutron.network - - LB_NETWORK: - type: string - description: Load Balancer network name - constraints: - - custom_constraint: neutron.network - - METER_NAME: - type: string - description: gnocchi metric to trigger autoscaling - default: vswitch.port.receive.util - - RESOURCE_TYPE: - description: Gnocchi resource type to use to query - type: string - default: vswitch_interface_and_port - - MinClusterSize: - type: string - default: '1' - description: Minimum number of servers in the scaling group - - MaxClusterSize: - type: string - default: '2' - description: Maximum number of servers in the scaling group - -resources: - - LoadBalancer: - type: OS::Nova::Server - properties: - name: - list_join: - - "-" - - [{get_param: 'OS::stack_name'}, 'LoadBalancer'] - image: { get_param: LB_IMAGE} - flavor: {get_param: FLAVOR } - key_name: {get_param: KEYPAIR} - admin_user: {get_param: KEYPAIR_ADMIN_USER } - networks: - - network: { get_param: PUBLIC_NETWORK } - vif-model: 'virtio' - - network: { get_param: LB_NETWORK } - - network: { get_param: INTERNAL_NETWORK } - user_data_format: 'RAW' - user_data: | - #wrs-config - DEMO_PERSONALITY="lb" - FUNCTIONS="hugepages,demo," - - - SrvScaleOutPolicy: - type: OS::Heat::ScalingPolicy - properties: - auto_scaling_group_id: { get_resource: ServerGroup } - adjustment_type: change_in_capacity - scaling_adjustment: 1 - cooldown: 30 - - SrvScaleInPolicy: - type: OS::Heat::ScalingPolicy - properties: - auto_scaling_group_id: { get_resource: ServerGroup } - adjustment_type: change_in_capacity - scaling_adjustment: -1 - cooldown: 30 - - LINKAlarmHigh: - type: OS::Aodh::GnocchiAggregationByResourcesAlarm - properties: - description: Scale-out if the avg link util > 50% for 5 minutes - metric: { get_param: METER_NAME } - aggregation_method: mean - granularity: 300 - evaluation_periods: '1' - threshold: '50' - resource_type: { get_param: RESOURCE_TYPE } - comparison_operator: gt - alarm_actions: - - {get_attr: [SrvScaleOutPolicy, alarm_url]} - query: - str_replace: - template: '{"or": [{"=": {"network_uuid": "internal_net_id"}}, - {"=": {"network_uuid": "public_net_id"}}, - {"=": {"network_uuid": "lb_net_id"}}, - {"=": {"network_uuid": "vm_net_id"}}]}' - params: - internal_net_id: {get_param: INTERNAL_NETWORK} - public_net_id: {get_param: PUBLIC_NETWORK} - lb_net_id: {get_param: LB_NETWORK} - vm_net_id: {get_param: VM_NETWORK} - - LINKAlarmLow: - type: OS::Aodh::GnocchiAggregationByResourcesAlarm - properties: - description: Scale-in if the avg link util < 20% for 5 minutes - metric: { get_param: METER_NAME } - aggregation_method: mean - granularity: 300 - evaluation_periods: '1' - threshold: '20' - resource_type: { get_param: RESOURCE_TYPE } - comparison_operator: lt - alarm_actions: - - {get_attr: [SrvScaleInPolicy, alarm_url]} - query: - str_replace: - template: '{"or": [{"=": {"network_uuid": "internal_net_id"}}, - {"=": {"network_uuid": "public_net_id"}}, - {"=": {"network_uuid": "lb_net_id"}}, - {"=": {"network_uuid": "vm_net_id"}}]}' - params: - internal_net_id: {get_param: INTERNAL_NETWORK} - public_net_id: {get_param: PUBLIC_NETWORK} - lb_net_id: {get_param: LB_NETWORK} - vm_net_id: {get_param: VM_NETWORK} - - ServerGroup: - type: OS::Heat::AutoScalingGroup - properties: - cooldown: 60 - desired_capacity: 1 - min_size: { get_param: MinClusterSize } - max_size: { get_param: MaxClusterSize } - resource: - type: OS::Nova::Server - metadata: - wrs-groupindex-mode: true - properties: - name: - list_join: - - "-" - - [{get_param: 'OS::stack_name'}, 'srv', ''] - flavor: { get_param: FLAVOR } - image: { get_param: IMAGE } - key_name: { get_param: KEYPAIR } - admin_user: {get_param: KEYPAIR_ADMIN_USER } - metadata: {"metering.server_group": {get_param: "OS::stack_id"}} - networks: - - network: { get_param: PUBLIC_NETWORK } - vif-model: 'virtio' - - network: { get_param: VM_NETWORK } - - network: { get_param: INTERNAL_NETWORK } - user_data_format: 'RAW' - user_data: | - #wrs-config - DEMO_PERSONALITY="srv" - FUNCTIONS="hugepages,demo," diff --git a/openstack/python-heat/python-heat/templates/hot/scenarios/LabSetup.yaml b/openstack/python-heat/python-heat/templates/hot/scenarios/LabSetup.yaml deleted file mode 100644 index cd9b89e1..00000000 --- a/openstack/python-heat/python-heat/templates/hot/scenarios/LabSetup.yaml +++ /dev/null @@ -1,379 +0,0 @@ -################################################################################ -# Copyright (c) 2013-2015 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ -# -# Objective: -# Demonstrates a simple lab setup -# Sets up networks, routers, glance images, flavors, keypairs -# -# Pre-Reqs: -# Image file located at /home/wrsroot/images/tis-centos-guest.img -# This is an R2 HEAT template version (2015-04-30) -# -# Mandatory Template Parameters: -# TENANT_ID: The tenant ID (keystone tenant-list) -# -# Tenant Considerations: -# Should be run as admin. -# -# Sample CLI syntax: -# heat stack-create -f LabSetup.yaml -# -P TENANT_ID=812b639cd3714d389a4e2662b114b72b SETUP -# -# Expected Outcome: -# 2 provider networks created called: physnet0 and physnet1 with ranges -# setup (neutron providernet-list) -# A new keypair called: controller-0 (nova keypair-list) -# A new glance image called: wrl6 (glance image-list) -# 2 flavors created called: m1.tiny and m1.small (nova flavor-list) -# 4 networks created called: external-net0, internal-net0, private-net0, -# public-net0 (neutron net-list) -# 5 subnets created called: public-subnet0, external-subnet0, -# private-subnet0, internal-subnet0, tagged-subnet0 (neutron subnet-list) -# 2 routers with gateways setup called: public-router0, -# private-router0 (neutron router-list) -# -################################################################################ - -heat_template_version: 2015-04-30 - -description: > - Demonstrate a simple Lab Setup - -parameters: - - TENANT_ID: - description: Tenant ID for the network. (openstack project list) - type: string - default: admin - - IMAGE_NAME: - description: Name of the new glance image - type: string - default: wrl6 - - KEYPAIR_NAME: - description: Name of the new keypair - type: string - default: controller-0 - - PHYSNET0: - description: First physical network - type: string - default: physnet0 - - PHYSNET1: - description: Second physical network - type: string - default: physnet1 - - # Network names - PUBLICNET: - description: Name of the Public Network - type: string - default: public-net0 - - PRIVATENET: - description: Name of the Private Network - type: string - default: private-net0 - - INTERNALNET: - description: Name of the Internal Network - type: string - default: internal-net0 - - EXTERNALNET: - description: Name of the External Network - type: string - default: external-net0 - - # Subnet names - PUBLICSUBNET: - description: Name of the Public Subnet - type: string - default: public-subnet0 - - PRIVATESUBNET: - description: Name of the Private Subnet - type: string - default: private-subnet0 - - INTERNALSUBNET: - description: Name of the Internal Subnet - type: string - default: internal-subnet0 - - TAGGEDSUBNET: - description: Name of the Tagged Subnet - type: string - default: tagged-subnet0 - - EXTERNALSUBNET: - description: Name of the External Subnet - type: string - default: external-subnet0 - - PUBLIC_CIDR: - description: Cidr of the Public Subnet - type: string - default: '192.168.101.0/24' - - PUBLIC_EXTERNAL_GWY: - description: External IP of public router on the external network - type: string - default: 192.168.1.2 - - PRIVATE_CIDR: - description: Cidr of the Private Subnet - type: string - default: '192.168.201.0/24' - - PRIVATE_EXTERNAL_GWY: - description: External IP of private router on the external network - type: string - default: 192.168.1.3 - - INTERNAL_CIDR: - description: Cidr of the Internal Subnet - type: string - default: '10.10.0.0/24' - - TAGGED_CIDR: - description: Cidr of the Tagged Subnet - type: string - default: '10.10.1.0/24' - - EXTERNAL_CIDR: - description: Cidr of the External Subnet - type: string - default: '192.168.1.0/24' - - EXTERNAL_GATEWAY: - description: Cidr of the External Subnet - type: string - default: '192.168.1.1' - - # Router names - PUBLICROUTER: - description: Name of the Public Router - type: string - default: public-router0 - - PRIVATEROUTER: - description: Name of the Private Router - type: string - default: private-router0 - - -resources: - - ProviderNet0: - type: WR::Neutron::ProviderNet - properties: - name: { get_param: PHYSNET0 } - type: vlan - - ProviderNet1: - type: WR::Neutron::ProviderNet - properties: - name: { get_param: PHYSNET1 } - type: vlan - - ProviderNetRange0A: - type: WR::Neutron::ProviderNetRange - properties: - providernet_id: { get_resource: ProviderNet0 } - name: { list_join: [ "-", [{ get_param: PHYSNET0}, "a"]]} - minimum: 400 - maximum: 499 - tenant_id: { get_param: TENANT_ID } - - ProviderNetRange0B: - type: WR::Neutron::ProviderNetRange - properties: - # required properties - providernet_id: { get_resource: ProviderNet0 } - name: { list_join: [ "-", [{ get_param: PHYSNET0}, "b"]]} - minimum: 10 - maximum: 10 - shared: true - - ProviderNetRange1A: - type: WR::Neutron::ProviderNetRange - properties: - # required properties - providernet_id: { get_resource: ProviderNet1 } - name: { list_join: [ "-", [{ get_param: PHYSNET1}, "a"]]} - minimum: 500 - maximum: 599 - tenant_id: { get_param: TENANT_ID } - - OS_Nova_KeyPair: - type: OS::Nova::KeyPair - properties: - # required properties - name: {get_param: KEYPAIR_NAME } - # optional properties - save_private_key: false - - wrl5_Glance_Image: - type: OS::Glance::Image - properties: - name: {get_param: IMAGE_NAME } - is_public: true - container_format: bare - disk_format: qcow2 - location: file:///home/wrsroot/images/tis-centos-guest.img - - m1.tiny: - type: OS::Nova::Flavor - properties: - name: m1.tiny - ram: 256 - disk: 2 - vcpus: 1 - extra_specs: - 'hw:cpu_policy': dedicated - 'hw:mem_page_size': 2048 - - m1.small: - type: OS::Nova::Flavor - properties: - name: m1.small - ram: 512 - disk: 2 - vcpus: 1 - extra_specs: - 'hw:cpu_policy': shared - 'hw:mem_page_size': 2048 - - external_network: - type: OS::Neutron::Net - depends_on: ProviderNetRange0B - properties: - name: { get_param: EXTERNALNET } - value_specs: - 'provider:network_type': vlan - 'provider:physical_network': { get_attr: [ProviderNet0, name] } - 'provider:segmentation_id': 10 - 'router:external': 'True' - tenant_id: { get_param: TENANT_ID } - - public_network: - type: OS::Neutron::Net - depends_on: ProviderNetRange0A - properties: - name: { get_param: PUBLICNET } - shared: false - tenant_id: { get_param: TENANT_ID } - value_specs: - 'provider:network_type': vlan - 'provider:physical_network': { get_attr: [ProviderNet0, name] } - 'provider:segmentation_id': 400 - - private_network: - type: OS::Neutron::Net - depends_on: ProviderNetRange1A - properties: - name: { get_param: PRIVATENET } - shared: false - value_specs: - 'provider:network_type': vlan - 'provider:physical_network': { get_attr: [ProviderNet1, name] } - 'provider:segmentation_id': 500 - tenant_id: { get_param: TENANT_ID } - - internal_network: - type: OS::Neutron::Net - depends_on: external_network - properties: - name: { get_param: INTERNALNET } - shared: false - tenant_id: { get_param: TENANT_ID } - - public_subnet: - type: OS::Neutron::Subnet - properties: - cidr: { get_param: PUBLIC_CIDR } - network_id: { get_resource: public_network } - name: { get_param: PUBLICSUBNET } - tenant_id: { get_param: TENANT_ID } - - private_subnet: - type: OS::Neutron::Subnet - properties: - cidr: { get_param: PRIVATE_CIDR } - network_id: { get_resource: private_network } - name: { get_param: PRIVATESUBNET } - enable_dhcp: true - tenant_id: { get_param: TENANT_ID } - - internal_subnet: - type: OS::Neutron::Subnet - properties: - cidr: { get_param: INTERNAL_CIDR } - network_id: { get_resource: internal_network } - name: { get_param: INTERNALSUBNET } - enable_dhcp: true - tenant_id: { get_param: TENANT_ID } - # --no-gateway - - tagged_subnet: - type: OS::Neutron::Subnet - properties: - cidr: { get_param: TAGGED_CIDR } - network_id: { get_resource: internal_network } - name: { get_param: TAGGEDSUBNET } - tenant_id: { get_param: TENANT_ID } - enable_dhcp: true - # --no-gateway - - external_subnet: - type: OS::Neutron::Subnet - properties: - cidr: { get_param: EXTERNAL_CIDR } - network_id: { get_resource: external_network } - name: { get_param: EXTERNALSUBNET } - tenant_id: { get_param: TENANT_ID } - enable_dhcp: false - gateway_ip: { get_param: EXTERNAL_GATEWAY } - - public_router: - type: OS::Neutron::Router - properties: - name: { get_param: PUBLICROUTER} - external_gateway_info: - network: { get_resource: external_network } - enable_snat: false - external_fixed_ips: - - ip_address: { get_param: PUBLIC_EXTERNAL_GWY } - subnet: { get_resource: external_subnet } - tenant_id: {get_param: TENANT_ID} - - private_router: - type: OS::Neutron::Router - properties: - name: { get_param: PRIVATEROUTER} - external_gateway_info: - network: { get_resource: external_network } - enable_snat: false - external_fixed_ips: - - ip_address: { get_param: PRIVATE_EXTERNAL_GWY } - subnet: { get_resource: external_subnet } - tenant_id: {get_param: TENANT_ID} - - public_router_interface: - type: OS::Neutron::RouterInterface - properties: - router_id: { get_resource: public_router } - subnet_id: { get_resource: public_subnet } - - private_router_interface: - type: OS::Neutron::RouterInterface - properties: - router_id: { get_resource: private_router } - subnet_id: { get_resource: private_subnet } diff --git a/openstack/python-heat/python-heat/templates/hot/scenarios/NestedAutoScale.yaml b/openstack/python-heat/python-heat/templates/hot/scenarios/NestedAutoScale.yaml deleted file mode 100644 index 047b4b4c..00000000 --- a/openstack/python-heat/python-heat/templates/hot/scenarios/NestedAutoScale.yaml +++ /dev/null @@ -1,229 +0,0 @@ -################################################################################ -# Copyright (c) 2013-2018 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ -# -# Objective: -# Demonstrates creating: -# An autoscaling stack of nova instances that use cinder volumes -# The default meter used to trigger scaling is: cpu_util -# This template uses another template to show nested scaling -# -# Pre-Reqs: -# Normal lab setup. Capable of launching 3 VMs -# A keypair called: controller-0. (nova keypair-list) -# A flavor called: small (nova flavor-list) -# A glance image called: tis-centos-guest (glance image-list) -# A network called: internal0-net0 (neutron net-list) -# A nested template file NestedStack.yaml in the same folder as this yaml. -# -# Optional Template Parameters: -# KEYPAIR: A keypair setup for the current user (nova keypair-list) -# KEYPAIR_ADMIN_USER: The user to specify for injecting ssh keys from the -# keypair into the VM -# FLAVOR: A nova flavor name or UUID for the VMs (nova flavor-list) -# IMAGE: A glance image name or UUID for launching VMs (glance image-list) -# NETWORK: Name or UUID of the network to use for the VMs (neutron net-list) -# METER_NAME: Name of the gnocchi metric to use to trigger autoscaling -# (gnocchi metric list) -# HIGH_VALUE: Value for the meter to trigger a scale up. -# LOW_VALUE: Value for the meter to trigger a scale down. -# -# Tenant Considerations: -# The tenant must have access to the meter type selected. -# -# Sample CLI syntax: -# heat stack-create -f NestedAutoScale.yaml STACK -# -# Expected Outcome: -# VMs running the guest image (nova list) -# New aodh alarm triggers (aodh alarm list) -# New cinder volumes for each VM (cinder list) -# This template produces an output which shows the CLI syntax to help -# troubleshoot autoscaling -# -################################################################################ - -heat_template_version: 2015-04-30 - -description: > - Demonstrates autoscaling of a nested stack - The nested stack creates volumes and VMs - -parameters: - - KEYPAIR: - description: keypair to use. (nova keypair-list) - type: string - default: controller-0 - constraints: - - custom_constraint: nova.keypair - - KEYPAIR_ADMIN_USER: - description: Name of user account to inject ssh keys from keypair - type: string - default: 'ec2-user' - - FLAVOR: - description: Nova flavor to use. (nova flavor-list) - type: string - default: small - constraints: - - custom_constraint: nova.flavor - - IMAGE: - description: Glance image to create a cinder volume(glance image-list) - type: string - default: tis-centos-guest - constraints: - - custom_constraint: glance.image - - NETWORK: - description: Name of the network to use (neutron net-list) - type: string - default: internal0-net0 - constraints: - - custom_constraint: neutron.network - - METER_NAME: - description: Gnocchi metric to query when determining autoscaling - type: string - default: cpu_util - - RESOURCE_TYPE: - description: Gnocchi resource type to use to query - type: string - default: instance - - HIGH_VALUE: - description: Metric value that will trigger a scale up if exceeded - type: string - default: '80' - - LOW_VALUE: - description: Metric value that will trigger a scale down if below - type: string - default: '30' - -resources: - - ScalingGroup: - type: OS::Heat::AutoScalingGroup - properties: - cooldown: 60 - desired_capacity: 1 - max_size: 3 - min_size: 1 - resource: - type: NestedStack.yaml - properties: - NAMING: { get_param: "OS::stack_name"} - FLAVOR: { get_param: FLAVOR } - IMAGE: { get_param: IMAGE } - KEYPAIR: { get_param: KEYPAIR } - KEYPAIR_ADMIN_USER: { get_param: KEYPAIR_ADMIN_USER } - NETWORK: { get_param: NETWORK } - METADATA: {"metering.server_group": {get_param: "OS::stack_id"}} - - ScaleUpPolicy: - type: OS::Heat::ScalingPolicy - properties: - adjustment_type: change_in_capacity - auto_scaling_group_id: { get_resource: ScalingGroup } - cooldown: 60 - scaling_adjustment: 1 - - ScaleDownPolicy: - type: OS::Heat::ScalingPolicy - properties: - adjustment_type: change_in_capacity - auto_scaling_group_id: { get_resource: ScalingGroup } - cooldown: 60 - scaling_adjustment: -1 - - AlarmHigh: - type: OS::Aodh::GnocchiAggregationByResourcesAlarm - properties: - description: Scale up if the meter above threshold for 5 minutes - metric: { get_param: METER_NAME } - aggregation_method: mean - granularity: 300 - evaluation_periods: 1 - threshold: { get_param: HIGH_VALUE } - resource_type: { get_param: RESOURCE_TYPE } - comparison_operator: gt - alarm_actions: - - {get_attr: [ScaleUpPolicy, alarm_url]} - # gnocchi alarm resource will automatically - # prepend to the query based on the meter type - # metadata.metering - # or metadata.user_metadata - query: - str_replace: - template: '{"=": {"server_group": "stack_id"}}' - params: - stack_id: {get_param: "OS::stack_id"} - - AlarmLow: - type: OS::Aodh::GnocchiAggregationByResourcesAlarm - properties: - description: Scale down if the meter below threshold for 5 minutes - metric: { get_param: METER_NAME } - aggregation_method: mean - granularity: 300 - evaluation_periods: 1 - threshold: { get_param: LOW_VALUE } - resource_type: { get_param: RESOURCE_TYPE } - comparison_operator: lt - alarm_actions: - - {get_attr: [ScaleDownPolicy, alarm_url]} - # gnocchi alarm resource will automatically - # prepend to the query based on the meter type - # metadata.metering - # or metadata.user_metadata - query: - str_replace: - template: '{"=": {"server_group": "stack_id"}}' - params: - stack_id: {get_param: "OS::stack_id"} - -outputs: - gnocchi_query: - value: - str_replace: - template: > - gnocchi measures aggregation --resource-type resourcetype - --query '"server_group"="stackval"' - --granularity 300 --aggregation mean -m metric - params: - resourcetype: { get_param: RESOURCE_TYPE } - metric: { get_param: METER_NAME } - stackval: { get_param: "OS::stack_id" } - description: > - This is a Gnocchi query for statistics on the cpu_util measurements about - OS::Nova::Server instances in this stack. The --resource-type select the - type of Gnocchi resource. The --query parameter filters resources - according to its attributes. When a VM's metadata includes an item of the - form metering.server_group=X, the corresponding Gnocchi resource has a - attribute named server_group that can queried with 'server_group="X"' In - this case the nested stacks give their VMs metadata that is passed as a - nested stack parameter, and this stack passes a metadata of the form - metering.server_group=X, where X is this stack's ID. - - manual_scale_up: - value: - str_replace: - template: > - curl -X POST "scale_up_url" - params: - scale_up_url: {get_attr: [ScaleUpPolicy, alarm_url]} - - manual_scale_down: - value: - str_replace: - template: > - curl -X POST "scale_down_url" - params: - scale_down_url: {get_attr: [ScaleDownPolicy, alarm_url]} diff --git a/openstack/python-heat/python-heat/templates/hot/scenarios/NestedStack.yaml b/openstack/python-heat/python-heat/templates/hot/scenarios/NestedStack.yaml deleted file mode 100644 index 05b78514..00000000 --- a/openstack/python-heat/python-heat/templates/hot/scenarios/NestedStack.yaml +++ /dev/null @@ -1,103 +0,0 @@ -################################################################################ -# Copyright (c) 2013 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ -# -# Objective: -# This stack is not meant to be launched directly. -# It is used by NestedAutoScale.yaml -# -# Pre-Reqs: -# Refer to NestedAutoScale.yaml -# -# Mandatory Template Parameters: -# None -# -# Tenant Considerations: -# Refer to NestedAutoScale.yaml -# -# Sample CLI syntax: -# Refer to NestedAutoScale.yaml -# -# Expected Outcome: -# Refer to NestedAutoScale.yaml -# -################################################################################ - -heat_template_version: 2015-04-30 - -parameters: - - METADATA: - description: a way of passing metadata from the outer stack to the VMs - type: json - - NAMING: - description: Prefix for the name of the volumes and vms - type: string - default: "" - - KEYPAIR: - description: keypair to use. (nova keypair-list) - type: string - default: controller-0 - constraints: - - custom_constraint: nova.keypair - - KEYPAIR_ADMIN_USER: - description: Name of user account to inject ssh keys from keypair - type: string - default: 'ec2-user' - - FLAVOR: - description: Nova flavor to use. (nova flavor-list) - type: string - default: m1.small - constraints: - - custom_constraint: nova.flavor - - IMAGE: - description: Glance image to create cinder volume (glance image-list) - type: string - default: wrl6 - constraints: - - custom_constraint: glance.image - - NETWORK: - description: Name of the private network to use (neutron net-list) - type: string - default: private-net0 - constraints: - - custom_constraint: neutron.network - -resources: - - CinderVolume: - type: OS::Cinder::Volume - properties: - name: - list_join: - - "_" - - [{ get_param: NAMING }, "vol", { group_index } ] - image: { get_param: IMAGE } - size: 2 - - NovaServer: - type: OS::Nova::Server - properties: - name: - list_join: - - "_" - - [{ get_param: NAMING }, "vm", { group_index } ] - metadata: {get_param: METADATA } - key_name: { get_param: KEYPAIR } - admin_user: { get_param: KEYPAIR_ADMIN_USER } - block_device_mapping: - - device_name: vda - delete_on_termination: true - volume_id: { get_resource: CinderVolume } - flavor: { get_param: FLAVOR } - networks: - - network: { get_param: NETWORK } diff --git a/openstack/python-heat/python-heat/templates/hot/scenarios/Networking_and_Servers.yaml b/openstack/python-heat/python-heat/templates/hot/scenarios/Networking_and_Servers.yaml deleted file mode 100644 index 5c26a532..00000000 --- a/openstack/python-heat/python-heat/templates/hot/scenarios/Networking_and_Servers.yaml +++ /dev/null @@ -1,217 +0,0 @@ -################################################################################ -# Copyright (c) 2013 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ -# -# Objective: -# Demonstrate constructing a server using a newly created subnet -# Shows two scenarios -# Scenario A: network, subnets and ports are created explicitly for the -# servers. This scenario supports selecting a subnet through the use of -# a port -# Scenario B: network and subnets are created and only network is -# specified for the server. This scenario does not support selecting -# which subnet is selected but will not allow booting unless at least one -# subnet exists. -# -# Pre-Reqs: -# A glance image called: wrl6 -# A nova flavor called: m1.small -# -# Mandatory Template Parameters: -# None -# -# Tenant Considerations: -# An admin only activity -# -# Sample CLI syntax: -# heat stack-create -f Networking_and_Servers.yaml STACK -# -# Expected Outcome: -# new networks, subnets, ports and servers -# neutron net-list -# neutron subnet-list -# neutron port-list -# nova list -# servers A1 and A2 will be on separate subnets -# servers B1 and B2 will typically be on the same subnet -# -################################################################################ -heat_template_version: 2015-04-30 - -description: > - Demonstrate creating a network and subnetwork to launch a server - -parameters: - - NETWORK_PREFIX: - type: string - description: "The prefix for each newly created network" - default: "network" - - SERVER_PREFIX: - type: string - description: "The prefix for each newly created server" - default: "server" - - IMAGE: - type: string - description: "The name of the glance image" - default: wrl6 - constraints: - - custom_constraint: glance.image - - FLAVOR: - type: string - description: "The name of the flavor to use" - default: m1.small - constraints: - - custom_constraint: nova.flavor - - CIDR1: - type: string - description: "CIDR of subnet A1" - default: "192.168.110.0/24" - - CIDR2: - type: string - description: "CIDR of subnet A2" - default: "192.168.120.0/24" - - CIDR3: - type: string - description: "CIDR of subnet B1" - default: "192.168.130.0/24" - - CIDR4: - type: string - description: "CIDR of subnet B2" - default: "192.168.140.0/24" - -resources: - - ################ - # Scenario 1 # - ################ - A_Network: - type: "OS::Neutron::Net" - properties: - name: - list_join: [ "-", [{ get_param: NETWORK_PREFIX}, "A"]] - - A_Subnet_1: - type: "OS::Neutron::Subnet" - properties: - name: - list_join: - - "-" - - [{ get_param: NETWORK_PREFIX }, "subnet", "A", "1"] - - network_id: { get_resource: A_Network } - cidr: { get_param: CIDR1 } - enable_dhcp: "True" - - A_Subnet_2: - type: "OS::Neutron::Subnet" - properties: - name: - list_join: - - "-" - - [{ get_param: NETWORK_PREFIX }, "subnet", "A", "2"] - network_id: { get_resource: A_Network } - cidr: { get_param: CIDR2 } - enable_dhcp: "True" - - A_Port_1: - type: OS::Neutron::Port - properties: - network_id: { get_resource: A_Network } - fixed_ips: - - subnet_id: { get_resource: A_Subnet_1 } - - A_Port_2: - type: OS::Neutron::Port - properties: - network_id: { get_resource: A_Network } - fixed_ips: - - subnet_id: { get_resource: A_Subnet_2 } - - A_Server_1: - type: "OS::Nova::Server" - properties: - name: - list_join: [ "-", [{ get_param: SERVER_PREFIX}, "A", "1"]] - image: { get_param: IMAGE } - flavor: { get_param: FLAVOR } - networks: - - port: { get_resource: A_Port_1 } - - A_Server_2: - type: "OS::Nova::Server" - properties: - name: - list_join: [ "-", [{ get_param: SERVER_PREFIX}, "A", "2"]] - image: { get_param: IMAGE } - flavor: { get_param: FLAVOR } - networks: - - port: { get_resource: A_Port_2 } - - ################ - # Scenario 2 # - ################ - B_Network: - type: "OS::Neutron::Net" - properties: - name: { list_join: [ "-", [{ get_param: NETWORK_PREFIX}, "B"]]} - - B_Subnet_1: - type: "OS::Neutron::Subnet" - properties: - name: - list_join: - - "-" - - [{ get_param: NETWORK_PREFIX }, "subnet", "B", "1"] - network_id: { get_resource: B_Network } - cidr: { get_param: CIDR3 } - enable_dhcp: "True" - - B_Subnet_2: - type: "OS::Neutron::Subnet" - properties: - name: - list_join: - - "-" - - [{ get_param: NETWORK_PREFIX }, "subnet", "B", "2"] - network_id: { get_resource: B_Network } - cidr: { get_param: CIDR4 } - enable_dhcp: "True" - - # This server will use whichever B_Network subnet exists. - # It delays creation until B_Subnet_1 exists - # If B_Subnet_2 also exists, it may choose it - B_Server_1: - type: "OS::Nova::Server" - depends_on: B_Subnet_1 - properties: - name: - list_join: [ "-", [{ get_param: SERVER_PREFIX}, "B", "1"]] - image: { get_param: IMAGE } - flavor: { get_param: FLAVOR } - networks: - - network: { get_resource: B_Network } - - # This server will use whichever B_Network subnet exists. - # It delays creation until B_Subnet_2 exists - # If B_Subnet_1 also exists, it may choose it - B_Server_2: - type: "OS::Nova::Server" - depends_on: B_Subnet_2 - properties: - name: - list_join: [ "-", [{ get_param: SERVER_PREFIX}, "B", "2"]] - image: { get_param: IMAGE } - flavor: { get_param: FLAVOR } - networks: - - network: { get_resource: B_Network } diff --git a/openstack/python-heat/python-heat/templates/hot/scenarios/PortForwarding.yaml b/openstack/python-heat/python-heat/templates/hot/scenarios/PortForwarding.yaml deleted file mode 100644 index ec018e0f..00000000 --- a/openstack/python-heat/python-heat/templates/hot/scenarios/PortForwarding.yaml +++ /dev/null @@ -1,210 +0,0 @@ -################################################################################ -# Copyright (c) 2015 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ -# -# Objective: -# Demonstrates a virtual router port forwarding setup -# Sets up ports, VM instances, and forwarding rules -# -# Pre-Reqs: -# An environment capable of launching 3 VMs -# Image imported to glance -# Keypair imported to nova -# Private network created -# Public (external) network created with attachment to private subnet -# Router create connecting private network to public network -# -# Mandatory Template Parameters: -# KEYPAIR -# IMAGE -# FLAVOR -# ROUTER_ID -# PRIVATE_NET -# PRIVATE_SUBNET -# -# Tenant Considerations: -# Should be run as tenant. -# Can be run as admin -# -# Sample CLI syntax: -# heat stack-create -f PortForwarding.yaml \ -# -P ROUTER_ID=812b639cd3714d389a4e2662b114b72b \ -# -P KEYPAIR=tenant1-keypair \ -# -P FLAVOR=small \ -# -P PRIVATE_NET=tenant1-mgmt \ -# -P PRIVATE_SUBNET=tenant1-mgmt-subnet0 \ -# DNAT -# -# Expected Outcome: -# 3 VM instances launched -# 3 Neutron port forwarding rules (1 to each VM) (neutron portforwarding-list) -# -################################################################################ - -heat_template_version: 2015-04-30 - -description: > - HOT template to deploy three servers into an existing neutron tenant - network and assign port forwarding rules to each server so they are - accessible from the public network via specific layer4 port numbers. - -parameters: - - KEYPAIR: - type: string - description: Name of keypair to assign to servers - constraints: - - custom_constraint: nova.keypair - - KEYPAIR_ADMIN_USER: - type: string - description: Name of user account to inject ssh keys from keypair - default: 'ec2-user' - - IMAGE: - type: string - description: Name of image to use for servers - default: tis-centos-guest - constraints: - - custom_constraint: glance.image - - FLAVOR: - type: string - description: Flavor to use for servers - default: small - constraints: - - custom_constraint: nova.flavor - - ROUTER_ID: - type: string - description: ID of public facing router that handles NAT translations - constraints: - - custom_constraint: neutron.router - - PRIVATE_NET: - type: string - description: Name of private network into which servers get deployed - constraints: - - custom_constraint: neutron.network - - PRIVATE_SUBNET: - type: string - description: Name of private sub network into which servers get deployed - constraints: - - custom_constraint: neutron.subnet - - PRIVATE_PORT_NUMBER: - type: number - description: Layer4 protocol port number which will terminate on each VM - default: 80 - - PROTOCOL: - type: string - description: Layer4 protocol of all port mappings - default: tcp - - SERVER1_PUBLIC_PORT_NUMBER: - type: number - description: Public layer4 protocol portnum which terminates on server1 - default: 8080 - - SERVER2_PUBLIC_PORT_NUMBER: - type: number - description: Public layer4 protocol portnum which terminates on server2 - default: 8081 - - SERVER3_PUBLIC_PORT_NUMBER: - type: number - description: Public layer4 protocol portnum which terminates on server3 - default: 8082 - -resources: - - server1: - type: OS::Nova::Server - properties: - name: Server1 - image: { get_param: IMAGE } - flavor: { get_param: FLAVOR } - key_name: { get_param: KEYPAIR } - admin_user: { get_param: KEYPAIR_ADMIN_USER } - networks: - - port: { get_resource: server1_port } - - server1_port: - type: OS::Neutron::Port - properties: - network: { get_param: PRIVATE_NET } - fixed_ips: - - subnet: { get_param: PRIVATE_SUBNET } - - server1_rule: - type: WR::Neutron::PortForwarding - properties: - router_id: { get_param: ROUTER_ID } - inside_addr: { get_attr: [ server1, first_address ] } - inside_port: { get_param: PRIVATE_PORT_NUMBER } - outside_port: { get_param: SERVER1_PUBLIC_PORT_NUMBER } - protocol: { get_param: PROTOCOL } - description: "Server1 port forwarding rule" - - server2: - type: OS::Nova::Server - properties: - name: Server2 - image: { get_param: IMAGE } - flavor: { get_param: FLAVOR } - key_name: { get_param: KEYPAIR } - admin_user: { get_param: KEYPAIR_ADMIN_USER } - networks: - - port: { get_resource: server2_port } - - server2_port: - type: OS::Neutron::Port - properties: - network: { get_param: PRIVATE_NET } - fixed_ips: - - subnet: { get_param: PRIVATE_SUBNET } - - server2_rule: - type: WR::Neutron::PortForwarding - properties: - router_id: { get_param: ROUTER_ID } - inside_addr: { get_attr: [ server2, first_address ] } - inside_port: { get_param: PRIVATE_PORT_NUMBER } - outside_port: { get_param: SERVER2_PUBLIC_PORT_NUMBER } - protocol: { get_param: PROTOCOL } - description: "Server2 port forwarding rule" - - server3: - type: OS::Nova::Server - properties: - name: Server3 - image: { get_param: IMAGE } - flavor: { get_param: FLAVOR } - key_name: { get_param: KEYPAIR } - admin_user: { get_param: KEYPAIR_ADMIN_USER } - networks: - - port: { get_resource: server3_port } - - server3_port: - type: OS::Neutron::Port - properties: - network: { get_param: PRIVATE_NET } - fixed_ips: - - subnet: { get_param: PRIVATE_SUBNET } - - server3_rule: - type: WR::Neutron::PortForwarding - properties: - # required properties - router_id: { get_param: ROUTER_ID } - inside_addr: { get_attr: [ server3, first_address ] } - inside_port: { get_param: PRIVATE_PORT_NUMBER } - outside_port: { get_param: SERVER3_PUBLIC_PORT_NUMBER } - protocol: { get_param: PROTOCOL } - # optional properties - description: "Server3 port forwarding rule" diff --git a/openstack/python-heat/python-heat/templates/hot/scenarios/UserData.yaml b/openstack/python-heat/python-heat/templates/hot/scenarios/UserData.yaml deleted file mode 100644 index 82b5b31b..00000000 --- a/openstack/python-heat/python-heat/templates/hot/scenarios/UserData.yaml +++ /dev/null @@ -1,175 +0,0 @@ -################################################################################ -# Copyright (c) 2017 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ -# -# Objectives: -# Boot a nova server with userdata -# Use stack-update to rebuild the server with new userdata -# -# Pre-Reqs: -# A keypair called: controller-0 (nova keypair-list) -# A nova flavor called: m1.tiny (nova flavor-list) -# A glance image called: wrl6 (glance image-list) -# A networks called: private-net0 (neutron net-list) -# -# Mandatory Template Parameters: -# None -# -# Tenant Considerations: -# None -# -# Sample CLI syntax: -# heat stack-create -f UserData.yaml STACK -# heat stack-update -f UserData.yaml -P USERDATA="new userdata" STACK -# -# Expected Outcome: -# 3 new nova instances called: userdata-vm, userdata-vm_vol, -# userdata-vm_vol_v2 -# 2 new volumes called: userdata-vol, userdata-vol_v2 -# nova list -# The stack-update should rebuild the nova VM with new userdata -# The userdata is base64 encoded attribute: OS-EXT-SRV-ATTR:user_data -# -################################################################################ -heat_template_version: 2015-04-30 - -description: > - Demonstrate launching an instance with updatable userdata - -parameters: - - VM_NAME: - description: name for the new VM - type: string - default: userdata-vm - - VM_VOL_NAME: - description: name for the new VM - type: string - default: userdata-vm_vol - - VOL_V1_NAME: - description: name for the new VM - type: string - default: userdata-vol - - VM_VOL_V2_NAME: - description: name for the new VM - type: string - default: userdata-vm_vol_v2 - - VOL_V2_NAME: - description: name for the new VM - type: string - default: userdata-vol_v2 - - KEYPAIR: - description: keypair to use. (nova keypair-list) - type: string - default: controller-0 - constraints: - - custom_constraint: nova.keypair - - KEYPAIR_ADMIN_USER: - type: string - description: Name of user account to inject ssh keys from keypair - default: 'ec2-user' - - FLAVOR: - description: Nova flavor to use. (nova flavor-list) - type: string - default: m1.tiny - constraints: - - custom_constraint: nova.flavor - - IMAGE: - description: Glance image to use (glance image-list) - type: string - default: wrl6 - constraints: - - custom_constraint: glance.image - - PRIVATE_NET: - description: private network to use (neutron net-list) - type: string - default: private-net0 - constraints: - - custom_constraint: neutron.network - - USERDATA: - description: Userdata for the new VM - type: string - default: "Sample Userdata" - -resources: - - ##################### - ## Host with image as boot source - ###################### - RAW_Server: - type: OS::Nova::Server - properties: - admin_user: { get_param: KEYPAIR_ADMIN_USER } - flavor: { get_param: FLAVOR } - image: { get_param: IMAGE } - key_name: { get_param: KEYPAIR } - name: { get_param: VM_NAME } - networks: - - network: { get_param: PRIVATE_NET } - user_data: { get_param: USERDATA } - user_data_format: RAW - user_data_update_policy: REBUILD - - ##################### - ## Host with volume as boot source within the block_device_mapping field - ###################### - RAW_vol: - type: OS::Cinder::Volume - properties: - name: { get_param: VOL_V1_NAME } - image: { get_param: IMAGE } - size: 2 - - RAW_Server_vol: - type: OS::Nova::Server - properties: - admin_user: { get_param: KEYPAIR_ADMIN_USER } - flavor: { get_param: FLAVOR } - block_device_mapping: - - device_name: vda - volume_id: { get_resource: RAW_vol } - key_name: { get_param: KEYPAIR } - name: { get_param: VM_VOL_NAME } - networks: - - network: { get_param: PRIVATE_NET } - user_data: { get_param: USERDATA } - user_data_format: RAW - user_data_update_policy: REBUILD - - ##################### - ## Host with vol as boot source within the block_device_mapping_v2 field - ###################### - RAW_vol_V2: - type: OS::Cinder::Volume - properties: - name: { get_param: VOL_V2_NAME } - image: { get_param: IMAGE } - size: 2 - - RAW_Server_vol_V2: - type: OS::Nova::Server - properties: - admin_user: { get_param: KEYPAIR_ADMIN_USER } - flavor: { get_param: FLAVOR } - block_device_mapping_v2: - - {device_name: vda, volume_id: { get_resource: RAW_vol_V2 } } - key_name: { get_param: KEYPAIR } - name: { get_param: VM_VOL_V2_NAME } - networks: - - network: { get_param: PRIVATE_NET } - user_data: { get_param: USERDATA } - user_data_format: RAW - user_data_update_policy: REBUILD diff --git a/openstack/python-heat/python-heat/templates/hot/scenarios/VIF.yaml b/openstack/python-heat/python-heat/templates/hot/scenarios/VIF.yaml deleted file mode 100644 index 9f5bdcf1..00000000 --- a/openstack/python-heat/python-heat/templates/hot/scenarios/VIF.yaml +++ /dev/null @@ -1,96 +0,0 @@ -################################################################################ -# Copyright (c) 2015 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ -# -# Objective: -# Demonstrates Launching a VM specifying VIF PCI Address -# vif pci address format is: 0000::.0 -# where bus and slot are 2 digit hex values -# example syntax: 0000:05:0A.0 -# -# Pre-Reqs: -# Normal lab setup. -# Ability to launch a VM with a VIF PCI Address -# A keypair called: controller-0 (nova keypair-list) -# A flavor called: m1.small (nova flavor-list) -# A glance image called: wrl6 (glance image-list) -# Network called: private-net0 (neutron net-list) -# -# Mandatory Template Parameters: -# None -# -# Sample CLI syntax: -# heat stack-create -f VIF.yaml -P VIF_PCI_ADDR=0000:00:00.0 STACK -# -# Expected Outcome: -# A new stack (heat stack-list) -# A new nova VM (nova list) -# -################################################################################ - -heat_template_version: 2015-04-30 - -description: > - Creates a HEAT stack and a VM instance using the speficied vif pic address - -parameters: - - KEYPAIR: - description: Name of existing KeyPair to enable SSH access to VMs - type: string - default: controller-0 - constraints: - - custom_constraint: nova.keypair - - FLAVOR: - description: Nova flavor to use. (nova flavor-list) - type: string - default: m1.small - constraints: - - custom_constraint: nova.flavor - - IMAGE: - description: the name or uuid of the server image in glance - type: string - default: wrl6 - constraints: - - custom_constraint: glance.image - - NETWORK: - description: name of private network to use (neutron net-list) - type: string - default: private-net0 - constraints: - - custom_constraint: neutron.network - - VM_NAME: - description: Name to label the VM instance - type: string - default: 'vif-1' - - VIF: - description: Vif Model to use - type: string - default: 'virtio' - - VIF_PCI_ADDR: - description: Vif pci address - type: string - default: '0000:01:01.0' - -resources: - - Srv: - type: OS::Nova::Server - properties: - name: { get_param: VM_NAME } - image: { get_param: IMAGE } - flavor: { get_param: FLAVOR } - key_name: { get_param: KEYPAIR } - networks: - - network: { get_param: NETWORK } - vif-model: { get_param: VIF } - vif-pci-address: { get_param: VIF_PCI_ADDR } diff --git a/openstack/python-heat/python-heat/templates/hot/scenarios/VMAutoScaling.yaml b/openstack/python-heat/python-heat/templates/hot/scenarios/VMAutoScaling.yaml deleted file mode 100644 index cb271a16..00000000 --- a/openstack/python-heat/python-heat/templates/hot/scenarios/VMAutoScaling.yaml +++ /dev/null @@ -1,225 +0,0 @@ -################################################################################ -# Copyright (c) 2014-2018 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ -# -# Objective: -# Demonstrates dynamically resize guest vcpus of a VM without -# service impact when policy criteria described in the template is met. -# -# Pre-Reqs: -# Normal lab setup. -# Ability to launch a VM -# A keypair called: controller-0 (nova keypair-list) -# A flavor with special attributes -# hw:wrs:min_vcpus = 1 -# hw:cpu_policy = dedicated -# a minimum of 2 vcpus -# A glance image called: wrl6 (glance image-list) -# Network called: private-net0 (neutron net-list) -# -# Mandatory Template Parameters: -# None -# -# Tenant Considerations: -# A tenant can use this template if using a keypair, subnet and network -# accessible to it -# -# Sample CLI syntax: -# heat stack-create -f VMAutoScaling.yaml STACK -# -# Expected Outcome: -# A new stack (heat stack-list) -# A new nova VM (nova list) -# Two aodh alarms corresponding to high and low watermarks -# (aodh alarm list) -# -################################################################################ - -heat_template_version: 2015-04-30 - -description: > - Creates a HEAT autoscaling stack and a VM instance which is able to scale - up/down the number of guest vpcu's using vcpu_util samples from the guest - instance. - -parameters: - KEYPAIR: - description: Name of existing KeyPair to enable SSH access to VMs - type: string - default: controller-0 - constraints: - - custom_constraint: nova.keypair - - KEYPAIR_ADMIN_USER: - description: Name of user account to inject ssh keys from keypair - type: string - default: 'ec2-user' - - FLAVOR: - description: Nova flavor to use. (nova flavor-list) - type: string - default: m1.small - constraints: - - custom_constraint: nova.flavor - - IMAGE: - description: the name or uuid of the server image in glance - type: string - default: wrl6 - constraints: - - custom_constraint: glance.image - - NETWORK: - description: name of private network to use (neutron net-list) - type: string - default: private-net0 - constraints: - - custom_constraint: neutron.network - - METER_NAME: - description: Gnocchi metric to query when determining autoscaling - type: string - default: vcpu_util - - RESOURCE_TYPE: - description: Gnocchi resource type to use to query - type: string - default: instance - - SCALE_UP_VALUE: - description: Metric value that will trigger a scale up if exceeded - type: string - default: '60' - - SCALE_DOWN_VALUE: - description: Metric value that will trigger a scale down if below - type: string - default: '5' - - VM_NAME: - description: Name to label the VM instance - type: string - default: 'guest-1' - -resources: - - Srv: - type: OS::Nova::Server - properties: - name: { get_param: VM_NAME } - image: { get_param: IMAGE } - flavor: { get_param: FLAVOR } - key_name: { get_param: KEYPAIR } - admin_user: { get_param: KEYPAIR_ADMIN_USER } - metadata: - {"metering.server_group": { get_param: "OS::stack_id"}} - networks: - - { network: { get_param: NETWORK }, vif-model: virtio } - - CPUAlarmHigh: - type: OS::Aodh::GnocchiAggregationByResourcesAlarm - properties: - description: Scale up if 5 minutes avg of meter above threshold - metric: { get_param: METER_NAME } - aggregation_method: mean - granularity: 300 - evaluation_periods: '1' - threshold: { get_param: SCALE_UP_VALUE } - resource_type: { get_param: RESOURCE_TYPE } - repeat_actions: 'True' - comparison_operator: gt - alarm_actions: - - { get_attr: [SrvScaleUpPolicy, AlarmUrl] } - # gnocchi alarm resource will automatically - # prepend to the query based on the meter type - # metadata.metering - # or metadata.user_metadata - query: - str_replace: - template: '{"=": {"server_group": "stack_id"}}' - params: - stack_id: {get_param: "OS::stack_id"} - - CPUAlarmLow: - type: OS::Aodh::GnocchiAggregationByResourcesAlarm - properties: - description: Scale down if 5 minutes avg of meter below threshold - metric: { get_param: METER_NAME } - aggregation_method: mean - granularity: 300 - evaluation_periods: '1' - threshold: { get_param: SCALE_DOWN_VALUE } - resource_type: { get_param: RESOURCE_TYPE } - repeat_actions: 'True' - comparison_operator: lt - alarm_actions: - - { get_attr: [SrvScaleDownPolicy, AlarmUrl]} - # gnocchi alarm resource will automatically - # prepend to the query based on the meter type - # metadata.metering - # or metadata.user_metadata - query: - str_replace: - template: '{"=": {"server_group": "stack_id"}}' - params: - stack_id: {get_param: "OS::stack_id"} - - SrvScaleUpPolicy: - type: OS::WR::ScalingPolicy - properties: - ServerName: { get_resource: Srv } - ScalingResource: 'cpu' - ScalingDirection: 'up' - Cooldown: '60' - - SrvScaleDownPolicy: - type: OS::WR::ScalingPolicy - properties: - ServerName: { get_resource: Srv } - ScalingResource: 'cpu' - ScalingDirection: 'down' - Cooldown: '60' - -outputs: - - gnocchi_query: - value: - str_replace: - template: > - gnocchi measures aggregation --resource-type resourcetype - --query '"server_group"="stackval"' - --granularity 300 --aggregation mean -m metric - params: - resourcetype: { get_param: RESOURCE_TYPE } - metric: { get_param: METER_NAME } - stackval: { get_param: "OS::stack_id" } - description: > - This is a Gnocchi query for statistics on the vcpu_util measurements about - OS::Nova::Server instances in this stack. The --resource-type select the - type of Gnocchi resource. The --query parameter filters resources - according to its attributes. When a VM's metadata includes an item of the - form metering.server_group=X, the corresponding Gnocchi resource has a - attribute named server_group that can queried with 'server_group="X"' In - this case the nested stacks give their VMs metadata that is passed as a - nested stack parameter, and this stack passes a metadata of the form - metering.server_group=X, where X is this stack's ID. - - manual_scale_up: - value: - str_replace: - template: > - curl -X POST "scale_up_url" - params: - scale_up_url: { get_attr: [SrvScaleUpPolicy, AlarmUrl] } - - - manual_scale_down: - value: - str_replace: - template: > - curl -X POST "scale_down_url" - params: - scale_down_url: { get_attr: [SrvScaleDownPolicy, AlarmUrl] } diff --git a/openstack/python-heat/python-heat/templates/hot/simple/OS_Ceilometer_Alarm.yaml b/openstack/python-heat/python-heat/templates/hot/simple/OS_Ceilometer_Alarm.yaml deleted file mode 100644 index 574c9591..00000000 --- a/openstack/python-heat/python-heat/templates/hot/simple/OS_Ceilometer_Alarm.yaml +++ /dev/null @@ -1,113 +0,0 @@ -################################################################################ -# Copyright (c) 2013-2018 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ -# -# Objective: -# Demonstrate constructing the heat resource OS::Aodh::GnocchiAggregationByResourcesAlarm -# -# Pre-Reqs: -# Normal Lab Setup -# -# Mandatory Template Parameters: -# None -# -# Tenant Considerations: -# None -# -# Sample CLI syntax: -# heat stack-create -f OS_Ceilometer_Alarm.yaml STACK -# -# Expected Outcome: -# A new alarm (trigger). -# aodh alarm list -# -################################################################################ - -heat_template_version: 2015-04-30 - -description: > - Demonstrate the OS::Aodh::GnocchiAggregationByResourcesAlarm heat resource - -resources: - - OS_Ceilometer_Alarm: - type: OS::Aodh::GnocchiAggregationByResourcesAlarm - properties: - ################################################# - # Required properties - # comparison_operator: - # constraints: - # - allowed_values: [ge, gt, eq, ne, lt, le] - # description: Operator comparing specified stats with threshold - # required: true - # type: string - comparison_operator: 'ge' - - # evaluation_periods: {description: num periods to evaluate over - # , required: true, type: string} - evaluation_periods: '3' - - # metric: {description: Meter name watched by the alarm - # , required: true, type: string} - metric: 'cpu_util' - - # aggregation_method: - # description: The aggregation_method to compare to the threshold - # required: true - # type: string - # default: mean - # constraints: - # - allowed_values: mean } - aggregation_method: 'mean' - - # granularity: - # description: The time range in seconds over which to query - # required: true - # type: string - granularity: '300' - - # resource_type: {description: The type of resource, required:true, type:string} - resource_type: 'instance' - - # query: - # description: A query to filter resource, it's a json string like - # {"and": [{"=": {"ended_at": null}}, ...]} - query: - str_replace: - template: '{"=": {"server_group": "stack_id"}}' - params: - stack_id: {get_param: "OS::stack_id"} - - # threshold: {description: Threshold to evaluate against - # , required: true, type: string} - threshold: '60' - - ################################################# - # Optional properties - # alarm_actions: {description: A list of URLs (webhooks) to invoke - # when state transitions to alarm, required: false, type: list} - - # description: {description: Description for the alarm - # , required: false, type: string} - description: 'A Sample Alarm' - - # enabled: {default: 'true', description: True if alarm - # evaluation/actioning is enabled, - # required: false, type: boolean} - enabled: false - - # insufficient_data_actions: {description: A list of URLs - # (webhooks) to invoke when state transitions to insufficient-data - # , required: false, type: list} - - # ok_actions: {description: A list of URLs (webhooks) to invoke - # when state transitions to ok, required: false, type: list} - - # repeat_actions: {default: 'false', description: 'True to trigger - # actions each time the threshold is reached. By default, actions - # are called when : the threshold is reached AND the alarm''s - # state have changed', required: false, type: boolean} - repeat_actions: true diff --git a/openstack/python-heat/python-heat/templates/hot/simple/OS_Cinder_Volume.yaml b/openstack/python-heat/python-heat/templates/hot/simple/OS_Cinder_Volume.yaml deleted file mode 100644 index 0d3788d3..00000000 --- a/openstack/python-heat/python-heat/templates/hot/simple/OS_Cinder_Volume.yaml +++ /dev/null @@ -1,144 +0,0 @@ -################################################################################ -# Copyright (c) 2013-2015 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ -# -# Objective: -# Demonstrate constructing the heat resource OS::Cinder::Volume -# -# Pre-Reqs: -# Normal Lab Setup (networks, host interfaces, glance images) -# -# Mandatory Template Parameters: -# None -# -# Tenant Considerations: -# None -# -# Sample CLI syntax: -# heat stack-create -f OS_Cinder_Volume.yaml STACK -# -# Expected Outcome: -# A new 1GB cinder volume. -# cinder list -# -################################################################################ - -heat_template_version: 2015-04-30 - -description: > - Demonstrate the OS::Cinder::Volume heat resource - -parameters: - - VOLUME_NAME: - description: Name of the newly created volume - type: string - default: sample_cinder_vol - - VOLUME_SIZE: - description: size for the new cinder volume - type: number - default: 2 - -resources: - - OS_Cinder_Volume: - type: OS::Cinder::Volume - properties: - ################################################# - # Required properties - ################################################# - # None - - ################################################# - # Optional properties - ################################################# - # availability_zone: {description: The availability zone in which - # the volume will be created., required: false, type: string} - - # backup_id: {description: 'If specified, the backup to create - # the volume from.', required: false, type: string} - - # description: {description: A description of the volume., - # required: false, type: string} - description: 'A sample cinder volume' - - # image: {description: 'If specified, the name or ID of the - # glance image to create the volume from.', - # required: false, type: string} - - # imageRef: {description: 'DEPRECATED: use "image" instead.', - # required: false, type: string} - - # metadata: {description: Key/value pairs to associate with the - # volume., required: false, type: map} - - # name: {description: A name used to distinguish the volume., - # required: false, type: string} - name: { get_param: VOLUME_NAME } - - # scheduler_hints: {description: 'Arbitrary key-value pairs - # specified by the client to help the Cinder scheduler - # creating a volume.', required: false, # type: string} - - # size: {description: The size of the volume in GB., - # required: false, type: number} - size: { get_param: VOLUME_SIZE } - - # snapshot_id: {description: 'If specified, the cinder volume - # to use as source.', # required: false, type: string} - - # source_volid: {description: 'If specified, the volume to use as - # source.', required: false, type: string} - - # volume_type: {description: 'If specified, the type of volume - # to use, mapping to a specific backend cinder vtype.', - # required: false, type: string} - -# Cinder Volume Attributes -outputs: - vol_status: - description: The current status of the volume. - value: { get_attr: [ OS_Cinder_Volume, status] } - vol_metadata_values: - description: Key/value pairs associated with the volume in dict form. - value: { get_attr: [ OS_Cinder_Volume, metadata_values] } - vol_display_name: - description: Name of the volume. - value: { get_attr: [ OS_Cinder_Volume, display_name] } - vol_attachments: - description: The list of attachments of the volume - value: { get_attr: [ OS_Cinder_Volume, attachments] } - vol_availability_zone: - description: The availability zone in which the volume is located. - value: { get_attr: [ OS_Cinder_Volume, availability_zone] } - vol_bootable: - description: Boolean indicating if the volume can be booted or not. - value: { get_attr: [ OS_Cinder_Volume, bootable] } - vol_encrypted: - description: Boolean indicating if the volume is encrypted or not. - value: { get_attr: [ OS_Cinder_Volume, encrypted] } - vol_created_at: - description: The timestamp indicating volume creation. - value: { get_attr: [ OS_Cinder_Volume, created_at] } - vol_display_description: - description: Description of the volume. - value: { get_attr: [ OS_Cinder_Volume, display_description] } - vol_source_volid: - description: The volume used as source, if any. - value: { get_attr: [ OS_Cinder_Volume, source_volid] } - vol_snapshot_id: - description: The snapshot the volume was created from, if any. - value: { get_attr: [ OS_Cinder_Volume, snapshot_id] } - vol_size: - description: The size of the volume in GB. - value: { get_attr: [ OS_Cinder_Volume, size] } - vol_volume_type: - description: The type of the volume mapping to a backend, if any. - value: { get_attr: [ OS_Cinder_Volume, volume_type] } - vol_metadata: - description: Key/value pairs associated with the volume. - value: { get_attr: [ OS_Cinder_Volume, metadata] } diff --git a/openstack/python-heat/python-heat/templates/hot/simple/OS_Cinder_VolumeAttachment.yaml b/openstack/python-heat/python-heat/templates/hot/simple/OS_Cinder_VolumeAttachment.yaml deleted file mode 100644 index 86c513fe..00000000 --- a/openstack/python-heat/python-heat/templates/hot/simple/OS_Cinder_VolumeAttachment.yaml +++ /dev/null @@ -1,122 +0,0 @@ -################################################################################ -# Copyright (c) 2013-2015 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ -# -# Objective: -# Demonstrate constructing the heat resource OS::Cinder::VolumeAttachment -# -# Pre-Reqs: -# Normal Lab Setup -# A glance image named: wrl6 (glance image-list) -# A nova flavor named: small (nova flavor-list) -# A network named: private-net0 (neutron net-list) -# -# Mandatory Template Parameters: -# network_id (neutron net-list) -# -# Tenant Considerations: -# The tenant (or admin) needs access to the network selected -# -# Sample CLI syntax: -# heat stack-create -f OS_Cinder_VolumeAttachment.yaml STACK -# -# Expected Outcome: -# A nova server that has mounted a new 1GB cinder volume -# cinder list -# nova list -# nova show -# -################################################################################ - -heat_template_version: 2015-04-30 - -description: > - Demonstrate the OS::Cinder::VolumeAttachment heat resource - -parameters: - - IMAGE: - description: Glance image used by cinder volume (glance image-list) - type: string - default: wrl6 - constraints: - - custom_constraint: glance.image - - FLAVOR: - description: Nova flavor to use. (nova flavor-list) - type: string - default: small - constraints: - - custom_constraint: nova.flavor - - NETWORK: - description: name of network to use (neutron net-list) - type: string - default: private-net0 - constraints: - - custom_constraint: neutron.network - - VM_NAME: - description: Name of the newly created VM - type: string - default: cinder_vm - - VOLUME_NAME: - description: Name of the newly created volume - type: string - default: cinder_volume_demo - - VOLUME_SIZE: - description: size for the new cinder volume - type: number - default: 2 - - -resources: - - OS_Cinder_VolumeAttachment: - type: OS::Cinder::VolumeAttachment - properties: - ################################################# - # Required properties - ################################################# - # instance_uuid: {description: The ID of the server to which the - # volume attaches., - instance_uuid: { get_resource: some_instance } - - # mountpoint: {description: The location where the volume is - # exposed on the instance., Note: launchpad bug 1267744 suggests - # the mountpoint should be /dev/vd[b-z] except on baremetal - # This value is not respected. It will use the first available - # mountpoint (usually /dev/vdb) - mountpoint: /dev/vdb - - # volume_id: {description: The ID of the volume to be attached., - # required: true, type: string} - volume_id: { get_resource: some_volume } - - ################################################# - # Optional properties: NONE - ################################################# - - ################################################# - # The following resources are created because they - # are required fields for the volumeattachment - ################################################# - some_instance: - type: OS::Nova::Server - properties: - name: { get_param: VM_NAME } - image: { get_param: IMAGE } - flavor: { get_param: FLAVOR } - networks: - - network: { get_param: NETWORK } - - some_volume: - type: OS::Cinder::Volume - properties: - name: { get_param: VOLUME_NAME } - size: { get_param: VOLUME_SIZE } diff --git a/openstack/python-heat/python-heat/templates/hot/simple/OS_Glance_Image.yaml b/openstack/python-heat/python-heat/templates/hot/simple/OS_Glance_Image.yaml deleted file mode 100644 index cb4275b4..00000000 --- a/openstack/python-heat/python-heat/templates/hot/simple/OS_Glance_Image.yaml +++ /dev/null @@ -1,91 +0,0 @@ -################################################################################ -# Copyright (c) 2013-2015 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ -# -# Objective: -# Demonstrate constructing the heat resource OS::Glance::Image -# -# Pre-Reqs: -# Normal Lab Setup (networks, host interfaces, glance images) -# guest image file located and accessible at -# /home/wrsroot/images/tis-centos-guest.img -# -# Mandatory Template Parameters: -# None -# -# Tenant Considerations: -# Only admin can create a public glance image -# None -# -# Sample CLI syntax: -# heat stack-create -f OS_Glance_Image.yaml STACK -# -# Expected Outcome: -# A new glance image called sample_image. -# glance image-list -# -################################################################################ - -heat_template_version: 2015-04-30 - -description: > - Demonstrate the OS::Glance::Image heat resource - -parameters: - - NAME: - description: Glance image name - type: string - default: sample_image - - CONTAINER_FORMAT: - description: Container format for glance image - type: string - default: bare - - DISK_FORMAT: - description: Disk format for glance image - type: string - default: qcow2 - - LOCATION: - description: Location to directly load the file from disk - type: string - default: file:///home/wrsroot/images/tis-centos-guest.img - - IS_PUBLIC: - description: Whether this is a public glance image. Admin only. - type: boolean - default: true - - MIN_RAM: - description: Minimum amount of ram for image - type: number - default: 0 - - MIN_DISK: - description: Minimum amount of disk for image - type: number - default: 0 - -resources: - - OS_Glance_Image: - type: OS::Glance::Image - properties: - # Required - container_format: {get_param: CONTAINER_FORMAT} - disk_format: {get_param: DISK_FORMAT} - location: {get_param: LOCATION} - - # Optional - name: {get_param: NAME} - min_ram: {get_param: MIN_RAM} - min_disk: {get_param: MIN_DISK} - protected: false - is_public: {get_param: IS_PUBLIC} - # When ID is not specified, a UUID is generated - # id diff --git a/openstack/python-heat/python-heat/templates/hot/simple/OS_Heat_AccessPolicy.yaml b/openstack/python-heat/python-heat/templates/hot/simple/OS_Heat_AccessPolicy.yaml deleted file mode 100644 index bfd1a818..00000000 --- a/openstack/python-heat/python-heat/templates/hot/simple/OS_Heat_AccessPolicy.yaml +++ /dev/null @@ -1,77 +0,0 @@ -################################################################################ -# Copyright (c) 2013-2015 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ -# -# Objective: -# Demonstrate constructing the heat resource OS::Heat::AccessPolicy -# This creates an accesspolicy which can be set for a User -# -# Pre-Reqs: -# Normal Lab Setup (networks, host interfaces) -# A network named private-net0 with permission to create ports -# -# Mandatory Template Parameters: -# None -# -# Tenant Considerations: -# Cannot be run as tenant. -# -# Sample CLI syntax: -# heat stack-create -f OS_Heat_AccessPolicy.yaml STACK -# -# Expected Outcome: -# A newly created neutron port -# neutron port-list -# A new (v3) User with access to the port -# The user will not be visible using the CLI (v2) list commands -# heat resource-list STACK -# openstack user show -# -################################################################################ - -heat_template_version: 2015-04-30 - -description: > - Demonstrate the OS::Heat::AccessPolicy heat resource - -parameters: - - NETWORK: - description: Network used by the access policy (neutron net-list) - type: string - default: private-net0 - constraints: - - custom_constraint: neutron.network - - -resources: - - # AccessPolicy grants access to resources created as part of the stack - OS_Heat_AccessPolicy: - type: OS::Heat::AccessPolicy - properties: - ################################################# - # Required properties - ################################################# - # AllowedResources: { - # description: Resources that users are allowed to access by the - # DescribeStackResource API., required: true, type: list} - # Note: that this is a list of names and not references - AllowedResources: [ some_port, ] - - ################################################# - # Optional properties: None - ################################################# - - some_user: - type: AWS::IAM::User - properties: - Policies: [ { get_resource: OS_Heat_AccessPolicy } ] - - some_port: - type: OS::Neutron::Port - properties: - network: { get_param: NETWORK } diff --git a/openstack/python-heat/python-heat/templates/hot/simple/OS_Heat_AutoScalingGroup.yaml b/openstack/python-heat/python-heat/templates/hot/simple/OS_Heat_AutoScalingGroup.yaml deleted file mode 100644 index 2be63d67..00000000 --- a/openstack/python-heat/python-heat/templates/hot/simple/OS_Heat_AutoScalingGroup.yaml +++ /dev/null @@ -1,77 +0,0 @@ -################################################################################ -# Copyright (c) 2013-2015 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ -# -# Objective: -# Demonstrate constructing the heat resource OS::Heat::AutoScalingGroup -# To see a better example, refer to scenarios/NestedAutoScale.yaml -# -# Pre-Reqs: -# Normal lab setup. Capable of launching 3 VMs -# A flavor called: small (nova flavor-list) -# A glance image called: wrl6 (glance image-list) -# A network called: private-net0 (neutron net-list) -# A template file OS_Nova_Server.yaml in the same folder as this yaml. -# -# Optional Template Parameters: -# FLAVOR: A nova flavor name or UUID for the VMs (nova flavor-list) -# IMAGE: A glance image name or UUID when launching VMs (glance image-list) -# NETWORK: Name or UUID of the network to use for the VMs (neutron net-list) -# -# Tenant Considerations: -# None -# -# Sample CLI syntax: -# heat stack-create -f OS_Heat_AutoScalingGroup.yaml STACK -# -# Expected Outcome: -# VMs running the guest image (nova list) -# -################################################################################ - -heat_template_version: 2015-04-30 - -description: > - Demonstrate the OS::Heat::AutoScalingGroup heat resource - -parameters: - - FLAVOR: - description: Nova flavor to use (nova flavor-list) - type: string - default: small - constraints: - - custom_constraint: nova.flavor - - IMAGE: - description: Name of the glance image to use (glance image-list) - type: string - default: wrl6 - constraints: - - custom_constraint: glance.image - - NETWORK: - description: Name of the network to use (neutron net-list) - type: string - default: private-net0 - constraints: - - custom_constraint: neutron.network - -resources: - - OS_Heat_AutoScalingGroup: - type: OS::Heat::AutoScalingGroup - properties: - cooldown: 60 - desired_capacity: 1 - max_size: 3 - min_size: 1 - resource: - type: OS_Nova_Server.yaml - properties: - FLAVOR: { get_param: FLAVOR } - IMAGE: { get_param: IMAGE } - NETWORK: { get_param: NETWORK } diff --git a/openstack/python-heat/python-heat/templates/hot/simple/OS_Heat_Stack.yaml b/openstack/python-heat/python-heat/templates/hot/simple/OS_Heat_Stack.yaml deleted file mode 100644 index e351e35e..00000000 --- a/openstack/python-heat/python-heat/templates/hot/simple/OS_Heat_Stack.yaml +++ /dev/null @@ -1,59 +0,0 @@ -################################################################################ -# Copyright (c) 2013-2015 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ -# -# Objective: -# Demonstrate constructing the heat resource OS::Heat::Stack -# This resource allows inlining a HEAT template -# -# Pre-Reqs: -# None -# -# Mandatory Template Parameters: -# None -# -# Tenant Considerations: -# None -# -# Sample CLI syntax: -# heat stack-create -f OS_Heat_Stack.yaml STAK -# -# Expected Outcome: -# 2 HEAT stacks (one stack owns the second stack) -# heat stack-list -# -# A new keypair called InlineKP (created by the second stack). -# nova keypair-list -# -################################################################################ - -heat_template_version: 2015-04-30 - -description: > - Demonstrate the OS::Heat::Stack heat resource - -resources: - KeyPair_Stack: - type: OS::Heat::Stack - properties: - - template: | - heat_template_version: 2015-04-30 - parameters: - NEW_KEY_NAME: - description: Name for the new keypair - type: string - resources: - OS_Nova_KeyPair: - type: OS::Nova::KeyPair - properties: - name: { get_param: NEW_KEY_NAME } - - - parameters: { NEW_KEY_NAME: InlineKP } - # context: - # - region: - timeout: 1 diff --git a/openstack/python-heat/python-heat/templates/hot/simple/OS_Neutron_FloatingIP.yaml b/openstack/python-heat/python-heat/templates/hot/simple/OS_Neutron_FloatingIP.yaml deleted file mode 100644 index c31408c9..00000000 --- a/openstack/python-heat/python-heat/templates/hot/simple/OS_Neutron_FloatingIP.yaml +++ /dev/null @@ -1,83 +0,0 @@ -################################################################################ -# Copyright (c) 2013-2015 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ -# -# Objective: -# Demonstrate constructing the heat resource OS::Neutron::FloatingIP -# -# Pre-Reqs: -# Normal Lab Setup (networks, host interfaces, glance images) -# external neutron network named: external-net0 (neutron net-list) -# -# Mandatory Template Parameters: -# None -# -# Tenant Considerations: -# The tenant (or admin) needs access to the network selected -# -# Sample CLI syntax: -# heat stack-create -f OS_Neutron_FloatingIP.yaml STACK -# -# Expected Outcome: -# A new floating IP address -# neutron floatingip-list -# -################################################################################ - -heat_template_version: 2015-04-30 - -description: > - Demonstrate the OS::Neutron::FloatingIP heat resource - -parameters: - - NETWORK: - description: External network to allocate floatingIP (neutron net-list) - type: string - default: external-net0 - constraints: - - custom_constraint: neutron.network - -resources: - - OS_Neutron_FloatingIP: - type: OS::Neutron::FloatingIP - properties: - ################################################# - # Required properties - ################################################# - # Mandatory. either: - # floating_network (name or uuid) - # or - # floating_network_id (uuid) - # - # floating_network_id: {description: ID of network to allocate - # floating IP from., required: true, type: string} - floating_network: { get_param: NETWORK } - - ################################################# - # Optional properties - ################################################# - # fixed_ip_address: {description: IP address to use if the port - # has multiple addresses., required: false, type: string} - - # port_id: {description: ID of an existing port with at least one - # IP address to associate with this floating IP. - # , required: false, type: string} - # This needs to be a port on the external SUBNET associated with - # the network - - # value_specs: - # default: {} - # description: Extra parameters to include in the "floatingip" - # object in the creation request. Parameters are often specific - # to installed hardware or extensions. - # required: false - # type: map - # - # Passing an invalid key will cause heat creation to fail. - # Some keys that may be valid are: tenant_id, - # value_specs: {'tenant_id': 'some_uuid' } diff --git a/openstack/python-heat/python-heat/templates/hot/simple/OS_Neutron_Net.yaml b/openstack/python-heat/python-heat/templates/hot/simple/OS_Neutron_Net.yaml deleted file mode 100644 index e7cefbfe..00000000 --- a/openstack/python-heat/python-heat/templates/hot/simple/OS_Neutron_Net.yaml +++ /dev/null @@ -1,113 +0,0 @@ -################################################################################ -# Copyright (c) 2013-2015 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ -# -# Objective: -# Demonstrate constructing the heat resource OS::Neutron::Net -# -# Pre-Reqs: -# None -# -# Mandatory Template Parameters: -# None -# -# Tenant Considerations: -# None -# -# Sample CLI syntax: -# heat stack-create -f OS_Neutron_Net.yaml STACK -# -# Expected Outcome: -# A new network called sample-net -# neutron net-list -# -################################################################################ - -heat_template_version: 2015-04-30 - -description: > - Demonstrate the OS::Neutron::Net heat resource - -parameters: - - NETWORK_NAME: - description: name of network to create - type: string - default: sample-net - -resources: - - OS_Neutron_Net: - type: OS::Neutron::Net - properties: - ################################################# - # Required properties - ################################################# - - ################################################# - # Optional properties - ################################################# - - # admin_state_up: {default: true, description: A boolean value - # specifying the administrative status of the network., - # required: false, type: boolean} - admin_state_up: true - - # name: A string specifying a symbolic name for the network, which - # is not required to be unique.', required: false, type: string - name: { get_param: NETWORK_NAME } - - # shared: {description: Whether this network should be shared - # across all tenants. Note that the default policy setting - # restricts usage of this attribute to administrative users only. - # ,required: false, type: boolean} - shared: false - - # tenant_id: {description: The ID of the tenant which will own the - # network. Only administrative users can set the tenant - # identifier; this cannot be changed using authorization policies. - # , required: false, type: string} - - # value_specs: - # default: {} - # description: Extra parameters to include in the "network" - # object in the creation request. Parameters are often specific - # to installed hardware or extensions. - # required: false type: map - # - # For example, - # - # value_specs: - # 'provider:network_type': vlan - # 'provider:physical_network': group0-data0b - # 'router:external': false - # vlan_transparent: false - -outputs: - - nwk_admin_state_up: - description: The administrative status of the network. - value: { get_attr: [ OS_Neutron_Net, admin_state_up] } - - nwk_name: - description: The name of the network. - value: { get_attr: [ OS_Neutron_Net, name] } - - nwk_show: - description: All attributes. - value: { get_attr: [ OS_Neutron_Net, show] } - - nwk_status: - description: The status of the network. - value: { get_attr: [ OS_Neutron_Net, status] } - - nwk_subnets: - description: Subnets of this network. - value: { get_attr: [ OS_Neutron_Net, subnets] } - - nwk_tenant_id: - description: The tenant owning this network. - value: { get_attr: [ OS_Neutron_Net, tenant_id] } diff --git a/openstack/python-heat/python-heat/templates/hot/simple/OS_Neutron_Port.yaml b/openstack/python-heat/python-heat/templates/hot/simple/OS_Neutron_Port.yaml deleted file mode 100644 index 2b49c4ee..00000000 --- a/openstack/python-heat/python-heat/templates/hot/simple/OS_Neutron_Port.yaml +++ /dev/null @@ -1,137 +0,0 @@ -################################################################################ -# Copyright (c) 2013-2015 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ -# -# Objective: -# Demonstrate constructing the heat resource OS::Neutron::Port -# -# Pre-Reqs: -# Normal Lab Setup (networks, host interfaces, glance images) -# An external network named: external-net0 (neutron net-list) -# -# Mandatory Template Parameters: -# None -# -# Tenant Considerations: -# The tenant (or admin) needs access to the network selected -# -# Sample CLI syntax: -# heat stack-create -f OS_Neutron_Port.yaml STACK -# -# Expected Outcome: -# A new port on that network named: sample_port -# neutron port-list -# -################################################################################ - -heat_template_version: 2015-04-30 - -description: > - Demonstrate the OS::Neutron::Port heat resource - -parameters: - - NETWORK: - description: the external network to use when creating the port - type: string - default: external-net0 - constraints: - - custom_constraint: neutron.network - - - PORT_NAME: - description: Name for the port - type: string - default: sample_port - -resources: - - OS_Neutron_Port: - type: OS::Neutron::Port - properties: - ################################################# - # Required properties - ################################################# - # Requires network_id (uuid) or network (name or uuid) - # network_id: - network: {get_param: NETWORK } - - ################################################# - # Optional properties - ################################################# - # admin_state_up: {default: true, required: false, type: boolean} - admin_state_up: true - - # device_id: {required: false, type: string} - device_id: device_X - - # fixed_ips: - # required: false - # schema: - # '*': - # required: false - # schema: - # ip_address: {required: false, type: string} - # subnet_id: {required: false, type: string} - # type: map - # type: list - - # mac_address: {required: false, type: string} - - # name: {required: false, type: string} - name: { get_param: PORT_NAME } - - # security_groups: {required: false, type: list} - # value_specs: - # default: {} - # required: false - # type: map - - -outputs: - prt_admin_state_up: - description: The administrative state of this port. - value: { get_attr: [ OS_Neutron_Port, admin_state_up] } - - prt_device_id: - description: Unique identifier for the device. - value: { get_attr: [ OS_Neutron_Port, device_id] } - - prt_device_owner: - description: Name of the network owning the port. - value: { get_attr: [ OS_Neutron_Port, device_owner] } - - prt_fixed_ips: - description: Fixed ip addresses. - value: { get_attr: [ OS_Neutron_Port, fixed_ips] } - - prt_mac_address: - description: Mac address of the port. - value: { get_attr: [ OS_Neutron_Port, mac_address] } - - prt_name: - description: Friendly name of the port. - value: { get_attr: [ OS_Neutron_Port, name] } - - prt_network_id: - description: Unique identifier for the network owning the port. - value: { get_attr: [ OS_Neutron_Port, network_id] } - - prt_security_groups: - description: A list of security groups for the port. - value: { get_attr: [ OS_Neutron_Port, security_groups] } - - prt_show: - description: All attributes. - value: { get_attr: [ OS_Neutron_Port, show] } - - prt_status: - description: The status of the port. - value: { get_attr: [ OS_Neutron_Port, status] } - - prt_tenant_id: - description: Tenant owning the port - value: { get_attr: [ OS_Neutron_Port, tenant_id] } diff --git a/openstack/python-heat/python-heat/templates/hot/simple/OS_Neutron_Router.yaml b/openstack/python-heat/python-heat/templates/hot/simple/OS_Neutron_Router.yaml deleted file mode 100644 index 07812306..00000000 --- a/openstack/python-heat/python-heat/templates/hot/simple/OS_Neutron_Router.yaml +++ /dev/null @@ -1,102 +0,0 @@ -################################################################################ -# Copyright (c) 2013-2015 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ -# -# Objective: -# Demonstrate constructing the heat resource OS::Neutron::Router -# -# Pre-Reqs: -# Normal Lab Setup (networks, host interfaces, glance images) -# network named external-net0 (neutron net-list) -# -# Mandatory Template Parameters: -# None -# -# Tenant Considerations: -# The tenant (or admin) needs access to the network selected -# -# Sample CLI syntax: -# heat stack-create -f OS_Neutron_Router.yaml STACK -# -# Expected Outcome: -# A new router for the network called: sample_router -# neutron router-list -# -################################################################################ - -heat_template_version: 2015-04-30 - -description: > - Demonstrate the OS::Neutron::Router heat resource - -parameters: - - NETWORK: - description: the external network to use when creating the Router - type: string - default: external-net0 - constraints: - - custom_constraint: neutron.network - - - ROUTER_NAME: - description: name for the new router - type: string - default: sample_router - -resources: - - OS_Neutron_Router: - type: OS::Neutron::Router - properties: - ################################################# - # Required properties: None - ################################################# - - ################################################# - # Optional properties - ################################################# - # admin_state_up: {default: true, required: false, type: boolean} - admin_state_up: true - - # name: {required: false, type: string} - name: { get_param: ROUTER_NAME } - - # value_specs: - # default: {} - # required: false - # type: map - # Possible valid keys are: - # external_gateway_info (value is a dict) - external_gateway_info: - network: { get_param: NETWORK } - enable_snat: true - -outputs: - - rt_admin_state_up: - description: Administrative state of the router. - value: { get_attr: [ OS_Neutron_Router, admin_state_up] } - - rt_external_gateway_info: - description: Gateway network for the router. - value: { get_attr: [ OS_Neutron_Router, external_gateway_info] } - - rt_name: - description: Friendly name of the router. - value: { get_attr: [ OS_Neutron_Router, name] } - - rt_show: - description: All attributes. - value: { get_attr: [ OS_Neutron_Router, show] } - - rt_status: - description: The status of the router. - value: { get_attr: [ OS_Neutron_Router, status] } - - rt_tenant_id: - description: Tenant owning the router. - value: { get_attr: [ OS_Neutron_Router, tenant_id] } diff --git a/openstack/python-heat/python-heat/templates/hot/simple/OS_Neutron_RouterGateway.yaml b/openstack/python-heat/python-heat/templates/hot/simple/OS_Neutron_RouterGateway.yaml deleted file mode 100644 index 9a8f8bd2..00000000 --- a/openstack/python-heat/python-heat/templates/hot/simple/OS_Neutron_RouterGateway.yaml +++ /dev/null @@ -1,75 +0,0 @@ -################################################################################ -# Copyright (c) 2013-2015 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ -# -# Objective: -# Demonstrate constructing the heat resource OS::Neutron::RouterGateway -# -# Pre-Reqs: -# Normal Lab Setup (networks, host interfaces, glance images) -# An external network named: external-net0 (neutron net-list) -# -# Mandatory Template Parameters: -# None -# -# Tenant Considerations: -# The tenant (or admin) needs access to the network selected -# -# Sample CLI syntax: -# heat stack-create -f OS_Neutron_RouterGateway.yaml STACK -# -# Expected Outcome: -# Creates a router with no external gateway called sample_gateway_router -# and then adds a gateway to it -# neutron router-list -# -################################################################################ - -heat_template_version: 2015-04-30 - -description: > - Demonstrate the OS::Neutron::RouterGateway heat resource - -parameters: - - NETWORK: - description: the external network to use when creating the router - type: string - default: external-net0 - constraints: - - custom_constraint: neutron.network - - ROUTER_NAME: - description: name of the new router - type: string - default: sample_gateway_router - -resources: - - OS_Neutron_RouterGateway: - type: OS::Neutron::RouterGateway - properties: - ################################################# - # Required properties - ################################################# - # either network_id(uuid) or network (name of uuid) - # network_id: - network: {get_param: NETWORK} - - # router_id: {required: true, type: string} - router_id: { get_resource: some_router} - - ################################################# - # Optional properties: None - ################################################# - - some_router: - type: OS::Neutron::Router - properties: - name: { get_param: ROUTER_NAME } - external_gateway_info: - network: { get_param: NETWORK } - enable_snat: true diff --git a/openstack/python-heat/python-heat/templates/hot/simple/OS_Neutron_RouterInterface.yaml b/openstack/python-heat/python-heat/templates/hot/simple/OS_Neutron_RouterInterface.yaml deleted file mode 100644 index d8214fc3..00000000 --- a/openstack/python-heat/python-heat/templates/hot/simple/OS_Neutron_RouterInterface.yaml +++ /dev/null @@ -1,107 +0,0 @@ -################################################################################ -# Copyright (c) 2013-2015 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ -# -# Objective: -# Demonstrate constructing the heat resource OS::Neutron::RouterInterface -# -# Pre-Reqs: -# Normal Lab Setup (networks, host interfaces, glance images) -# external network named: external-net0 (neutron net-list) -# -# Mandatory Template Parameters: -# None -# -# Tenant Considerations: -# The tenant (or admin) needs access to the network selected -# -# Sample CLI syntax: -# heat stack-create -f OS_Neutron_RouterInterface.yaml STACK -# -# Expected Outcome: -# Creates a router called sample_if_router -# neutron router-list -# Creates a net called sample_if_net -# neutron net-list -# Creates a subnet called sample_if_subnet -# neutron subnet-list -# A new port for the interface corresponding to the subnet -# neutron router-port-list sample_if_router -# -################################################################################ - -heat_template_version: 2015-04-30 - -description: > - Demonstrate the OS::Neutron::RouterInterface heat resource - -parameters: - - NETWORK: - description: external network used when creating the router and subnet - type: string - default: external-net0 - constraints: - - custom_constraint: neutron.network - - NET_NAME: - description: the network to use when creating the subnet - type: string - default: sample_if_net - - ROUTER_NAME: - description: name of the new router - type: string - default: sample_if_router - - SUBNET_NAME: - description: name of the new subnet - type: string - default: sample_if_subnet - - CIDR: - description: cidr for the sample subnet - type: string - default: 192.168.12.0/24 - -resources: - - OS_Neutron_RouterInterface: - type: OS::Neutron::RouterInterface - properties: - ################################################# - # Required properties - ################################################# - - # router_id: {required: true, type: string} - router_id: {get_resource: some_router} - - # subnet_id: {required: true, type: string} - subnet_id: {get_resource: some_subnet} - - ################################################# - # Optional properties: None - ################################################# - - some_router: - type: OS::Neutron::Router - properties: - name: { get_param: ROUTER_NAME } - external_gateway_info: - network: {get_param: NETWORK } - enable_snat: true - - some_net: - type: OS::Neutron::Net - properties: - name: { get_param: NET_NAME } - - some_subnet: - type: OS::Neutron::Subnet - properties: - name: { get_param: SUBNET_NAME } - cidr: { get_param: CIDR } - network: { get_resource: some_net } diff --git a/openstack/python-heat/python-heat/templates/hot/simple/OS_Neutron_SecurityGroup.yaml b/openstack/python-heat/python-heat/templates/hot/simple/OS_Neutron_SecurityGroup.yaml deleted file mode 100644 index 3dd01a31..00000000 --- a/openstack/python-heat/python-heat/templates/hot/simple/OS_Neutron_SecurityGroup.yaml +++ /dev/null @@ -1,61 +0,0 @@ -################################################################################ -# Copyright (c) 2013-2015 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ -# -# Objective: -# Demonstrate constructing the heat resource OS::Neutron::SecurityGroup -# -# Pre-Reqs: -# Normal Lab Setup (networks, host interfaces, glance images) -# -# Mandatory Template Parameters: -# None -# -# Tenant Considerations: -# An admin action -# -# Sample CLI syntax: -# heat stack-create -f OS_Neutron_SecurityGroup.yaml STACK -# -# Expected Outcome: -# A new neutron security group called SecurityGroupDeluxe -# neutron security-group-list -# -################################################################################ - -heat_template_version: 2015-04-30 - -description: > - Demonstrate the OS::Neutron::SecurityGroup heat resource - -parameters: - - NAME: - description: Name for the new neutron security group - type: string - default: SecurityGroupDeluxe - - DESCRIPTION: - description: Description for the new neutron security group - type: string - default: A sample neutron security group - -resources: - - OS_Neutron_SecurityGroup: - type: OS::Neutron::SecurityGroup - properties: - name: { get_param: NAME } - description: { get_param: DESCRIPTION } - rules: - - direction: ingress - protocol: tcp - port_range_min: 80 - port_range_max: 80 - - direction: ingress - protocol: udp - port_range_min: 81 - port_range_max: 81 diff --git a/openstack/python-heat/python-heat/templates/hot/simple/OS_Neutron_Subnet.yaml b/openstack/python-heat/python-heat/templates/hot/simple/OS_Neutron_Subnet.yaml deleted file mode 100644 index b2291158..00000000 --- a/openstack/python-heat/python-heat/templates/hot/simple/OS_Neutron_Subnet.yaml +++ /dev/null @@ -1,149 +0,0 @@ -################################################################################ -# Copyright (c) 2013-2015 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ -# -# Objective: -# Demonstrate constructing the heat resource OS::Neutron::Subnet -# -# Pre-Reqs: -# Normal Lab Setup (networks, host interfaces, glance images) -# A network named: private-net0 (neutron net-list) -# -# Mandatory Template Parameters: -# None -# -# Tenant Considerations: -# The tenant (or admin) needs access to the network selected -# -# Sample CLI syntax: -# heat stack-create -f OS_Neutron_Subnet.yaml STACK -# -# Expected Outcome: -# A new subnet called sample_subnet -# neutron subnet-list -# -################################################################################ - -heat_template_version: 2015-04-30 - -description: > - Demonstrate the OS::Neutron::Subnet heat resource - -parameters: - - NETWORK: - description: UUID of the parent network to use when creating the subnet - type: string - default: private-net0 - constraints: - - custom_constraint: neutron.network - - CIDR: - description: Cidr of the subnet - type: string - default: 192.168.12.0/24 - -resources: - - OS_Neutron_Subnet: - type: OS::Neutron::Subnet - properties: - ################################################# - # Required properties - ################################################# - - # cidr: {required: true, type: string} - # An error will occur if this overlaps with an existing subnet - cidr: { get_param: CIDR } - - # either network_id (uuid) or network (name or uuid) is required - # network_id: { get_param: NETWORK } - network: { get_param: NETWORK } - - ################################################# - # Optional properties - ################################################# - # allocation_pools: - # required: false - # schema: - # '*': - # required: false - # schema: - # end: {required: true, type: string} - # start: {required: true, type: string} - # type: map - # type: list - - # dns_nameservers: {required: false, type: list} - dns_nameservers: - - 8.8.8.8 - - 9.9.9.9 - - # enable_dhcp: {required: false, type: boolean} - enable_dhcp: true - - # gateway_ip: {required: false, type: string} - - # ip_version: - # constraints: - # - allowed_values: [4, 6] - # default: 4 - # required: false - # type: integer - ip_version: 4 - - # name: {required: false, type: string} - name: sample_subnet - - # tenant_id: {required: false, type: string} - - # value_specs: - # default: {} - # required: false - # type: map - - -outputs: - - sn_allocation_pools: - description: Ip allocation pools and their ranges. - value: { get_attr: [ OS_Neutron_Subnet, allocation_pools] } - - sn_cidr: - description: CIDR block notation for this subnet. - value: { get_attr: [ OS_Neutron_Subnet, cidr] } - - sn_dns_nameservers: - description: List of dns nameservers. - value: { get_attr: [ OS_Neutron_Subnet, dns_nameservers] } - - sn_enable_dhcp: - description: '''true'' if DHCP enabled for subnet else ''false''.' - value: { get_attr: [ OS_Neutron_Subnet, enable_dhcp] } - - sn_gateway_ip: - description: Ip of the subnet's gateway. - value: { get_attr: [ OS_Neutron_Subnet, gateway_ip] } - - sn_ip_version: - description: Ip version for the subnet. - value: { get_attr: [ OS_Neutron_Subnet, ip_version] } - - sn_name: - description: Friendly name of the subnet. - value: { get_attr: [ OS_Neutron_Subnet, name] } - - sn_network_id: - description: Parent network of the subnet. - value: { get_attr: [ OS_Neutron_Subnet, network_id] } - - sn_show: - description: All attributes. - value: { get_attr: [ OS_Neutron_Subnet, show] } - - sn_tenant_id: - description: Tenant owning the subnet. - value: { get_attr: [ OS_Neutron_Subnet, tenant_id] } diff --git a/openstack/python-heat/python-heat/templates/hot/simple/OS_Nova_Flavor.yaml b/openstack/python-heat/python-heat/templates/hot/simple/OS_Nova_Flavor.yaml deleted file mode 100644 index 620c18e0..00000000 --- a/openstack/python-heat/python-heat/templates/hot/simple/OS_Nova_Flavor.yaml +++ /dev/null @@ -1,106 +0,0 @@ -################################################################################ -# Copyright (c) 2013-2015 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ -# -# Objective: -# Demonstrate constructing the heat resource OS::Nova::Flavor -# Shows setting cpu_model and cpu_policy -# -# Pre-Reqs: -# None -# -# Mandatory Template Parameters: -# None -# -# Tenant Considerations: -# Only admin can create a flavor -# -# Sample CLI syntax: -# heat stack-create -f OS_Nova_Flavor.yaml STACK -# -# Expected Outcome: -# A new flavor -# nova flavor-list -# -################################################################################ - -heat_template_version: 2015-04-30 - -description: > - Demonstrate the OS::Nova::Flavor heat resource - -parameters: - - FLAVOR_NAME: - description: Name for the flavor - type: string - default: sample-flavor - RAM: - description: How much RAM - type: number - default: 256 - VCPUS: - description: Num vcpus - type: number - default: 1 - DISK: - description: Disk. 0 means no limit - type: number - default: 0 - EPHEMERAL: - description: Ephemeral - type: number - default: 0 - SWAP: - description: Swap space in MB - type: number - default: 0 - RXTX_FACTOR: - description: RX TX Factor - type: string - constraints: - - allowed_pattern: "[0-9]+[.][0-9]+" - default: "1.0" - CPU_MODEL: - description: Cpu model of the new Flavor - type: string - constraints: - - allowed_values: - - Conroe - - Penryn - - Nehalem - - Westmere - - SandyBridge - - Haswell - default: SandyBridge - CPU_POLICY: - description: Cpu policy of the new Flavor - type: string - constraints: - - allowed_values: - - dedicated - - shared - default: shared - -resources: - - OS_Nova_Flavor: - type: OS::Nova::Flavor - properties: - # Required - ram: {get_param: RAM} - vcpus: {get_param: VCPUS} - disk: {get_param: DISK} - # Optional - # id: some_id - # is_public: False - name: {get_param: FLAVOR_NAME} - ephemeral: {get_param: EPHEMERAL} - swap: {get_param: SWAP} - rxtx_factor: {get_param: RXTX_FACTOR} - extra_specs: - 'hw:cpu_model': {get_param: CPU_MODEL} - 'hw:cpu_policy': {get_param: CPU_POLICY} diff --git a/openstack/python-heat/python-heat/templates/hot/simple/OS_Nova_KeyPair.yaml b/openstack/python-heat/python-heat/templates/hot/simple/OS_Nova_KeyPair.yaml deleted file mode 100644 index d9268c62..00000000 --- a/openstack/python-heat/python-heat/templates/hot/simple/OS_Nova_KeyPair.yaml +++ /dev/null @@ -1,63 +0,0 @@ -################################################################################ -# Copyright (c) 2013-2015 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ -# -# Objective: -# Demonstrate constructing the heat resource OS::Nova::KeyPair -# -# Pre-Reqs: -# None -# -# Mandatory Template Parameters: -# None -# -# Tenant Considerations: -# If a tenant can run: nova keypair-create then they can run this template -# -# Sample CLI syntax: -# heat stack-create -f OS_Nova_KeyPair.yaml STACK -# -# Expected Outcome: -# A new keypair -# nova keypair-list -# -################################################################################ - -heat_template_version: 2015-04-30 - -description: > - Demonstrate the OS::Nova::KeyPair heat resource - -parameters: - - NEW_KEY_NAME: - description: Name for the new keypair - type: string - default: KeyPairDeluxe - -resources: - - OS_Nova_KeyPair: - type: OS::Nova::KeyPair - properties: - # required properties - name: { get_param: NEW_KEY_NAME } - # optional properties - # public_key: CONTENTS of the PUBLIC KEY FILE created by: - # ssh-keygen -t dsa -f /root/.ssh/id_rsa -N "" -q - # If the file is accessible externally use - # get_file { get_file: new_key.pub } - save_private_key: false - -outputs: - - kp_public_key: - description: The public key for this new keypair - value: { get_attr: [ OS_Nova_KeyPair, public_key] } - - kp_private_key: - description: The private key for this new keypair - value: { get_attr: [ OS_Nova_KeyPair, private_key] } diff --git a/openstack/python-heat/python-heat/templates/hot/simple/OS_Nova_Server.yaml b/openstack/python-heat/python-heat/templates/hot/simple/OS_Nova_Server.yaml deleted file mode 100644 index 8d49dfd3..00000000 --- a/openstack/python-heat/python-heat/templates/hot/simple/OS_Nova_Server.yaml +++ /dev/null @@ -1,226 +0,0 @@ -################################################################################ -# Copyright (c) 2013-2015 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ -# -# Objective: -# Demonstrate constructing the heat resource OS::Nova::Server -# -# Pre-Reqs: -# Normal Lab Setup (networks, host interfaces, glance images) -# A glance image named: wrl6 (glance image-list) -# A nova flavor named: small (nova flavor-list) -# A neutron network named: private-net0 (neutron net-list) -# -# Mandatory Template Parameters: -# None -# -# Tenant Considerations: -# The tenant (or admin) needs access to the network selected -# -# Sample CLI syntax: -# heat stack-create -f OS_Nova_Server.yaml STACK -# -# Expected Outcome: -# A newly launched nova instance -# nova list -# -################################################################################ - -heat_template_version: 2015-04-30 - -description: > - Demonstrate the OS::Nova::Server heat resource - -parameters: - - SERVER_NAME: - description: network to use (neutron net-list) - type: string - default: nova_server - - NETWORK: - description: network to use (neutron net-list) - type: string - default: private-net0 - constraints: - - custom_constraint: neutron.network - - IMAGE: - description: Glance image to use (glance image-list) - type: string - default: wrl6 - constraints: - - custom_constraint: glance.image - - FLAVOR: - description: Nova flavor to use. (nova flavor-list) - type: string - default: small - constraints: - - custom_constraint: nova.flavor - -resources: - - r_string: - type: OS::Heat::RandomString - properties: - length: 4 - sequence: digits - - OS_Nova_Server: - type: OS::Nova::Server - properties: - ################################################# - # Required properties - ################################################# - # flavor: {description: The ID or name of the flavor to boot - # onto, required: true, type: string} - flavor: { get_param: FLAVOR } - - # Either image or block_device_mapping with device_name='vda' - # MUST be specified - # image: {description: The ID or name of the image to boot with, - # required: false, type: string} - image: { get_param: IMAGE } - - ################################################# - # Optional properties - ################################################# - # availability_zone: {description: Name of the availability zone - # for server placement, required: false, type: string} - - # block_device_mapping: - # description: Block device mappings for this server - # required: false - # schema: - # '*': - # required: false - # schema: - # delete_on_termination: {description: Indicate whether - # the volume should be deleted when the server is - # terminated, required: false, type: boolean} - # device_name: {description: A device name where the - # volume will be attached in the system at - # /dev/device_name. This value is typically vda, - # required: true, type: string} - # snapshot_id: {description: The ID of the snapshot to - # create a volume from, required: false, type: string} - # volume_id: {description: The ID of the volume to boot - # from. Only one of volume_id or snapshot_id should - # be provided, required: false, type: string} - # volume_size: {description: 'The size of the volume, in - # GB. It is safe to leave this blank and have the - # Compute service infer the size', - # required: false,type: string} - # type: map - # type: list - - # config_drive: {description: 'value for config drive either - # boolean, or volume-id', required: false, type: string} - - # diskConfig: - # constraints: - # - allowed_values: [AUTO, MANUAL] - # description: Control how the disk is partitioned when the - # server is created - # required: false - # type: string - - # flavor_update_policy: - # constraints: - # - allowed_values: [RESIZE, REPLACE] - # default: RESIZE - # description: Policy on how to apply a flavor update; either - # by requesting a server resize or by replacing the entire - # server - # required: false - # type: string - flavor_update_policy: REPLACE - - - # key_name: {description: Name of keypair to inject into server, - # required: false, type: string} - - # metadata: {description: 'Arbitrary key/value metadata to store - # for this server. A maximum of five entries is allowed, and both - # keys and values must be 255 charactersor less', - # required: false, type: map} - - # name: {description: Optional server name, - # required: false, type: string} - name: - list_join: - - "-" - - [{ get_param: SERVER_NAME}, { get_resource: r_string }] - - - # networks: - # description: An ordered list of nics to be added to this - # server, with information - # about connected networks, fixed ips, port etc - # required: false - # schema: - # '*': - # required: false - # schema: - # fixed_ip: {description: Fixed IP address to specify for - # the port created on the requested network, - # required: false, type: string} - # port: {description: ID of an existing port to associate - # with this server, required: false, type: string} - # uuid: {description: ID of network to create a port on, - # required: false, type: string} - # type: map - # type: list - networks: - - network: { get_param: NETWORK } - - # reservation_id: {description: A UUID for the set of servers being - # requested, required: false, type: string} - - # scheduler_hints: {description: Arbitrary key-value pairs - # specified by the clientto help boot a server, - # required: false, type: map} - - # security_groups: {description: List of security group names, - # required: false, type: list} - # Note: networks and security_groups cannot BOTH be specified - - # user_data: {description: User data script to be executed by - # cloud-init, required: false, type: string} - - # user_data_format: {description: RAW will bypass MIME formatting - # user data., required: false, type: string} - user_data_format: RAW - -outputs: - srv_accessIPv4: - description: Manually assigned alt public IPv4 address of server - value: { get_attr: [ OS_Nova_Server, accessIPv4] } - - srv_accessIPv6: - description: Manually assigned alt public IPv6 address of the server - value: { get_attr: [ OS_Nova_Server, accessIPv6] } - - srv_addresses: - description: A dict of all network addresses as returned by the API - value: { get_attr: [ OS_Nova_Server, addresses] } - - srv_first_address: - description: the first assigned network address, or empty string - value: { get_attr: [ OS_Nova_Server, first_address] } - - srv_instance_name: - description: AWS compatible instance name - value: { get_attr: [ OS_Nova_Server, instance_name] } - - srv_networks: - description: A dict of assigned network addresses - value: { get_attr: [ OS_Nova_Server, networks] } - - srv_show: - description: A dict of all server details as returned by the API - value: { get_attr: [ OS_Nova_Server, show] } diff --git a/openstack/python-heat/python-heat/templates/hot/simple/OS_Nova_ServerGroup.yaml b/openstack/python-heat/python-heat/templates/hot/simple/OS_Nova_ServerGroup.yaml deleted file mode 100644 index 06561f85..00000000 --- a/openstack/python-heat/python-heat/templates/hot/simple/OS_Nova_ServerGroup.yaml +++ /dev/null @@ -1,99 +0,0 @@ -################################################################################ -# Copyright (c) 2013-2015 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ -# -# Objective: -# Demonstrate constructing the heat resource OS::Nova::ServerGroup -# -# Pre-Reqs: -# Normal Lab Setup (networks, host interfaces, glance images) -# -# Mandatory Template Parameters: -# None -# -# Tenant Considerations: -# None -# -# Sample CLI syntax: -# heat stack-create -f OS_Nova_ServerGroup.yaml STACK -# -# Expected Outcome: -# A new nova servergroup of size 2 and type affinity -# nova server-group-list -# -################################################################################ - -heat_template_version: 2015-04-30 - -description: > - Demonstrate the OS::Nova::ServerGroup heat resource - -parameters: - - FLAVOR: - type: string - description: Nova flavor to use (nova flavor-list) - default: small - constraints: - - custom_constraint: nova.flavor - - NETWORK: - type: string - description: network to use (neutron net-list) - default: private-net0 - constraints: - - custom_constraint: neutron.network - - IMAGE: - description: Glance image to use (glance image-list) - type: string - default: wrl6 - constraints: - - custom_constraint: glance.image - - SIZE: - description: Number of servers to create for the group - type: number - default: 2 - -resources: - - OS_Nova_ServerGroup: - type: OS::Nova::ServerGroup - properties: - ################################################# - # Required properties - ################################################# - # policies: {description: The scheduler policy for the server - # group., required: true, type: string} - # Note: only valid values are 'affinity' or 'anti-affinity' - policies: ['affinity'] - - ################################################# - # Optional properties: - ################################################# - # best_effort: {description: Whether the scheduler should still - # allow the server to be created even if it cannot satisfy the - # group policy. (Optional.), required: false, type: boolean} - best_effort: true - - # group_size: {description: Maximum number of servers in the - # server group. (Optional.), required: false, type: integer} - group_size: { get_param: SIZE } - - OS_Nova_RG: - type: OS::Heat::ResourceGroup - properties: - count: { get_param: SIZE } - resource_def: - type: OS::Nova::Server - properties: - networks: - - network: { get_param: NETWORK } - image: { get_param: IMAGE } - flavor: { get_param: FLAVOR } - scheduler_hints: - group: { get_resource: OS_Nova_ServerGroup } diff --git a/openstack/python-heat/python-heat/templates/hot/simple/WR_Neutron_Port_Forwarding.yaml b/openstack/python-heat/python-heat/templates/hot/simple/WR_Neutron_Port_Forwarding.yaml deleted file mode 100644 index 0fe29983..00000000 --- a/openstack/python-heat/python-heat/templates/hot/simple/WR_Neutron_Port_Forwarding.yaml +++ /dev/null @@ -1,129 +0,0 @@ -################################################################################ -# Copyright (c) 2015 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ -# -# Objective: -# Demonstrate constructing the heat resource WR::Neutron::ProviderNet -# -# Pre-Reqs: -# A glance image called: wrl6 -# A nova flavor called: m1.tiny -# A neutron network called: external-net0 -# Permissions to create a neutron router and a nova server -# -# Tenant Considerations: -# This is an admin activity -# -# Sample CLI syntax: -# heat stack-create -f WR_Neutron_PortForwarding.yaml STACK -# -# Expected Outcome: -# A new router called: PF_Router (neutron router-list) -# A new server called: PF_Server (nova list) -# A new port forwarding rule created between a public port number on the router -# and a private port number on a VM instance. -# Verify using: neutron portforwarding-list -# -################################################################################ - -heat_template_version: 2015-04-30 - -description: > - Demonstrate the WR::Neutron::PortForwarding heat resource - -parameters: - - ROUTER_NAME: - description: Name of the new router instance - type: string - default: PF_Router - - SERVER_NAME: - description: Name of the new server - type: string - default: PF_Server - - NETWORK: - description: the external network to use when creating the Router - type: string - default: external-net0 - constraints: - - custom_constraint: neutron.network - - IMAGE: - type: string - description: Name of image to use for server - default: wrl6 - constraints: - - custom_constraint: glance.image - - FLAVOR: - type: string - description: Flavor to use for server - default: m1.tiny - constraints: - - custom_constraint: nova.flavor - - INSIDE_PORT: - description: Layer4 protocol port number in use on the VM instance - type: number - default: 80 - - OUTSIDE_PORT: - description: Layer4 protocol port number to publish on the VM instance - type: number - default: 8080 - - PROTOCOL: - description: Layer4 protocol type - type: string - default: tcp - - DESCRIPTION: - description: User defined description of the forwarding rule - type: string - default: A sample port forwarding rule - -resources: - A_Router: - type: OS::Neutron::Router - properties: - admin_state_up: true - name: { get_param: ROUTER_NAME } - external_gateway_info: - network: {get_param: NETWORK} - enable_snat: true - - A_Server: - type: OS::Nova::Server - properties: - name: { get_param: SERVER_NAME } - image: {get_param: IMAGE} - flavor: {get_param: FLAVOR} - networks: [ network: { get_param: NETWORK } ] - - WR_Neutron_Port_Forwarding: - type: WR::Neutron::PortForwarding - properties: - # required properties - router_id: { get_resource: A_Router } - inside_addr: { get_attr: [A_Server, first_address ] } - inside_port: { get_param: INSIDE_PORT } - outside_port: { get_param: OUTSIDE_PORT } - protocol: { get_param: PROTOCOL } - - # optional properties - description: { get_param: DESCRIPTION } - -outputs: - - pn_show: - description: All attributes of the port forwarding rule - value: { get_attr: [ WR_Neutron_Port_Forwarding, show] } - - pn_port_id: - description: The neutron port uuid to which the IP address is associated - value: { get_attr: [ WR_Neutron_Port_Forwarding, port_id] } diff --git a/openstack/python-heat/python-heat/templates/hot/simple/WR_Neutron_ProviderNet.yaml b/openstack/python-heat/python-heat/templates/hot/simple/WR_Neutron_ProviderNet.yaml deleted file mode 100644 index 005181ed..00000000 --- a/openstack/python-heat/python-heat/templates/hot/simple/WR_Neutron_ProviderNet.yaml +++ /dev/null @@ -1,92 +0,0 @@ -################################################################################ -# Copyright (c) 2013-2015 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ -# -# Objective: -# Demonstrate constructing the heat resource WR::Neutron::ProviderNet -# -# Pre-Reqs: -# None -# -# Mandatory Template Parameters: -# None -# -# Tenant Considerations: -# This is an admin activity -# -# Sample CLI syntax: -# heat stack-create -f WR_Neutron_ProviderNet.yaml STACK -# -# Expected Outcome: -# A new provider network called physnetX -# neutron providernet-list -# -################################################################################ - -heat_template_version: 2015-04-30 - -description: > - Demonstrate the WR::Neutron::ProviderNet heat resource - -parameters: - - NAME: - description: Name of the provider network - type: string - default: physnetX - - TYPE: - description: Provider network type for the network - type: string - default: vlan - constraints: - - allowed_values: [ vlan, vxlan, flat ] - - MTU: - description: MTU for the provider network - type: number - default: 1500 - - VLANTRANSPARENT: - description: vlan_transparent tenant networks for provider network - type: boolean - default: false - - DESCRIPTION: - description: Description for the provider network - type: string - default: A sample provider network - -resources: - - WR_Neutron_ProviderNet: - type: WR::Neutron::ProviderNet - properties: - # required properties - name: { get_param: NAME } - type: { get_param: TYPE } - - # optional properties - mtu: { get_param: MTU } - vlan_transparent: { get_param: VLANTRANSPARENT } - description: { get_param: DESCRIPTION } - -outputs: - pn_status: - description: The status of the provider network - value: { get_attr: [ WR_Neutron_ProviderNet, status] } - - pn_mtu: - description: The mtu of the provider network - value: { get_attr: [ WR_Neutron_ProviderNet, mtu] } - - pn_show: - description: All attributes of the provider network - value: { get_attr: [ WR_Neutron_ProviderNet, show] } - - pn_name: - description: Name of the provider network - value: { get_attr: [ WR_Neutron_ProviderNet, name] } diff --git a/openstack/python-heat/python-heat/templates/hot/simple/WR_Neutron_ProviderNetRange.yaml b/openstack/python-heat/python-heat/templates/hot/simple/WR_Neutron_ProviderNetRange.yaml deleted file mode 100644 index 30067cdd..00000000 --- a/openstack/python-heat/python-heat/templates/hot/simple/WR_Neutron_ProviderNetRange.yaml +++ /dev/null @@ -1,121 +0,0 @@ -################################################################################ -# Copyright (c) 2013-2015 Wind River Systems, Inc. -# -# SPDX-License-Identifier: Apache-2.0 -# -################################################################################ -# -# Objective: -# Demonstrate constructing the heat resource WR::Neutron::ProviderNetRange -# -# Pre-Reqs: -# None -# -# Mandatory Template Parameters: -# None -# -# Tenant Considerations: -# Admin activity -# -# Sample CLI syntax: -# heat stack-create -f WR_Neutron_ProviderNetRange.yaml STACK -# -# Expected Outcome: -# A new provider network range called: physnetX-R1 -# neutron providernet-range-list -# A fake provider network called: physnetX -# neutron providernet-list -# -################################################################################ - -heat_template_version: 2015-04-30 - -description: > - Demonstrate the WR::Neutron::ProviderNetRange heat resource - -parameters: - - NAME: - description: Name of the provider network range - type: string - default: physnetX-R1 - - TENANT: - description: NAME or ID for tenant of unshared provider network range - type: string - default: admin - constraints: - - custom_constraint: keystone.project - - SHARED: - description: Whether provider network range is shared for all tenants - type: boolean - default: false - - DESCRIPTION: - description: Description of the provider network range - type: string - default: 'physnetX-R1 sample range' - - MINIMUM: - description: Min range for this provider network range - type: number - default: '10' - - MAXIMUM: - description: Max range for this provider network range - type: number - default: '10' - - TTL: - description: TTL for this vxlan provider network range - type: number - default: '44' - - PORT: - description: PORT for this vxlan provider network range - type: number - default: '8472' - - GROUP: - description: Multicast IP for this vxlan provider network range - type: string - default: '224.0.0.255' - -resources: - - WR_Neutron_ProviderNetRange: - type: WR::Neutron::ProviderNetRange - properties: - # required properties - providernet_id: { get_resource: ProviderNet1 } - name: { get_param: NAME } - minimum: { get_param: MINIMUM} - maximum: { get_param: MAXIMUM} - - # optional properties - description: { get_param: DESCRIPTION } - shared: { get_param: SHARED} - # tenant_id is ignored if this is a shared range - tenant_id: { get_param: TENANT } - # group (ie: multicast IP) is only set if provider net is vxlan - group: { get_param: GROUP } - # ttl is only set if provider net is vxlan - ttl: { get_param: TTL } - # port is only set if provider net is vxlan. - port: { get_param: PORT} - - ProviderNet1: - type: WR::Neutron::ProviderNet - properties: - name: sample_physnet_X - type: vxlan - vlan_transparent: true - mtu: 1500 - description: fake physet - -outputs: - - pnr_show: - description: All attributes of the provider net range - value: { get_attr: [ WR_Neutron_ProviderNetRange, show] } diff --git a/openstack/python-heat/wrs-heat-template/centos/build_srpm.data b/openstack/python-heat/wrs-heat-template/centos/build_srpm.data deleted file mode 100644 index fa9aa5e7..00000000 --- a/openstack/python-heat/wrs-heat-template/centos/build_srpm.data +++ /dev/null @@ -1,2 +0,0 @@ -SRC_DIR="python-heat/templates" -TIS_PATCH_VER=1 diff --git a/openstack/python-heat/wrs-heat-template/centos/wrs-heat-templates.spec b/openstack/python-heat/wrs-heat-template/centos/wrs-heat-templates.spec deleted file mode 100644 index fdeced08..00000000 --- a/openstack/python-heat/wrs-heat-template/centos/wrs-heat-templates.spec +++ /dev/null @@ -1,29 +0,0 @@ -Summary: Titanium Cloud Sample Heat Templates -Name: wrs-heat-templates -Version: 1.6.0 -Release: %{tis_patch_ver}%{?_tis_dist} -License: Apache-2.0 -Group: base -Packager: Wind River -URL: unknown - -Source0: %{name}-%{version}.tar.gz - -%define cgcs_sdk_deploy_dir /opt/deploy/cgcs_sdk - -Requires: openstack-heat-common - -%description -Titanium Cloud Heat Template examples - -%install -rm -rf ${RPM_BUILD_ROOT} -mkdir -p ${RPM_BUILD_ROOT}/%{cgcs_sdk_deploy_dir} -install -m 644 %{SOURCE0} $RPM_BUILD_ROOT/%{cgcs_sdk_deploy_dir}/%{name}-%{version}.tgz - -%clean -rm -rf ${RPM_BUILD_ROOT} - -%files -%defattr(-,root,root,-) -%{cgcs_sdk_deploy_dir} diff --git a/openstack/python-heat/wrs-heat-template/python-heat b/openstack/python-heat/wrs-heat-template/python-heat deleted file mode 120000 index 6512b15c..00000000 --- a/openstack/python-heat/wrs-heat-template/python-heat +++ /dev/null @@ -1 +0,0 @@ -../python-heat \ No newline at end of file diff --git a/tox.ini b/tox.ini index accfc28c..45bbfbd1 100644 --- a/tox.ini +++ b/tox.ini @@ -25,8 +25,7 @@ commands = -name \*.sh \ -print0 | xargs -0 bashate -v -i E006" bash -c "find {toxinidir} \ - \( -path '{toxinidir}/openstack/python-heat/python-heat/templates*' \ - -o -path '{toxinidir}/.tox' \) -a -prune \ + -path '{toxinidir}/.tox' -a -prune \ -o -name '*.yaml' \ -print0 | xargs -0 yamllint"