게시물 718건
   
[HOT] create_floatingip_instance.yaml
글쓴이 : 최고관리자 날짜 : 2015-12-23 (수) 12:31 조회 : 3064
                                
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


이름 패스워드
스타일
굴림
10pt
<html> <body>
 
 
 
 
비밀글 (체크하면 글쓴이만 내용을 확인할 수 있습니다.)
왼쪽의 글자를 입력하세요.
   

 



 
사이트명 : 모지리네 | 대표 : 이경현 | 개인커뮤니티 : 랭키닷컴 운영체제(OS) | 경기도 성남시 분당구 | 전자우편 : mojily골뱅이chonnom.com Copyright ⓒ www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.