Last active
August 29, 2015 14:01
-
-
Save ycombinator/377fd3d7b01d8a4f8a78 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 Rackspace database instance | |
parameters: | |
# Database settings | |
db_instance_flavor: | |
description: Rackspace Cloud Database Flavor to determine amount of RAM | |
type: string | |
default: 1GB Instance | |
constraints: | |
- allowed_values: | |
- 512MB Instance | |
- 1GB Instance | |
- 2GB Instance | |
- 4GB Instance | |
- 8GB Instance | |
- 16GB Instance | |
description: | | |
Must be a valid Rackspace Cloud Database flavor for the region you have | |
selected to deploy into. | |
db_instance_size: | |
type: number | |
description: Size of the Rackspace Cloud Database, in GB | |
default: 10 | |
constraints: | |
- range: | |
min: 10 | |
max: 150 | |
description: | | |
Database instance size, in GB. min 10, max 150 | |
db_username: | |
description: Username for the database | |
type: string | |
default: db_user | |
constraints: | |
- allowed_pattern: "^(.){1,16}$" | |
description: | | |
Must be shorter than 16 characters, this is due to MySQL's maximum | |
username length. | |
resources: | |
db_password: | |
type: OS::Heat::RandomString | |
properties: | |
length: 16 | |
sequence: lettersdigits | |
db: | |
type: OS::Trove::Instance | |
properties: | |
name: db_instance | |
flavor: { get_param: db_instance_flavor } | |
size: { get_param: db_instance_size } | |
databases: | |
- name: somedb | |
users: | |
- name: { get_param: db_username } | |
password: { get_attr: [db_password, value] } | |
databases: [ somedb ] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment