¿ù°£ Àα⠰Խù°

°Ô½Ã¹° 715°Ç
   
[API] ±âÁ¸ ·Îµå¹ë·£½º + ¿ÀÅ佺ÄÉÀϸµ - heat
±Û¾´ÀÌ : ÃÖ°í°ü¸®ÀÚ ³¯Â¥ : 2016-07-04 (¿ù) 10:54 Á¶È¸ : 2193
                                
¡Ø Heat LbaasV2 ´Â mitaka ¿¡¼­ºÎÅÍ Áö¿ø
http://www.chonnom.com/bbs/board.php?bo_table=OpenStack&wr_id=313

¿ÀÅ佺ÄÉÀÏ¿ë ³×Æ®¿öÅ©¸¦ º°µµ·Î »ý¼ºÇÏÁö ¾Ê°í ±âÁ¸ »ç¿ëÀÚ ³×Æ®¿öÅ©³»¿¡ ÀÖ´Â ·Îµå¹ë·±½º¸¦ ASG À¸·Î È°¿ë

Parameter
 - app_port
 - image
 - flavor
 - public_network
 - networks
 - subnet
 - sample   :: Áõ°¨/°¨¼Ò ¼öÄ¡ ¸ð´ÏÅ͸µ ´ë»ó
 - pool

resources
 - asg.properties.min_size
 - asg.properties.max_size
 - asg.properties.resource.type
 - scaleup.properties.cooldown
 - scaleup.properties.scaling_adjustment
 - scaledown.properties.cooldown
 - scaledown.properties.scaling_adjustment
 - cpu_alarm_high.properties.meter_name
 - cpu_alarm_high.properties.period
 - cpu_alarm_high.properties.evaluation_periods
 - cpu_alarm_high.properties.threshold
 - cpu_alarm_low.properties.meter_name
 - cpu_alarm_low.properties.period
 - cpu_alarm_low.properties.evaluation_periods
 - cpu_alarm_low.properties.threshold

