eac_tools 0.31.1 → 0.32.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +36 -36
  3. data/lib/eac_tools/version.rb +1 -1
  4. data/sub/avm/avm.gemspec +1 -1
  5. data/sub/avm/lib/avm/entries/auto_values/entry.rb +11 -4
  6. data/sub/avm/lib/avm/entries/jobs/base.rb +62 -0
  7. data/sub/avm/lib/avm/entries/jobs/variables_source/read_entry.rb +50 -0
  8. data/sub/avm/lib/avm/entries/jobs/variables_source.rb +15 -0
  9. data/sub/avm/lib/avm/entries/jobs/with_variables_source.rb +15 -0
  10. data/sub/avm/lib/avm/{jobs.rb → entries/jobs.rb} +4 -2
  11. data/sub/avm/lib/avm/instances/base/entry_keys.rb +1 -1
  12. data/sub/avm/lib/avm/instances/entry_keys.rb +1 -1
  13. data/sub/avm/lib/avm/rspec/setup.rb +7 -8
  14. data/sub/avm/lib/avm/rspec/shared_examples/entries_values.rb +23 -0
  15. data/sub/avm/lib/avm/version.rb +1 -1
  16. data/sub/avm/spec/lib/avm/instances/base_spec.rb +77 -97
  17. data/sub/avm/spec/lib/avm/instances/{base_spec_configs_storage.yml → base_spec_files/config.yml} +0 -0
  18. data/sub/avm-eac_asciidoctor_base0/avm-eac_asciidoctor_base0.gemspec +2 -2
  19. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/apache_host.rb +2 -2
  20. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/apache_path.rb +2 -2
  21. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/deploy.rb +2 -2
  22. data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/version.rb +1 -1
  23. data/sub/avm-eac_latex_base0/avm-eac_latex_base0.gemspec +3 -3
  24. data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/instances/apache_host.rb +2 -2
  25. data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/instances/deploy.rb +2 -2
  26. data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/version.rb +1 -1
  27. data/sub/avm-eac_rails_base0/avm-eac_rails_base0.gemspec +2 -2
  28. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/apache_host.rb +2 -2
  29. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/apache_path.rb +2 -2
  30. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/deploy.rb +2 -2
  31. data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/version.rb +1 -1
  32. data/sub/avm-eac_rails_base1/avm-eac_rails_base1.gemspec +4 -4
  33. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/apache_host.rb +19 -0
  34. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/systemd_unit/service.rb +72 -0
  35. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/systemd_unit/tasks_scheduler_command.rb +31 -0
  36. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/systemd_unit.rb +59 -0
  37. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/tasks_scheduler/systemd_unit.rb +4 -4
  38. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +1 -1
  39. data/sub/avm-eac_rails_base1/template/avm/eac_rails_base1/{systemd_unit → instances/systemd_unit}/tasks_scheduler.service +0 -0
  40. data/sub/avm-eac_rails_base1/template/avm/eac_rails_base1/{systemd_unit → instances/systemd_unit}/tasks_scheduler_command.sh +0 -0
  41. data/sub/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +2 -2
  42. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/apache_host.rb +2 -2
  43. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/database.rb +30 -0
  44. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/gitolite.rb +42 -0
  45. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/web.rb +20 -0
  46. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base.rb +1 -0
  47. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/deploy.rb +2 -2
  48. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/docker_image.rb +2 -6
  49. data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
  50. data/sub/avm-eac_redmine_base0/spec/lib/avm/eac_redmine_base0/instances/base/gitolite_spec.rb +26 -0
  51. data/sub/avm-eac_redmine_base0/spec/lib/avm/eac_redmine_base0/instances/base/gitolite_spec_files/config.yml +10 -0
  52. data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/deploy/config/install.sh.template +11 -3
  53. data/sub/avm-eac_webapp_base0/avm-eac_webapp_base0.gemspec +2 -2
  54. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/apache_host.rb +85 -0
  55. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/apache_path.rb +54 -0
  56. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/base.rb +1 -1
  57. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/appended_directories.rb +27 -0
  58. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/build.rb +50 -0
  59. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/file_unit.rb +44 -0
  60. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/git_info.rb +64 -0
  61. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/version.rb +26 -0
  62. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/write_on_target.rb +20 -0
  63. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy.rb +75 -0
  64. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/version.rb +1 -1
  65. data/sub/avm-eac_webapp_base0/template/avm/eac_webapp_base0/{apache_host → instances/apache_host}/no_ssl.conf +0 -0
  66. data/sub/avm-eac_webapp_base0/template/avm/eac_webapp_base0/{apache_path → instances/apache_path}/default.conf +0 -0
  67. data/sub/avm-eac_wordpress_base0/avm-eac_wordpress_base0.gemspec +3 -3
  68. data/sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/instances/apache_host.rb +2 -2
  69. data/sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/instances/deploy.rb +2 -2
  70. data/sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/version.rb +1 -1
  71. metadata +63 -31
  72. data/sub/avm/lib/avm/jobs/base.rb +0 -63
  73. data/sub/avm/lib/avm/jobs/variables_source.rb +0 -22
  74. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/apache_host.rb +0 -17
  75. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/systemd_unit/service.rb +0 -70
  76. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/systemd_unit/tasks_scheduler_command.rb +0 -29
  77. data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/systemd_unit.rb +0 -57
  78. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/apache_host.rb +0 -83
  79. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/apache_path.rb +0 -51
  80. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy/appended_directories.rb +0 -25
  81. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy/build.rb +0 -48
  82. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy/file_unit.rb +0 -42
  83. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy/git_info.rb +0 -62
  84. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy/version.rb +0 -24
  85. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy/write_on_target.rb +0 -18
  86. data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy.rb +0 -73
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eac_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.31.1
4
+ version: 0.32.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Put here the authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-22 00:00:00.000000000 Z
11
+ date: 2022-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avm
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.44'
19
+ version: '0.45'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.44'
26
+ version: '0.45'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: avm-eac_asciidoctor_base0
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -31,6 +31,9 @@ dependencies:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0.7'
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: 0.7.1
34
37
  type: :runtime
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
@@ -38,6 +41,9 @@ dependencies:
38
41
  - - "~>"
