• R/O
  • HTTP
  • SSH
  • HTTPS

grid-chef-repo: コミット

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


コミットメタ情報

リビジョン8382a64b49b2e176436315b92512becf512a6bbe (tree)
日時2018-05-06 12:24:02
作者whitestar <whitestar@user...>
コミッターwhitestar

ログメッセージ

fixes 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.9
4+-----
5+- fixes utility scripts.
6+
37 0.5.8
48 -----
59 - improves utility scripts.
--- a/cookbooks/docker-grid/concourse.yml
+++ b/cookbooks/docker-grid/concourse.yml
@@ -1,5 +1,5 @@
11 ---
2-# $ fly -t target sp -p docker-grid-cookbook -c concourse.yml -l fly-vars.yml -l ~/sec/credentials-prod.yml
2+# $ fly -t $CC_TARGET sp -p docker-grid-cookbook -c concourse.yml -l fly-vars.yml -l ~/sec/credentials-prod.yml
33 resources:
44 - name: src-git
55 type: git
@@ -21,7 +21,7 @@ resources:
2121 ca_certs:
2222 - domain: ((registry-mirror-domain)) # e.g. registry.docker.example.com:5000
2323 cert: ((docker-reg-ca-cert))
24- check_every: 12h # default: 1m
24+ check_every: 6h # default: 1m
2525
2626 jobs:
2727 - name: test-cookbook
@@ -97,4 +97,4 @@ jobs:
9797 tag_prefix: ((cookbook-name))-
9898 tag: src-git/cookbooks/((cookbook-name))/version
9999 only_tag: true
100- annotate: ../src-git/cookbooks/((cookbook-name))/version
100+ annotate: src-git/cookbooks/((cookbook-name))/version
--- a/cookbooks/docker-grid/templates/default/usr/local/bin/docker_containers_cleanup
+++ b/cookbooks/docker-grid/templates/default/usr/local/bin/docker_containers_cleanup
@@ -8,4 +8,7 @@ if id $(whoami) | grep docker > /dev/null 2>&1; then
88 fi
99 [ `whoami` = 'root' ] && sudo=''
1010
11-$sudo docker ps -q -f status=exited -f status=dead | awk '{print $1}' | xargs --no-run-if-empty docker rm
11+if ! tty -s; then
12+ echo `date '+%Y-%m-%d %H:%M:%S %z'`' Removing exited and dead containers ...'
13+fi
14+$sudo docker ps -q -f status=exited -f status=dead | awk '{print $1}' | $sudo 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
@@ -8,4 +8,7 @@ if id $(whoami) | grep docker > /dev/null 2>&1; then
88 fi
99 [ `whoami` = 'root' ] && sudo=''
1010
11-$sudo docker images | awk '$2=="<none>" {print $3}' | xargs --no-run-if-empty docker rmi
11+if ! tty -s; then
12+ echo `date '+%Y-%m-%d %H:%M:%S %z'`' Removing untagged images ...'
13+fi
14+$sudo docker images | awk '$2=="<none>" {print $3}' | $sudo 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
@@ -8,4 +8,7 @@ if id $(whoami) | grep docker > /dev/null 2>&1; then
88 fi
99 [ `whoami` = 'root' ] && sudo=''
1010
11-$sudo docker volume ls -qf dangling=true | xargs --no-run-if-empty docker volume rm
11+if ! tty -s; then
12+ echo `date '+%Y-%m-%d %H:%M:%S %z'`' Removing dangling volumes ...'
13+fi
14+$sudo docker volume ls -qf dangling=true | $sudo xargs --no-run-if-empty docker volume rm
--- a/cookbooks/docker-grid/version
+++ b/cookbooks/docker-grid/version
@@ -1 +1 @@
1-0.5.8
1+0.5.9
旧リポジトリブラウザで表示