This file contains hidden or 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
define([ | |
'underscore','backbone','logging' | |
], function(_, Backbone, logging) { | |
var RootModel = | |
Backbone.Model.extend({ | |
initialize : function(attributes, options) { | |
Backbone.Model.prototype.initialize.apply(this, arguments); |
This file contains hidden or 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
default["app"]["name"] = "app" | |
# Attribute to show the problem | |
default["app"]["install_dir"] = "/home/#{node["app"]["name"]}" | |
# Attribute used in delayed evaluation approach | |
default["app"]["install_dir2"] = "/home/%{name}" | |
# Attribute used in conditional assignment approach | |
# default["app"]["install_dir3"] = "/home/#{node["app"]["name"]}" |
This file contains hidden or 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
require 'chef/provisioning' | |
with_driver "aws" | |
with_data_center 'us-west-1' do | |
machine 'bowser' do | |
machine_options :bootstrap_options => { | |
:key_name => 'test2-aws' | |
} | |
end |
This file contains hidden or 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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Resources": { | |
"elbappserverelb": { | |
"Type": "AWS::ElasticLoadBalancing::LoadBalancer", | |
"Properties": { | |
"AvailabilityZones": [ | |
"us-west-2c", | |
"us-west-2b", | |
"us-west-2a" |
This file contains hidden or 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
path = node['myapp']['path'] | |
install_options = [] | |
install_options << "--registry=#{node['myapp']['npm_registry']}" if (node['myapp']['npm_registry']) | |
# option is to prevent failure as pkgs are unauthenticated | |
package 'git' do | |
action :install | |
options "--allow-unauthenticated" | |
end |
This file contains hidden or 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
default['myapp']['user'] = 'automation' # must have access to git repo | |
default['myapp']['path'] = '/home/automation/myapp' # where to install app - make sure this directory exists (or create in recipe) | |
default['myapp']['name'] = 'myapp' # name must match that in package.json | |
default['myapp']['repo_url'] = "bitbucket.org:mycompany/myapp.git" | |
default['myapp']['npm_registry'] = 'https://registry.nodejitsu.com' | |