caco 0.1.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.
Files changed (118) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +12 -0
  3. data/.travis.yml +10 -0
  4. data/CODE_OF_CONDUCT.md +74 -0
  5. data/Gemfile +12 -0
  6. data/Gemfile.lock +227 -0
  7. data/Guardfile +42 -0
  8. data/LICENSE.txt +21 -0
  9. data/README.md +97 -0
  10. data/Rakefile +10 -0
  11. data/bin/_guard-core +29 -0
  12. data/bin/bundle +114 -0
  13. data/bin/byebug +29 -0
  14. data/bin/caco +29 -0
  15. data/bin/coderay +29 -0
  16. data/bin/console +20 -0
  17. data/bin/eyaml +29 -0
  18. data/bin/guard +29 -0
  19. data/bin/listen +29 -0
  20. data/bin/pry +29 -0
  21. data/bin/rake +29 -0
  22. data/bin/safe_yaml +29 -0
  23. data/bin/setup +8 -0
  24. data/bin/thor +29 -0
  25. data/bin/tilt +29 -0
  26. data/caco.gemspec +43 -0
  27. data/exe/caco +27 -0
  28. data/lib/caco.rb +115 -0
  29. data/lib/caco/barman.rb +10 -0
  30. data/lib/caco/barman/cell/global.rb +4 -0
  31. data/lib/caco/barman/cell/node.rb +15 -0
  32. data/lib/caco/barman/install.rb +25 -0
  33. data/lib/caco/barman/view/global.erb +7 -0
  34. data/lib/caco/barman/view/node.erb +8 -0
  35. data/lib/caco/cell.rb +8 -0
  36. data/lib/caco/config.rb +23 -0
  37. data/lib/caco/debian.rb +28 -0
  38. data/lib/caco/debian/add_user.rb +18 -0
  39. data/lib/caco/debian/apt_key_install.rb +19 -0
  40. data/lib/caco/debian/apt_repo_add.rb +17 -0
  41. data/lib/caco/debian/apt_sources_list.rb +15 -0
  42. data/lib/caco/debian/apt_update.rb +33 -0
  43. data/lib/caco/debian/cell/service.rb +19 -0
  44. data/lib/caco/debian/cell/sources_list.rb +7 -0
  45. data/lib/caco/debian/package_install.rb +21 -0
  46. data/lib/caco/debian/package_installed.rb +17 -0
  47. data/lib/caco/debian/service_enable.rb +26 -0
  48. data/lib/caco/debian/service_install.rb +31 -0
  49. data/lib/caco/debian/user_home.rb +17 -0
  50. data/lib/caco/debian/view/service.erb +18 -0
  51. data/lib/caco/debian/view/sources_list.erb +10 -0
  52. data/lib/caco/downloader.rb +41 -0
  53. data/lib/caco/executer.rb +33 -0
  54. data/lib/caco/facter.rb +41 -0
  55. data/lib/caco/file_link.rb +36 -0
  56. data/lib/caco/file_reader.rb +24 -0
  57. data/lib/caco/file_writer.rb +57 -0
  58. data/lib/caco/finder.rb +13 -0
  59. data/lib/caco/grafana.rb +6 -0
  60. data/lib/caco/grafana/install.rb +26 -0
  61. data/lib/caco/haproxy.rb +12 -0
  62. data/lib/caco/haproxy/cell/conf_postgres.rb +4 -0
  63. data/lib/caco/haproxy/cell/conf_stats.rb +4 -0
  64. data/lib/caco/haproxy/conf_get.rb +15 -0
  65. data/lib/caco/haproxy/conf_set.rb +52 -0
  66. data/lib/caco/haproxy/install.rb +9 -0
  67. data/lib/caco/haproxy/view/conf_postgres.erb +25 -0
  68. data/lib/caco/haproxy/view/conf_stats.erb +6 -0
  69. data/lib/caco/macro.rb +2 -0
  70. data/lib/caco/postgres.rb +44 -0
  71. data/lib/caco/postgres/build_augeas.rb +20 -0
  72. data/lib/caco/postgres/conf_get.rb +37 -0
  73. data/lib/caco/postgres/conf_set.rb +54 -0
  74. data/lib/caco/postgres/database_create.rb +28 -0
  75. data/lib/caco/postgres/extension_create.rb +28 -0
  76. data/lib/caco/postgres/hba_set.rb +65 -0
  77. data/lib/caco/postgres/install.rb +34 -0
  78. data/lib/caco/postgres/shell.rb +13 -0
  79. data/lib/caco/postgres/sql.rb +17 -0
  80. data/lib/caco/postgres/user_change_password.rb +13 -0
  81. data/lib/caco/postgres/user_create.rb +33 -0
  82. data/lib/caco/prometheus.rb +15 -0
  83. data/lib/caco/prometheus/adapter_install_pg.rb +107 -0
  84. data/lib/caco/prometheus/adapter_install_postgresql.rb +47 -0
  85. data/lib/caco/prometheus/cell/alertmanager_conf.rb +4 -0
  86. data/lib/caco/prometheus/cell/alerts.rb +4 -0
  87. data/lib/caco/prometheus/cell/conf.rb +7 -0
  88. data/lib/caco/prometheus/exporter_install.rb +35 -0
  89. data/lib/caco/prometheus/install.rb +50 -0
  90. data/lib/caco/prometheus/install_alert_manager.rb +62 -0
  91. data/lib/caco/prometheus/view/alertmanager_conf.erb +13 -0
  92. data/lib/caco/prometheus/view/alerts.erb +18 -0
  93. data/lib/caco/prometheus/view/conf.erb +34 -0
  94. data/lib/caco/rbenv.rb +8 -0
  95. data/lib/caco/rbenv/cell/profile.rb +4 -0
  96. data/lib/caco/rbenv/install.rb +56 -0
  97. data/lib/caco/rbenv/install_version.rb +17 -0
  98. data/lib/caco/rbenv/view/profile.erb +3 -0
  99. data/lib/caco/repmgr.rb +15 -0
  100. data/lib/caco/repmgr/cell/conf.rb +43 -0
  101. data/lib/caco/repmgr/conf.rb +25 -0
  102. data/lib/caco/repmgr/install.rb +25 -0
  103. data/lib/caco/repmgr/node_register_primary.rb +34 -0
  104. data/lib/caco/repmgr/node_register_standby.rb +25 -0
  105. data/lib/caco/repmgr/node_registered.rb +15 -0
  106. data/lib/caco/repmgr/node_role.rb +18 -0
  107. data/lib/caco/repmgr/view/conf.erb +27 -0
  108. data/lib/caco/settings_loader.rb +67 -0
  109. data/lib/caco/settings_loader_monkeypatch.rb +28 -0
  110. data/lib/caco/ssh.rb +6 -0
  111. data/lib/caco/ssh/authorized_keys_add.rb +82 -0
  112. data/lib/caco/sudo.rb +6 -0
  113. data/lib/caco/sudo/sudoers_add.rb +15 -0
  114. data/lib/caco/timescale.rb +6 -0
  115. data/lib/caco/timescale/install.rb +25 -0
  116. data/lib/caco/unpacker.rb +76 -0
  117. data/lib/caco/version.rb +3 -0
  118. metadata +398 -0
