Skip to content

Commit

Permalink
Merge pull request #17 from myplanetdigital/official-jenkins
Browse files Browse the repository at this point in the history
Moves to using official opscode jenkins cookbook head.

- Updates to chef 11 as pre-req.
- Moves to official head for knife-solo gem.
- Moves to official head for chef-solo-search cookbook.
  • Loading branch information
Patrick Connolly committed May 13, 2013
2 parents 9ade3d8 + 46bcf03 commit 129329c
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 46 deletions.
8 changes: 5 additions & 3 deletions .chef/knife.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
knife[:image] = 'd531a2dd-7ae9-4407-bb5a-e5ea03303d98' # Ubuntu 10.04 LTS

# knife-solo
knife[:solo] = true
knife[:solo_path] = '~/chef-solo'
knife[:omnibus_version] = '10.16.6'
knife[:bootstrap_version] = '11.4.4'

data_bag_path "data_bags"
cookbook_path [ "cookbooks", "cookbooks-override" ]
role_path "roles"
6 changes: 3 additions & 3 deletions Cheffile
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ cookbook "bash",
# PR: https://github.com/mszoernyi/chef-bash/pull/1
:ref => "feature/bash_profile-resource"
cookbook "chef-solo-search",
:git => "https://github.com/myplanetdigital/chef-solo-search.git"
:git => "https://github.com/edelight/chef-solo-search.git",
:ref => "0.4.0"
cookbook "drush",
:git => "https://github.com/msonnabaum/chef-drush.git"
cookbook "git"
cookbook "jenkins",
:git => "https://github.com/myplanetdigital/chef-jenkins.git",
:ref => "GH-11-basic-auth-opt"
:git => "https://github.com/opscode-cookbooks/jenkins.git"
cookbook "oh-my-zsh"
cookbook "openssh"
cookbook "php"
Expand Down
46 changes: 29 additions & 17 deletions Cheffile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,23 @@ SITE
runit (~> 1.0)
windows (>= 0.0.0)
yum (>= 0.0.0)
java (1.10.0)
iptables (0.12.0)
java (1.10.2)
windows (>= 0.0.0)
mysql (2.1.2)
build-essential (>= 0.0.0)
openssl (>= 0.0.0)
nginx (1.6.0)
apt (>= 0.0.0)
build-essential (>= 0.0.0)
ohai (>= 1.1.4)
runit (>= 0.0.0)
yum (>= 0.0.0)
oh-my-zsh (0.4.2)
git (>= 0.0.0)
user (>= 0.0.0)
zsh (>= 0.0.0)
ohai (1.1.8)
openssh (1.1.4)
openssl (1.0.2)
php (1.1.8)
Expand All @@ -40,6 +48,13 @@ SITE
yum (2.1.0)
zsh (1.0.0)

GIT
remote: https://github.com/edelight/chef-solo-search.git
ref: 0.4.0
sha: 5ba022d02c51cafc7b5323c1209fbb7936e4f60b
specs:
chef-solo-search (0.4.0)

GIT
remote: https://github.com/msonnabaum/chef-drush.git
ref: master
Expand All @@ -63,15 +78,6 @@ GIT
specs:
bash (0.0.0)

GIT
remote: https://github.com/myplanetdigital/chef-jenkins.git
ref: GH-11-basic-auth-opt
sha: c335e0dd27dd2650f0417d29ff223ec79fc1282a
specs:
jenkins (0.6.3)
java (>= 0.0.0)
runit (>= 0.0.0)

GIT
remote: https://github.com/myplanetdigital/chef-phpcs.git
ref: master
Expand All @@ -80,13 +86,6 @@ GIT
phpcs (1.0.0)
php (>= 0.0.0)

GIT
remote: https://github.com/myplanetdigital/chef-solo-search.git
ref: master
sha: 743a0d2c6bbfd6d595b8088457b6a7fecb3a6729
specs:
chef-solo-search (0.4.0)

GIT
remote: https://github.com/myplanetdigital/chef-user.git
ref: 23-plaintext-pwd
Expand All @@ -102,6 +101,19 @@ GIT
xdebug (0.0.1)
php (>= 0.0.0)

