Initial samples of policy specs

This commit is contained in:
tengqm 2015-02-09 18:00:07 +08:00
parent d586e20363
commit 64d0ba84ed
10 changed files with 235 additions and 3 deletions

View File

@ -0,0 +1,13 @@
# Sample deletion policy that can be attached to a cluster.
# The valid values include:
# OLDEST_FIRST, OLDEST_PROFILE_FIRST, YOUNGEST_FIRST, RANDOM
criteria: OLDEST_FIRST
# Length in number of seconds before the actual deletion happens
# This param buys an instance some time before deletion
grace_period: 60
# Whether the deletion will reduce the desired capability of
# the cluster as well.
reduce_desired_capacity: False

View File

@ -0,0 +1,24 @@
# Sample health policy based on node health checking
detection:
# Type for health checking, valid values include:
# NODE_STATUS_POLLING, LB_STATUS_POLLING, VM_EVENT_LISTENING
type: NODE_STATUS_POLLING
# Number of seconds between two adjacent checking
interval: 60
recovery:
# List of actions that can be retried on a failed node
actions:
- reboot
- rebuild
- migrate
- evacuate
- recreate
# List of services that are to be fenced
fencing:
- compute
- storage
- network

View File

@ -0,0 +1,55 @@
# Sample health policy based on monitoring using LBaaS service
detection:
# Type for health checking, valid values include:
# NODE_STATUS_POLLING, LB_STATUS_POLLING, VM_EVENT_LISTENING
type: LB_STATUS_POLLING
# Number of seconds between two adjacent checking
interval: 60
# Detailed specification for the checking type
options:
# Min time in seconds between regular connection of the member
deplay: 5
# Max time in seconds for a monitor to wait for a connection to
# establish before it times out
timeout: 10
# Predefined health monitor types, valid values include one of:
# PING, TCP, HTTP, HTTPS
type: HTTP
# Number of permissible connection failures before chaning the
# node status to INACTIVE
max_retries: 3
# Administrative state of the monitor
admin_state_up: True
# HTTP method used for requests by the monitor of type HTTP
http_method: GET
# List of HTTP status codes expected in response from the member
# to declare it healthy
expected_codes: 200
# HTTP path used in HTTP request by monitor for health testing
url_path: /health_status
recovery:
# List of actions that can be retried on a failed node
actions:
- reboot
- rebuild
- migrate
- evacuate
- recreate
# List of services that are to be fenced
fencing:
- compute
- storage
- network

View File

@ -0,0 +1,25 @@
# This is a spec for an AWS ELB load-balancer
AvailabilityZones: []
HealthCheck:
HealthyThreshold: 5
Interval: 60
Target: 80
Timeout: 30
UnhealtyThreshold: 15
Instances: []
Listeners:
- InstancePort: 80
LoadBalancerPort: 80
Protocol: HTTP
SSLCertificateId: MyCertificate
PolicyNames:
- PolicyA
- PolicyB
AppCookieStickinessPolicy:
- What
LBCookieStickienessPolicy:
- What
SecurityGroups:
- ssh_group
Subnets:
- private_sub_net_01

View File

@ -0,0 +1,42 @@
# load-balancing policy spec using Neutron LBaaS service
# NOTE: properties are combined from LB and Pool
# Each Pool member has its own 'address', 'protocol_port, 'weight',
# and 'admin_state_up' property
#### LB propertie
# Port on which servers are running on the members
protocol_port: 80
#### Pool properties
protocol: HTTP
# Subnet for the port on which members can be connected
subnet: private_subnet
# Valid values include:
# ROUND_ROBIN, LEAST_CONNECTIONS, SOURCE_IP
lb_method: ROUND_ROBIN
# Administrative state of the pool
admin_state_up: True
# IP address and port of the pool
vip:
# Subnet of the VIP
subnet: public_subnet
# IP adddress of the VIP
address: 172.24.4.220
# Max #connections per second allowed for this VIP
connection_limit: 500
# TCP port to listen on
protocol_port: 80
# Administrative state up
admin_state_up: True
# session persistence configuration
session_persistence:
# type of session persistence implementation, valid values include:
# SOURCE_IP, HTTP_COOKIE, APP_COOKIE
type: SOURCE_IP
# Name of cookie if type set to APP_COOKIE
cookie_name: whatever

View File

@ -0,0 +1,23 @@
# Sample placement policy doing round-robin
# Spanning AZs with weights
availability_zones:
strategy:
# Valid values include:
# ROUND_ROBIN, WEIGHTED, SOURCE
type: ROUND_ROBIN
options:
zones:
- AZ1
- AZ2
# Spanning regions with weights
regions:
strategy:
# Valid values include:
# ROUND_ROBIN, WEIGHTED, SOURCE
type: ROUND_ROBIN
options:
regions:
- RegionOne
- RegionTwo

View File

@ -0,0 +1,23 @@
# Spanning AZs with weights
availability_zones:
strategy:
# Valid values include:
# ROUND_ROBIN, WEIGHTED, SOURCE
type: WEIGHTED
options:
- zone: AZ1
weight: 100
- zone: AZ2
weight: 50
# Spanning regions with weights
regions:
strategy:
# Valid values include:
# ROUND_ROBIN, WEIGHTED, SOURCE
type: WEIGHTED
options:
- region: RegionOne
weight: 100
- region: RegionTwo
weight: 100

View File

@ -0,0 +1,20 @@
# Sample scaling policy that can be attached to a cluster
# Min number of nodes to keep the cluster operational
min_size: 1
# Max number of nodes to cap resource consumption
max_size: 10
adjustment:
# Adjustment type, valid values include:
# EXACT_CAPACITY, CHANGE_IN_CAPACITY, CHANGE_IN_PERCENTAGE
type: CHANGE_IN_CAPACITY
# A number that will be interpreted based on the type setting
value: 1
# When type is set CHNAGE_IN_PERCENTAGE, min_step specifies
# that the cluster size will be changed by at least the number
# of nodes specified here
min_step: 1

View File

@ -0,0 +1,10 @@
# Sample update policy
# Min number of nodes in service when doing rolling updates
min_in_service: 1
# Max number of nodes that can be updated simultaneously
max_batch_size: 1
# Number of seconds between batches
pause_time: 0

View File

@ -1,3 +0,0 @@
min_in_service: 1
max_batch_size: 1
pause_time: 0