|
|
°Ô½Ã¹° 715°Ç
|
|
|
[API] ·Îµå¹ë·£½º »ý¼º + ¿ÀÅ佺ÄÉÀϸµ - heat |
|
±Û¾´ÀÌ :
ÃÖ°í°ü¸®ÀÚ
³¯Â¥ : 2016-07-04 (¿ù) 10:41
Á¶È¸ : 2562
|
¡Ø Heat LbaasV2 ´Â mitaka ¿¡¼ºÎÅÍ Áö¿øhttp://www.chonnom.com/bbs/board.php?bo_table=OpenStack&wr_id=312ASG ³»¿¡ ·Îµå¹ë·£½º ½Å±Ô »ý¼º + ½Å±Ô³×Æ®¿öÅ© + ¿ÀÅ佺ÄÉÀÏ Parameter - app_port - lb_port - image - flavor - public_network - networks - subnet 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}b542938cc0ac051b3ff0d0865bc29e5dcdb57392" -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_lb_autocale_sample", "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"]}}, "lburl": {"description": "This URL is the \"external\" URL that can be used to access the load balancer.", "value": {"str_replace": {"params": {"IP_ADDRESS": {"get_attr": ["floating_ip", "floating_ip_address"]}, "PORT": {"get_param": "lb_port"}}, "template": "http://IP_ADDRESS:PORT"}}}, "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"}]}, "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"}]}, "lb_port": {"default": 80, "type": "number", "description": "Port used by the load balancer"}, "image": {"default": "ubuntu", "type": "string", "description": "Image used for servers", "constraints": [{"custom_constraint": "glance.image"}]}, "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"}]}}, "resources": {"scaleup": {"type": "OS::Heat::ScalingPolicy", "properties": {"auto_scaling_group_id": {"get_resource": "asg"}, "adjustment_type": "change_in_capacity", "scaling_adjustment": 1, "cooldown": 60}}, "monitor": {"type": "OS::Neutron::LBaaS::HealthMonitor", "properties": {"delay": 3, "max_retries": 3, "type": "HTTP", "timeout": 3, "pool": {"get_resource": "pool"}}}, "floating_ip": {"type": "OS::Neutron::FloatingIP", "properties": {"floating_network": {"get_param": "public_network"}, "port_id": {"get_attr": ["loadbalancer", "vip_port_id"]}}}, "listener": {"type": "OS::Neutron::LBaaS::Listener", "properties": {"protocol_port": {"get_param": "lb_port"}, "protocol": "HTTP", "loadbalancer": {"get_resource": "loadbalancer"}}}, "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", "matching_metadata": {"metadata.user_metadata.stack": {"get_param": "OS::stack_id"}}, "evaluation_periods": 1, "period": 60, "statistic": "avg", "threshold": 15, "comparison_operator": "lt"}}, "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_resource": "pool"}, "networks": {"get_param": "networks"}}}, "max_size": 5}}, "pool": {"type": "OS::Neutron::LBaaS::Pool", "properties": {"lb_algorithm": "ROUND_ROBIN", "listener": {"get_resource": "listener"}, "protocol": "HTTP"}}, "scaledown": {"type": "OS::Heat::ScalingPolicy", "properties": {"auto_scaling_group_id": {"get_resource": "asg"}, "adjustment_type": "change_in_capacity", "scaling_adjustment": -1, "cooldown": 60}}, "loadbalancer": {"type": "OS::Neutron::LBaaS::LoadBalancer", "properties": {"vip_subnet": {"get_param": "subnet"}}}, "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", "matching_metadata": {"metadata.user_metadata.stack": {"get_param": "OS::stack_id"}}, "evaluation_periods": 1, "period": 60, "statistic": "avg", "threshold": 50, "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_lb_autocale_sample/095c8414-2e50-4e64-9aba-4bcbf0f4e3f2 Date: Mon, 04 Jul 2016 01:42:50 GMT Content-Type: application/json X-Openstack-Request-Id: req-297bdd1b-476d-419a-b716-db2da3dcc2c1 RESP BODY: {"stack": {"id": "095c8414-2e50-4e64-9aba-4bcbf0f4e3f2", "links": [{"href": "http://con-210-44:8004/v1/cc15238cf5ed4d708f53523c80b321cc/stacks/lkh_lb_autocale_sample/095c8414-2e50-4e64-9aba-4bcbf0f4e3f2", "rel": "self"}]}} ¸ð´ÏÅ͸µ ÆäÀÌÁö : http://${LBAASV2_VIP}:8080 À¥ÀÎÁõ : xxxx / xxxxxx
|
|
|
|
|