diff --git a/lib/rubber/instance.rb b/lib/rubber/instance.rb index 6ab0fae3a..b74894783 100644 --- a/lib/rubber/instance.rb +++ b/lib/rubber/instance.rb @@ -7,7 +7,7 @@ module Configuration # Contains the ec2 instance configuration defined in instance.yml # class Instance - attr_reader :file, :artifacts + attr_reader :instance_storage, :artifacts include Enumerable include MonitorMixin diff --git a/lib/rubber/recipes/rubber/deploy.rb b/lib/rubber/recipes/rubber/deploy.rb index b9e596b57..db53765cd 100644 --- a/lib/rubber/recipes/rubber/deploy.rb +++ b/lib/rubber/recipes/rubber/deploy.rb @@ -70,7 +70,14 @@ def run_config(options={}) # Need to do this so we can work with staging instances without having to # checkin instance file between create and bootstrap, as well as during a deploy if fetch(:push_instance_config, false) - push_files = [rubber_instances.file] + rubber_cfg.environment.config_files + push_files = rubber_cfg.environment.config_files + + # If we're using a local instance file, push that up. This isn't necessary when storing in S3 or SimpleDB. + if rubber_instances.instance_storage =~ /^file:(.*)/ + location = $1 + push_files << location + end + push_files.each do |file| dest_file = file.sub(/^#{Rubber.root}\/?/, '') put(File.read(file), File.join(path, dest_file), :mode => "+r")