¿ù°£ Àα⠰Խù°

°Ô½Ã¹° 715°Ç
   
[HOT] create_floatingip_instance.yaml
±Û¾´ÀÌ : ÃÖ°í°ü¸®ÀÚ ³¯Â¥ : 2015-12-23 (¼ö) 12:31 Á¶È¸ : 2956
                                
Heat Orchestration Template reference

Self-Service Network
 - Private Network¾È¿¡ ÀνºÅϽº »ý¼ºÇÏ°í Floating IP Ãß°¡

Example)
create_floatingip_instance.yaml
heat_template_version: 2015-10-15

description: Simple template to deploy a single compute instance

parameters:
  image:
    type: string
    label: Image name or ID
    description: Image to be used for compute instance
    default: cirros
  flavor:
    type: string
    label: Flavor
    description: Type of instance (flavor) to be used
    default: m1.small
  private_network:
    type: string
    label: Private network name or ID
    description: Network to attach instance to.
    default: demo_private
  private_subnet:
    type: string
    default: 29801943-a259-4580-a5d6-b8d387991b6a
    description: Id of the private sub network for the compute server
  public_network:
    type: string
    label: Public network name or ID
    default: public
    description: Id of the public network for the compute server 

resources:
  my_instance:
    type: OS::Nova::Server
    properties:
      name: Heat_VM
      image: { get_param: image }
      flavor: { get_param: flavor }
      networks:
        - port: { get_resource: my_instance_port }
        
  my_instance_port:
    type: OS::Neutron::Port
    properties:
      network_id: { get_param: private_network }
      fixed_ips:
        - subnet_id: { get_param: private_subnet }

  floating_ip:
    type: OS::Neutron::FloatingIP
    properties:
      floating_network: { get_param: public_network }
      port_id: { get_resource: my_instance_port }

outputs:
  instance_private_ip:
    description: IP address of the instance
    value: { get_attr: [my_instance, first_address] }
  instance_public_ip:
    description: IP address of the instance
    value: { get_attr: [floating_ip, floating_ip_address] }

root@controller:~# heat stack-create create_floatingip_instance -f create_floatingip_instance.yaml -P "image=CentOS_6_x86_64_25G;flavor=a5267b1b-4a5f-42aa-8d53-82ae69daa88b;private_network=mojily_private;public_network=public;private_subnet=a36c26fb-3446-4a3f-831c-7da6d2deefe1"


root@controller:~# heat stack-show create_floatingip_instance


À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

 



 
»çÀÌÆ®¸í : ¸ðÁö¸®³× | ´ëÇ¥ : ÀÌ°æÇö | °³ÀÎÄ¿¹Â´ÏƼ : ·©Å°´åÄÄ ¿î¿µÃ¼Á¦(OS) | °æ±âµµ ¼º³²½Ã ºÐ´ç±¸ | ÀüÀÚ¿ìÆí : mojily°ñ¹ðÀÌchonnom.com Copyright ¨Ï www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.