Grid環境構築用のChefリポジトリです。
Revision | 22599008309d336ddbba467ad2aa343c2540b15b (tree) |
---|---|
Time | 2017-07-17 10:14:23 |
Author | whitestar <whitestar@user...> |
Commiter | whitestar |
adds the Concourse pipeline configuration.
@@ -1,6 +1,11 @@ | ||
1 | 1 | CHANGELOG for chef_utils |
2 | 2 | ========================= |
3 | 3 | |
4 | +0.8.2 | |
5 | +----- | |
6 | +- adds the Concourse pipeline configuration. | |
7 | +- adds the Chef version pinning feature for the Debian family. | |
8 | + | |
4 | 9 | 0.8.1 |
5 | 10 | ----- |
6 | 11 | - adds the SSL server key pair's deployment feature for a Chef Server. |
@@ -1,11 +1,27 @@ | ||
1 | 1 | --- |
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 | + | |
3 | 13 | resources: |
4 | 14 | - name: src-git |
5 | - type: git | |
15 | + type: ya-git | |
16 | + #type: git | |
6 | 17 | 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 | |
8 | 19 | 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 | |
9 | 25 | - name: chefdk-cache |
10 | 26 | type: docker-image |
11 | 27 | source: |
@@ -16,18 +32,24 @@ resources: | ||
16 | 32 | ca_certs: |
17 | 33 | - domain: ((registry-mirror-domain)) # e.g. registry.docker.example.com:5000 |
18 | 34 | cert: ((docker-reg-ca-cert)) |
35 | + check_every: 12h # default: 1m | |
19 | 36 | |
20 | 37 | jobs: |
21 | -- name: build-cookbook | |
38 | +- name: test-cookbook | |
22 | 39 | 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 | |
26 | 46 | - task: ci-build |
27 | 47 | image: chefdk-cache |
48 | + params: | |
49 | + http_proxy: ((http-proxy)) # e.g. http://proxy.example.com:3128 | |
50 | + #HTTP_PROXY: ((http-proxy)) | |
28 | 51 | config: |
29 | 52 | platform: linux |
30 | - | |
31 | 53 | #image_resource: |
32 | 54 | # type: docker-image |
33 | 55 | # source: |
@@ -38,10 +60,8 @@ jobs: | ||
38 | 60 | #ca_certs: |
39 | 61 | #- domain: ((registry-mirror-domain)) |
40 | 62 | # cert: ((docker-reg-ca-cert)) |
41 | - | |
42 | 63 | inputs: |
43 | 64 | - name: src-git |
44 | - | |
45 | 65 | run: |
46 | 66 | #dir: ./src-git/cookbooks/((cookbook-name)) |
47 | 67 | #path: rake |
@@ -52,3 +72,39 @@ jobs: | ||
52 | 72 | cd ./src-git/cookbooks/((cookbook-name)) |
53 | 73 | bundle install |
54 | 74 | 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. |
@@ -2,7 +2,7 @@ | ||
2 | 2 | # Cookbook Name:: chef_utils |
3 | 3 | # Recipe:: chef-client |
4 | 4 | # |
5 | -# Copyright 2016, whitestar | |
5 | +# Copyright 2016-2017, whitestar | |
6 | 6 | # |
7 | 7 | # Licensed under the Apache License, Version 2.0 (the "License"); |
8 | 8 | # you may not use this file except in compliance with the License. |