• R/O
  • HTTP
  • SSH
  • HTTPS

grid-chef-repo: コミット

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


コミットメタ情報

リビジョン40341f470d6cb07287a7819a4b5b6e9710364e32 (tree)
日時2017-12-03 16:41:19
作者whitestar <whitestar@user...>
コミッターwhitestar

ログメッセージ

improves utility scripts.

変更サマリ

差分

--- a/cookbooks/docker-grid/CHANGELOG.md
+++ b/cookbooks/docker-grid/CHANGELOG.md
@@ -1,5 +1,9 @@
11 # docker-grid CHANGELOG
22
3+0.5.8
4+-----
5+- improves utility scripts.
6+
37 0.5.7
48 -----
59 - refactoring.
--- a/cookbooks/docker-grid/recipes/dind-compose.rb
+++ b/cookbooks/docker-grid/recipes/dind-compose.rb
@@ -73,12 +73,14 @@ override_config_srvs['dind']['volumes'] = vols unless vols.empty?
7373 end
7474 }
7575
76-log <<-"EOM"
76+log 'dind-compose post install message' do
77+ message <<-"EOM"
7778 Note: You must execute the following command manually.
78- See #{doc_url}
79- * Start:
80- $ cd #{app_dir}
81- $ docker-compose up -d
82- * Stop
83- $ docker-compose down
79+ See #{doc_url}
80+ * Start:
81+ $ cd #{app_dir}
82+ $ docker-compose up -d
83+ * Stop
84+ $ docker-compose down
8485 EOM
86+end
--- a/cookbooks/docker-grid/recipes/registry.rb
+++ b/cookbooks/docker-grid/recipes/registry.rb
@@ -102,12 +102,14 @@ node.override['docker-grid']['registry']['docker-compose']['config'] = \
102102 end
103103 }
104104
105-log <<-"EOM"
105+log 'registry-docker-compose post install message' do
106+ message <<-"EOM"
106107 Note: You must execute the following command manually.
107- See #{doc_url}
108- * Start:
109- $ cd #{app_dir}
110- $ docker-compose up -d
111- * Stop
112- $ docker-compose down
108+ See #{doc_url}
109+ * Start:
110+ $ cd #{app_dir}
111+ $ docker-compose up -d
112+ * Stop
113+ $ docker-compose down
113114 EOM
115+end
--- a/cookbooks/docker-grid/templates/default/usr/local/bin/docker_containers_cleanup
+++ b/cookbooks/docker-grid/templates/default/usr/local/bin/docker_containers_cleanup
@@ -1,3 +1,11 @@
1-#!/bin/sh
2-
3-docker ps -q -f status=exited -f status=dead | awk '{print $1}' | xargs --no-run-if-empty docker rm
1+#!/bin/sh
2+
3+PATH=.:/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin
4+
5+sudo='sudo'
6+if id $(whoami) | grep docker > /dev/null 2>&1; then
7+ sudo=''
8+fi
9+[ `whoami` = 'root' ] && sudo=''
10+
11+$sudo docker ps -q -f status=exited -f status=dead | awk '{print $1}' | xargs --no-run-if-empty docker rm
--- a/cookbooks/docker-grid/templates/default/usr/local/bin/docker_images_cleanup
+++ b/cookbooks/docker-grid/templates/default/usr/local/bin/docker_images_cleanup
@@ -1,3 +1,11 @@
1-#!/bin/sh
2-
3-docker images | awk '$2=="<none>" {print $3}' | xargs --no-run-if-empty docker rmi
1+#!/bin/sh
2+
3+PATH=.:/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin
4+
5+sudo='sudo'
6+if id $(whoami) | grep docker > /dev/null 2>&1; then
7+ sudo=''
8+fi
9+[ `whoami` = 'root' ] && sudo=''
10+
11+$sudo docker images | awk '$2=="<none>" {print $3}' | xargs --no-run-if-empty docker rmi
--- a/cookbooks/docker-grid/templates/default/usr/local/bin/docker_volumes_cleanup
+++ b/cookbooks/docker-grid/templates/default/usr/local/bin/docker_volumes_cleanup
@@ -1,3 +1,11 @@
1-#!/bin/sh
2-
3-docker volume ls -qf dangling=true | xargs --no-run-if-empty docker volume rm
1+#!/bin/sh
2+
3+PATH=.:/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin
4+
5+sudo='sudo'
6+if id $(whoami) | grep docker > /dev/null 2>&1; then
7+ sudo=''
8+fi
9+[ `whoami` = 'root' ] && sudo=''
10+
11+$sudo docker volume ls -qf dangling=true | xargs --no-run-if-empty docker volume rm
--- a/cookbooks/docker-grid/version
+++ b/cookbooks/docker-grid/version
@@ -1 +1 @@
1-0.5.7
1+0.5.8
旧リポジトリブラウザで表示