¿ù°£ Àα⠰Խù°

°Ô½Ã¹° 708°Ç
   
[API] ¿ÀÅ佺ÄÉÀϸµ + Ãß°¡µð½ºÅ© - heat
±Û¾´ÀÌ : ÃÖ°í°ü¸®ÀÚ ³¯Â¥ : 2016-07-04 (¿ù) 14:11 Á¶È¸ : 2602
                                
ASG ³»¿¡ ·Îµå¹ë·£½º ½Å±Ô »ý¼º + ½Å±Ô³×Æ®¿öÅ© + ¿ÀÅ佺ÄÉÀÏ (Ãß°¡µð½ºÅ© Àû¿ë)

Parameter

 - flavor
 - image
 - public_net_id
 - vol_size
 - vol_id

resource
 - privete_net.name
 - private_subnet.name
 - router.name
 - asg.min_size    :: ÃÖ´ë ÀνºÅϽº ¼ö
 - asg.max_size   :: ÃÖ¼Ò ÀνºÅϽº ¼ö
 - asg.resource.type : server.yaml     :: ÂüÁ¶ÆÄÀÏ
 - scale_up_policy.properties.cooldown     :: ´ë±â½Ã°£
 - scale_up_policy.properties.scaling_adjustment    :: ¼­¹öÁõ°¡ °¹¼ö
 - scale_down_policy.properties.cooldown    :: ´ë±â ½Ã°£
 - scale_down_policy.properties.scaling_adjustment   :: ¼­¹ö°¨¼Ò °¹¼ö
 - cpu_alarm_high.properties.periods   ::   ÁÖ±â
 - cpu_alarm_high.properties.evaluation_periods   ::   Ƚ¼ö
 - cpu_alarm_high.properties.threshold   :: Àû¿ë°ª
 - cpu_alarm_low.properties.periods.    :: ÁÖ±â
 - cpu_alarm_low.properties.evaluation_periods.    ::  Ƚ¼ö
 - cpu_alarm_low.properties.threshold    ::  Àû¿ë°ª


