[dev_setup] Cache Erlang tarballs

To speed up repeated installation on slow links.

Change-Id: I575c76ff167a07c7174d4893c65a6bbc7b9e559d
This commit is contained in:
Jesse Zhang 2012-04-01 23:57:19 -07:00
Родитель a08183b72e
Коммит 5835c95969
3 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -9,3 +9,4 @@ default[:deployment][:domain] = "vcap.me"
default[:deployment][:log_path] = File.join(deployment[:home], "log")
default[:deployment][:profile] = File.expand_path(File.join(ENV["HOME"], ".cloudfoundry_deployment_profile"))
default[:deployment][:local_run_profile] = File.expand_path(File.join(ENV["HOME"], ".cloudfoundry_deployment_local"))
default[:deployment][:setup_cache] = File.join("", "var", "cache", "dev_setup")

Просмотреть файл

@ -13,7 +13,7 @@ node[:postgresql][:host] ||= cf_local_ip
[node[:deployment][:home], File.join(node[:deployment][:home], "deploy"), node[:deployment][:log_path],
File.join(node[:deployment][:home], "sys", "log"), node[:deployment][:config_path],
File.join(node[:deployment][:config_path], "staging")].each do |dir|
File.join(node[:deployment][:config_path], "staging"), node[:deployment][:setup_cache]].each do |dir|
directory dir do
owner node[:deployment][:user]
group node[:deployment][:group]

Просмотреть файл

@ -1,18 +1,17 @@
#
# Cookbook Name:: erlang
# Recipe:: default
#
# Copyright 2011, VMware
# Copyright 2012, VMware
#
#
%w[ build-essential libncurses5-dev openssl libssl-dev ].each do |pkg|
package pkg
end
remote_file File.join("", "tmp", "otp_src_#{node[:erlang][:version]}.tar.gz") do
remote_file File.join(node[:deployment][:setup_cache], "otp_src_#{node[:erlang][:version]}.tar.gz") do
owner node[:deployment][:user]
source node[:erlang][:source]
not_if { ::File.exists?(File.join("", "tmp", "otp_src_#{node[:erlang][:version]}.tar.gz")) }
checksum "849d050b59821e9f2831fee2e3267d84b410eee860a55f6fc9320cc00b5205bd"
end
directory node[:erlang][:path] do