Commit 389b137a authored by Christopher Huhn's avatar Christopher Huhn 🐣
Browse files

Merge branch 'master' into upstream_packages

parents 3f53c55f 0106ae90
...@@ -2,4 +2,6 @@ default[:cvmfs][:client][:default_local][:default_domain] = node['domain'] ...@@ -2,4 +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][:cache_base] = '/var/cache/cvmfs'
default[:cvmfs][:client][:default_local][:quota_limit] = 20000 default[:cvmfs][:client][:default_local][:quota_limit] = 20000
default[:cvmfs][:client][:default_local][:max_ttl] = 30 default[:cvmfs][:client][:default_local][:max_ttl] = 30
default[:cvmfs][:client][:config_d] = Mash.new
default['cvmfs']['client']['domain_d'] = {}
default['cvmfs']['client']['config_d'] = {}
default['cvmfs']['version'] = '' default[:cvmfs][:version] = String.new
default['cvmfs']['keys'] = {} default[:cvmfs][:keys] = Mash.new
default['cvmfs']['client']['package'] = 'cvmfs'
name "cernvm-fs" name "cernvm-fs"
maintainer "GSI, HPC Department" maintainer 'GSI Helmholtzzentrum fuer Schwerionenforschung GmbH'
maintainer_email "hpc@gsi.de" maintainer_email "hpc@gsi.de"
license "Apache 2.0" license "Apache 2.0"
description "Deploy and configure CernVM-FS clients and servers." description "Deploy and configure CernVM-FS clients and servers."
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) 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 "sys", '>= 1.51.0'
depends "apache2", '< 6.0' depends "apache2", '< 6.0'
supports "debian", ">= 7.0" supports "debian", ">= 7.0"
...@@ -2,49 +2,34 @@ ...@@ -2,49 +2,34 @@
# #
# #
# # Deploy the APT key for `gsi-repository` package 'gnupg'
# sys_apt_key "Deploy APT key for the GSI package repository" do
# key <<KEY # Deploy the APT key for `gsi-repository`
# -----BEGIN PGP PUBLIC KEY BLOCK----- sys_apt_key "Deploy APT key for the GSI package repository" do
# Version: GnuPG v1.4.12 (GNU/Linux) key <<KEY
-----BEGIN PGP PUBLIC KEY BLOCK-----
# mQENBFidegQBCADOdF8kqd2KtAdc1kF5I/bvKpb9urStw93EKua6YoalYmCYMNfg Version: GnuPG v1.4.12 (GNU/Linux)
# x9pq9Np+dqr52ph/LN9AWICe3oHwUGRKU3vE9S15LXrKtgdmAYedEJKIliLt8H9i
# BZF2Ma0JK/Nk5mMzK0W1n2gcDEg1GmK+/XWYzKCMsdearrIU8LJ9+iQHBEydLJIO mQENBFidegQBCADOdF8kqd2KtAdc1kF5I/bvKpb9urStw93EKua6YoalYmCYMNfg
# vqP2pvsGWxj5ogY9X+q23+ZzzHgH6SMIpwM+iKQa22bm1nHm8J9eWMJBKBFz1sX4 x9pq9Np+dqr52ph/LN9AWICe3oHwUGRKU3vE9S15LXrKtgdmAYedEJKIliLt8H9i
# dWQvhkY6NgUg6unGDWF+RLOJhT31fPMiEB4vB6tKXSI0PYHNLrpERgG8Sl4/EFdk BZF2Ma0JK/Nk5mMzK0W1n2gcDEg1GmK+/XWYzKCMsdearrIU8LJ9+iQHBEydLJIO
# ONHcfjmFnWbQ/X9udtRXwBmFvDNfZ0hYI41nABEBAAG0M0dTSSByZXBvc2l0b3J5 vqP2pvsGWxj5ogY9X+q23+ZzzHgH6SMIpwM+iKQa22bm1nHm8J9eWMJBKBFz1sX4
# IHNpZ25pbmcga2V5IDIwMTcgPGxpbnV4Z3JvdXBAZ3NpLmRlPokBPQQTAQgAJwUC dWQvhkY6NgUg6unGDWF+RLOJhT31fPMiEB4vB6tKXSI0PYHNLrpERgG8Sl4/EFdk
# WJ16BAIbAwUJCWYBgAULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRCrZFFowbvN ONHcfjmFnWbQ/X9udtRXwBmFvDNfZ0hYI41nABEBAAG0M0dTSSByZXBvc2l0b3J5
# DkGyCACtYMTeSuyls2PzbYOgO3PRnOCdG8D+iqwAvLI8BL8HNITobm9bIIwTslwu IHNpZ25pbmcga2V5IDIwMTcgPGxpbnV4Z3JvdXBAZ3NpLmRlPokBPQQTAQgAJwUC
# 0QvZc8Jb53LL1USF9uSmqCK0miHexH4Gaybc1WFM1o4xvqzneQlVOWyrq8oqKEB6 WJ16BAIbAwUJCWYBgAULCQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRCrZFFowbvN
# wBuHEbpCi+9i8fIfnVbKd3r+IbE/9W5JcSmWDItywz7ei1v1/ZXb27/FgxgcPtnh DkGyCACtYMTeSuyls2PzbYOgO3PRnOCdG8D+iqwAvLI8BL8HNITobm9bIIwTslwu
# CBgXEeEIL8s7SCM1CsR+d87sc7dIATBERK+nGVxTKwnQntWrqk5p2Oq3fJ0NU8kJ 0QvZc8Jb53LL1USF9uSmqCK0miHexH4Gaybc1WFM1o4xvqzneQlVOWyrq8oqKEB6
# 3yHCZ0ll93J7lZLX4pCbdLdLPiw3/DMvR4QzqEuH0HnzBc52OdF/HJ4acM7adv0K wBuHEbpCi+9i8fIfnVbKd3r+IbE/9W5JcSmWDItywz7ei1v1/ZXb27/FgxgcPtnh
# TqAhv92xvOIhIXrSMzovp29qSkZP CBgXEeEIL8s7SCM1CsR+d87sc7dIATBERK+nGVxTKwnQntWrqk5p2Oq3fJ0NU8kJ
# =O1Gt 3yHCZ0ll93J7lZLX4pCbdLdLPiw3/DMvR4QzqEuH0HnzBc52OdF/HJ4acM7adv0K
# -----END PGP PUBLIC KEY BLOCK----- TqAhv92xvOIhIXrSMzovp29qSkZP
# KEY =O1Gt
# end -----END PGP PUBLIC KEY BLOCK-----
KEY
# sys_apt_repository 'cvmfs' do
# config "deb\thttp://mirror.gsi.de/distrib/gsi-repository "\
# "#{node['lsb']['codename']} main"
# end
cvmfs_release_package_url =
'https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest_all.deb'
cvmfs_release_package_file =
::File.join(Chef::Config[:file_cache_path],
cvmfs_release_package_url.split('/').last)
remote_file cvmfs_release_package_file do
source cvmfs_release_package_url
end end
dpkg_package cvmfs_release_package_file do sys_apt_repository 'cvmfs' do
notifies :update, 'apt_update[cvmfs-release]', :immediately config "deb\thttp://mirror.gsi.de/distrib/gsi-repository "\
"#{node['lsb']['codename']} main"
end end
apt_update 'cvmfs-release'
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Cookbook Name:: cernvm-fs # Cookbook Name:: cernvm-fs
# Recipe:: client # Recipe:: client
# #
# Copyright 2013-2019 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH # Copyright 2013-2020 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
# #
# Authors: # Authors:
# Matteo Dessalvi <m.dessalvi@gsi.de> # Matteo Dessalvi <m.dessalvi@gsi.de>
...@@ -74,20 +74,43 @@ template '/etc/cvmfs/default.local' do ...@@ -74,20 +74,43 @@ template '/etc/cvmfs/default.local' do
) )
end 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' directory '/etc/cvmfs/config.d'
# Each repository needs its configuration file # Each repository needs its configuration file
unless node['cvmfs']['client']['config_d'].empty? node['cvmfs']['client']['config_d'].each do |repo, attrs|
node['cvmfs']['client']['config_d'].each do |repo,config|
config['http_proxy'] = 'DIRECT' unless config.has_key? 'http_proxy' # node attributes are strings
config = { 'http_proxy' => 'DIRECT' }
config.merge!(attrs)
template "/etc/cvmfs/config.d/#{repo}.conf" do template "/etc/cvmfs/config.d/#{repo}.conf" do
source 'etc_cvmfs_config.d_generic.conf.erb' source 'etc_cvmfs_config.d_generic.conf.erb'
mode "0644" mode "0644"
variables( :repo => repo, :config => config ) variables(config: config)
end end
end
end end
...@@ -30,7 +30,7 @@ else ...@@ -30,7 +30,7 @@ else
when /^8/ when /^8/
package 'cvmfs-client' package 'cvmfs-client'
when /^9/ when /^9/
package node['cvmfs']['client']['package'] package 'cvmfs-client'
else else
log "Platform version #{node[:platform_version]} not supported!" do log "Platform version #{node[:platform_version]} not supported!" do
level :warn level :warn
......
# /etc/cvmfs/config.d/<%= @repo %>.local
# #
# DO NOT CHANGE THIS FILE MANUALLY! # DO NOT CHANGE THIS FILE MANUALLY!
# #
......
require 'spec_helper' require 'spec_helper'
# TODO: find a good way to determine which variant of CVMFS we have installed describe package('cvmfs-client') do
# `grep-status -s Package,Status -P cvmfs-release` ???
# For now:
if true
cvmfs_client_package = 'cvmfs'
else
cvmfs_client_package = 'cvmfs-client'
end
describe package(cvmfs_client_package) do
it { should be_installed } it { should be_installed }
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