itamae-plugin-recipe-datadog 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: a46b30385e139078a8376799851e15fcab2b5af0
4
- data.tar.gz: 8676d78c039fafc3b1b5da515a407e54da6fdbb2
2
+ SHA256:
3
+ metadata.gz: d33dd23d2f0ffa8e206c56b2a5664bce2872ed0b0e804db40d02eeda35dadac5
4
+ data.tar.gz: d251ffdb8fad88c15d5d3697c89bea3268dde6796dd93102e5a6559a1b6684e5
5
5
  SHA512:
6
- metadata.gz: bbd5900cb32f38789e3fa82044cb4d6f1992d7586bdd09d8616d5660b8687553f2284e1c94e670c6dba88a32d131aee045d44481cbc79fcea95530e86c517989
7
- data.tar.gz: 73ac0faa935432ee5e784c6b458d813212075390d0d61e947d9a06f879505c275130de2132e6f443d72089a6fb1e3b2ade3f732b683d79cd85ca1be33a80e2b5
6
+ metadata.gz: 813a3703de9374b149137e71915aaf806849e2626b5e23cda0146ede07b711185bfaaaa184f1ef516a8a9f50cf39d841457a2ec4abd57963a15a7117825c7562
7
+ data.tar.gz: 684839e54f9d4c331baf41720550b9c67359dcb78bb08a4ba024042c6d8a22cf2065898d3e4d96d92fa78c4d7a451a28cdd0157102e3fbc387cb053db3a4cf8f
data/README.md CHANGED
@@ -34,14 +34,19 @@ include_recipe "datadog::install"
34
34
  datadog:
35
35
  api_key: xxxxxx
36
36
  install_only: false # default: true
37
+ upgrade: true # default: false
37
38
  ```
38
39
 
39
- `node[:datadog][:api_key]` is your datadog-agent API Key.
40
- `node[:datadog][:install_only]` is an install option. If you want to install agent and don't start agent, please set this option`true`.
40
+ - `node[:datadog][:api_key]`
41
+ - Your datadog-agent API Key.
42
+ - `node[:datadog][:install_only]`
43
+ - An install option. If you want to install agent and don't start agent, please set this option`true`.
44
+ - `node[:datadog][:upgrade]`
45
+ - An install option. Upgrade datadog-agent version automatically.
41
46
 
42
47
  ## Contributing
43
48
 
44
- Bug reports and pull requests are welcome on GitHub at https://github.com/takanamito/itamae-plugin-recipe-datadog. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
49
+ Bug reports and pull requests are welcome on GitHub at https://github.com/speee/itamae-plugin-recipe-datadog. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
45
50
 
46
51
 
47
52
  ## License
@@ -1,21 +1,24 @@
1
1
  node.reverse_merge!(
2
2
  datadog: {
3
- install_only: true
3
+ install_only: true,
4
+ upgrade: false,
4
5
  }
5
6
  )
6
7
 
7
8
  execute 'download install script' do
8
- command 'wget https://raw.githubusercontent.com/DataDog/dd-agent/master/packaging/datadog-agent/source/install_agent.sh'
9
+ command 'wget https://raw.githubusercontent.com/DataDog/datadog-agent/master/cmd/agent/install_script.sh -O /tmp/install_script.sh'
9
10
  end
10
11
 
11
- execute "change install script's permission" do
12
- command 'chmod 755 install_agent.sh'
12
+ file '/tmp/install_script.sh' do
13
+ action :edit
14
+ mode '0755'
13
15
  end
14
16
 
15
17
  execute 'install datadog-agent' do
16
- if node[:datadog][:install_only]
17
- command "DD_API_KEY=#{node[:datadog][:api_key]} DD_INSTALL_ONLY=true ./install_agent.sh"
18
- else
19
- command "DD_API_KEY=#{node[:datadog][:api_key]} ./install_agent.sh"
20
- end
18
+ options = {}
19
+ options['DD_API_KEY'] = node[:datadog][:api_key]
20
+ options['DD_INSTALL_ONLY'] = 'true' if node[:datadog][:install_only]
21
+ options['DD_UPGRADE'] = 'true' if node[:datadog][:upgrade]
22
+ option_str = options.map { |k, v| "#{k}=#{v}" }.join(' ')
23
+ command "#{option_str} /tmp/install_script.sh"
21
24
  end
@@ -2,7 +2,7 @@ module Itamae
2
2
  module Plugin
3
3
  module Recipe
4
4
  module Datadog
5
- VERSION = "0.1.1"
5
+ VERSION = "0.2.0"
6
6
  end
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itamae-plugin-recipe-datadog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takahiro Kiso (takanamito)
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2016-12-28 00:00:00.000000000 Z
12
+ date: 2019-02-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -91,8 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  - !ruby/object:Gem::Version
92
92
  version: '0'
93
93
  requirements: []
94
- rubyforge_project:
95
- rubygems_version: 2.6.8
94
+ rubygems_version: 3.0.1
96
95
  signing_key:
97
96
  specification_version: 4
98
97
  summary: Itamae plugin to install datadog-agent.