зеркало из https://github.com/mozilla/labs-vcap.git
add node06 runtime with Node.js 0.6.7
* add node06 alongside node (0.4.12) * update node cookbooks to install both, + terminology tweaks * nodejs -> node or node04 where appropriate * bump vcap_staging to 0.1.33 Change-Id: Ifaf0b7233c8f58cea49d15d4bb357a3fc79f612b
This commit is contained in:
Родитель
6f54c0ff02
Коммит
fd79088d1d
|
@ -138,7 +138,7 @@ GEM
|
|||
yajl-ruby (~> 0.8.3)
|
||||
vcap_logging (0.1.3)
|
||||
vcap_stager (0.1.8)
|
||||
vcap_staging (0.1.32)
|
||||
vcap_staging (0.1.33)
|
||||
nokogiri (>= 1.4.4)
|
||||
rake
|
||||
rspec
|
||||
|
|
|
@ -23,7 +23,7 @@ class App < ActiveRecord::Base
|
|||
|
||||
AppStates = %w[STOPPED STARTED]
|
||||
PackageStates = %w[PENDING STAGED FAILED]
|
||||
Runtimes = %w[ruby18 ruby19 java node php erlangR14B02 python26]
|
||||
Runtimes = %w[ruby18 ruby19 java node node06 php erlangR14B02 python26]
|
||||
Frameworks = %w[sinatra rails3 java_web spring grails node php otp_rebar lift wsgi django unknown]
|
||||
|
||||
validates_presence_of :name, :framework, :runtime
|
||||
|
|
|
@ -150,6 +150,8 @@ runtimes:
|
|||
version: 1.9.2
|
||||
node:
|
||||
version: 0.4.12
|
||||
node06:
|
||||
version: 0.6.7
|
||||
java:
|
||||
version: 1.6.0
|
||||
debug_modes:
|
||||
|
|
Двоичные данные
cloud_controller/vendor/cache/vcap_staging-0.1.32.gem → cloud_controller/vendor/cache/vcap_staging-0.1.33.gem
поставляемый
Двоичные данные
cloud_controller/vendor/cache/vcap_staging-0.1.32.gem → cloud_controller/vendor/cache/vcap_staging-0.1.33.gem
поставляемый
Двоичный файл не отображается.
|
@ -58,6 +58,11 @@ runtimes:
|
|||
version: 0.4.12
|
||||
version_flag: '-v'
|
||||
environment:
|
||||
node06:
|
||||
executable: node
|
||||
version: 0.6.7
|
||||
version_flag: '-v'
|
||||
environment:
|
||||
java:
|
||||
executable: java
|
||||
version: 1.6.0
|
||||
|
|
|
@ -113,6 +113,8 @@ runtimes:
|
|||
version: 1.9.2
|
||||
node:
|
||||
version: 0.4.12
|
||||
node06:
|
||||
version: 0.6.7
|
||||
java:
|
||||
version: 1.6.0
|
||||
debug_modes:
|
||||
|
|
|
@ -4,8 +4,12 @@ runtimes:
|
|||
- node:
|
||||
version: '0.4.12'
|
||||
description: 'Node.js'
|
||||
executable: <%= File.join(node[:nodejs][:path], "bin", "node") %>
|
||||
executable: <%= File.join(node[:node04][:path], "bin", "node") %>
|
||||
default: true
|
||||
- node06:
|
||||
version: '0.6.7'
|
||||
description: 'Node.js'
|
||||
executable: <%= File.join(node[:node06][:path], "bin", "node") %>
|
||||
app_servers:
|
||||
detection:
|
||||
- "*.js": '.'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
default[:dea][:config_file] = "dea.yml"
|
||||
default[:dea][:local_route] = nil
|
||||
default[:dea][:runtimes] = ["ruby18", "ruby19", "nodejs", "java", "erlang", "php"]
|
||||
default[:dea][:runtimes] = ["ruby18", "ruby19", "node04", "node06", "java", "erlang", "php"]
|
||||
default[:dea][:logging] = 'debug'
|
||||
default[:dea][:secure] = false
|
||||
default[:dea][:multi_tenant] = true
|
||||
|
|
|
@ -15,6 +15,10 @@ node[:dea][:runtimes].each do |runtime|
|
|||
include_recipe "ruby"
|
||||
when "ruby18"
|
||||
include_recipe "ruby::ruby18"
|
||||
when "node06"
|
||||
include_recipe "node::node06"
|
||||
when "node", "node04"
|
||||
include_recipe "node::node04"
|
||||
else
|
||||
include_recipe "#{runtime}"
|
||||
end
|
||||
|
|
|
@ -59,13 +59,20 @@ runtimes:
|
|||
additional_checks: "-e 'puts RUBY_PATCHLEVEL >= 180'"
|
||||
environment:
|
||||
<% end %>
|
||||
<% if node[:dea][:runtimes].include?("nodejs") %>
|
||||
<% if node[:dea][:runtimes].include?("node04") %>
|
||||
node:
|
||||
executable: <%= File.join(node[:nodejs][:path], "bin", "node") %>
|
||||
executable: <%= File.join(node[:node04][:path], "bin", "node") %>
|
||||
version: 0.4.12
|
||||
version_flag: '-v'
|
||||
environment:
|
||||
<% end %>
|
||||
<% if node[:dea][:runtimes].include?("node06") %>
|
||||
node06:
|
||||
executable: <%= File.join(node[:node06][:path], "bin", "node") %>
|
||||
version: 0.6.7
|
||||
version_flag: '-v'
|
||||
environment:
|
||||
<% end %>
|
||||
<% if node[:dea][:runtimes].include?("java") %>
|
||||
java:
|
||||
executable: java
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
include_attribute "deployment"
|
||||
default[:node04][:version] = "0.4.12"
|
||||
default[:node04][:path] = File.join(node[:deployment][:home], "deploy", "nodes", "node-#{node04[:version]}")
|
||||
default[:node04][:source] = "http://nodejs.org/dist/node-v#{node04[:version]}.tar.gz"
|
|
@ -0,0 +1,4 @@
|
|||
include_attribute "deployment"
|
||||
default[:node06][:version] = "0.6.7"
|
||||
default[:node06][:path] = File.join(node[:deployment][:home], "deploy", "nodes", "node-#{node06[:version]}")
|
||||
default[:node06][:source] = "http://nodejs.org/dist/v#{node06[:version]}/node-v#{node06[:version]}.tar.gz"
|
|
@ -0,0 +1,42 @@
|
|||
module NodeInstall
|
||||
def cf_node_install(node_version, node_source, node_path)
|
||||
%w[ build-essential ].each do |pkg|
|
||||
package pkg
|
||||
end
|
||||
|
||||
remote_file File.join("", "tmp", "node-v#{node_version}.tar.gz") do
|
||||
owner node[:deployment][:user]
|
||||
source node_source
|
||||
not_if { ::File.exists?(File.join("", "tmp", "node-v#{node_version}.tar.gz")) }
|
||||
end
|
||||
|
||||
|
||||
directory node_path do
|
||||
owner node[:deployment][:user]
|
||||
group node[:deployment][:group]
|
||||
mode "0755"
|
||||
recursive true
|
||||
action :create
|
||||
end
|
||||
|
||||
bash "Install Node.js" do
|
||||
cwd File.join("", "tmp")
|
||||
user node[:deployment][:user]
|
||||
code <<-EOH
|
||||
tar xzf node-v#{node_version}.tar.gz
|
||||
cd node-v#{node_version}
|
||||
./configure --prefix=#{node_path}
|
||||
make
|
||||
make install
|
||||
EOH
|
||||
not_if do
|
||||
::File.exists?(File.join(node_path, "bin", "node"))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class Chef::Recipe
|
||||
include NodeInstall
|
||||
end
|
||||
|
|
@ -3,4 +3,4 @@ maintainer_email "support@vmware.com"
|
|||
license "Apache 2.0"
|
||||
description "Installs/Configures nodeJS"
|
||||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
|
||||
version "0.0.1"
|
||||
version "0.0.2"
|
|
@ -0,0 +1,5 @@
|
|||
node_version = node[:node04][:version]
|
||||
node_source = node[:node04][:source]
|
||||
node_path = node[:node04][:path]
|
||||
|
||||
cf_node_install(node_version, node_source, node_path)
|
|
@ -0,0 +1,5 @@
|
|||
node_version = node[:node06][:version]
|
||||
node_source = node[:node06][:source]
|
||||
node_path = node[:node06][:path]
|
||||
|
||||
cf_node_install(node_version, node_source, node_path)
|
|
@ -1,4 +0,0 @@
|
|||
include_attribute "deployment"
|
||||
default[:nodejs][:version] = "0.4.12"
|
||||
default[:nodejs][:path] = File.join(node[:deployment][:home], "deploy", "nodejs")
|
||||
default[:nodejs][:source] = "http://nodejs.org/dist/node-v#{nodejs[:version]}.tar.gz"
|
|
@ -1,40 +0,0 @@
|
|||
#
|
||||
# Cookbook Name:: nodejs
|
||||
# Recipe:: default
|
||||
#
|
||||
# Copyright 2011, VMware
|
||||
#
|
||||
#
|
||||
%w[ build-essential ].each do |pkg|
|
||||
package pkg
|
||||
end
|
||||
|
||||
remote_file File.join("", "tmp", "node-v#{node[:nodejs][:version]}.tar.gz") do
|
||||
owner node[:deployment][:user]
|
||||
source node[:nodejs][:source]
|
||||
not_if { ::File.exists?(File.join("", "tmp", "node-v#{node[:nodejs][:version]}.tar.gz")) }
|
||||
end
|
||||
|
||||
|
||||
directory node[:nodejs][:path] do
|
||||
owner node[:deployment][:user]
|
||||
group node[:deployment][:group]
|
||||
mode "0755"
|
||||
recursive true
|
||||
action :create
|
||||
end
|
||||
|
||||
bash "Install Nodejs" do
|
||||
cwd File.join("", "tmp")
|
||||
user node[:deployment][:user]
|
||||
code <<-EOH
|
||||
tar xzf node-v#{node[:nodejs][:version]}.tar.gz
|
||||
cd node-v#{node[:nodejs][:version]}
|
||||
./configure --prefix=#{node[:nodejs][:path]}
|
||||
make
|
||||
make install
|
||||
EOH
|
||||
not_if do
|
||||
::File.exists?(File.join(node[:nodejs][:path], "bin", "node"))
|
||||
end
|
||||
end
|
|
@ -7,7 +7,7 @@ dea:
|
|||
- ruby18
|
||||
- ruby19
|
||||
- java
|
||||
- nodejs
|
||||
- node
|
||||
jobs:
|
||||
install:
|
||||
- all
|
||||
|
|
|
@ -27,5 +27,5 @@ jobs:
|
|||
runtimes:
|
||||
- ruby18
|
||||
- ruby19
|
||||
- nodejs
|
||||
- node
|
||||
- java
|
||||
|
|
|
@ -8,7 +8,7 @@ gem 'yajl-ruby', '>= 0.7.9'
|
|||
|
||||
gem 'vcap_common', '~> 1.0.3'
|
||||
gem 'vcap_logging', '>= 0.1.3'
|
||||
gem 'vcap_staging', '~> 0.1.32'
|
||||
gem 'vcap_staging', '~> 0.1.33'
|
||||
|
||||
group :test do
|
||||
gem 'rspec'
|
||||
|
|
|
@ -43,7 +43,7 @@ GEM
|
|||
thin (~> 1.3.1)
|
||||
yajl-ruby (~> 0.8.3)
|
||||
vcap_logging (0.1.3)
|
||||
vcap_staging (0.1.32)
|
||||
vcap_staging (0.1.33)
|
||||
nokogiri (>= 1.4.4)
|
||||
rake
|
||||
rspec
|
||||
|
@ -66,6 +66,6 @@ DEPENDENCIES
|
|||
sinatra
|
||||
vcap_common (~> 1.0.3)
|
||||
vcap_logging (>= 0.1.3)
|
||||
vcap_staging (~> 0.1.32)
|
||||
vcap_staging (~> 0.1.33)
|
||||
webmock
|
||||
yajl-ruby (>= 0.7.9)
|
||||
|
|
Двоичные данные
stager/vendor/cache/vcap_staging-0.1.32.gem → stager/vendor/cache/vcap_staging-0.1.33.gem
поставляемый
Двоичные данные
stager/vendor/cache/vcap_staging-0.1.32.gem → stager/vendor/cache/vcap_staging-0.1.33.gem
поставляемый
Двоичный файл не отображается.
|
@ -6,6 +6,10 @@ runtimes:
|
|||
description: 'Node.js'
|
||||
executable: node
|
||||
default: true
|
||||
- node06:
|
||||
version: '0.6.7'
|
||||
description: 'Node.js'
|
||||
executable: node
|
||||
app_servers:
|
||||
detection:
|
||||
- "*.js": '.'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module VCAP
|
||||
module Staging
|
||||
VERSION = '0.1.32'
|
||||
VERSION = '0.1.33'
|
||||
end
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче