Commit 3efe90f0 authored by Christopher Huhn's avatar Christopher Huhn 🥚
Browse files

Merge branch 'master' into 1-drop-dependency-on-sys

parents 2bebfb2a 0106ae90
---
driver:
name: docker
privileged: true
provision_command:
# https://github.com/test-kitchen/kitchen-docker/issues/285:
- mkdir -p /run/sshd
- apt-get -qq -y install chef || true
- apt-get -qq -y install exim4-base || true
- apt-get -qq -y install shellcheck || true
require_chef_omnibus: false
provisioner:
log_level: warn
platforms:
- name: debian-stretch
- name: debian-jessie
- name: debian-wheezy
# wheezy chef package is 10.12
driver:
require_chef_omnibus: 12.0.3
- name: debian-buster
- name: debian-bullseye
- name: ubuntu-18.04
- name: centos-7
driver:
require_chef_omnibus: 14
provision_command:
- yum install -y rubygems
......@@ -24,6 +24,13 @@ verifier:
# sudo apt-get -q -y install bundler ruby-serverspec
platforms:
- name: buster64
driver:
box: debian/buster64
provider: libvirt
provision: true
vagrantfiles:
- vagrant.rb
- name: stretch64
driver:
box: debian/stretch64
......
---
language: ruby
cache: bundler
sudo: required
dist: xenial
services: docker
# bundler in the travis image is too old:
before_install:
- gem install bundler
bundler_args: --without vagrant
before_script:
- bundle exec kitchen list
env:
global:
- KITCHEN_LOCAL_YAML=.kitchen.docker.yml
matrix:
- CHEF_VERSION=12.3
- CHEF_VERSION=12.14
- CHEF_VERSION=13
- CHEF_VERSION=14
rvm:
# - system # does not work with `gem install bundler`
- 2.3
- 2.5
matrix:
exclude:
- rvm: 2.3
env: CHEF_VERSION=14
stages:
- rubocop
- foodcritic
- test
- kitchen
# this is the script for the test stage, where the matrix is expanded
script: bundle exec rake chefspec
jobs:
fast_finish: true
include:
- stage: rubocop
script: bundle exec rake rubocop
- stage: foodcritic
script: bundle exec rake foodcritic
- stage: kitchen
env: KITCHEN_PLATFORM=debian-stretch
script: bundle exec kitchen test $KITCHEN_PLATFORM
- env: KITCHEN_PLATFORM=debian-jessie
script: bundle exec kitchen test $KITCHEN_PLATFORM
- env: KITCHEN_PLATFORM=debian-buster
script: bundle exec kitchen test $KITCHEN_PLATFORM
- env: KITCHEN_PLATFORM=debian-wheezy
script: bundle exec kitchen test $KITCHEN_PLATFORM
- env: KITCHEN_PLATFORM=ubuntu-18.04
script: bundle exec kitchen test $KITCHEN_PLATFORM
- env: KITCHEN_PLATFORM=centos-7
script: bundle exec kitchen test $KITCHEN_PLATFORM
allow_failures:
- rvm: 2.4
- env: CHEF_VERSION=14
- env: CHEF_VERSION=13
- env: KITCHEN_PLATFORM=centos-7
- stage: test
source 'http://rubygems.org'
group :development do
gem 'rake'
gem 'rubocop' #, '~> 0.49'
# Foodcritic 13 drops Chef 12 compatibility:
gem 'foodcritic', '< 13'
# Newer versions break foodcritic:
# https://github.com/Foodcritic/foodcritic/commit/28f6684
gem 'cucumber-core', '>= 1.3', '< 4.0'
gem 'berkshelf'
# take Chef version from environment, fall back to newest version:
gem 'chef', (ENV['CHEF_VERSION']) ? "~> #{ENV['CHEF_VERSION']}" : "< 15"
gem 'chefspec', '< 7.2'
gem 'chefspec-ohai'
# test-kitchen pulls Chef's crappy license-acceptance gem
gem 'test-kitchen', '< 2.2'
# gem 'guard-rspec', require: false
# gem 'libnotify'
# gem "serverspec"
end
group :travis do
gem 'kitchen-docker'
end
group :vagrant do
gem 'vagrant'
gem 'kitchen-vagrant'
gem 'vagrant-libvirt'
gem 'vagrant-berkshelf'
end
......@@ -2,7 +2,6 @@ default[:cvmfs][:client][:default_local][:default_domain] = node['domain']
default[:cvmfs][:client][:default_local][:cache_base] = '/var/cache/cvmfs'
default[:cvmfs][:client][:default_local][:quota_limit] = 20000
default[:cvmfs][:client][:default_local][:max_ttl] = 30
default[:cvmfs][:client][:config_d] = Mash.new
if node['platform'] == 'debian'
case node['platform_version']
......@@ -12,3 +11,6 @@ if node['platform'] == 'debian'
default['cvmfs']['client']['auto.cvmfs'] = '/etc/auto.cvmfs'
end
end
default['cvmfs']['client']['domain_d'] = {}
default['cvmfs']['client']['config_d'] = {}
name "cernvm-fs"
maintainer "GSI, HPC Department"
maintainer 'GSI Helmholtzzentrum fuer Schwerionenforschung GmbH'
maintainer_email "hpc@gsi.de"
license "Apache 2.0"
description "Deploy and configure CernVM-FS clients and servers."
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version "0.3.0"
source_url 'https://git.gsi.de:chef/cookbooks/cernvm-fs/'
issues_url 'https://git.gsi.de:chef/cookbooks/cernvm-fs/issues'
version "0.4.0"
depends "sys", '>= 1.51.0'
depends "apache2", '< 6.0'
supports "debian", ">= 7.0"
......@@ -2,7 +2,7 @@
# Cookbook Name:: cernvm-fs
# Recipe:: client
#
# Copyright 2013-2019 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
# Copyright 2013-2020 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
#
# Authors:
# Matteo Dessalvi <m.dessalvi@gsi.de>
......@@ -73,19 +73,43 @@ template '/etc/cvmfs/default.local' do
)
end
#
# Domain configs:
#
directory '/etc/cvmfs/domain.d'
node['cvmfs']['client']['domain_d'].each do |repo, attrs|
# node attributes are strings
config = { 'http_proxy' => 'DIRECT' }
config.merge!(attrs)
template "/etc/cvmfs/domain.d/#{repo}.conf" do
source 'etc_cvmfs_config.d_generic.conf.erb'
mode "0644"
variables(config: config)
end
end
#
# Repository configs
#
directory '/etc/cvmfs/config.d'
# Each repository needs its configuration file
unless node['cvmfs']['client']['config_d'].empty?
node['cvmfs']['client']['config_d'].each do |repo,config|
config['http_proxy'] = 'DIRECT' unless config.has_key? 'http_proxy'
node['cvmfs']['client']['config_d'].each do |repo, attrs|
template "/etc/cvmfs/config.d/#{repo}.conf" do
source 'etc_cvmfs_config.d_generic.conf.erb'
mode "0644"
variables( :repo => repo, :config => config )
end
# node attributes are strings
config = { 'http_proxy' => 'DIRECT' }
config.merge!(attrs)
template "/etc/cvmfs/config.d/#{repo}.conf" do
source 'etc_cvmfs_config.d_generic.conf.erb'
mode "0644"
variables(config: config)
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment