¿ù°£ Àα⠰Խù°

°Ô½Ã¹° 715°Ç
   
HEAT - Orchestration (Example)
±Û¾´ÀÌ : ÃÖ°í°ü¸®ÀÚ ³¯Â¥ : 2015-06-16 (È­) 14:01 Á¶È¸ : 4980
                                
HEAT - Orchestration (Example)


:: ¹èÄ¡ÆÄÀÏ »ðÀÔ  (Key °ªÇÏ°íÀÇ ¿µÇâ...)
root@controller:~# cat test-stack2.yml 
heat_template_version: 2015-04-30

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: test_CentOS 6.6_x86_64
  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-net

resources:
  my_instance:
    type: OS::Nova::Server
    properties:
      image: { get_param: image }
      flavor: { get_param: flavor }
      networks:
        - network: { get_param: private_network }
      user_data: |
        #!/bin/sh
        echo "Hello, World!"
      user_data_format: RAW

outputs:
  instance_name:
    description: Name of the instance
    value: { get_attr: [my_instance, name] }
  instance_ip:
    description: IP address of the instance
    value: { get_attr: [my_instance, first_address] }


root@controller:~# heat stack-create stack_with_init_script -f test-stack2.yml -P "flavor=m1.medium"
+--------------------------------------+------------------------+--------------------+----------------------+
| id                                   | stack_name             | stack_status       | creation_time        |
+--------------------------------------+------------------------+--------------------+----------------------+
| 0a3862f7-0b1f-46af-8285-3ccf698a13a2 | first_stack            | CREATE_COMPLETE    | 2015-06-16T05:41:58Z |
| 98f94e56-4ca2-42c0-a92c-b014db102b0e | stack_vm1              | CHECK_COMPLETE     | 2015-06-16T05:54:47Z |
| b954d6c1-c8b0-4bf6-9900-169babf48130 | stack_with_init_script | CREATE_IN_PROGRESS | 2015-06-16T06:07:51Z |
+--------------------------------------+------------------------+--------------------+----------------------+


Github Source : http://heat.chonnom.com

Multi Instance »ý¼º (¿öµåÇÁ·¹½º¿ë WEB / DB ÀνºÅϽº¸¦ °¢°¢ ¸¸µå´Â ¿¹Á¦)
root@controller:~# heat stack-create wordpress -f heat_3d.yaml -e lib/env.yaml -P "flavor=m1.medium;image=test_Ubuntu_14.04_x86_64"


AutoScailing (CPU ºÎÇÏ¿¡ µû¸¥ ÀνºÅϽº Áõ°¡/Ãà¼Ò)
root@controller:~# heat stack-create vm1 -f asg_demo.yaml -P "flavor=m1.medium;image=test_CentOS 6.6_x86_64;public_net_id=c360ab81-8504-4138-a183-e6a744b096b1"
:: cpu_util 600ÃÊ¿¡ 15 ÀÌÇÏÀÏ °æ¿ì Ãà¼Ò
   cpu_util 60ÃÊ¿¡ 50 ÀÌ»óÀÏ °æ¿ì Áõ°¡ 

oot@controller:~# ceilometer alarm-list
+--------------------------------------+---------------------------------+-------------------+----------+---------+------------+---------------------------------+------------------+
| Alarm ID                             | Name                            | State             | Severity | Enabled | Continuous | Alarm condition                 | Time constraints |
+--------------------------------------+---------------------------------+-------------------+----------+---------+------------+---------------------------------+------------------+
| 09c634b8-acaf-4d43-a26b-feb74e0d65bf | vm1-cpu_alarm_low-fhjtwj6zqvnn  | insufficient data | low      | True    | True       | cpu_util < 15.0 during 1 x 600s | None             |
| e0374350-b39d-4f0b-b484-da8279abcacd | vm1-cpu_alarm_high-on37oq7xonz6 | insufficient data | low      | True    | True       | cpu_util > 50.0 during 1 x 60s  | None             |
+--------------------------------------+---------------------------------+-------------------+----------+---------+------------+---------------------------------+------------------+

CPU ·Îµå ¹ß»ý±â : http://umz.kr/0Ix8I
:: ¸ð´ÏÅ͸µ ´ë»ó Resource ID = 5243ff36-cb7e-40bc-a577-de78fa5cca7f
   Áõ°¡ÇÑ ÀνºÅϽº 1
   Áõ°¡ÇÑ ÀνºÅϽº 2

