Created
June 4, 2015 11:07
-
-
Save mberglof/0b838dda83bf4625d879 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
heat_template_version: 2013-05-23 | |
description: | | |
This is a Heat template to deploy a single Linux server running redis. | |
parameters: | |
flavor: | |
description: Flavor for Cloud Servers | |
type: string | |
default: 2 GB General Purpose v1 | |
image: | |
label: Server Image | |
description: Operating system to use for created servers | |
type: string | |
default: CentOS 6 (PVHVM) | |
constraints: | |
- allowed_values: | |
- Ubuntu 12.04 LTS (Precise Pangolin) (PVHVM) | |
- CentOS 6 (PVHVM) | |
description: Must be a supported operating system. | |
redis_version: | |
description: version of redis to install | |
type: string | |
default: 2.8.9 | |
server_hostname: | |
description: Hostname for the server. | |
type: string | |
default: redis-slave | |
ssh_keypair_name: | |
description: Nova keypair name for ssh access to the server | |
type: string | |
ssh_private_key: | |
description: private key to access the created servers | |
type: string | |
master_ip: | |
description: IP address of redis master server to which we are enslaved | |
type: string | |
redis_password: | |
description: password for redis auth | |
type: string | |
redis_port: | |
description: port for redis servers to listen on | |
type: number | |
default: 6379 | |
sentinel_port: | |
description: port for sentinels to listen on | |
type: number | |
default: 26379 | |
stack_id: | |
type: string | |
default: heat | |
kitchen: | |
label: Kitchen | |
description: URL for the kitchen to use | |
type: string | |
default: https://github.com/rackspace-orchestration-templates/redis-sentinel | |
chef_version: | |
label: Chef Version | |
description: Version of chef client to use | |
type: string | |
default: 11.12.8 | |
resources: | |
redis_slave_server: | |
type: "OS::Nova::Server" | |
properties: | |
name: { get_param: server_hostname } | |
flavor: { get_param: flavor } | |
image: { get_param: image } | |
key_name: { get_param: ssh_keypair_name } | |
metadata: | |
rax-heat: { get_param: stack_id } | |
redis_slave_setup: | |
type: "OS::Heat::ChefSolo" | |
depends_on: redis_slave_server | |
properties: | |
username: root | |
private_key: { get_param: ssh_private_key } | |
host: { get_attr: [redis_slave_server, accessIPv4] } | |
kitchen: { get_param: kitchen } | |
chef_version: { get_param: chef_version } | |
node: | |
run_list: [ "recipe[rax-redis::config_slave_sentinel]" ] | |
redisio: | |
default_settings: | |
slaveof: | |
address: { get_param: master_ip } | |
port: { get_param: redis_port } | |
masterauth: { get_param: redis_password } | |
servers: | |
- name: slave | |
port: { get_param: redis_port } | |
sentinels: | |
- sentinel_port: { get_param: sentinel_port } | |
port: { get_param: sentinel_port } | |
name: 'cluster' | |
master_ip: { get_param: master_ip } | |
master_port: { get_param: redis_port } | |
auth-pass: { get_param: redis_password } | |
logfile: /var/log/sentinel.log | |
version: { get_param: redis_version } | |
outputs: | |
redis_slave_ip: | |
value: { get_attr: [redis_slave_server, accessIPv4] } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment