lib/fog/rackspace/docs/auto_scale.md in fog-maestrodev-1.18.0.20131209091424 vs lib/fog/rackspace/docs/auto_scale.md in fog-maestrodev-1.18.0.20131218202447

- old
+ new

@@ -1,8 +1,8 @@ #Auto Scale (AutoScale) -This document explains how to get started using auto scale with Fog. It assumes you have read the [Getting Started with Fog and the Rackspace Open Cloud](getting_started.md) document. +This document explains how to get started using Auto Scale with Fog. It assumes you have read the [Getting Started with Fog and the Rackspace Open Cloud](getting_started.md) document. ## Basic Concepts Auto Scale is a service that enables you to scale your application by adding or removing servers based on monitoring events, a schedule, or arbitrary webhooks. @@ -13,11 +13,11 @@ * Servers and Load Balancers ## Workflow -A scaling group is monitored by Rackspace Cloud Monitoring. When Monitoring triggers an alarm for high utilization within the Autoscaling group, a webhook is triggered. The webhook calls the auto scale service, which consults a policy in accordance with the webhook. The policy determines how many additional Cloud Servers should be added or removed in accordance with the alarm. +A scaling group is monitored by Rackspace Cloud Monitoring. When Monitoring triggers an alarm for high utilization within the Autoscaling group, a webhook is triggered. The webhook calls the Auto Scale service, which consults a policy in accordance with the webhook. The policy determines how many additional Cloud Servers should be added or removed in accordance with the alarm. Alarms may trigger scaling up or scaling down. Scale-down events always remove the oldest server in the group. Cooldowns allow you to ensure that you don't scale up or down too fast. When a scaling policy runs, both the scaling policy cooldown and the group cooldown start. Any additional requests to the group are discarded while the group cooldown is active. Any additional requests to the specific policy are discarded when the policy cooldown is active. @@ -41,11 +41,11 @@ require 'fog' ## Create Service -Next, create a connection to auto scale: +Next, create a connection to Auto Scale: Using a US-based account: service = Fog::Rackspace::AutoScale( :rackspace_username => RACKSPACE_USER_NAME, # Your Rackspace Username @@ -66,11 +66,11 @@ To learn more about obtaining cloud credentials refer to the [Getting Started with Fog and the Rackspace Open Cloud](getting_started.md) document. By default `Fog::Rackspace::AutoScale` will authenticate against the US authentication endpoint. You can specify alternative authentication endpoints using the key `:rackspace_auth_url`. Please refer to [Alternate Authentication Endpoints](http://docs.rackspace.com/auth/api/v2.0/auth-client-devguide/content/Endpoints-d1e180.html) for a list of alternative Rackspace authentication endpoints. -Alternative regions are specified using the key `:rackspace_region `. A list of regions available for auto scale can be found by executing the following: +Alternative regions are specified using the key `:rackspace_region `. A list of regions available for Auto Scale can be found by executing the following: identity_service = Fog::Identity({ :provider => 'Rackspace', # Rackspace Fog provider :rackspace_username => RACKSPACE_USER_NAME, # Your Rackspace Username :rackspace_api_key => RACKSPACE_API, # Your Rackspace API key @@ -140,11 +140,11 @@ :list_groups, :create_group, :get_group, :delete_group, :get_group_state, :pause_group_state, :resume_group_state, :get_group_config, :update_group_config, :get_launch_config, :update_launch_config, :list_policies, :create_policy, :get_policy, :update_policy, :delete_policy, :execute_policy, :execute_anonymous_webhook, :get_webhook, :list_webhooks, :create_webhook, :update_webhook, :delete_webhook #### Example Request -To request a list of volume types: +To request a list of Auto Scale groups: response = service.list_groups This returns in the following `Excon::Response`: @@ -163,11 +163,11 @@ returns: {"groups_links"=>[], "groups"=>[{"paused"=>false, "desiredCapacity"=>0, "links"=>[{"href"=>"https://ord.autoscale.api.rackspacecloud.com/v1.0/555/groups/b45e6107-26ca-4a93-869d-46bf20005df3/", "rel"=>"self"}], "active"=>[], "pendingCapacity"=>0, "activeCapacity"=>0, "id"=>"b45e6107-26ca-4a93-869d-46bf20005df3", "name"=>"fog-scailing-group"}]} -To learn more about auto scale request methods refer to [rdoc](http://rubydoc.info/gems/fog/Fog/Rackspace/AutoScale/Real). To learn more about Excon refer to [Excon GitHub repo](https://github.com/geemus/excon). +To learn more about Auto Scale request methods refer to [rdoc](http://rubydoc.info/gems/fog/Fog/Rackspace/AutoScale/Real). To learn more about Excon refer to [Excon GitHub repo](https://github.com/geemus/excon). ### Model Layer Fog models behave in a manner similar to `ActiveModel`. Models will generally respond to `create`, `save`, `persisted?`, `destroy`, `reload` and `attributes` methods. Additionally, fog will automatically create attribute accessors. @@ -367,11 +367,11 @@ group_config.cooldown = 120 group_config.max_entities = 16 group_config.save -**Note**: If you pass any metadata values in this call, it must be the full set of metadata for the Scaling Group, since the underlying API call **overwrites** any existing metadata. +**Note**: If you pass any metadata values in this call, it must be the full set of metadata for the scaling group, since the underlying API call **overwrites** any existing metadata. ### Deleting a Scaling Group To remove a scaling group, call its `destroy` method: @@ -398,11 +398,11 @@ To retrieve the launch config: launch_config = group.launch_config -The launch configuration contains two attributes `:type` and `:args`. The only launch type currently available for auto scale is `:launch_server`. The `args` attribute contains a hash with the launch server configuration options as follows: +The launch configuration contains two attributes `:type` and `:args`. The only launch type currently available for Auto Scale is `:launch_server`. The `args` attribute contains a hash with the launch server configuration options as follows: {"server"=>{ "name"=>"autoscale_server", "imageRef"=>"66448837-1a58-4bd2-a647-9f3272f36263", "flavorRef"=>"2", @@ -434,10 +434,10 @@ #### Parameters Parameter | Required | Default | Notes ---- | ---- | ---- | ---- **:name** | yes | | -**:type** | yes | | This can be "webhook", "schedule" or "cloud_monitoring" +**:type** | yes | | This can be "webhook", "schedule" or "cloud monitoring" **:cooldown** | yes | | Period in seconds after a policy execution in which further events are ignored. This is separate from the overall cooldown for the scaling group. **:change** | no | | Can be positive or negative, which makes this a scale-up or scale-down policy, respectively. If this value is specified you can not specify `:change_percent`. **:change_percent** | no | | The percentage change to the autoscale group's number of units. If this value is specified you can not specify `:change`. **:args** | no | | This is used to specify schedule parameters. Please refer to [Policy documentation](http://docs-internal-staging.rackspace.com/cas/api/v1.0/autoscale-devguide/content/POST_createPolicies_v1.0__tenantId__groups__groupId__policies_Policies.html) for more information.