itamae-plugin-recipe-datadog 0.1.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/LICENSE.txt +1 -1
- data/README.md +8 -3
- data/itamae-plugin-recipe-datadog.gemspec +2 -2
- data/lib/itamae/plugin/recipe/datadog/install.rb +23 -8
- data/lib/itamae/plugin/recipe/datadog/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 0ae9b400e6f30b6f5fe507b7e385474e31e9293c8b6d7336b2e464cd3d2cf0f7
|
4
|
+
data.tar.gz: 30e35ccecb871ea1b32d03879d8e4074ac2dc44a97095d9f2b7af1d6db0de3b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd1e76a1884865d23d5617bab9759db252928649bed56afb928a3b59a785c95a853fb6c513ebf7e5e7d43c667f5993ebe126682981c0fbf1e09d0d809269eb7a
|
7
|
+
data.tar.gz: fa74c66777b61efdeeba897ba78f89860b4ac9dbb844e1c7c12991ab705af912620877493d8ed1999d7fb5351aa989a80e82545675cd26034d7e4e690a8827f4
|
data/LICENSE.txt
CHANGED
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]`
|
40
|
-
|
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/
|
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
|
@@ -6,12 +6,12 @@ require 'itamae/plugin/recipe/datadog/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "itamae-plugin-recipe-datadog"
|
8
8
|
spec.version = Itamae::Plugin::Recipe::Datadog::VERSION
|
9
|
-
spec.authors = ["Takahiro Kiso (takanamito)"]
|
9
|
+
spec.authors = ["Takahiro Kiso (takanamito)", "Speee, Inc."]
|
10
10
|
spec.email = ["t.kiso0928@gmail.com"]
|
11
11
|
|
12
12
|
spec.summary = %q{Itamae plugin to install datadog-agent.}
|
13
13
|
spec.description = %q{Itamae plugin to install datadog-agent.}
|
14
|
-
spec.homepage = "https://github.com/
|
14
|
+
spec.homepage = "https://github.com/speee/itamae-plugin-recipe-datadog"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
17
17
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
@@ -1,21 +1,36 @@
|
|
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/
|
9
|
+
command 'wget https://raw.githubusercontent.com/DataDog/datadog-agent/main/cmd/agent/install_script.sh -O /tmp/install_script.sh'
|
10
|
+
|
11
|
+
# If upgrade is enabled, always download the latest install_script.sh
|
12
|
+
# If upgrade is disabled, download only when `/tmp/install_script.sh` doesn't exist
|
13
|
+
unless node[:datadog][:upgrade]
|
14
|
+
not_if 'ls /tmp/install_script.sh'
|
15
|
+
end
|
9
16
|
end
|
10
17
|
|
11
|
-
|
12
|
-
|
18
|
+
file '/tmp/install_script.sh' do
|
19
|
+
action :edit
|
20
|
+
mode '0755'
|
13
21
|
end
|
14
22
|
|
15
23
|
execute 'install datadog-agent' do
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
24
|
+
options = {}
|
25
|
+
options['DD_API_KEY'] = node[:datadog][:api_key]
|
26
|
+
options['DD_INSTALL_ONLY'] = 'true' if node[:datadog][:install_only]
|
27
|
+
options['DD_UPGRADE'] = 'true' if node[:datadog][:upgrade]
|
28
|
+
option_str = options.map { |k, v| "#{k}=#{v}" }.join(' ')
|
29
|
+
command "#{option_str} /tmp/install_script.sh"
|
30
|
+
|
31
|
+
# If upgrade is enabled, always run `install_script.sh`
|
32
|
+
# If upgrade is disabled, run `install_script.sh` only when datadog isn't installed
|
33
|
+
unless node[:datadog][:upgrade]
|
34
|
+
not_if 'ls /etc/datadog-agent/datadog.yaml'
|
20
35
|
end
|
21
36
|
end
|
metadata
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itamae-plugin-recipe-datadog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takahiro Kiso (takanamito)
|
8
|
+
- Speee, Inc.
|
8
9
|
autorequire:
|
9
10
|
bindir: exe
|
10
11
|
cert_chain: []
|
11
|
-
date:
|
12
|
+
date: 2022-03-19 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: bundler
|
@@ -71,7 +72,7 @@ files:
|
|
71
72
|
- lib/itamae/plugin/recipe/datadog.rb
|
72
73
|
- lib/itamae/plugin/recipe/datadog/install.rb
|
73
74
|
- lib/itamae/plugin/recipe/datadog/version.rb
|
74
|
-
homepage: https://github.com/
|
75
|
+
homepage: https://github.com/speee/itamae-plugin-recipe-datadog
|
75
76
|
licenses:
|
76
77
|
- MIT
|
77
78
|
metadata: {}
|
@@ -90,8 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
91
|
- !ruby/object:Gem::Version
|
91
92
|
version: '0'
|
92
93
|
requirements: []
|
93
|
-
|
94
|
-
rubygems_version: 2.6.8
|
94
|
+
rubygems_version: 3.0.3.1
|
95
95
|
signing_key:
|
96
96
|
specification_version: 4
|
97
97
|
summary: Itamae plugin to install datadog-agent.
|