39
42
  - !ruby/object:Gem::Version
40
43
  version: '0.7'
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 0.7.1
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: avm-eac_generic_base0
43
49
  requirement: !ruby/object:Gem::Requirement
@@ -59,6 +65,9 @@ dependencies:
59
65
  - - "~>"
60
66
  - !ruby/object:Gem::Version
61
67
  version: '0.2'
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: 0.2.1
62
71
  type: :runtime
63
72
  prerelease: false
64
73
  version_requirements: !ruby/object:Gem::Requirement
@@ -66,6 +75,9 @@ dependencies:
66
75
  - - "~>"
67
76
  - !ruby/object:Gem::Version
68
77
  version: '0.2'
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: 0.2.1
69
81
  - !ruby/object:Gem::Dependency
70
82
  name: avm-eac_rails_base0
71
83
  requirement: !ruby/object:Gem::Requirement
@@ -73,6 +85,9 @@ dependencies:
73
85
  - - "~>"
74
86
  - !ruby/object:Gem::Version
75
87
  version: '0.8'
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: 0.8.1
76
91
  type: :runtime
77
92
  prerelease: false
78
93
  version_requirements: !ruby/object:Gem::Requirement
@@ -80,34 +95,37 @@ dependencies:
80
95
  - - "~>"
81
96
  - !ruby/object:Gem::Version
82
97
  version: '0.8'
98
+ - - ">="
99
+ - !ruby/object:Gem::Version
100
+ version: 0.8.1
83
101
  - !ruby/object:Gem::Dependency
84
102
  name: avm-eac_rails_base1
85
103
  requirement: !ruby/object:Gem::Requirement
86
104
  requirements:
87
105
  - - "~>"
88
106
  - !ruby/object:Gem::Version
89
- version: '0.6'
107
+ version: '0.7'
90
108
  type: :runtime
91
109
  prerelease: false
92
110
  version_requirements: !ruby/object:Gem::Requirement
93
111
  requirements:
94
112
  - - "~>"
95
113
  - !ruby/object:Gem::Version
96
- version: '0.6'
114
+ version: '0.7'
97
115
  - !ruby/object:Gem::Dependency
98
116
  name: avm-eac_redmine_base0
99
117
  requirement: !ruby/object:Gem::Requirement