DEBUG (base) Making authentication request to http://con-210-44:35357/v3/auth/tokens
DEBUG (connectionpool) "POST /v3/auth/tokens HTTP/1.1" 201 6343
DEBUG (session) REQ: curl -g -i -X POST http://con-210-44:8004/v1/cc15238cf5ed4d708f53523c80b321cc/stacks -H "User-Agent: python-heatclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}bacdb50e8647ab876e9e3e0cb07622fdd00c1ac1" -d '{"files": {"file:///root/hot/lbaas/lb_server.yaml": "{\"outputs\": {\"server_ip\": {\"description\": \"IP Address of the load-balanced server.\", \"value\": {\"get_attr\": [\"server\", \"first_address\"]}}, \"lb_member\": {\"description\": \"LB member details.\", \"value\": {\"get_attr\": [\"pool_member\", \"show\"]}}}, \"heat_template_version\": \"2015-10-15\", \"description\": \"A Group of Load Balanced Servers\", \"parameters\": {\"subnet\": {\"type\": \"string\", \"description\": \"Subnet on which the load balancer will be located\", \"constraints\": [{\"custom_constraint\": \"neutron.subnet\"}]}, \"app_port\": {\"type\": \"number\", \"description\": \"Port used by the servers\"}, \"image\": {\"type\": \"string\", \"description\": \"Image used for servers\", \"constraints\": [{\"custom_constraint\": \"glance.image\"}]}, \"metadata\": {\"type\": \"json\"}, \"flavor\": {\"type\": \"string\", \"description\": \"Flavor used for servers\", \"constraints\": [{\"custom_constraint\": \"nova.flavor\"}]}, \"pool\": {\"type\": \"string\", \"description\": \"Pool to contact\"}, \"networks\": {\"type\": \"string\", \"description\": \"Network used by the server\"}}, \"resources\": {\"pool_member\": {\"type\": \"OS::Neutron::LBaaS::PoolMember\", \"properties\": {\"subnet\": {\"get_param\": \"subnet\"}, \"protocol_port\": {\"get_param\": \"app_port\"}, \"pool\": {\"get_param\": \"pool\"}, \"address\": {\"get_attr\": [\"server\", \"first_address\"]}}}, \"server\": {\"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": "lkh_inuse_lb_autoscale", "environment": {}, "template": {"outputs": {"scale_dn_url": {"description": "This URL is the webhook to scale down the autoscaling group. You can invoke the scale-down operation by doing an HTTP POST to this URL; no body nor extra headers are needed.\n", "value": {"get_attr": ["scaledown", "alarm_url"]}}, "scale_up_url": {"description": "This URL is the webhook to scale up the autoscaling group.  You can invoke the scale-up operation by doing an HTTP POST to this URL; no body nor extra headers are needed.\n", "value": {"get_attr": ["scaleup", "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": "add lbaas resource", "parameters": {"subnet": {"default": "6bb50686-9b52-4146-8f66-c29923aeef73", "type": "string", "description": "Subnet on which the load balancer will be located", "constraints": [{"custom_constraint": "neutron.subnet"}]}, "image": {"default": "ubuntu", "type": "string", "description": "Image used for servers", "constraints": [{"custom_constraint": "glance.image"}]}, "sample": {"default": "2de3c6a2-50d3-45ba-848f-5cb8d43b64c1", "type": "string", "description": "monitoring target instance id"}, "app_port": {"default": 80, "type": "number", "description": "Port used by the servers"}, "public_network": {"default": "74067cb8-1800-4ae3-b11b-9f416920840c", "type": "string", "description": "Network used by the load balancer", "constraints": [{"custom_constraint": "neutron.network"}]}, "flavor": {"default": "smile", "type": "string", "description": "Flavor used for servers", "constraints": [{"custom_constraint": "nova.flavor"}]}, "networks": {"default": "940b3ded-e425-427c-8b22-defe37b6a1d8", "type": "string", "description": "Network used by the servers", "constraints": [{"custom_constraint": "neutron.network"}]}, "pool": {"default": "1ae29c88-f549-4378-9e36-2d8b9a4eaae8", "type": "string", "description": "lbaas pool id"}}, "resources": {"cpu_alarm_low": {"type": "OS::Ceilometer::Alarm", "properties": {"meter_name": "cpu_util", "alarm_actions": [{"get_attr": ["scaledown", "alarm_url"]}], "description": "Scale-down if the average CPU < 15% for 10 minutes", "evaluation_periods": 1, "period": 60, "statistic": "avg", "threshold": 15, "query": [{"field": "resource_id", "value": {"get_param": "sample"}, "op": "eq"}], "comparison_operator": "lt"}}, "scaledown": {"type": "OS::Heat::ScalingPolicy", "properties": {"auto_scaling_group_id": {"get_resource": "asg"}, "adjustment_type": "change_in_capacity", "scaling_adjustment": -1, "cooldown": 60}}, "asg": {"type": "OS::Heat::AutoScalingGroup", "properties": {"min_size": 1, "resource": {"type": "file:///root/hot/lbaas/lb_server.yaml", "properties": {"subnet": {"get_param": "subnet"}, "app_port": {"get_param": "app_port"}, "image": {"get_param": "image"}, "metadata": {"metering.stack": {"get_param": "OS::stack_id"}}, "flavor": {"get_param": "flavor"}, "pool": {"get_param": "pool"}, "networks": {"get_param": "networks"}}}, "max_size": 5}}, "scaleup": {"type": "OS::Heat::ScalingPolicy", "properties": {"auto_scaling_group_id": {"get_resource": "asg"}, "adjustment_type": "change_in_capacity", "scaling_adjustment": 1, "cooldown": 60}}, "cpu_alarm_high": {"type": "OS::Ceilometer::Alarm", "properties": {"meter_name": "cpu_util", "alarm_actions": [{"get_attr": ["scaleup", "alarm_url"]}], "description": "Scale-up if the average CPU > 50% for 1 minute", "evaluation_periods": 1, "period": 60, "statistic": "avg", "threshold": 50, "query": [{"field": "resource_id", "value": {"get_param": "sample"}, "op": "eq"}], "comparison_operator": "gt"}}}}}'
INFO (connectionpool) Starting new HTTP connection (1): con-210-44
DEBUG (connectionpool) "POST /v1/cc15238cf5ed4d708f53523c80b321cc/stacks HTTP/1.1" 201 222
DEBUG (session) RESP: [201] Content-Length: 222 Connection: keep-alive Location: http://con-210-44:8004/v1/cc15238cf5ed4d708f53523c80b321cc/stacks/lkh_inuse_lb_autoscale/526c8cee-133e-4fd0-96d3-41d3e23f36a4 Date: Mon, 04 Jul 2016 02:36:21 GMT Content-Type: application/json X-Openstack-Request-Id: req-101a1c93-7ac8-47be-9d78-98b7bae40d50
RESP BODY: {"stack": {"id": "526c8cee-133e-4fd0-96d3-41d3e23f36a4", "links": [{"href": "http://con-210-44:8004/v1/cc15238cf5ed4d708f53523c80b321cc/stacks/lkh_inuse_lb_autoscale/526c8cee-133e-4fd0-96d3-41d3e23f36a4", "rel": "self"}]}}


¸ð´ÏÅ͸µ ÆäÀÌÁö :
 http://${LBAASV2_VIP}:8080
 À¥ÀÎÁõ :  xxxx / xxxxxx

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

 



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