• R/O
  • HTTP
  • SSH
  • HTTPS

grid-chef-repo: コミット

Grid環境構築用のChefリポジトリです。


コミットメタ情報

リビジョン37c1db3b03aab8f18011871b0237305d0eedd529 (tree)
日時2018-07-16 14:24:54
作者whitestar <whitestar@user...>
コミッターwhitestar

ログメッセージ

add RHEL family support.

変更サマリ

差分

--- a/cookbooks/kata-containers/CHANGELOG.md
+++ b/cookbooks/kata-containers/CHANGELOG.md
@@ -1,5 +1,9 @@
11 # kata-containers CHANGELOG
22
3+0.2.0
4+-----
5+- add RHEL family support.
6+
37 0.1.0
48 -----
59 - Initial release of kata-containers
--- a/cookbooks/kata-containers/README.md
+++ b/cookbooks/kata-containers/README.md
@@ -19,6 +19,7 @@ This cookbook installs Kata Containers.
1919
2020 ### platforms
2121
22+- CentOS, RHEL >= 7
2223 - Ubuntu >= 16.04
2324
2425 ### packages
--- a/cookbooks/kata-containers/metadata.rb
+++ b/cookbooks/kata-containers/metadata.rb
@@ -9,7 +9,7 @@ source_url 'http://scm.osdn.jp/gitroot/metasearch/grid-chef-repo.git'
99 issues_url 'https://osdn.jp/projects/metasearch/ticket'
1010
1111 chef_version '>= 12'
12-# %w( centos redhat ).each do |os|
13-# supports os, '>= 7.0'
14-# end
12+%w( centos redhat ).each do |os|
13+ supports os, '>= 7.0'
14+end
1515 supports 'ubuntu', '>= 16.04'
--- a/cookbooks/kata-containers/recipes/default.rb
+++ b/cookbooks/kata-containers/recipes/default.rb
@@ -20,7 +20,34 @@
2020 platform = node['platform']
2121
2222 case platform
23-# when 'centos'
23+when 'centos', 'redhat'
24+ [
25+ 'yum-utils',
26+ ].each {|pkg_name|
27+ resources(package: pkg_name) rescue package pkg_name do
28+ action :install
29+ end
30+ }
31+
32+ bash 'add_kata-containers_repo' do
33+ code <<-"EOH"
34+ source /etc/os-release
35+ yum-config-manager --add-repo "http://download.opensuse.org/repositories/home:/katacontainers:/release/CentOS_${VERSION_ID}/home:katacontainers:release.repo"
36+ EOH
37+ action :nothing
38+ not_if "yum repolist | grep 'katacontainers'"
39+ end
40+
41+ [
42+ 'kata-runtime',
43+ 'kata-proxy',
44+ 'kata-shim',
45+ ].each {|pkg_name|
46+ resources(package: pkg_name) rescue package pkg_name do
47+ action :install
48+ notifies :run, 'bash[add_kata-containers_repo]', :before
49+ end
50+ }
2451 when 'ubuntu'
2552 apt_get_update = 'apt-get_update'
2653 resources(execute: apt_get_update) rescue execute apt_get_update do
--- a/cookbooks/kata-containers/version
+++ b/cookbooks/kata-containers/version
@@ -1 +1 @@
1-0.1.0
1+0.2.0
旧リポジトリブラウザで表示