Skip to content
This repository has been archived by the owner on Nov 16, 2018. It is now read-only.

Commit

Permalink
Update to latest omnibus/berkshelf
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Ferrigni committed Aug 10, 2015
1 parent cecb6cb commit c983a4f
Show file tree
Hide file tree
Showing 18 changed files with 234 additions and 108 deletions.
8 changes: 5 additions & 3 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ driver:
cpus: 2
memory: 2048
synced_folders:
- ['../../..', '/home/vagrant/opscode-monitoring']
- ['.', '/home/vagrant/opscode-monitoring']

provisioner:
require_chef_omnibus: 11.8.0
require_chef_omnibus: 12.0.3

platforms:
- name: ubuntu-12.04
Expand All @@ -21,7 +21,9 @@ platforms:

suites:
- name: default
run_list: omnibus::default
run_list:
- omnibus::default
- opscode-monitoring::default
attributes:
omnibus:
build_user: vagrant
Expand Down
2 changes: 2 additions & 0 deletions Berksfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ cookbook 'apt', '~> 2.0'

cookbook 'omnibus'

cookbook 'opscode-monitoring',
path: File.expand_path("cookbooks/opscode-monitoring", File.dirname(__FILE__))
# Uncomment to use the latest version of the Omnibus cookbook from GitHub
# cookbook 'omnibus', github: 'opscode-cookbooks/omnibus'
3 changes: 3 additions & 0 deletions Berksfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
DEPENDENCIES
apt (~> 2.0)
omnibus
opscode-monitoring
path: cookbooks/opscode-monitoring

GRAPH
7-zip (1.0.2)
Expand All @@ -17,6 +19,7 @@ GRAPH
homebrew (~> 1.5)
windows (~> 1.30)
wix (~> 1.1)
opscode-monitoring (0.1.0)
windows (1.31.0)
chef_handler (>= 0.0.0)
wix (1.1.0)
Expand Down
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
source 'https://rubygems.org'

# Install omnibus software
gem 'omnibus', '~> 3.0'
gem 'omnibus-software', github: 'opscode/omnibus-software'
gem 'omnibus', github: 'chef/omnibus'
gem 'omnibus-software', github: 'chef/omnibus-software'
92 changes: 42 additions & 50 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,69 +1,61 @@
GIT
remote: git://github.com/opscode/omnibus-software.git
revision: a2ed1d0395b24c7c47964c9562c27e81144e2ebf
remote: git://github.com/chef/omnibus-software.git
revision: 05e778b04644c5bb1d1e1fb514587361868a61c6
specs:
omnibus-software (0.0.1)
omnibus-software (4.0.0)

GIT
remote: git://github.com/chef/omnibus.git
revision: c9937e6d3729aa72bf45c0bd77a6ff9d4c2c5d09
specs:
omnibus (4.0.0)
chef-sugar (~> 3.0)
cleanroom (~> 1.0)
mixlib-shellout (~> 2.0)
mixlib-versioning
ohai (~> 8.0)
ruby-progressbar (~> 1.7)
thor (~> 0.18)
uber-s3