100
118
  requirements:
101
119
  - - "~>"
102
120
  - !ruby/object:Gem::Version
103
- version: '0.15'
121
+ version: '0.16'
104
122
  type: :runtime
105
123
  prerelease: false
106
124
  version_requirements: !ruby/object:Gem::Requirement
107
125
  requirements:
108
126
  - - "~>"
109
127
  - !ruby/object:Gem::Version
110
- version: '0.15'
128
+ version: '0.16'
111
129
  - !ruby/object:Gem::Dependency
112
130
  name: avm-eac_redmine_plugin_base0
113
131
  requirement: !ruby/object:Gem::Requirement
@@ -142,14 +160,14 @@ dependencies:
142
160
  requirements:
143
161
  - - "~>"
144
162
  - !ruby/object:Gem::Version
145
- version: '0.8'
163
+ version: '0.9'
146
164
  type: :runtime
147
165
  prerelease: false
148
166
  version_requirements: !ruby/object:Gem::Requirement
149
167
  requirements:
150
168
  - - "~>"
151
169
  - !ruby/object:Gem::Version
152
- version: '0.8'
170
+ version: '0.9'
153
171
  - !ruby/object:Gem::Dependency
154
172
  name: avm-eac_wordpress_base0
155
173
  requirement: !ruby/object:Gem::Requirement
@@ -157,6 +175,9 @@ dependencies:
157
175
  - - "~>"
158
176
  - !ruby/object:Gem::Version
159
177
  version: '0.2'
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: 0.2.1
160
181
  type: :runtime
161
182
  prerelease: false
162
183
  version_requirements: !ruby/object:Gem::Requirement
@@ -164,6 +185,9 @@ dependencies:
164
185
  - - "~>"
165
186
  - !ruby/object:Gem::Version
166
187
  version: '0.2'
188
+ - - ">="
189
+ - !ruby/object:Gem::Version
190
+ version: 0.2.1
167
191
  - !ruby/object:Gem::Dependency
168
192
  name: avm-tools
169
193
  requirement: !ruby/object:Gem::Requirement
@@ -343,9 +367,12 @@ files:
343
367
  - sub/avm-eac_rails_base1/Gemfile
344
368
  - sub/avm-eac_rails_base1/avm-eac_rails_base1.gemspec
345
369
  - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1.rb
346
- - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/apache_host.rb
347
370
  - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances.rb
371
+ - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/apache_host.rb
348
372
  - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/base.rb
373
+ - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/systemd_unit.rb
374
+ - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/systemd_unit/service.rb
375
+ - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/systemd_unit/tasks_scheduler_command.rb
349
376
  - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner.rb
350
377
  - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/bundle.rb
351
378
  - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/code_runner.rb
@@ -358,20 +385,20 @@ files:
358
385
  - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner_with/bundle.rb
359
386
  - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner_with/rails_environment.rb
360
387
  - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/sources/base.rb
361
- - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/systemd_unit.rb
362
- - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/systemd_unit/service.rb
363
- - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/systemd_unit/tasks_scheduler_command.rb
364
388
  - sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb
365
389
  - sub/avm-eac_rails_base1/spec/rubocop_spec.rb
366
390
  - sub/avm-eac_rails_base1/spec/spec_helper.rb
367
- - sub/avm-eac_rails_base1/template/avm/eac_rails_base1/systemd_unit/tasks_scheduler.service
368
- - sub/avm-eac_rails_base1/template/avm/eac_rails_base1/systemd_unit/tasks_scheduler_command.sh
391
+ - sub/avm-eac_rails_base1/template/avm/eac_rails_base1/instances/systemd_unit/tasks_scheduler.service
392
+ - sub/avm-eac_rails_base1/template/avm/eac_rails_base1/instances/systemd_unit/tasks_scheduler_command.sh
369
393
  - sub/avm-eac_redmine_base0/Gemfile
370
394
  - sub/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec
371
395
  - sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0.rb
372
396
  - sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances.rb
373
397
  - sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/apache_host.rb
374
398
  - sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base.rb
399
+ - sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/database.rb
400
+ - sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/gitolite.rb
401
+ - sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/web.rb
375
402
  - sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/data_unit.rb
376
403
  - sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/deploy.rb