root@controller:~# ceilometer sample-list -m cpu_util --limit 50 
+--------------------------------------+----------+-------+---------------+------+---------------------+
| Resource ID                          | Name     | Type  | Volume        | Unit | Timestamp           |
+--------------------------------------+----------+-------+---------------+------+---------------------+
| 2e7e2bbd-6661-4368-9f1a-ff3d272b5b81 | cpu_util | gauge | 4.46666666667 | %    | 2015-06-18T07:08:15 |
| 0dc31dbb-47ea-4c50-a50f-16a0da6ad970 | cpu_util | gauge | 4.56166666667 | %    | 2015-06-18T07:08:15 |
| 51ddc950-05ff-4101-bc58-dfc938cf6253 | cpu_util | gauge | 4.69333333333 | %    | 2015-06-18T07:08:15 |
| 4b9f473a-2502-4c9b-95f6-c2c28e7aae56 | cpu_util | gauge | 6.42166666667 | %    | 2015-06-18T07:03:22 |
| 5243ff36-cb7e-40bc-a577-de78fa5cca7f | cpu_util | gauge | 6.28          | %    | 2015-06-18T07:03:22 |
| 2e7e2bbd-6661-4368-9f1a-ff3d272b5b81 | cpu_util | gauge | 4.425         | %    | 2015-06-18T06:58:15 |
| 0dc31dbb-47ea-4c50-a50f-16a0da6ad970 | cpu_util | gauge | 4.54833333333 | %    | 2015-06-18T06:58:15 |
| 51ddc950-05ff-4101-bc58-dfc938cf6253 | cpu_util | gauge | 4.66          | %    | 2015-06-18T06:58:15 |
| 5243ff36-cb7e-40bc-a577-de78fa5cca7f | cpu_util | gauge | 64.0515806988 | %    | 2015-06-18T06:53:22 |
| 2e7e2bbd-6661-4368-9f1a-ff3d272b5b81 | cpu_util | gauge | 4.45          | %    | 2015-06-18T06:48:15 |
| 0dc31dbb-47ea-4c50-a50f-16a0da6ad970 | cpu_util | gauge | 4.53666666667 | %    | 2015-06-18T06:48:15 |
| 51ddc950-05ff-4101-bc58-dfc938cf6253 | cpu_util | gauge | 4.65833333333 | %    | 2015-06-18T06:48:15 |
| 5243ff36-cb7e-40bc-a577-de78fa5cca7f | cpu_util | gauge | 105.661101836 | %    | 2015-06-18T06:43:21 |
| 2e7e2bbd-6661-4368-9f1a-ff3d272b5b81 | cpu_util | gauge | 4.435         | %    | 2015-06-18T06:38:15 |
| 0dc31dbb-47ea-4c50-a50f-16a0da6ad970 | cpu_util | gauge | 4.52          | %    | 2015-06-18T06:38:15 |
| 51ddc950-05ff-4101-bc58-dfc938cf6253 | cpu_util | gauge | 4.67          | %    | 2015-06-18T06:38:15 |
| 2e7e2bbd-6661-4368-9f1a-ff3d272b5b81 | cpu_util | gauge | 5.85117056856 | %    | 2015-06-18T06:28:15 |
| 0dc31dbb-47ea-4c50-a50f-16a0da6ad970 | cpu_util | gauge | 4.54849498328 | %    | 2015-06-18T06:28:15 |
| 51ddc950-05ff-4101-bc58-dfc938cf6253 | cpu_util | gauge | 5.48829431438 | %    | 2015-06-18T06:28:15 |
| 2e7e2bbd-6661-4368-9f1a-ff3d272b5b81 | cpu_util | gauge | 7.5049833887  | %    | 2015-06-18T06:18:17 |
| 0dc31dbb-47ea-4c50-a50f-16a0da6ad970 | cpu_util | gauge | 6.66611295681 | %    | 2015-06-18T06:18:17 |
| 51ddc950-05ff-4101-bc58-dfc938cf6253 | cpu_util | gauge | 7.12956810631 | %    | 2015-06-18T06:18:17 |
| 2e7e2bbd-6661-4368-9f1a-ff3d272b5b81 | cpu_util | gauge | 6.175         | %    | 2015-06-18T06:08:15 |
| 0dc31dbb-47ea-4c50-a50f-16a0da6ad970 | cpu_util | gauge | 6.31833333333 | %    | 2015-06-18T06:08:15 |
| 51ddc950-05ff-4101-bc58-dfc938cf6253 | cpu_util | gauge | 15.4666666667 | %    | 2015-06-18T06:08:15 |
| 2e7e2bbd-6661-4368-9f1a-ff3d272b5b81 | cpu_util | gauge | 5.39333333333 | %    | 2015-06-18T05:58:15 |
| 0dc31dbb-47ea-4c50-a50f-16a0da6ad970 | cpu_util | gauge | 6.12166666667 | %    | 2015-06-18T05:58:15 |
| 51ddc950-05ff-4101-bc58-dfc938cf6253 | cpu_util | gauge | 39.87         | %    | 2015-06-18T05:58:15 |
| 2e7e2bbd-6661-4368-9f1a-ff3d272b5b81 | cpu_util | gauge | 10.2983333333 | %    | 2015-06-18T05:48:15 |
| 0dc31dbb-47ea-4c50-a50f-16a0da6ad970 | cpu_util | gauge | 13.9583333333 | %    | 2015-06-18T05:48:15 |
| 51ddc950-05ff-4101-bc58-dfc938cf6253 | cpu_util | gauge | 9.68833333333 | %    | 2015-06-18T05:48:15 |
............................................
............................................


Heat »èÁ¦
 - ÀνºÅϽº »èÁ¦
 # nova delete ${iNSTANCE_NAME}
 - Heat »èÁ¦
 # heat stack-delete ${STACK_NAME}



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

 



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