DEBUG (base) Making authentication request to http://controller:35357/v3/auth/tokens
DEBUG (connectionpool) "POST /v3/auth/tokens HTTP/1.1" 201 5948
DEBUG (session) REQ: curl -g -i -X POST http://controller:8004/v1/946abc56dd684702ab84b396bc9feea6/stacks -H "User-Agent: python-heatclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}423e51f9c9cb940ea8dd6ea2985730c078aa8c9f" -d '{"files": {"file:///root/heat/server.yaml": "{\"outputs\": {\"server_ip\": {\"description\": \"IP Address of the load-balanced server.\", \"value\": {\"get_attr\": [\"server\", \"first_address\"]}}}, \"heat_template_version\": \"2015-10-15\", \"description\": \"A load-balancer server\", \"parameters\": {\"subnet\": {\"type\": \"string\", \"description\": \"private_subnet\"}, \"vol_size\": {\"type\": \"number\", \"description\": \"The size of the Cinder volume\"}, \"image\": {\"type\": \"string\", \"description\": \"Image used for servers\"}, \"user_data\": {\"type\": \"string\", \"description\": \"Server user_data\"}, \"public_net_id\": {\"type\": \"string\", \"description\": \"public_net_id\"}, \"flavor\": {\"type\": \"string\", \"description\": \"flavor used by the servers\"}, \"vol_id\": {\"type\": \"string\", \"description\": \"The id of the Cinder volume\"}, \"networks\": {\"type\": \"string\", \"description\": \"private_net\"}, \"metadata\": {\"type\": \"json\"}}, \"resources\": {\"vol_att\": {\"type\": \"OS::Cinder::VolumeAttachment\", \"properties\": {\"instance_uuid\": {\"get_resource\": \"server\"}, \"mountpoint\": \"/dev/vdb\", \"volume_id\": {\"get_resource\": \"my_vol\"}}}, \"my_vol\": {\"type\": \"OS::Cinder::Volume\", \"properties\": {\"source_volid\": {\"get_param\": \"vol_id\"}, \"size\": {\"get_param\": \"vol_size\"}}}, \"server\": {\"depends_on\": \"my_vol\", \"type\": \"OS::Nova::Server\", \"properties\": {\"flavor\": {\"get_param\": \"flavor\"}, \"networks\": [{\"network\": {\"get_param\": \"networks\"}}], \"image\": {\"get_param\": \"image\"}, \"metadata\": {\"get_param\": \"metadata\"}}}}}"}, "disable_rollback": true, "parameters": {}, "stack_name": "autoscail_cinder2", "environment": {}, "template": {"outputs": {"scale_dn_url": {"description": "Webhook URL to scale down the group. You can invoke the scale-down operation by doing an HTTP POST to this URL.\n", "value": {"get_attr": ["scale_down_policy", "alarm_url"]}}, "scale_up_url": {"description": "Webhook URL to scale up the group. You can invoke the scale-up operation by doing an HTTP POST to this URL.\n", "value": {"get_attr": ["scale_up_policy", "alarm_url"]}}, "server_list": {"description": "List of server names that are part of the group.\n", "value": {"get_attr": ["asg", "outputs_list", "name"]}}}, "heat_template_version": "2015-10-15", "description": "This is a very simple template that illustrates automatic scaling up and down using OS::Heat::AutoScalingGroup. CPU load is generated for 15 mins after each instance is spawned, triggering a scale-up event. Once the max number of instances has been reached and the CPU load generation has finished, the number of instances will be scaled back down to 1.\n", "parameters": {"vol_size": {"default": 10, "type": "number", "description": "The size of the Cinder volume"}, "flavor": {"default": "c179df51-3fbc-4eb1-8d10-da623e8c62a5", "type": "string", "description": "Flavor of the servers"}, "vol_id": {"default": "fde05771-ced1-485f-8774-be1bf9db9be3", "type": "string", "description": "The id of the Cinder volume"}, "public_net_id": {"default": "fc711d9c-1071-4c47-b082-bd214a36fa47", "type": "string", "description": "ID of the public network to use", "label": "Public network ID"}, "image": {"default": "c072d98b-897c-4432-a281-f5b2ae794b24", "type": "string", "description": "Image used to boot the servers"}}, "resources": {"cpu_alarm_high": {"type": "OS::Ceilometer::Alarm", "properties": {"meter_name": "cpu_util", "alarm_actions": [{"get_attr": ["scale_up_policy", "alarm_url"]}], "description": "Scale-up if the average CPU > 50% for 1 minute", "matching_metadata": {"metadata.user_metadata.stack": {"get_param": "OS::stack_id"}}, "evaluation_periods": 1, "period": 60, "statistic": "avg", "threshold": 50, "comparison_operator": "gt"}}, "scale_up_policy": {"type": "OS::Heat::ScalingPolicy", "properties": {"auto_scaling_group_id": {"get_resource": "asg"}, "adjustment_type": "change_in_capacity", "scaling_adjustment": 1, "cooldown": 60}}, "router_interface": {"type": "OS::Neutron::RouterInterface", "properties": {"router_id": {"get_resource": "router"}, "subnet_id": {"get_resource": "private_subnet"}}}, "cpu_alarm_low": {"type": "OS::Ceilometer::Alarm", "properties": {"meter_name": "cpu_util", "alarm_actions": [{"get_attr": ["scale_down_policy", "alarm_url"]}], "description": "Scale-down if the average CPU < 15% for 10 minutes", "matching_metadata": {"metadata.user_metadata.stack": {"get_param": "OS::stack_id"}}, "evaluation_periods": 1, "period": 600, "statistic": "avg", "threshold": 10, "comparison_operator": "lt"}}, "asg": {"depends_on": ["router_gw", "router_interface"], "type": "OS::Heat::AutoScalingGroup", "properties": {"min_size": 1, "resource": {"type": "file:///root/heat/server.yaml", "properties": {"subnet": {"get_resource": "private_subnet"}, "vol_size": {"get_param": "vol_size"}, "image": {"get_param": "image"}, "user_data": null, "public_net_id": {"get_param": "public_net_id"}, "flavor": {"get_param": "flavor"}, "vol_id": {"get_param": "vol_id"}, "networks": {"get_resource": "private_net"}, "metadata": {"metering.stack": {"get_param": "OS::stack_id"}}}}, "max_size": 5}}, "private_subnet": {"type": "OS::Neutron::Subnet", "properties": {"network_id": {"get_resource": "private_net"}, "cidr": "192.168.11.0/24", "dns_nameservers": ["8.8.8.8", "8.8.4.4"], "name": "jyh1_subnet", "enable_dhcp": true}}, "private_net": {"type": "OS::Neutron::Net", "properties": {"name": "jyh1_net", "admin_state_up": true}}, "router": {"type": "OS::Neutron::Router", "properties": {"name": "jyh1_router", "admin_state_up": true}}, "scale_down_policy": {"type": "OS::Heat::ScalingPolicy", "properties": {"auto_scaling_group_id": {"get_resource": "asg"}, "adjustment_type": "change_in_capacity", "scaling_adjustment": "-1", "cooldown": 60}}, "router_gw": {"type": "OS::Neutron::RouterGateway", "properties": {"network_id": {"get_param": "public_net_id"}, "router_id": {"get_resource": "router"}}}}}}'
INFO (connectionpool) Starting new HTTP connection (1): controller
DEBUG (connectionpool) "POST /v1/946abc56dd684702ab84b396bc9feea6/stacks HTTP/1.1" 201 217
DEBUG (session) RESP: [201] Content-Length: 217 Connection: keep-alive Location: http://controller:8004/v1/946abc56dd684702ab84b396bc9feea6/stacks/autoscail_cinder2/98cbdb60-f2fa-42b3-aec1-c5d168b94495 Date: Mon, 04 Jul 2016 05:32:02 GMT Content-Type: application/json X-Openstack-Request-Id: req-5ec4424d-50f3-4041-bb98-07ec782ff364
RESP BODY: {"stack": {"id": "98cbdb60-f2fa-42b3-aec1-c5d168b94495", "links": [{"href": "http://controller:8004/v1/946abc56dd684702ab84b396bc9feea6/stacks/autoscail_cinder2/98cbdb60-f2fa-42b3-aec1-c5d168b94495", "rel": "self"}]}}


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

 



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