377
404
  - sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/docker_image.rb
@@ -392,6 +419,8 @@ files:
392
419
  - sub/avm-eac_redmine_base0/locale/pt-BR.yml
393
420
  - sub/avm-eac_redmine_base0/spec/lib/avm/eac_redmine_base0/instances/apache_host_spec.rb
394
421
  - sub/avm-eac_redmine_base0/spec/lib/avm/eac_redmine_base0/instances/apache_host_spec_files/apache_host_spec_no_ssl_content.conf
422
+ - sub/avm-eac_redmine_base0/spec/lib/avm/eac_redmine_base0/instances/base/gitolite_spec.rb
423
+ - sub/avm-eac_redmine_base0/spec/lib/avm/eac_redmine_base0/instances/base/gitolite_spec_files/config.yml
395
424
  - sub/avm-eac_redmine_base0/spec/rubocop_spec.rb
396
425
  - sub/avm-eac_redmine_base0/spec/spec_helper.rb
397
426
  - sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/deploy/config/install.sh.template
@@ -515,17 +544,17 @@ files:
515
544
  - sub/avm-eac_webapp_base0/Gemfile
516
545
  - sub/avm-eac_webapp_base0/avm-eac_webapp_base0.gemspec
517
546
  - sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0.rb
518
- - sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/apache_host.rb
519
- - sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/apache_path.rb
520
- - sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy.rb
521
- - sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy/appended_directories.rb
522
- - sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy/build.rb
523
- - sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy/file_unit.rb
524
- - sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy/git_info.rb
525
- - sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy/version.rb
526
- - sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy/write_on_target.rb
547
+ - sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/apache_host.rb
548
+ - sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/apache_path.rb
527
549
  - sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/base.rb
528
550
  - sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/base/subcommand_parent.rb
551
+ - sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy.rb
552
+ - sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/appended_directories.rb
553
+ - sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/build.rb
554
+ - sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/file_unit.rb
555
+ - sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/git_info.rb
556
+ - sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/version.rb
557
+ - sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/write_on_target.rb
529
558
  - sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners.rb
530
559
  - sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/apache_host.rb
531
560
  - sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/runners/apache_path.rb
@@ -540,8 +569,8 @@ files:
540
569
  - sub/avm-eac_webapp_base0/spec/lib/avm/eac_webapp_base0/sources/base_spec.rb
541
570
  - sub/avm-eac_webapp_base0/spec/rubocop_spec.rb
542
571
  - sub/avm-eac_webapp_base0/spec/spec_helper.rb
543
- - sub/avm-eac_webapp_base0/template/avm/eac_webapp_base0/apache_host/no_ssl.conf
544
- - sub/avm-eac_webapp_base0/template/avm/eac_webapp_base0/apache_path/default.conf
572
+ - sub/avm-eac_webapp_base0/template/avm/eac_webapp_base0/instances/apache_host/no_ssl.conf
573
+ - sub/avm-eac_webapp_base0/template/avm/eac_webapp_base0/instances/apache_path/default.conf
545
574
  - sub/avm-eac_wordpress_base0/Gemfile
546
575
  - sub/avm-eac_wordpress_base0/avm-eac_wordpress_base0.gemspec
547
576
  - sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0.rb
@@ -803,6 +832,11 @@ files:
803
832
  - sub/avm/lib/avm/entries/base/uri_components_entries_values/path_component.rb
804
833
  - sub/avm/lib/avm/entries/base/uri_components_entries_values/url_component.rb
805
834
  - sub/avm/lib/avm/entries/entry.rb
835
+ - sub/avm/lib/avm/entries/jobs.rb
836
+ - sub/avm/lib/avm/entries/jobs/base.rb
837
+ - sub/avm/lib/avm/entries/jobs/variables_source.rb
838
+ - sub/avm/lib/avm/entries/jobs/variables_source/read_entry.rb
839
+ - sub/avm/lib/avm/entries/jobs/with_variables_source.rb
806
840
  - sub/avm/lib/avm/entries/keys_constants_set.rb
807
841
  - sub/avm/lib/avm/entries/uri_builder.rb
808
842
  - sub/avm/lib/avm/executables.rb
@@ -821,9 +855,6 @@ files:
821
855
  - sub/avm/lib/avm/instances/docker_image.rb