GEM
remote: https://rubygems.org/
specs:
addressable (2.3.6)
arr-pm (0.0.9)
cabin (> 0)
backports (3.6.0)
cabin (0.6.1)
chef-sugar (1.3.0)
childprocess (0.5.3)
ffi (~> 1.0, >= 1.0.11)
clamp (0.6.3)
ffi (1.9.3)
fpm (1.0.2)
arr-pm (~> 0.0.8)
backports (>= 2.6.2)
cabin (>= 0.6.0)
childprocess
clamp (~> 0.6)
ffi
ftw (~> 0.0.30)
json (>= 1.7.7)
ftw (0.0.39)
addressable
backports (>= 2.6.2)
cabin (> 0)
http_parser.rb (= 0.5.3)
http_parser.rb (0.5.3)
chef-sugar (3.1.1)
cleanroom (1.0.0)
ffi (1.9.10)
ffi-yajl (2.2.2)
libyajl2 (~> 1.2)
ipaddress (0.8.0)
json (1.8.1)
mime-types (1.25.1)
libyajl2 (1.2.0)
mime-types (2.6.1)
mixlib-cli (1.5.0)
mixlib-config (2.1.0)
mixlib-config (2.2.1)
mixlib-log (1.6.0)
mixlib-shellout (1.4.0)
ohai (6.22.0)
mixlib-shellout (2.1.0)
mixlib-versioning (1.1.0)
ohai (8.5.0)
ffi (~> 1.9)
ffi-yajl (~> 2.2)
ipaddress
mime-types (~> 2.0)
mixlib-cli
mixlib-config
mixlib-config (~> 2.0)
mixlib-log
mixlib-shellout
systemu (~> 2.5.2)
yajl-ruby
omnibus (3.1.0)
chef-sugar (~> 1.2)
fpm (~> 1.0.0)
mixlib-config (~> 2.1)
mixlib-shellout (~> 1.3)
ohai (~> 6.12)
thor (~> 0.18)
uber-s3
systemu (2.5.2)
mixlib-shellout (~> 2.0)
rake (~> 10.1)
systemu (~> 2.6.4)
wmi-lite (~> 1.0)
rake (10.4.2)
ruby-progressbar (1.7.5)
systemu (2.6.5)
thor (0.19.1)
uber-s3 (0.2.4)
mime-types (~> 1.17)
yajl-ruby (1.2.0)
uber-s3 (0.1.1)
wmi-lite (1.0.0)

PLATFORMS
ruby

DEPENDENCIES
omnibus (~> 3.0)
omnibus!
omnibus-software!
78 changes: 78 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# These targets are intended to run from a developer workstation, not
# an Omnibus build node. If you want to muck about on the build node
# itself, please use the `build_node.mk` file instead.
#
# e.g., 'make -f build_node.mk $TARGET'

DEV_PLATFORM ?= ubuntu-1204
DEV_PROJECT=omnibus-monitoring

.DEFAULT_GOAL=dev

dev:
kitchen converge default-$(DEV_PLATFORM)

dev-login:
kitchen login default-$(DEV_PLATFORM)

dev-destroy:
kitchen destroy default-$(DEV_PLATFORM)

dev-suspend:
cd .kitchen/kitchen-vagrant/default-$(DEV_PLATFORM) \
&& vagrant suspend

dev-resume:
cd .kitchen/kitchen-vagrant/default-$(DEV_PLATFORM) \
&& vagrant resume

from_scratch: dev-destroy dev

update-omnibus:
bundle update omnibus

update-omnibus-software:
bundle update omnibus-software

update:
bundle update omnibus omnibus-software

extract_dev_cache:
mkdir -p $(DEV_PLATFORM)_git_cache
cd .kitchen/kitchen-vagrant/default-$(DEV_PLATFORM) \
&& vagrant ssh -c 'cp -R /var/cache/omnibus/cache/git_cache /home/vagrant/$(DEV_PROJECT)/$(DEV_PLATFORM)_git_cache'

deploy_dev_cache:
cd .kitchen/kitchen-vagrant/default-$(DEV_PLATFORM) \
&& vagrant ssh -c 'mkdir -p /var/cache/omnibus/cache && rm -rf /var/cache/omnibus/cache/* && cp -R /home/vagrant/$(DEV_PROJECT)/$(DEV_PLATFORM)_git_cache/* /var/cache/omnibus/cache'

# Remove all but the most recent installer package (and its metadata
# file) from the pkg directory. This is used to keep the pkg
# directory small, as it is rsynced into our development Vagrant box
#
# "tail -n+2" starts the listing at the second line (i.e., we don't
# send the most recent file through to the "rm")
#
# Note that "prune" is synonymous with "prune_deb", as Ubuntu is the
# platform we currently target in development; this is the target that
# you'll use on a regular basis. "prune_rpm" is provided for
# completeness, should you ever create CentOS installers.
prune: prune_deb

clear_pkg_cache: clear_pkg_cache_deb

