-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into ha-feature-trusty
- Loading branch information
Showing
17 changed files
with
219 additions
and
31 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
default[:kerl][:checksum] = { | ||
'17.0' => '48fc017ed0e9a6f65c94c40c62d4b7daa1cab264925ec6746005b77e4c880453', | ||
'17.1' => '38a069e7419b4ad9bdeb992bf2721055492deb32ff6170514a4b9e8ee4a4a5c4', | ||
'17.3' => '1284b182bfc185d5f094d70e21c566f0cd400a300e79779deed5b5a3d8d743d3', | ||
'17.4' => 'c43dd4cefc2337663806b7e474d9f0284131d582d598aae313b0d40d622238e4', | ||
'R14B02' => '6b460f00467b800d2b4a0b193dc37fe7b5b6b0cf6dd44e55c91cdefcceb98450', | ||
'R14B03' => '84711d4807bc6d36bc4ff378758d3f485b98c728ed30e55983069d5acdc54df7', | ||
'R14B04' => 'bd710f894c2a9aae3ba872dfb0c19dc7b98cb1804e62b28f9884e83b0a7a562e', | ||
'R15B01' => 'c37fbb5f2f0270c04d15c1a5b8206524be84398f4bc17791833f3b12433573ff', | ||
'R15B02' => '5419ff69848299d224010d06dd0119ad513bbb0ea4bc79d6825f55016eade323', | ||
'R15B03' => 'b5281eb941d6bfe03796642fb3321ff9557081372478f9914f59d8968b5b9ac7', | ||
'R15B' => '95499c0e40bc8acb08431310252f0aa083f37bfba7d5abe6e1efd3da8b3de917', | ||
'R16B01' => '7f11ba06714314c21472a09fb7fb24efca5bca838deb626f661ba01f3ac71388', | ||
'R16B02' => '5d898af83587c0b6827686f55d81ae6e732f7b6f85ab41e2193897bab566c887', | ||
'R16B03-1' => '0cd50a2c88f16371ddef457465d11008b6a8749abaf04e9e91f4e93557fc3beb', | ||
'R16B03' => '3a093c7f3e68b552b0cc430fc0db06567e2696d11b8edb8d7e066dcb9a5c29d0', | ||
'R16B' => '6fdc6ae988adb3e68da3a91180cc0b6a3461701221e36c6d4b2cf4ce50c09547' | ||
} | ||
|
||
default[:kerl][:releases] = default[:kerl][:checksum].keys | ||
|
||
default[:kerl][:path] = "/usr/local/bin/kerl" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
include_attribute "kerl::source" | ||
include_attribute "kerl::binary" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
# | ||
# Cookbook Name:: kerl | ||
# Recipe:: binary | ||
# | ||
# Copyright 2011-2012, Michael S. Klishin, Ward Bekker | ||
# Copyright 2015, Travis CI GmbH | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
include_recipe "libreadline" | ||
include_recipe "libssl" | ||
include_recipe "libncurses" | ||
|
||
package "curl" do | ||
action :install | ||
end | ||
|
||
package "unixodbc-dev" do | ||
action :install | ||
end | ||
|
||
installation_root = "/home/#{node.travis_build_environment.user}/otp" | ||
|
||
directory(installation_root) do | ||
owner node.travis_build_environment.user | ||
group node.travis_build_environment.group | ||
mode "0755" | ||
action :create | ||
end | ||
|
||
remote_file(node.kerl.path) do | ||
source "https://raw.githubusercontent.com/spawngrid/kerl/master/kerl" | ||
mode "0755" | ||
end | ||
|
||
|
||
home = "/home/#{node.travis_build_environment.user}" | ||
env = { | ||
'HOME' => home, | ||
'USER' => node.travis_build_environment.user, | ||
'KERL_DISABLE_AGNER' => 'yes', | ||
"KERL_BASE_DIR" => "#{home}/.kerl", | ||
'CPPFLAGS' => "#{ENV['CPPFLAGS']} -DEPMD6" | ||
} | ||
|
||
case [node[:platform], node[:platform_version]] | ||
when ["ubuntu", "11.04"] then | ||
# fixes compilation with Ubuntu 11.04 zlib. MK. | ||
env["KERL_CONFIGURE_OPTIONS"] = "--enable-dynamic-ssl-lib --enable-hipe" | ||
end | ||
|
||
# updates list of available releases. Needed for kerl to recognize | ||
# R15B, for example. MK. | ||
execute "erlang.releases.update" do | ||
command "#{node.kerl.path} update releases" | ||
|
||
user node.travis_build_environment.user | ||
group node.travis_build_environment.group | ||
|
||
environment(env) | ||
|
||
# run when kerl script is downloaded & installed | ||
subscribes :run, resources(:remote_file => node.kerl.path) | ||
end | ||
|
||
cookbook_file "#{node.travis_build_environment.home}/.erlang.cookie" do | ||
owner node.travis_build_environment.user | ||
group node.travis_build_environment.group | ||
mode 0600 | ||
|
||
source "erlang.cookie" | ||
end | ||
|
||
cookbook_file "#{node.travis_build_environment.home}/.build_plt" do | ||
owner node.travis_build_environment.user | ||
group node.travis_build_environment.group | ||
mode 0700 | ||
|
||
source "build_plt" | ||
end | ||
|
||
|
||
node.kerl.releases.each do |rel| | ||
|
||
require 'tmpdir' | ||
|
||
local_archive = File.join(Dir.tmpdir, "erlang-#{rel}-x86_64.tar.bz2") | ||
|
||
remote_file local_archive do | ||
source "https://s3.amazonaws.com/travis-otp-releases/#{node.platform}/#{node.platform_version}/erlang-#{rel}-x86_64.tar.bz2" | ||
checksum node.kerl.checksum[rel] | ||
end | ||
|
||
bash "Expand Erlang #{rel} archive" do | ||
user node.travis_build_environment.user | ||
group node.travis_build_environment.group | ||
|
||
code <<-EOF | ||
tar xjf #{local_archive} --directory #{File.join(node.travis_build_environment.home, 'otp')} | ||
EOF | ||
|
||
not_if File.exist?(File.join(node.travis_build_environment.home, 'otp', rel)) | ||
end | ||
|
||
end |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
default[:kiex][:elixir_versions] = ['1.0.2'] | ||
default[:kiex][:default_elixir_version] = '1.0.2' | ||
default[:kiex][:default_elixir_version] = '1.0.3' | ||
default[:kiex][:elixir_versions] = [ default[:kiex][:default_elixir_version] ] | ||
# we assume that required OTP releases are installed by 'kerl' cookbook | ||
default[:kiex][:required_otp_release_for] = { | ||
'1.0.2' => '17.4' | ||
'1.0.3' => '17.4' | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
include_recipe "bison" | ||
include_recipe "libreadline" | ||
|
||
include_recipe "phpenv" | ||
include_recipe "phpbuild" | ||
|
||
# This recipe downloads our own 5.2.17 archive for Precise | ||
|
||
if node[:platform] == 'ubuntu' && node[:platform_version] == '12.04' | ||
require 'tmpdir' | ||
|
||
local_archive = File.join(Dir.tmpdir, 'php-5.2.17.tar.bz2') | ||
|
||
remote_file local_archive do | ||
source 'https://s3.amazonaws.com/travis-php-archives/php-5.2.17.tar.bz2' | ||
checksum '5deb018f585fb40d781917e6cd744f3ecaf8aabbc6eaf53d4f1300e61d8fd915' | ||
end | ||
|
||
bash 'Expand PHP 5.2.17 archive' do | ||
user node.travis_build_environment.user | ||
group node.travis_build_environment.group | ||
|
||
code <<-EOF | ||
tar xjf #{local_archive} --directory #{File.join(node.travis_build_environment.home, '.phpenv', 'versions')} | ||
EOF | ||
|
||
not_if File.exist?(File.join(node.travis_build_environment.home, '.phpenv', 'versions', '5.2.17')) | ||
end | ||
end |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,6 @@ | |
|
||
|
||
python_pip "virtualenv" do | ||
version '12.0.6' | ||
version '12.0.7' | ||
action :install | ||
end |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
recipes: | ||
- kerl | ||
- kerl::binary | ||
- kiex | ||
- rebar | ||
- system_info | ||
|
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
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
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
41 changes: 32 additions & 9 deletions
41
worker_host/travis_worker/templates/default/sv-travis-worker-run.erb
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,43 @@ | ||
#!/bin/bash | ||
# vim:filetype=sh | ||
# Chef manages this file on <%= node.name %> <3 <3 <3 | ||
exec 2>&1 | ||
<% if @options[:docker] %> | ||
for lang in <%= @options[:docker_languages].join(" ") %>; do | ||
docker pull quay.io/travisci/travis-$lang:latest || { echo "Pulling $lang image failed"; exit 1; } | ||
docker tag quay.io/travisci/travis-$lang:latest travis:$lang || { echo "Tagging $lang image failed"; exit 1; } | ||
done | ||
<% end %> | ||
cd <%= @options[:worker_home] %> | ||
|
||
if [[ -f /etc/default/travis-worker-chef ]] ; then | ||
set -a | ||
source /etc/default/travis-worker-chef | ||
set +a | ||
fi | ||
|
||
if [[ -f /etc/default/travis-worker ]] ; then | ||
set -a | ||
source /etc/default/travis-worker | ||
set +a | ||
fi | ||
|
||
: ${TRAVIS_WORKER_DOCKER_LANGUAGES:=<%= @options[:docker_languages].join(' ') %>} | ||
: ${TRAVIS_WORKER_HOME:=<%= @options[:worker_home] %>} | ||
: ${TRAVIS_WORKER_USER:=<%= @options[:user] %>} | ||
: ${TRAVIS_WORKER_GROUP:=<%= @options[:group] %>} | ||
: ${TRAVIS_WORKER_JRUBY:=<%= @options[:jruby] %>} | ||
: ${TRAVIS_WORKER_DOCKER_PRESEED_ENABLED:=false} | ||
: ${TRAVIS_WORKER_DOCKER_PRESEED_TOUCHFILE:=/mnt/docker/.preseeded} | ||
: ${TRAVIS_WORKER_DOCKER_PRESEED_WAIT_SLEEP:=30} | ||
|
||
if [[ $TRAVIS_WORKER_DOCKER_PRESEED_ENABLED = true && ! -f "$TRAVIS_WORKER_DOCKER_PRESEED_TOUCHFILE" ]] ; then | ||
echo "Docker preseed not done yet" | ||
sleep "${TRAVIS_WORKER_DOCKER_PRESEED_WAIT_SLEEP}" | ||
exit 1 | ||
fi | ||
|
||
for lang in ${TRAVIS_WORKER_DOCKER_LANGUAGES} ; do | ||
docker pull "quay.io/travisci/travis-${lang}:latest" || { echo "Pulling ${lang} image failed"; exit 1; } | ||
docker tag "quay.io/travisci/travis-${lang}:latest" "travis:${lang}" || { echo "Tagging ${lang} image failed"; exit 1; } | ||
done | ||
|
||
cd "${TRAVIS_WORKER_HOME}" | ||
|
||
exec chpst \ | ||
-u <%= @options[:user] %>:<%= @options[:group] %> \ | ||
/usr/local/bin/signal_wrapper <%= @options[:jruby] %> \ | ||
-u "${TRAVIS_WORKER_USER}:${TRAVIS_WORKER_GROUP}" \ | ||
/usr/local/bin/signal_wrapper "${TRAVIS_WORKER_JRUBY}" \ | ||
./bin/thor travis:worker:boot |