concourse-ci CHANGELOG
======================
+0.1.5
+-----
+- adds the `concourse-ci::fly` recipe.
+
0.1.4
-----
- Bug fix: SSH keys directory volume mount configurations.
- [Usage](#usage)
- [Recipes](#recipes)
- [concourse-ci::default](#concourse-cidefault)
+ - [concourse-ci::fly](#concourse-cifly)
- [concourse-ci::docker-compose](#concourse-cidocker-compose)
- [Role Examples](#role-examples)
- [SSL server keys and certificates management by ssl_cert cookbook](#ssl-server-keys-and-certificates-management-by-ssl_cert-cookbook)
|Key|Type|Description, example|Default|
|:--|:--|:--|:--|
+|`['concourse-ci']['fly']['version']`|String||`'2.7.0'`|
+|`['concourse-ci']['fly']['release_url']`|String||`"https://github.com/concourse/concourse/releases/download/v#{node['concourse-ci']['fly']['version']}/fly_linux_amd64"`|
+|`['concourse-ci']['fly']['release_checksum']`|String||`nil`|
+|`['concourse-ci']['fly']['auto_upgrade']`|Boolean||`false`|
+|`['concourse-ci']['fly']['install_path']`|String||`'/usr/local/bin/fly'`|
|`['concourse-ci']['docker-compose']['app_dir']`|String||`"#{node['docker-grid']['compose']['app_dir']}/concourse"`|
|`['concourse-ci']['docker-compose']['pgdata_dir']`|String|Path string or nil (unset).|`"#{node['concourse-ci']['docker-compose']['app_dir']}/database"`|
|`['concourse-ci']['docker-compose']['web_keys_dir']`|String|Path string.|`"#{node['concourse-ci']['docker-compose']['app_dir']}/keys/web"`|
This recipe does nothing.
+#### concourse-ci::fly
+
+This recipe installs the `fly` CLI.
+
#### concourse-ci::docker-compose
This recipe generates SSH keys of each node and a `docker-compose.yml` file for the Concourse CI service.
# limitations under the License.
#
+default['concourse-ci']['fly']['version'] = '2.7.0'
+default['concourse-ci']['fly']['release_url'] = "https://github.com/concourse/concourse/releases/download/v#{node['concourse-ci']['fly']['version']}/fly_linux_amd64"
+default['concourse-ci']['fly']['release_checksum'] = nil
+default['concourse-ci']['fly']['auto_upgrade'] = false
+default['concourse-ci']['fly']['install_path'] = '/usr/local/bin/fly'
+
default['concourse-ci']['with_ssl_cert_cookbook'] = false
# If ['concourse-ci']['with_ssl_cert_cookbook'] is true,
# node['concourse-ci']['docker-compose']['config']
license 'Apache 2.0'
description 'Installs/Configures Concourse CI by Docker Compose'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
-version '0.1.4'
+version '0.1.5'
source_url 'http://scm.osdn.jp/gitroot/metasearch/grid-chef-repo.git'
issues_url 'https://osdn.jp/projects/metasearch/ticket'
--- /dev/null
+#
+# Cookbook Name:: concourse-ci
+# Recipe:: fly
+#
+# Copyright 2017, whitestar
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+fly_ver = node['concourse-ci']['fly']['version']
+release_checksum = node['concourse-ci']['fly']['release_checksum']
+path_to_fly = node['concourse-ci']['fly']['install_path']
+
+remote_file path_to_fly do
+ source node['concourse-ci']['fly']['release_url']
+ checksum release_checksum unless release_checksum.nil?
+ owner 'root'
+ group 'root'
+ mode '0755'
+ action :create
+ not_if "#{path_to_fly} -v | grep #{fly_ver}"
+ not_if { ::File.exist?(path_to_fly) } unless node['concourse-ci']['fly']['auto_upgrade']
+end