clear_pkg_cache_%:
cd .kitchen/kitchen-vagrant/default-$(DEV_PLATFORM) \
&& vagrant ssh -c 'rm -v -f /var/cache/omnibus/pkg/*.$*'
cd .kitchen/kitchen-vagrant/default-$(DEV_PLATFORM) \
&& vagrant ssh -c 'rm -v -f /var/cache/omnibus/pkg/*.$*.metadata.json'

prune_%:
ls -1t pkg/*.$* | tail -n+2 | xargs rm -v
ls -1t pkg/*.$*.metadata.json | tail -n+2 | xargs rm -v


# Bundle install and build chef-server
dev-build: clear_pkg_cache prune
cd .kitchen/kitchen-vagrant/default-$(DEV_PLATFORM) && \
vagrant ssh --command "cd opscode-omnibus && bundle install && time ./bin/omnibus build chef-server"
3 changes: 1 addition & 2 deletions config/projects/opscode-monitoring.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@
maintainer 'Chef Software, Inc.'
homepage 'http://www.getchef.com'

install_path "/opt/opscode-monitoring"
install_dir "/opt/opscode-monitoring"
build_version Omnibus::BuildVersion.new.semver
build_iteration "1"

# setup version overrides for ruby-2.1 support
# These are from chefdk and we should check for new
# versions when chefdb has stabilized
override :bundler, version: "1.5.3"
override :berkshelf, version: "2-0-stable"
override :libedit, version: "20130712-3.1"
override :libtool, version: "2.4.2"
override :libxml2, version: "2.9.1"
Expand Down
43 changes: 0 additions & 43 deletions config/software/berkshelf2.rb

This file was deleted.

2 changes: 1 addition & 1 deletion config/software/cairo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"PKG_CONFIG_PATH" => "#{install_dir}/embedded/lib/pkgconfig"
}
command cmd, :env => env
command "make -j #{max_build_jobs}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}
command "make -j #{workers}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}
command "make install", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}end


6 changes: 3 additions & 3 deletions config/software/opscode-monitoring-cookbooks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
name "opscode-monitoring-cookbooks"

dependency "rsync"
dependency "berkshelf2"
dependency "berkshelf"

project_name = project.name

source :path => File.expand_path("files/cookbooks/#{project_name}", Omnibus.project_root)
source :path => File.expand_path("files/cookbooks/#{project_name}", Omnibus::Config.project_root)

build do
command "mkdir -p #{install_dir}/embedded/cookbooks"
command "#{install_dir}/embedded/bin/berks install --berksfile=./Berksfile --path=#{install_dir}/embedded/cookbooks",
command "#{install_dir}/embedded/bin/berks vendor --berksfile=./Berksfile #{install_dir}/embedded/cookbooks",
:env => { "RUBYOPT" => nil,
"BUNDLE_BIN_PATH" => nil,
"BUNDLE_GEMFILE" => nil,
Expand Down
2 changes: 1 addition & 1 deletion config/software/opscode-monitoring-ctl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
dependency "rsync"
dependency "omnibus-ctl"

source :path => File.expand_path("files/ctl-commands", Omnibus.project_root)
source :path => File.expand_path("files/ctl-commands", Omnibus::Config.project_root)

build do
block do
Expand Down
2 changes: 1 addition & 1 deletion config/software/opscode-monitoring-scripts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

dependency "rsync"

source :path => File.expand_path("files/scripts", Omnibus.project_root)
source :path => File.expand_path("files/scripts", Omnibus::Config.project_root)

build do
command "mkdir -p #{install_dir}/embedded/bin"
Expand Down
2 changes: 1 addition & 1 deletion config/software/pixman.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"LD_RUN_PATH" => "#{install_dir}/embedded/lib"
}
command cmd, :env => env
command "make -j #{max_build_jobs}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}
command "make -j #{workers}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}
command "make install", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}end


2 changes: 1 addition & 1 deletion config/software/sqlite.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"LD_RUN_PATH" => "#{install_dir}/embedded/lib"
}
command cmd, :env => env
command "make -j #{max_build_jobs}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}
command "make -j #{workers}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}
command "make install", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}end


Loading

0 comments on commit c983a4f

Please sign in to comment.