• R/O
  • HTTP
  • SSH
  • HTTPS

grid-chef-repo: Commit

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


Commit MetaInfo

Revision22599008309d336ddbba467ad2aa343c2540b15b (tree)
Time2017-07-17 10:14:23
Authorwhitestar <whitestar@user...>
Commiterwhitestar

Log Message

adds the Concourse pipeline configuration.

Change Summary

Incremental Difference

--- a/cookbooks/chef_utils/CHANGELOG.md
+++ b/cookbooks/chef_utils/CHANGELOG.md
@@ -1,6 +1,11 @@
11 CHANGELOG for chef_utils
22 =========================
33
4+0.8.2
5+-----
6+- adds the Concourse pipeline configuration.
7+- adds the Chef version pinning feature for the Debian family.
8+
49 0.8.1
510 -----
611 - adds the SSL server key pair's deployment feature for a Chef Server.
--- a/cookbooks/chef_utils/concourse.yml
+++ b/cookbooks/chef_utils/concourse.yml
@@ -1,11 +1,27 @@
11 ---
2-# $ fly -t target sp -p chef_utils-cookbook -c concourse.yml -l fly-vars.yml -l ~/credentials.yml
2+# $ fly -t target sp -p chef_utils-cookbook -c concourse.yml -l fly-vars.yml -l ~/sec/credentials-prod.yml
3+resource_types:
4+- name: ya-git
5+ type: docker-image
6+ source:
7+ repository: whitestar/git-resource
8+ registry_mirror: https://((registry-mirror-domain))
9+ ca_certs:
10+ - domain: ((registry-mirror-domain))
11+ cert: ((docker-reg-ca-cert))
12+
313 resources:
414 - name: src-git
5- type: git
15+ type: ya-git
16+ #type: git
617 source:
7- uri: git://git.osdn.net/gitroot/metasearch/grid-chef-repo.git
18+ uri: ((git-id-osdn))@git.osdn.net:/gitroot/metasearch/grid-chef-repo.git
819 branch: master
20+ paths:
21+ - cookbooks/((cookbook-name))
22+ git_user: ((git-user-osdn))
23+ private_key: ((git-private-key))
24+ #check_every: 1h # default: 1m
925 - name: chefdk-cache
1026 type: docker-image
1127 source:
@@ -16,18 +32,24 @@ resources:
1632 ca_certs:
1733 - domain: ((registry-mirror-domain)) # e.g. registry.docker.example.com:5000
1834 cert: ((docker-reg-ca-cert))
35+ check_every: 12h # default: 1m
1936
2037 jobs:
21-- name: build-cookbook
38+- name: test-cookbook
2239 plan:
23- - get: src-git
24- trigger: false
25- - get: chefdk-cache
40+ - aggregate:
41+ - get: src-git
42+ params:
43+ depth: 5
44+ trigger: true
45+ - get: chefdk-cache
2646 - task: ci-build
2747 image: chefdk-cache
48+ params:
49+ http_proxy: ((http-proxy)) # e.g. http://proxy.example.com:3128
50+ #HTTP_PROXY: ((http-proxy))
2851 config:
2952 platform: linux
30-
3153 #image_resource:
3254 # type: docker-image
3355 # source:
@@ -38,10 +60,8 @@ jobs:
3860 #ca_certs:
3961 #- domain: ((registry-mirror-domain))
4062 # cert: ((docker-reg-ca-cert))
41-
4263 inputs:
4364 - name: src-git
44-
4565 run:
4666 #dir: ./src-git/cookbooks/((cookbook-name))
4767 #path: rake
@@ -52,3 +72,39 @@ jobs:
5272 cd ./src-git/cookbooks/((cookbook-name))
5373 bundle install
5474 rake
75+- name: publish-cookbook
76+ plan:
77+ - aggregate:
78+ - get: src-git
79+ params:
80+ depth: 5
81+ trigger: false
82+ - get: chefdk-cache
83+ - task: publish
84+ image: chefdk-cache
85+ params:
86+ http_proxy: ((http-proxy))
87+ chef_username: ((chef-username))
88+ chef_client_key: ((chef-client-key))
89+ config:
90+ platform: linux
91+ inputs:
92+ - name: src-git
93+ run:
94+ path: /bin/bash
95+ args:
96+ - -c
97+ - |
98+ echo '{"username":"((chef-username))","key":"/root/chef-client-key.pem"}' > /root/.stove
99+ echo "$chef_client_key" > /root/chef-client-key.pem
100+ cd ./src-git/cookbooks/((cookbook-name))
101+ bundle install
102+ rake publish
103+ - put: src-git
104+ params:
105+ repository: src-git
106+ tag_prefix: ((cookbook-name))-
107+ tag: src-git/cookbooks/((cookbook-name))/version
108+ only_tag: true
109+ annotate: src-git/cookbooks/((cookbook-name))/version
110+ #annotate: # path to a file containing the annotation message.
--- a/cookbooks/chef_utils/recipes/chef-client.rb
+++ b/cookbooks/chef_utils/recipes/chef-client.rb
@@ -2,7 +2,7 @@
22 # Cookbook Name:: chef_utils
33 # Recipe:: chef-client
44 #
5-# Copyright 2016, whitestar
5+# Copyright 2016-2017, whitestar
66 #
77 # Licensed under the Apache License, Version 2.0 (the "License");
88 # you may not use this file except in compliance with the License.
Show on old repository browser