【问题标题】:Openstack Heat template for flat network用于平面网络的 Openstack Heat 模板
【发布时间】:2016-07-13 18:24:10
【问题描述】:

我已经配置了 2 节点 Openstack(Icehouse) 设置,并且还配置了热量。使用 HOT 模板创建实例时,它已成功启动。但是当我尝试使用我的 yml 文件创建平面网络时,它会显示在错误下方-

“无法创建网络。没有可分配的租户网络”

heat_template_version: 2013-05-23
description: Simple template to deploy a single compute instance

resources:
  provider_01:
     type: OS::Neutron::ProviderNet
     properties:
       physical_network: physnet2
       shared: true
       network_type: flat
  network_01:
     type: OS::Neutron::Net
     properties:
       admin_state_up: true
       name: External2
       shared: true
       #admin tenant id
       tenant_id: 6ec23610836048ddb8f9294dbf89a41e
  subnet_01:
     type: OS::Neutron::Subnet
     properties:
       name: Subnet2
       network_id: { get_resource: network_01 }
       cidr: 192.168.56.0/24
       gateway_ip: 192.168.56.1
       allocation_pools: [{"start": 192.168.56.50, "end": 192.168.56.70}]
       enable_dhcp: true
  port_01:
     type: OS::Neutron::Port
     properties:
       admin_state_up: true
       network_id: { get_resource: network_01 }
       #security_groups: "default"

【问题讨论】:

    标签: openstack openstack-neutron openstack-heat


    【解决方案1】:
    heat_template_version: 2014-10-16
    description: Template to create a tenant network along with router config
    
    parameters:
        ImageId:
           type: string
           label: cirros-0.3.2-x86_64
           description: cirros-0.3.2-x86_64
    
    resources:
        demo-net:
           type: OS::Neutron::Net
           properties:
              name: demo-net
    
        demo-subnet:
           type: OS::Neutron::Subnet
           properties:
              name: demo-subnet
              network_id: { get_resource: demo-net }
              cidr: 10.10.0.0/24
              gateway_ip: 10.10.0.1
    
        my_instance:
           type: OS::Nova::Server
           properties:
              name: "demo_test_nw_01"
              image: { get_param: ImageId }
              flavor: "m1.tiny"
              networks:
              - network : { get_resource: demo-net }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-04-25
      • 1970-01-01
      相关资源
      最近更新 更多