Created
March 10, 2011 15:06
-
-
Save dzinevich/864219 to your computer and use it in GitHub Desktop.
rubber.yml
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
# REQUIRED: The name of your application | |
app_name: streaming | |
# REQUIRED: The system user to run your app servers as | |
app_user: app | |
# REQUIRED: Notification emails (e.g. monit) get sent to this address | |
# | |
admin_email: mail@gmail.com | |
# REQUIRED: The timezone the server should be in | |
timezone: Etc/UTC | |
# REQUIRED: the domain all the instances should be associated with | |
# | |
domain: application.app.com | |
# OPTIONAL: Additional rubber file to pull config from if it exists. This file will | |
# also be pushed to remote host at RUBBER_ROOT/config/rubber/rubber-secret.yml | |
# | |
# rubber_secret: "#{File.expand_path('~') + '/.ec2' + (RUBBER_ENV == 'production' ? '' : '_dev') + '/rubber-secret.yml' rescue ''}" | |
# REQUIRED All known cloud providers with the settings needed to configure them | |
# There's only one coud provider right now - Amazon Web Services | |
# To implement another, clone lib/rubber/cloud/aws.rb | |
# | |
cloud_providers: | |
aws: | |
# REQUIRED The amazon keys and account ID (digits only, no dashes) used to access the AWS API | |
# | |
access_key: "#{AWS_ACCESS_KEY}" | |
secret_access_key: "#{AWS_SECRET_ACCESS_KEY}" | |
account: "#{AWS_ACCOUNT}" | |
# REQUIRED: The name of the amazon keypair and location of its private key | |
# | |
# NOTE: for some reason Capistrano requires you to have both the public and | |
# the private key in the same folder, the public key should have the | |
# extension ".pub". The easiest way to get your hand on this is to create the | |
# public key from the private key: ssh-keygen -y -f gsg-keypair > gsg-keypair.pub | |
# | |
key_name: "#{ENV['AWS_SSH_KEY_FILES']}" | |
key_file: "#{Dir[(File.expand_path('~') rescue '/root') + '/.ec2/*' + cloud_providers.aws.key_name].first}" | |
# m1.small or m1.large or m1.xlarge | |
image_type: m1.small | |
image_id: "#{ %w{m1.small c1.medium}.include?(image_type) ? 'ami-e80c5cad' : 'ami-860c5cc3' }" | |
# REQUIRED the cloud provider to use | |
# | |
cloud_provider: aws | |
# | |
security_groups: | |
default: | |
description: The default security group | |
rules: | |
- source_group_name: default | |
source_group_account: "#{cloud_providers.aws.account}" | |
- protocol: tcp | |
from_port: 22 | |
to_port: 22 | |
source_ips: [0.0.0.0/0] | |
nodejs: | |
description: nodejs | |
rules: | |
- source_group_name: nodejs | |
source_group_account: "#{cloud_providers.aws.account}" | |
- protocol: tcp | |
from_port: 8080 | |
to_port: 8080 | |
source_ips: [0.0.0.0/0] | |
# OPTIONAL: The default security groups to create instances with | |
assigned_security_groups: [default] | |
# OPTIONAL: Automatically create security groups for each host and role | |
# EC2 doesn't allow one to change what groups an instance belongs to after | |
# creation, so its good to have some empty ones predefined. | |
auto_security_groups: true | |
# OPTIONAL: Automatically isolate security groups for each appname/environment | |
# by mangling their names to be appname_env_groupname | |
# This makes it safer to have staging and production coexist on the same EC2 | |
# account, or even multiple apps | |
isolate_security_groups: true | |
# OPTIONAL: Prompts one to sync security group rules when the ones in amazon | |
# differ from those in rubber | |
prompt_for_security_group_sync: true | |
# OPTIONAL: The packages to install on all instances | |
# You can install a specific version of a package by using a sub-array of pkg, version | |
# For example, packages: [[rake, 0.7.1], irb] | |
packages: [postfix, build-essential, git-core, ec2-ami-tools] | |
# OPTIONAL: gem sources to setup for rubygems | |
# gemsources: ["http://rubygems.org", "http://gems.github.com"] | |
# OPTIONAL: The gems to install on all instances | |
# You can install a specific version of a gem by using a sub-array of gem, version | |
# For example, gem: [[rails, 2.2.2], open4, aws-s3] | |
gems: [open4, aws-s3, bundler, [rubber, "#{Rubber.version}"]] | |
# OPTIONAL: A string prepended to shell command strings that cause multi | |
# statement shell commands to fail fast. You may need to comment this out | |
# on some platforms, but it works for me on linux/osx with a bash shell | |
# | |
stop_on_error_cmd: "function error_exit { exit 99; }; trap error_exit ERR" | |
# OPTIONAL: The default set of roles to use when creating a staging instance | |
# with "cap rubber:create_staging". By default this uses all the known roles, | |
# but this is not always desired for staging, so you can specify a different | |
# set here | |
# | |
staging_roles: "haproxy,nodejs,rabitmq" | |
# OPTIONAL: Lets one assign amazon elastic IPs (static IPs) to your instances | |
# You should typically set this on the role/host level rather than | |
# globally , unless you really do want all instances to have a | |
# static IP | |
# | |
# use_static_ip: true | |
# OPTIONAL: Specifies an instance to be created in the given availability zone | |
# Availability zones are sepcified by amazon to be somewhat isolated | |
# from each other so that hardware failures in one zone shouldn't | |
# affect instances in another. As such, it is good to specify these | |
# for instances that need to be redundant to reduce your chance of | |
# downtime. You should typically set this on the role/host level | |
# rather than globally. Use rubber describe:zones to see the list | |
# of zones | |
# availability_zone: us-east-1a | |
# OPTIONAL: If you want t use Elastic Block Store (EBS) persistent | |
# volumes, add them to host specific overrides and they will get created | |
# and assigned to the instance. On initial creation, the volume will get | |
# attached _and_ formatted, but if your host disapears and you recreate | |
# it, the volume will only get remounted thereby preserving your data | |
# | |
hosts: | |
node01-qa: | |
availability_zone: us-east-1d | |
instance_roles: "nodejs,haproxy,rabbitmq" | |
security_groups: "nodejs" | |
cloud_providers: | |
aws: | |
image_id: ami-3e02f257 | |
image_type: m1.small | |
use_static_ip: false | |
roles: | |
nodejs: | |
packages: [libxslt-dev] | |
rabbitmq: | |
packages: [libxslt-dev] | |
# myconfig: someval |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment