2017-04-21 85 views
0

我无法使用加热模板执行脚本并请求一些输入。无法在HEAT/HOT模板中运行脚本

的OpenStack - >部署的AWS实例

我HEAT模板 -

heat_template_version: 2013-05-23 

description: > 
    Created 4/20/17 by [email protected] For Cloud [email protected] Adaptive Security 

parameters: 
    flavor: 
    type: string 
    description: 'Flavor to be used for compute instance' 
    key_name: 
    type: string 
    description: 'For most clouds, the name of the key-pair to be used for the compute instance; for VMware clouds, the contents of the public SSH key for the compute instance' 
    availability_zone1: 
    type: string 
    description: 'Name of availability zone in which to create the instance' 
    default: 'nova' 
    network-id__for__Itaas_testing: 
    type: string 
    description: 'Generated to reference ''Itaas_testing'' network.' 
    default: 'vpc-f3f24490' 
    subnet_id_subnet-faf1b19a: 
    type: string 
    description: 'Generated to reference subnet ''itaas_Private subnet''.' 
    default: 'subnet-faf1b19a' 
parameter_groups: 
    - { label: 'Image Parameters', parameters: [flavor, key_name] } 
    - { label: 'Network Parameters', parameters: [availability_zone1, network-id__for__Itaas_testing, subnet_id_subnet-faf1b19a] } 
resources: 
## REFERENCE {"Itaas_testing":{"type": "OS::Neutron::Net", "properties": {"network_id": "vpc-f3f24490", "external":"false", "subnets": [{"cidr":"10.0.0.0\/24","availability_zone":"us-west-1a","name":"itaas_Public subnet","id":"subnet-4af4b42a"},{"cidr":"10.0.4.0\/28","availability_zone":"us-west-1a","name":"itaas_Private subnet","id":"subnet-faf1b19b"}] }}} 

    RHEL-7_0_HVM_GA-20141017-x86_64-1-Hourly2-GP2: 
    type: OS::Nova::Server 
    properties: 
     networks: 
      - port: { get_resource: RHEL-7_0_HVM_GA-20141017-x86_64-1-Hourly2-GP2__to__Itaas_testing__port } 
     name: "RHEL-7_0_HVM_GA-20141017-x86_64-1-Hourly2-GP2" 
     image: "ami-33cdd876" # RHEL-7.0_HVM_GA-20141017-x86_64-1-Hourly2-GP2 
     flavor: { get_param: flavor } 
     key_name: { get_param: key_name } 
     availability_zone: { get_param: availability_zone1 } 
     metadata: 
     "__os_type__" : "Linux" 
     user_data: https://raw.githubusercontent.com/AnishAnil/Learn-git/master/test.sh 

    RHEL-7_0_HVM_GA-20141017-x86_64-1-Hourly2-GP2__to__Itaas_testing__port: 
    type: OS::Neutron::Port 
    properties: 
     security_groups: 
      - sg-1869137f # sg-1869137f(itaas_testing_security_group_any_any_any) 
     network_id: { get_param: network-id__for__Itaas_testing } 
     replacement_policy: AUTO #TODO remove this if using HEAT version Icehouse! 
     fixed_ips: 
     - subnet: { get_param: subnet_id_subnet-faf1b19e } 

outputs: 
    blueprint_url: 
    description: Blueprint Origin URL 
    value: https://ABCD:8443/landscaper/view/projects?open=a%40gmail.com_8caf420f_f24a_4c4d_83f8_cb9835d7b734-OrionContent/default/Adaptive_Security/ITSAAS_Baston.yml 

脚本文件中提及包含以下数据:

#!/bin/sh 
sudo mkdir /tmp/A1 
+0

堆栈创建过程中是否出现错误?如果是这样,请在你的问题中提及它 – kuro

回答