GIT
remote: https://github.com/opscode-cookbooks/jenkins.git
ref: master
sha: 7f3e6e6a3f750234d3371353245780e99392f64a
specs:
jenkins (0.8.0)
apache2 (>= 0.0.0)
apt (>= 0.0.0)
iptables (>= 0.0.0)
java (>= 0.0.0)
nginx (>= 0.0.0)
runit (>= 1.0.0)

GIT
remote: https://github.com/travis-ci/travis-cookbooks.git
path: ci_environment/xserver
Expand Down
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ gem "hub"
gem "jenkins"
gem "json"
gem 'knife-solo',
:git => 'https://github.com/tmatilai/knife-solo.git',
:ref => 'knife-bootstrap-solo'
:git => 'https://github.com/matschaffer/knife-solo.git'
gem "knife-rackspace"
gem "librarian"
gem "octokit"
Expand Down
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
GIT
remote: https://github.com/tmatilai/knife-solo.git
revision: f2f6e999f1f7cbaba16affa8dcc12929e36c9ab4
ref: knife-bootstrap-solo
remote: https://github.com/matschaffer/knife-solo.git
revision: 9be2dbe01be3606bf2eff6c49572e46a8496f192
specs:
knife-solo (0.3.0.pre3)
knife-solo (0.3.0.pre4)
chef (>= 10.12)
erubis (~> 2.7.0)
net-ssh (>= 2.2.2, < 3.0)

GEM
Expand Down
16 changes: 7 additions & 9 deletions cookbooks-override/inception/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,35 +37,33 @@
action :modify
end

log "restarting jenkins" do
notifies :stop, "service[jenkins]", :immediately
notifies :create, "ruby_block[netstat]", :immediately
notifies :start, "service[jenkins]", :immediately
notifies :create, "ruby_block[block_until_operational]", :immediately
action :nothing
file "/etc/shadow" do
mode "0644"
end

# Set global Jenkins configs
%w{
hudson.plugins.disk_usage.DiskUsageProjectActionFactory.xml
jobConfigHistory.xml
}.each do |filename|
template "#{node['jenkins']['server']['home']}/#{filename}" do
template "#{node['jenkins']['server']['data_dir']}/#{filename}" do
source "#{filename}.erb"
owner node['jenkins']['server']['user']
group node['jenkins']['server']['group']
mode "0644"
end
end

template "#{node['jenkins']['server']['home']}/config.xml" do
template "#{node['jenkins']['server']['data_dir']}/config.xml" do
source "jenkins-config.xml.erb"
owner node['jenkins']['server']['user']
group node['jenkins']['server']['group']
mode "0644"
notifies :write, "log[restarting jenkins]", :immediately
notifies :restart, "service[jenkins]", :immediately
notifies :create, "ruby_block[block_until_operational]", :immediately
end

# Create jenkins home directory.
directory node['jenkins']['node']['home'] do
owner node['jenkins']['server']['user']
group node['jenkins']['server']['group']
Expand Down
4 changes: 3 additions & 1 deletion roles/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
# Import configs from YAML file.
yml = YAML.load_file "#{current_dir}/config.yml"

::Chef::Role.send(:include, Chef::Mixin::Language)
# Allow databag search in role file.
::Chef::Role.send(:include, Chef::DSL::DataQuery)

name "base"
description "The base role for servers."
run_list(
"recipe[apt]",
"recipe[chef-solo-search]",
"recipe[sudo]",
"recipe[git]",
"recipe[zsh]",
Expand Down
2 changes: 2 additions & 0 deletions roles/dev_tools.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name "dev_tools"
description "Development tools for Jenkins server."
run_list(
"recipe[bash]",
"recipe[phpcs::drupal_standard]",
"recipe[xserver]",
"recipe[ark]",
"recipe[inception::casperjs]",
)
default_attributes({
Expand Down
2 changes: 1 addition & 1 deletion roles/jenkins.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"recipe[php::write_inis]",
"recipe[drush::utils]",
"recipe[drush::make]",
"recipe[jenkins]",
"recipe[jenkins::server]",
"recipe[jenkins::proxy_apache2]",
"role[dev_tools]",
"recipe[inception]",
Expand Down
6 changes: 0 additions & 6 deletions solo.rb

This file was deleted.

0 comments on commit 129329c

Please sign in to comment.