822
856
  - sub/avm/lib/avm/instances/entry_keys.rb
823
857
  - sub/avm/lib/avm/instances/runner.rb
824
- - sub/avm/lib/avm/jobs.rb
825
- - sub/avm/lib/avm/jobs/base.rb
826
- - sub/avm/lib/avm/jobs/variables_source.rb
827
858
  - sub/avm/lib/avm/launcher/errors/base.rb
828
859
  - sub/avm/lib/avm/launcher/errors/non_project.rb
829
860
  - sub/avm/lib/avm/launcher/paths/real.rb
@@ -844,6 +875,7 @@ files:
844
875
  - sub/avm/lib/avm/result.rb
845
876
  - sub/avm/lib/avm/rspec.rb
846
877
  - sub/avm/lib/avm/rspec/setup.rb
878
+ - sub/avm/lib/avm/rspec/shared_examples/entries_values.rb
847
879
  - sub/avm/lib/avm/rspec/shared_examples/in_avm_registry.rb
848
880
  - sub/avm/lib/avm/rspec/shared_examples/not_in_avm_registry.rb
849
881
  - sub/avm/lib/avm/runners/base.rb
@@ -885,7 +917,7 @@ files:
885
917
  - sub/avm/spec/lib/avm/applications/base_spec.rb
886
918
  - sub/avm/spec/lib/avm/applications/base_spec_fixture.yml
887
919
  - sub/avm/spec/lib/avm/instances/base_spec.rb
888
- - sub/avm/spec/lib/avm/instances/base_spec_configs_storage.yml
920
+ - sub/avm/spec/lib/avm/instances/base_spec_files/config.yml
889
921
  - sub/avm/spec/lib/avm/scms/base_spec.rb
890
922
  - sub/avm/spec/lib/avm/sources/base_spec.rb
891
923
  - sub/avm/spec/lib/avm/sources/runner_spec.rb
