• R/O
  • HTTP
  • SSH
  • HTTPS

grid-chef-repo: コミット

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


コミットメタ情報

リビジョン63b9b8cb7709be7f29dd6e4501c91eb9f37ca3de (tree)
日時2018-05-02 15:37:17
作者whitestar <whitestar@user...>
コミッターwhitestar

ログメッセージ

adds the fly_prune_workers_main script.

変更サマリ

差分

--- a/cookbooks/concourse-ci/CHANGELOG.md
+++ b/cookbooks/concourse-ci/CHANGELOG.md
@@ -1,6 +1,10 @@
11 concourse-ci CHANGELOG
22 ======================
33
4+0.2.7
5+-----
6+- adds the `fly_prune_workers_main` script.
7+
48 0.2.6
59 -----
610 - fixes format version detection of a local `docker-compose.yml`.
--- a/cookbooks/concourse-ci/concourse.yml
+++ b/cookbooks/concourse-ci/concourse.yml
@@ -1,5 +1,5 @@
11 ---
2-# $ fly -t target sp -p concourse-ci-cookbook -c concourse.yml -l fly-vars.yml -l ~/sec/credentials-prod.yml
2+# $ fly -t $CC_TARGET sp -p concourse-ci-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
--- a/cookbooks/concourse-ci/recipes/docker-compose.rb
+++ b/cookbooks/concourse-ci/recipes/docker-compose.rb
@@ -202,7 +202,8 @@ unless oauth_client_secret_vault_item.empty?
202202 end
203203
204204 external_url = web_envs_org['CONCOURSE_EXTERNAL_URL']
205-web_envs['CONCOURSE_EXTERNAL_URL'] = "http://#{node['ipaddress']}:8080" if external_url.nil?
205+external_url = "http://#{node['ipaddress']}:8080" if external_url.nil?
206+web_envs['CONCOURSE_EXTERNAL_URL'] = external_url
206207
207208 data_source = web_envs_org['CONCOURSE_POSTGRES_DATA_SOURCE']
208209 # for backward compatibility.
@@ -302,6 +303,17 @@ template config_file do
302303 mode '0600'
303304 end
304305
306+template "#{bin_dir}/fly_prune_workers_main" do
307+ source 'opt/docker-compose/app/concourse/bin/fly_prune_workers_main'
308+ owner 'root'
309+ group 'root'
310+ mode '0755'
311+ action :create
312+ variables(
313+ external_url: external_url
314+ )
315+end
316+
305317 log <<-"EOM"
306318 Note: You must execute the following command manually.
307319 See #{doc_url}
--- /dev/null
+++ b/cookbooks/concourse-ci/templates/default/opt/docker-compose/app/concourse/bin/fly_prune_workers_main
@@ -0,0 +1,13 @@
1+#!/usr/bin/env bash
2+
3+PATH=.:/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin:`dirname $0`
4+
5+if [ `whoami` != 'root' ]; then
6+ echo 'ERROR: This script requires the root privilege.'
7+ exit 1
8+fi
9+
10+. <%= node['concourse-ci']['docker-compose']['app_dir'] %>/.env
11+
12+fly login -t main -u concourse -p $CONCOURSE_BASIC_AUTH_PASSWORD -c <%= @external_url %>
13+fly_prune_workers -t main
--- a/cookbooks/concourse-ci/templates/default/usr/local/bin/fly_prune_workers
+++ b/cookbooks/concourse-ci/templates/default/usr/local/bin/fly_prune_workers
@@ -5,7 +5,7 @@ PATH=.:/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin:`dirname $0`
55 target=''
66
77 usage() {
8- echo 'Usage: prune_workers -t target'
8+ echo 'Usage: prune_workers -t $CC_TARGET'
99 echo
1010 echo "Options:"
1111 echo " -h: this help."
--- a/cookbooks/concourse-ci/version
+++ b/cookbooks/concourse-ci/version
@@ -1 +1 @@
1-0.2.6
1+0.2.7
旧リポジトリブラウザで表示