@@ -0,0 +1,28 @@
1
+ # This is a monkey patch to decrypt the yaml files before loading into `Config` gem
2
+ require "config/sources/yaml_source"
3
+ class Config::Sources::YAMLSource
4
+ def load
5
+ result = nil
6
+
7
+ if @path and File.exist?(@path)
8
+ content = IO.read(@path)
9
+ descrypted_content = decrypt_content(content)
10
+ result = YAML.load(ERB.new(descrypted_content).result)
11
+ end
12
+
13
+ result || {}
14
+
15
+ rescue Psych::SyntaxError => e
16
+ raise "YAML syntax error occurred while parsing #{@path}. " \
17
+ "Please note that YAML must be consistently indented using spaces. Tabs are not allowed. " \
18
+ "Error: #{e.message}"
19
+ end
20
+
21
+ def decrypt_content(content)
22
+ parsed_content = Caco.config.eyaml_parser.parse(content)
23
+ parsed_content.each do |parsed|
24
+ content.sub!(parsed.match, parsed.to_plain_text)
25
+ end
26
+ content
27
+ end
28
+ end
@@ -0,0 +1,6 @@
1
+ module Caco
2
+ module Ssh
3
+ end
4
+ end
5
+
6
+ require 'caco/ssh/authorized_keys_add'
@@ -0,0 +1,82 @@
1
+ class Caco::Ssh::AuthorizedKeysAdd < Trailblazer::Operation
2
+ step Subprocess(Caco::Debian::UserHome),
3
+ input: ->(_ctx, user:, **) {{
4
+ user: user
5
+ }}
6
+
7
+ step ->(ctx, user:, **) {
8
+ ctx[:user_home] = "/home/#{user}"
9
+ },
10
+ id: :define_user_path
11
+
12
+ step :check_user_ssh_folder
13
+
14
+ step :check_user_ssh_authorized_keys
15
+
16
+ step Subprocess(Caco::FileReader),
17
+ input: ->(_ctx, user_home:, **) {{
18
+ path: "#{user_home}/.ssh/authorized_keys",
19
+ }},
20
+ output: [:output]
21
+
22
+ step ->(ctx, key:, identifier:, output:, **) {
23
+ output.match?("^#{key} #{identifier}$")
24
+ },
25
+ Output(:success) => End(:success),
26
+ Output(:failure) => Track(:success),
27
+ id: :check_same_entry_exist
28
+
29
+ step ->(ctx, identifier:, output:, **) {
30
+ output.match?("^.*#{identifier}$")
31
+ },
32
+ Output(:success) => Id(:change_key),
33
+ Output(:failure) => Id(:add_key),
34
+ id: :check_identifier_exist
35
+
36
+ step :change_key, magnetic_to: nil
37
+ def change_key(ctx, key:, identifier:, output:, **)
38
+ output.gsub!(/^.*#{identifier}$/, "#{key} #{identifier}")
39
+ ctx[:content] = output
40
+ end
41
+
42
+ step :add_key, magnetic_to: nil
43
+ def add_key(ctx, key:, identifier:, output:, **)
44
+ output << "#{key} #{identifier}\n"
45
+ ctx[:created] = true
46
+ ctx[:content] = output
47
+ end
48
+
49
+ step Subprocess(Caco::FileWriter),
50
+ input: ->(_ctx, authorized_keys_path:, content:, **) {{
51
+ path: authorized_keys_path,
52
+ content: content
53
+ }}
54
+ step ->(ctx, **) {
55
+ ctx[:changed] = true
56
+ },
57
+ id: :mark_as_changed
58
+
59
+ def check_user_ssh_folder(ctx, user:, user_home:, **)
60
+ ctx[:ssh_home] = ssh_home = "#{Caco.config.write_files_root}#{user_home}/.ssh"
61
+ FileUtils.mkdir_p(ssh_home)
62
+ File.chmod(0700, ssh_home)
63
+ FileUtils.chown user, nil, ssh_home
64
+ rescue Errno::EPERM
65
+ true
66
+ end
67
+
68
+ def check_user_ssh_authorized_keys(ctx, ssh_home:, user:, **)
69
+ ctx[:authorized_keys_path] = authorized_keys_path = "#{ssh_home}/authorized_keys"
70
+ unless File.exist?(authorized_keys_path)
71
+ FileUtils.touch(authorized_keys_path)
72
+ File.chmod(0600, authorized_keys_path)
73
+ begin
74
+ FileUtils.chown user, nil, authorized_keys_path
75
+ rescue Errno::EPERM
76
+ true
77
+ end
78
+ else
79
+ true
80
+ end
81
+ end
82
+ end
@@ -0,0 +1,6 @@
1
+ module Caco
2
+ module Sudo
3
+ end
4
+ end
5
+
6
+ require 'caco/sudo/sudoers_add'
@@ -0,0 +1,15 @@
1
+ module Caco::Sudo
2
+ class SudoersAdd < Trailblazer::Operation
3
+ step ->(ctx, identifier:, **) {
4
+ ctx[:path] = "/etc/sudoers.d/#{identifier}"
5
+ },
6
+ id: :build_path
7
+
8
+ step Subprocess(Caco::FileWriter),
9
+ input: ->(_ctx, path:, content:, **) {{
10
+ path: path,
11
+ content: content
12
+ }},
13
+ output: {file_created: :created, file_changed: :changed}
14
+ end
15
+ end
@@ -0,0 +1,6 @@
1
+ module Caco
2
+ module Timescale
3
+ end
4
+ end
5
+
6
+ require 'caco/timescale/install'
@@ -0,0 +1,25 @@
1
+ module Caco::Timescale
2
+ class Install < Trailblazer::Operation
3
+ class Repo < Trailblazer::Operation
4
+ step Subprocess(Caco::Debian::AptKeyInstall),
5
+ input: ->(_ctx, **) {{
6
+ url: 'https://packagecloud.io/timescale/timescaledb/gpgkey',
7
+ fingerprint: '1005 FB68 604C E9B8 F687 9CF7 59F1 8EDF 47F2 4417'
8
+ }}
9
+ step Subprocess(Caco::Debian::AptRepoAdd),
10
+ input: ->(_ctx, **) {{
11
+ name: 'timescale',
12
+ url: 'https://packagecloud.io/timescale/timescaledb/debian/',
13
+ release: "#{Caco::Facter.("os", "distro", "codename")}",
14
+ component: 'main'
15
+ }}
16
+ end
17
+
18
+ step Subprocess(Repo)
19
+ step Subprocess(Caco::Debian::AptUpdate)
20
+ step Subprocess(Caco::Debian::PackageInstall),
21
+ input: ->(_ctx, postgres_version:, **) {{
22
+ package: "timescaledb-postgresql-#{postgres_version}"
23
+ }}
24
+ end
25
+ end
@@ -0,0 +1,76 @@
1
+ class Caco::Unpacker < Trailblazer::Operation
2
+ pass ->(ctx, dest:, **) {
3
+ FileUtils.mkdir_p(dest)
4
+ },
5
+ id: :create_dest
6
+
7
+ step ->(ctx, pack:, **) {
8
+ ctx[:mime_type] = Marcel::MimeType.for pack
9
+ },
10
+ id: :calculate_mime_type
11
+
12
+ step :build_integrity_command
13
+
14
+ step Subprocess(Caco::Executer),
15
+ input: ->(ctx, integrity_command:, **) {{
16
+ command: "#{integrity_command} 2> /dev/null|wc -l"
17
+ }},
18
+ output: ->(_ctx, exit_code:, output:, **) {
19
+ number_of_files = Integer(output)
20
+ { command_exit_code: exit_code, command_output: output, number_of_files: number_of_files }
21
+ },
22
+ id: "tar_integrity_test",
23
+ Output(:failure) => Track(:success)
24
+
25
+ step ->(ctx, command_exit_code:, number_of_files:, **) {
26
+ command_exit_code == 0 && number_of_files > 0
27
+ },
28
+ Output(:failure) => Track(:unknown_command),
29
+ Output(:success) => Id(:build_tar_command),
30
+ id: :check_integrity_test
31
+
32
+ step ->(ctx, pack:, dest:, **) {
33
+ ctx[:command] = "tar xpf #{pack} -C #{dest}"
34
+ },
35
+ id: :build_tar_command
36
+
37
+ step :find_format,
38
+ magnetic_to: :unknown_command,
39
+ Output(Trailblazer::Activity::Right, :success) => Track(:unknown_format)
40
+
41
+ step :build_unknown_command,
42
+ magnetic_to: :unknown_format,
43
+ Output(Trailblazer::Activity::Right, :success) => Track(:success)
44
+
45
+ step Subprocess(Class.new(Caco::Executer)),
46
+ input: [:command],
47
+ output: { exit_code: :command_exit_code, output: :command_output },
48
+ id: "unpacker_command"
49
+
50
+ fail ->(_ctx, **) {
51
+ # puts "Command Failed with output: #{failure_reason}"
52
+ # log to somewhere
53
+ false
54
+ },
55
+ id: :command_failed
56
+
57
+ def build_integrity_command(ctx, pack:, mime_type:, **)
58
+ return (ctx[:integrity_command] = "tar tzf #{pack}") if mime_type == "application/gzip"
59
+ return (ctx[:integrity_command] = "tar tjf #{pack}") if mime_type == "application/x-bzip"
60
+ return (ctx[:integrity_command] = "tar tf #{pack}") if mime_type == "application/x-tar"
61
+ ctx[:integrity_command] = "tar tf #{pack}"
62
+ end
63
+
64
+ def find_format(ctx, pack:, dest:, **)
65
+ ctx[:unknown_file_mime] = Marcel::MimeType.for pack
66
+ rescue StandardError
67
+ false
68
+ end
69
+
70
+ def build_unknown_command(ctx, pack:, dest:, mime_type:, **)
71
+ basename = File.basename(pack)
72
+ return ctx[:command] = "gunzip -c #{pack} > #{dest}/#{basename}" if mime_type == "application/gzip"
73
+ ctx[:failure_reason] = "unknown_format"
74
+ false
75
+ end
76
+ end
@@ -0,0 +1,3 @@
1
+ module Caco
2
+ VERSION = "0.1.0"
3
+ end
metadata ADDED
@@ -0,0 +1,398 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: caco
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Celso Fernandes
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2020-04-11 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: cells-erb
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: cells
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '4.1'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '4.1'
41
+ - !ruby/object:Gem::Dependency
42
+ name: config
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: down
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '5.0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '5.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: hiera-eyaml
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: http
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '4.0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '4.0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: marcel
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: ruby-augeas
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: trailblazer-cells
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: trailblazer
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '2.1'
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '2.1'
153
+ - !ruby/object:Gem::Dependency
154
+ name: bundler
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: '2.0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: '2.0'
167
+ - !ruby/object:Gem::Dependency
168
+ name: rake
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: '13.0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: '13.0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: minitest
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - "~>"
186
+ - !ruby/object:Gem::Version
187
+ version: '5.0'
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - "~>"
193
+ - !ruby/object:Gem::Version
194
+ version: '5.0'
195
+ - !ruby/object:Gem::Dependency
196
+ name: minitest-reporters
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - ">="
200
+ - !ruby/object:Gem::Version
201
+ version: '0'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
209
+ - !ruby/object:Gem::Dependency
210
+ name: trailblazer-developer
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - ">="
214
+ - !ruby/object:Gem::Version
215
+ version: '0'
216
+ type: :development
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - ">="
221
+ - !ruby/object:Gem::Version
222
+ version: '0'
223
+ - !ruby/object:Gem::Dependency
224
+ name: fakefs
225
+ requirement: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - ">="
228
+ - !ruby/object:Gem::Version
229
+ version: '0'
230
+ type: :development
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - ">="
235
+ - !ruby/object:Gem::Version
236
+ version: '0'
237
+ - !ruby/object:Gem::Dependency
238
+ name: webmock
239
+ requirement: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - ">="
242
+ - !ruby/object:Gem::Version
243
+ version: '0'
244
+ type: :development
245
+ prerelease: false
246
+ version_requirements: !ruby/object:Gem::Requirement
247
+ requirements:
248
+ - - ">="
249
+ - !ruby/object:Gem::Version
250
+ version: '0'
251
+ description: Caco, configure your machines like you develop your web apps
252
+ email:
253
+ - celso.fernandes@gmail.com
254
+ executables:
255
+ - caco
256
+ extensions: []
257
+ extra_rdoc_files: []
258
+ files:
259
+ - ".gitignore"
260
+ - ".travis.yml"
261
+ - CODE_OF_CONDUCT.md
262
+ - Gemfile
263
+ - Gemfile.lock
264
+ - Guardfile
265
+ - LICENSE.txt
266
+ - README.md
267
+ - Rakefile
268
+ - bin/_guard-core
269
+ - bin/bundle
270
+ - bin/byebug
271
+ - bin/caco
272
+ - bin/coderay
273
+ - bin/console
274
+ - bin/eyaml
275
+ - bin/guard
276
+ - bin/listen
277
+ - bin/pry
278
+ - bin/rake
279
+ - bin/safe_yaml
280
+ - bin/setup
281
+ - bin/thor
282
+ - bin/tilt
283
+ - caco.gemspec
284
+ - exe/caco
285
+ - lib/caco.rb
286
+ - lib/caco/barman.rb
287
+ - lib/caco/barman/cell/global.rb
288
+ - lib/caco/barman/cell/node.rb
289
+ - lib/caco/barman/install.rb
290
+ - lib/caco/barman/view/global.erb
291
+ - lib/caco/barman/view/node.erb
292
+ - lib/caco/cell.rb
293
+ - lib/caco/config.rb
294
+ - lib/caco/debian.rb
295
+ - lib/caco/debian/add_user.rb
296
+ - lib/caco/debian/apt_key_install.rb
297
+ - lib/caco/debian/apt_repo_add.rb
298
+ - lib/caco/debian/apt_sources_list.rb
299
+ - lib/caco/debian/apt_update.rb
300
+ - lib/caco/debian/cell/service.rb
301
+ - lib/caco/debian/cell/sources_list.rb
302
+ - lib/caco/debian/package_install.rb
303
+ - lib/caco/debian/package_installed.rb
304
+ - lib/caco/debian/service_enable.rb
305
+ - lib/caco/debian/service_install.rb
306
+ - lib/caco/debian/user_home.rb
307
+ - lib/caco/debian/view/service.erb
308
+ - lib/caco/debian/view/sources_list.erb
309
+ - lib/caco/downloader.rb
310
+ - lib/caco/executer.rb
311
+ - lib/caco/facter.rb
312
+ - lib/caco/file_link.rb
313
+ - lib/caco/file_reader.rb
314
+ - lib/caco/file_writer.rb
315
+ - lib/caco/finder.rb
316
+ - lib/caco/grafana.rb
317
+ - lib/caco/grafana/install.rb
318
+ - lib/caco/haproxy.rb
319
+ - lib/caco/haproxy/cell/conf_postgres.rb
320
+ - lib/caco/haproxy/cell/conf_stats.rb
321
+ - lib/caco/haproxy/conf_get.rb
322
+ - lib/caco/haproxy/conf_set.rb
323
+ - lib/caco/haproxy/install.rb
324
+ - lib/caco/haproxy/view/conf_postgres.erb
325
+ - lib/caco/haproxy/view/conf_stats.erb
326
+ - lib/caco/macro.rb
327
+ - lib/caco/postgres.rb
328
+ - lib/caco/postgres/build_augeas.rb
329
+ - lib/caco/postgres/conf_get.rb
330
+ - lib/caco/postgres/conf_set.rb
331
+ - lib/caco/postgres/database_create.rb
332
+ - lib/caco/postgres/extension_create.rb
333
+ - lib/caco/postgres/hba_set.rb
334
+ - lib/caco/postgres/install.rb
335
+ - lib/caco/postgres/shell.rb
336
+ - lib/caco/postgres/sql.rb
337
+ - lib/caco/postgres/user_change_password.rb
338
+ - lib/caco/postgres/user_create.rb
339
+ - lib/caco/prometheus.rb
340
+ - lib/caco/prometheus/adapter_install_pg.rb
341
+ - lib/caco/prometheus/adapter_install_postgresql.rb
342
+ - lib/caco/prometheus/cell/alertmanager_conf.rb
343
+ - lib/caco/prometheus/cell/alerts.rb
344
+ - lib/caco/prometheus/cell/conf.rb
345
+ - lib/caco/prometheus/exporter_install.rb
346
+ - lib/caco/prometheus/install.rb
347
+ - lib/caco/prometheus/install_alert_manager.rb
348
+ - lib/caco/prometheus/view/alertmanager_conf.erb
349
+ - lib/caco/prometheus/view/alerts.erb
350
+ - lib/caco/prometheus/view/conf.erb
351
+ - lib/caco/rbenv.rb
352
+ - lib/caco/rbenv/cell/profile.rb
353
+ - lib/caco/rbenv/install.rb
354
+ - lib/caco/rbenv/install_version.rb
355
+ - lib/caco/rbenv/view/profile.erb
356
+ - lib/caco/repmgr.rb
357
+ - lib/caco/repmgr/cell/conf.rb
358
+ - lib/caco/repmgr/conf.rb
359
+ - lib/caco/repmgr/install.rb
360
+ - lib/caco/repmgr/node_register_primary.rb
361
+ - lib/caco/repmgr/node_register_standby.rb
362
+ - lib/caco/repmgr/node_registered.rb
363
+ - lib/caco/repmgr/node_role.rb
364
+ - lib/caco/repmgr/view/conf.erb
365
+ - lib/caco/settings_loader.rb
366
+ - lib/caco/settings_loader_monkeypatch.rb
367
+ - lib/caco/ssh.rb
368
+ - lib/caco/ssh/authorized_keys_add.rb
369
+ - lib/caco/sudo.rb
370
+ - lib/caco/sudo/sudoers_add.rb
371
+ - lib/caco/timescale.rb
372
+ - lib/caco/timescale/install.rb
373
+ - lib/caco/unpacker.rb
374
+ - lib/caco/version.rb
375
+ homepage: https://github.com/fernandes/caco
376
+ licenses:
377
+ - MIT
378
+ metadata: {}
379
+ post_install_message:
380
+ rdoc_options: []
381
+ require_paths:
382
+ - lib
383
+ required_ruby_version: !ruby/object:Gem::Requirement
384
+ requirements:
385
+ - - ">="
386
+ - !ruby/object:Gem::Version
387
+ version: '0'
388
+ required_rubygems_version: !ruby/object:Gem::Requirement
389
+ requirements:
390
+ - - ">="
391
+ - !ruby/object:Gem::Version
392
+ version: '0'
393
+ requirements: []
394
+ rubygems_version: 3.0.1
395
+ signing_key:
396
+ specification_version: 4
397
+ summary: Caco, The Frog
398
+ test_files: []