@@ -1,63 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/jobs/variables_source'
4
- require 'avm/result'
5
- require 'eac_cli/core_ext'
6
-
7
- module Avm
8
- module Jobs
9
- module Base
10
- common_concern do
11
- include ::ActiveSupport::Callbacks
12
-
13
- enable_speaker
14
- enable_simple_cache
15
- enable_listable
16
- common_constructor :instance, :options, default: [{}] do
17
- if option_list.present?
18
- self.options = option_list.hash_keys_validate!(options.symbolize_keys)
19
- end
20
- end
21
- define_callbacks(*jobs)
22
- end
23
-
24
- module ClassMethods
25
- def jobs
26
- const_get('JOBS').dup
27
- end
28
- end
29
-
30
- module InstanceMethods
31
- def option_list
32
- nil
33
- end
34
-
35
- def run
36
- start_banner if respond_to?(:start_banner)
37
- run_jobs
38
- ::Avm::Result.success('Done!')
39
- rescue ::Avm::Result::Error => e
40
- e.to_result
41
- end
42
-
43
- def variables_source
44
- ::Avm::Jobs::VariablesSource.new(self, instance)
45
- end
46
-
47
- protected
48
-
49
- def run_jobs
50
- jobs.each do |job|
51
- run_callbacks job do
52
- send(job)
53
- end
54
- end
55
- end
56
-
57
- def jobs
58
- self.class.jobs
59
- end
60
- end
61
- end
62
- end
63
- end
@@ -1,22 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Avm
6
- module Jobs
7
- class VariablesSource
8
- common_constructor :job, :instance
9
-
10
- def read_entry(path, options = {})
11
- entry_from_job(path) || instance.read_entry(path, options)
12
- end
13
-
14
- private
15
-
16
- def entry_from_job(path)
17
- method = path.gsub('.', '_').underscore
18
- return job.send(method) if job.respond_to?(method, true)
19
- end
20
- end
21
- end
22
- end
@@ -1,17 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/eac_webapp_base0/apache_host'
4
-
5
- module Avm
6
- module EacRailsBase1
7
- class ApacheHost < ::Avm::EacWebappBase0::ApacheHost
8
- def document_root
9
- "#{instance.read_entry(::Avm::Instances::EntryKeys::INSTALL_PATH)}/public"
10
- end
11
-
12
- def extra_content
13
- 'PassengerEnabled On'
14
- end
15
- end
16
- end
17
- end
@@ -1,70 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Avm
6
- module EacRailsBase1
7
- class SystemdUnit
8
- module Service
9
- def service_content
10
- template.child('tasks_scheduler.service').apply(variables_source)
11
- end
12
-
13
- def service_exec_lines
14
- service_exec_operations
15
- .map { |k, v| "#{k}=#{tasks_scheduler_command_path} #{v}" }
16
- .join("\n")
17
- end
18
-
19
- def service_path
20
- ::Pathname.new('/etc/systemd/system').join(unit_name)
21
- end
22
-
23
- def service_link_path
24
- ::Pathname.new('/etc/systemd/system/multi-user.target.wants').join(unit_name)
25
- end
26
-
27
- def verify_service
28
- sudo_system!('systemd-analyze', 'verify', service_path)
29
- end
30
-
31
- private
32
-
33
- def enable_service
34
- systemctl('enable', unit_name)
35
- end
36
-
37
- def link_service
38
- sudo_execute!('rm', '-f', service_link_path)
39
- sudo_execute!('ln', '-s', service_path, service_link_path)
40
- end
41
-
42
- def reload_systemd
43
- systemctl('daemon-reload')
44
- end
45
-
46
- # @return [Hash<String, String>]
47
- def service_exec_operations
48
- if exec_run?
49
- { 'ExecStart' => 'run' }
50
- else
51
- { 'ExecStart' => 'start', 'ExecStop' => 'stop' }
52
- end
53
- end
54
-
55
- def start_service
56
- systemctl('start', unit_name)
57
- end
58
-
59
- def systemctl(*args)
60
- sudo_system!('systemctl', *args)
61
- end
62
-
63
- def write_service
64
- infom 'Writing service\'s unit file...'
65
- platform_instance.file_sudo_write(service_path, service_content)
66
- end
67
- end
68
- end
69
- end
70
- end
@@ -1,29 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
-
5
- module Avm
6
- module EacRailsBase1
7
- class SystemdUnit
8
- module TasksSchedulerCommand
9
- def tasks_scheduler_command_content
10
- template.child('tasks_scheduler_command.sh').apply(variables_source)
11
- end
12
-
13
- def tasks_scheduler_command_path
14
- "/opt/aux/#{instance.id}/tasks_scheduler.sh"
15
- end
16
-
17
- private
18
-
19
- def write_tasks_scheduler_command
20
- infom 'Writing tasks scheduler\'s command...'
21
- sudo_execute!('mkdir', '-p', ::File.dirname(tasks_scheduler_command_path))
22
- platform_instance.file_sudo_write(tasks_scheduler_command_path,
23
- tasks_scheduler_command_content)
24
- sudo_execute!('chmod', '+x', tasks_scheduler_command_path)
25
- end
26
- end
27
- end
28
- end
29
- end
@@ -1,57 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/jobs/base'
4
- require 'avm/eac_ubuntu_base0/apache'
5
- require 'eac_ruby_utils/core_ext'
6
-
7
- module Avm
8
- module EacRailsBase1
9
- class SystemdUnit
10
- JOBS = %w[write_tasks_scheduler_command write_service link_service verify_service
11
- reload_systemd enable_service start_service].freeze
12
-
13
- include ::Avm::Jobs::Base
14
- require_sub __FILE__, include_modules: true
15
- delegate :platform_instance, to: :instance
16
-
17
- enable_listable
18
- lists.add_symbol :option, :exec_run, :restart
19
-
20
- def description
21
- "#{instance.id} Tasks Scheduler"
22
- end
23
-
24
- def exec_run?
25
- options[OPTION_EXEC_RUN]
26
- end
27
-
28
- def option_list
29
- self.class.lists.option
30
- end
31
-
32
- def restart
33
- options[OPTION_RESTART]
34
- end
35
-
36
- def unit_name
37
- "#{instance.id}_tasks_scheduler.service"
38
- end
39
-
40
- def user
41
- instance.install_username
42
- end
43
-
44
- private
45
-
46
- def sudo_execute!(*args)
47
- platform_instance.host_env.command(['sudo'] + args).execute!
48
- end
49
-
50
- def sudo_system!(*args)
51
- command_args = ['sudo'] + args
52
- infom "Running \"#{::Shellwords.join(command_args)}\"..."
53
- platform_instance.host_env.command(command_args).system!
54
- end
55
- end
56
- end
57
- end
@@ -1,83 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'eac_ruby_utils/core_ext'
4
- require 'avm/jobs/base'
5
- require 'avm/eac_ubuntu_base0/apache'
6
- require 'eac_templates/core_ext'
7
-
8
- module Avm
9
- module EacWebappBase0
10
- class ApacheHost
11
- APACHE_DIRECTORY_EXTRA_CONFIG_KEY = 'install.apache_directory_extra_config'
12
- JOBS = %w[write_available_no_ssl_site enable_no_ssl_site remove_ssl_site reload_apache
13
- run_certbot enable_ssl_site reload_apache].freeze
14
- include ::Avm::Jobs::Base
15
-
16
- def directory_extra_config
17
- instance.entry(APACHE_DIRECTORY_EXTRA_CONFIG_KEY).value.if_present { |v| " #{v}\n" }
18
- end
19
-
20
- def no_ssl_site_content
21
- ::Avm::EacWebappBase0::ApacheHost
22
- .template.child('no_ssl.conf')
23
- .apply(variables_source)
24
- end
25
-
26
- def ssl?
27
- options[:certbot]
28
- end
29
-
30
- private
31
-
32
- def apache_uncached
33
- ::Avm::EacUbuntuBase0::Apache.new(instance.host_env)
34
- end
35
-
36
- def enable_no_ssl_site
37
- infom 'Enabling no SSL site...'
38
- no_ssl_site.enable
39
- end
40
-
41
- def enable_ssl_site
42
- return unless ssl?
43
-
44
- infom 'Enabling SSL site...'
45
- ssl_site.enable
46
- end
47
-
48
- def no_ssl_site_uncached
49
- apache.site(instance.id)
50
- end
51
-
52
- def reload_apache
53
- infom 'Reloading Apache...'
54
- apache.service('reload')
55
- end
56
-
57
- def remove_ssl_site
58
- infom 'Removing SSL site...'
59
- ssl_site.remove
60
- end
61
-
62
- def run_certbot
63
- return unless ssl?
64
-
65
- infom 'Running Certbot...'
66
- instance.host_env.command(
67
- 'sudo', 'certbot', '--apache', '--domain', instance.read_entry('web.hostname'),
68
- '--redirect', '--non-interactive', '--agree-tos',
69
- '--email', instance.install_email
70
- ).system!
71
- end
72
-
73
- def ssl_site_uncached
74
- apache.site(no_ssl_site.name + '-le-ssl')
75
- end
76
-
77
- def write_available_no_ssl_site
78
- infom 'Writing no SSL site conf...'
79
- no_ssl_site.write(no_ssl_site_content)
80
- end
81
- end
82
- end
83
- end
@@ -1,51 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'avm/jobs/base'
4
- require 'avm/eac_ubuntu_base0/apache'
5
- require 'eac_ruby_utils/core_ext'
6
-
7
- module Avm
8
- module EacWebappBase0
9
- class ApachePath
10
- JOBS = %w[write_available_conf enable_conf reload_apache].freeze
11
- include ::Avm::Jobs::Base
12
-
13
- def content
14
- ::Avm::EacWebappBase0::ApachePath.template.child('default.conf').apply(variables_source)
15
- end
16
-
17
- def document_root
18
- instance.read_entry(::Avm::Instances::EntryKeys::INSTALL_PATH)
19
- end
20
-
21
- def extra_content
22
- ''
23
- end
24
-
25
- private
26
-
27
- def apache_uncached
28
- ::Avm::EacUbuntuBase0::Apache.new(instance.host_env)
29
- end
30
-
31
- def enable_conf
32
- infom 'Enabling configuration...'
33
- conf.enable
34
- end
35
-
36
- def reload_apache
37
- infom 'Reloading Apache...'
38
- apache.service('reload')
39
- end
40
-
41
- def conf_uncached
42
- apache.conf(instance.id)
43
- end
44
-
45
- def write_available_conf
46
- infom 'Writing available configuration...'
47
- conf.write(content)
48
- end
49
- end
50
- end
51
- end