eac_tools 0.24.0 → 0.25.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +27 -27
- data/lib/eac_tools/version.rb +1 -1
- data/sub/avm/avm.gemspec +3 -3
- data/sub/avm/lib/avm/entries/auto_values/uri_entry.rb +1 -1
- data/sub/avm/lib/avm/entries/base/inherited_entry_value.rb +31 -0
- data/sub/avm/lib/avm/entries/base/uri_component_entry_value.rb +71 -0
- data/sub/avm/lib/avm/entries/base.rb +2 -10
- data/sub/avm/lib/avm/entries/entry.rb +10 -1
- data/sub/avm/lib/avm/entries/uri_builder.rb +4 -0
- data/sub/avm/lib/avm/instances/base/auto_values/filesystem.rb +0 -5
- data/sub/avm/lib/avm/instances/base/auto_values/install.rb +20 -15
- data/sub/avm/lib/avm/instances/entry_keys.rb +4 -3
- data/sub/avm/lib/avm/version.rb +1 -1
- data/sub/avm/spec/lib/avm/instances/base_spec.rb +17 -1
- data/sub/avm/spec/lib/avm/instances/base_spec_configs_storage.yml +7 -1
- data/sub/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +2 -2
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/deploy.rb +37 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/runners/base.rb +1 -1
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
- data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/{deploy → instances/deploy}/config/install.sh.template +0 -0
- data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/{deploy → instances/deploy}/config/secrets.yml +0 -0
- data/sub/avm-eac_ruby_base1/avm-eac_ruby_base1.gemspec +2 -2
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/runners/update_dependencies_requirements.rb +7 -1
- data/sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/version.rb +1 -1
- data/sub/avm-eac_webapp_base0/avm-eac_webapp_base0.gemspec +2 -2
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy/file_unit.rb +1 -1
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/runner/deploy.rb +2 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/version.rb +1 -1
- data/sub/eac_config/eac_config.gemspec +2 -2
- data/sub/eac_config/lib/eac_config/entry.rb +4 -0
- data/sub/eac_config/lib/eac_config/entry_path.rb +6 -1
- data/sub/eac_config/lib/eac_config/envvars_node.rb +4 -0
- data/sub/eac_config/lib/eac_config/node_entry.rb +5 -0
- data/sub/eac_config/lib/eac_config/version.rb +1 -1
- data/sub/eac_config/lib/eac_config/yaml_file_node.rb +4 -0
- data/sub/eac_config/spec/lib/eac_config/envvars_node_spec.rb +11 -0
- data/sub/eac_ruby_utils/eac_ruby_utils.gemspec +2 -2
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/class_accessors.rb +36 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/class_initialize.rb +14 -4
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_constructor/instance_initialize.rb +15 -4
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/common_constructor.rb +20 -15
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/ruby/on_clean_environment.rb +53 -20
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/ruby/on_replace_objects/replace_instance_method.rb +36 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/ruby/on_replace_objects.rb +52 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/common_constructor_spec.rb +26 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/{ruby_spec.rb → ruby/on_clean_environment_spec.rb} +11 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/ruby/on_replace_objects_spec.rb +67 -0
- metadata +28 -22
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/deploy.rb +0 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2dd36587fe5621b65a2fd826e04b44f9c941b848a9e5d3bb82f0e40375ec679b
|
4
|
+
data.tar.gz: '0880b563b0f3b7f367ddc299a385a76c626260937d779f4cd92f1884ad0ecc3d'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8edc33b2af676aaa9ba92138791e4e13fea951c028acd1efc6988a2d4922efd03bad2bb39ff15391110f070c63872ae17bb6a2831421095b62768f8a64c63864
|
7
|
+
data.tar.gz: 68360fc6669359864fbebeab00cf8a858bd341ffc849ed6855a4f5783efa5ee319c4c5a861a5752b0c55894be786b9a7230c0af5c5624cf99ef14bc354ccb064
|
data/Gemfile.lock
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
eac_tools (0.
|
5
|
-
avm (~> 0.
|
4
|
+
eac_tools (0.25.1)
|
5
|
+
avm (~> 0.39, >= 0.39.1)
|
6
6
|
avm-eac_asciidoctor_base0 (~> 0.5)
|
7
7
|
avm-eac_generic_base0 (~> 0.5)
|
8
8
|
avm-eac_latex_base0 (~> 0.1, >= 0.1.2)
|
9
9
|
avm-eac_rails_base0 (~> 0.7)
|
10
10
|
avm-eac_rails_base1 (~> 0.5)
|
11
|
-
avm-eac_redmine_base0 (~> 0.
|
11
|
+
avm-eac_redmine_base0 (~> 0.13)
|
12
12
|
avm-eac_redmine_plugin_base0 (~> 0.3)
|
13
|
-
avm-eac_ruby_base1 (~> 0.
|
14
|
-
avm-eac_webapp_base0 (~> 0.
|
13
|
+
avm-eac_ruby_base1 (~> 0.20)
|
14
|
+
avm-eac_webapp_base0 (~> 0.5)
|
15
15
|
avm-eac_wordpress_base0 (~> 0.1, >= 0.1.2)
|
16
16
|
avm-tools (~> 0.133)
|
17
|
-
eac_ruby_utils (~> 0.
|
17
|
+
eac_ruby_utils (~> 0.102)
|
18
18
|
|
19
19
|
PATH
|
20
20
|
remote: sub/avm-eac_asciidoctor_base0
|
@@ -60,15 +60,15 @@ PATH
|
|
60
60
|
PATH
|
61
61
|
remote: sub/avm-eac_redmine_base0
|
62
62
|
specs:
|
63
|
-
avm-eac_redmine_base0 (0.
|
64
|
-
avm (~> 0.
|
63
|
+
avm-eac_redmine_base0 (0.13.0)
|
64
|
+
avm (~> 0.39, >= 0.39.1)
|
65
65
|
avm-eac_generic_base0 (~> 0.5)
|
66
66
|
avm-eac_rails_base1 (~> 0.5)
|
67
67
|
avm-eac_ubuntu_base0 (~> 0.3)
|
68
68
|
curb (~> 0.9, >= 0.9.11)
|
69
69
|
eac_fs (~> 0.12, >= 0.12.3)
|
70
70
|
eac_rest (~> 0.6, >= 0.6.1)
|
71
|
-
eac_ruby_utils (~> 0.
|
71
|
+
eac_ruby_utils (~> 0.102)
|
72
72
|
|
73
73
|
PATH
|
74
74
|
remote: sub/avm-eac_redmine_plugin_base0
|
@@ -80,20 +80,20 @@ PATH
|
|
80
80
|
PATH
|
81
81
|
remote: sub/avm-eac_ruby_base1
|
82
82
|
specs:
|
83
|
-
avm-eac_ruby_base1 (0.
|
84
|
-
avm (~> 0.
|
83
|
+
avm-eac_ruby_base1 (0.20.0)
|
84
|
+
avm (~> 0.39, >= 0.39.1)
|
85
85
|
avm-eac_generic_base0 (~> 0.5)
|
86
|
-
eac_ruby_utils (~> 0.
|
86
|
+
eac_ruby_utils (~> 0.102)
|
87
87
|
|
88
88
|
PATH
|
89
89
|
remote: sub/avm-eac_webapp_base0
|
90
90
|
specs:
|
91
|
-
avm-eac_webapp_base0 (0.
|
92
|
-
avm (~> 0.
|
91
|
+
avm-eac_webapp_base0 (0.5.0)
|
92
|
+
avm (~> 0.39, >= 0.39.1)
|
93
93
|
avm-eac_generic_base0 (~> 0.5)
|
94
94
|
avm-eac_postgresql_base0 (~> 0.2)
|
95
95
|
avm-eac_ubuntu_base0 (~> 0.3)
|
96
|
-
eac_ruby_utils (~> 0.
|
96
|
+
eac_ruby_utils (~> 0.102)
|
97
97
|
|
98
98
|
PATH
|
99
99
|
remote: sub/avm-eac_wordpress_base0
|
@@ -124,12 +124,12 @@ PATH
|
|
124
124
|
PATH
|
125
125
|
remote: sub/avm
|
126
126
|
specs:
|
127
|
-
avm (0.
|
127
|
+
avm (0.39.1)
|
128
128
|
eac_cli (~> 0.27, >= 0.27.8)
|
129
|
-
eac_config (~> 0.
|
129
|
+
eac_config (~> 0.11, >= 0.11.1)
|
130
130
|
eac_docker (~> 0.4, >= 0.4.2)
|
131
|
-
eac_git (~> 0.12, >= 0.12.
|
132
|
-
eac_ruby_utils (~> 0.
|
131
|
+
eac_git (~> 0.12, >= 0.12.2)
|
132
|
+
eac_ruby_utils (~> 0.102)
|
133
133
|
eac_templates (~> 0.3, >= 0.3.1)
|
134
134
|
filesize (~> 0.2)
|
135
135
|
htmlbeautifier (~> 1.4, >= 1.4.2)
|
@@ -146,9 +146,9 @@ PATH
|
|
146
146
|
PATH
|
147
147
|
remote: sub/eac_config
|
148
148
|
specs:
|
149
|
-
eac_config (0.
|
150
|
-
addressable
|
151
|
-
eac_ruby_utils (~> 0.
|
149
|
+
eac_config (0.11.1)
|
150
|
+
addressable (~> 2.8)
|
151
|
+
eac_ruby_utils (~> 0.102)
|
152
152
|
|
153
153
|
PATH
|
154
154
|
remote: sub/eac_docker
|
@@ -177,11 +177,11 @@ PATH
|
|
177
177
|
PATH
|
178
178
|
remote: sub/eac_ruby_utils
|
179
179
|
specs:
|
180
|
-
eac_ruby_utils (0.
|
180
|
+
eac_ruby_utils (0.102.0)
|
181
181
|
activesupport (>= 4, < 7)
|
182
|
-
addressable (~> 2.
|
182
|
+
addressable (~> 2.8)
|
183
183
|
bundler
|
184
|
-
filesize
|
184
|
+
filesize (~> 0.2)
|
185
185
|
net-ssh (~> 4.2)
|
186
186
|
|
187
187
|
GEM
|
@@ -280,7 +280,7 @@ GEM
|
|
280
280
|
concurrent-ruby (~> 1.0)
|
281
281
|
jaro_winkler (1.5.4)
|
282
282
|
minitar (0.9)
|
283
|
-
minitest (5.16.
|
283
|
+
minitest (5.16.3)
|
284
284
|
multipart-post (2.2.3)
|
285
285
|
net-ssh (4.2.0)
|
286
286
|
nokogiri (1.13.8-x86_64-linux)
|
@@ -361,4 +361,4 @@ DEPENDENCIES
|
|
361
361
|
eac_tools!
|
362
362
|
|
363
363
|
BUNDLED WITH
|
364
|
-
2.3.
|
364
|
+
2.3.20
|
data/lib/eac_tools/version.rb
CHANGED
data/sub/avm/avm.gemspec
CHANGED
@@ -13,10 +13,10 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.files = Dir['{lib}/**/*']
|
14
14
|
|
15
15
|
s.add_dependency 'eac_cli', '~> 0.27', '>= 0.27.8'
|
16
|
-
s.add_dependency 'eac_config', '~> 0.
|
16
|
+
s.add_dependency 'eac_config', '~> 0.11', '>= 0.11.1'
|
17
17
|
s.add_dependency 'eac_docker', '~> 0.4', '>= 0.4.2'
|
18
|
-
s.add_dependency 'eac_git', '~> 0.12', '>= 0.12.
|
19
|
-
s.add_dependency 'eac_ruby_utils', '~> 0.
|
18
|
+
s.add_dependency 'eac_git', '~> 0.12', '>= 0.12.2'
|
19
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.102'
|
20
20
|
s.add_dependency 'eac_templates', '~> 0.3', '>= 0.3.1'
|
21
21
|
s.add_dependency 'filesize', '~> 0.2'
|
22
22
|
s.add_dependency 'htmlbeautifier', '~> 1.4', '>= 1.4.2'
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/entries/uri_builder'
|
4
|
+
require 'eac_config/entry_path'
|
5
|
+
require 'eac_ruby_utils/core_ext'
|
6
|
+
|
7
|
+
module Avm
|
8
|
+
module Entries
|
9
|
+
module Base
|
10
|
+
class InheritedEntryValue
|
11
|
+
enable_method_class
|
12
|
+
common_constructor :entries_provider, :source_entry_suffix, :target_entry_suffix, :block,
|
13
|
+
block_arg: true
|
14
|
+
|
15
|
+
def result
|
16
|
+
self_entry_value.if_present do |instance_id|
|
17
|
+
other_entry_value(instance_id).if_present(&block)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def other_entry_value(instance_id)
|
22
|
+
::Avm::Instances::Base.by_id(instance_id).read_entry_optional(target_entry_suffix)
|
23
|
+
end
|
24
|
+
|
25
|
+
def self_entry_value
|
26
|
+
entries_provider.read_entry_optional(source_entry_suffix)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/entries/uri_builder'
|
4
|
+
require 'eac_config/entry_path'
|
5
|
+
require 'eac_ruby_utils/core_ext'
|
6
|
+
|
7
|
+
module Avm
|
8
|
+
module Entries
|
9
|
+
module Base
|
10
|
+
class UriComponentEntryValue
|
11
|
+
enable_method_class
|
12
|
+
|
13
|
+
enable_listable
|
14
|
+
lists.add_symbol :option, :default_value, :inherited_value_block
|
15
|
+
|
16
|
+
common_constructor :entries_provider, :component_entry_path, :options, default: [{}] do
|
17
|
+
self.component_entry_path = ::EacConfig::EntryPath.assert(component_entry_path)
|
18
|
+
self.options = self.class.lists.option.hash_keys_validate!(options)
|
19
|
+
end
|
20
|
+
|
21
|
+
def default_value
|
22
|
+
options[OPTION_DEFAULT_VALUE].call_if_proc
|
23
|
+
end
|
24
|
+
|
25
|
+
def inherited_result
|
26
|
+
entries_provider.inherited_entry_value(
|
27
|
+
id_entry_path.to_string,
|
28
|
+
component_entry_path.to_string,
|
29
|
+
&inherited_value_block
|
30
|
+
)
|
31
|
+
end
|
32
|
+
|
33
|
+
def inherited_value_block
|
34
|
+
options[OPTION_INHERITED_VALUE_BLOCK]
|
35
|
+
end
|
36
|
+
|
37
|
+
# @return [EacConfig::EntryPath]
|
38
|
+
def id_entry_path
|
39
|
+
root_entry_path + %w[id]
|
40
|
+
end
|
41
|
+
|
42
|
+
# @return [String, nil]
|
43
|
+
def result
|
44
|
+
url_entry_value || inherited_result || default_value
|
45
|
+
end
|
46
|
+
|
47
|
+
# @return [EacConfig::EntryPath]
|
48
|
+
def root_entry_path
|
49
|
+
component_entry_path[0..-2]
|
50
|
+
end
|
51
|
+
|
52
|
+
# @return [Avm::Entries::Entry]
|
53
|
+
def url_entry
|
54
|
+
entries_provider.entry((root_entry_path + %w[url]).to_string)
|
55
|
+
end
|
56
|
+
|
57
|
+
def url_entry_value
|
58
|
+
return unless url_entry.context_found?
|
59
|
+
|
60
|
+
::Avm::Entries::UriBuilder.from_source(url_entry.value.to_uri)
|
61
|
+
.avm_field_get(component)
|
62
|
+
end
|
63
|
+
|
64
|
+
# @return [String]
|
65
|
+
def component
|
66
|
+
component_entry_path.last
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -6,6 +6,8 @@ require 'avm/entries/entry'
|
|
6
6
|
module Avm
|
7
7
|
module Entries
|
8
8
|
module Base
|
9
|
+
require_sub __FILE__, require_dependency: true
|
10
|
+
|
9
11
|
def entries_provider_id
|
10
12
|
id
|
11
13
|
end
|
@@ -32,16 +34,6 @@ module Avm
|
|
32
34
|
end
|
33
35
|
(path_prefix + entry_suffix).join('.')
|
34
36
|
end
|
35
|
-
|
36
|
-
def inherited_entry_value(source_entry_suffix, target_entry_suffix, &block)
|
37
|
-
read_entry_optional(source_entry_suffix).if_present do |instance_id|
|
38
|
-
other_entry_value(instance_id, target_entry_suffix).if_present(&block)
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
def other_entry_value(instance_id, entry_suffix)
|
43
|
-
::Avm::Instances::Base.by_id(instance_id).read_entry_optional(entry_suffix)
|
44
|
-
end
|
45
37
|
end
|
46
38
|
end
|
47
39
|
end
|
@@ -10,7 +10,16 @@ module Avm
|
|
10
10
|
common_constructor :parent, :suffix, :options
|
11
11
|
|
12
12
|
def auto_value
|
13
|
-
|
13
|
+
auto_value_entry.value
|
14
|
+
end
|
15
|
+
|
16
|
+
def auto_value_entry
|
17
|
+
@auto_value_entry ||= ::Avm::Entries::AutoValues::Entry.new(parent, suffix)
|
18
|
+
end
|
19
|
+
|
20
|
+
# @return [Boolean]
|
21
|
+
def context_found?
|
22
|
+
context_entry.found?
|
14
23
|
end
|
15
24
|
|
16
25
|
def full_path
|
@@ -12,11 +12,6 @@ module Avm
|
|
12
12
|
::Avm::Instances::EntryKeys::FS_PATH) { |v| v + '/' + id }
|
13
13
|
end
|
14
14
|
|
15
|
-
def auto_data_fs_path
|
16
|
-
inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID,
|
17
|
-
::Avm::Instances::EntryKeys::DATA_FS_PATH) { |v| v + '/' + id }
|
18
|
-
end
|
19
|
-
|
20
15
|
def auto_fs_url
|
21
16
|
auto_fs_url_with_install || auto_fs_url_without_install
|
22
17
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'avm/entries/uri_builder'
|
3
4
|
require 'avm/instances/entry_keys'
|
4
5
|
|
5
6
|
module Avm
|
@@ -7,25 +8,29 @@ module Avm
|
|
7
8
|
class Base
|
8
9
|
module AutoValues
|
9
10
|
module Install
|
10
|
-
def
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
def auto_install_hostname
|
17
|
-
inherited_entry_value(::Avm::Instances::EntryKeys::INSTALL_ID,
|
18
|
-
::Avm::Instances::EntryKeys::INSTALL_HOSTNAME)
|
11
|
+
def auto_install_data_path
|
12
|
+
uri_component_entry_value(
|
13
|
+
::Avm::Instances::EntryKeys::INSTALL_DATA_PATH,
|
14
|
+
inherited_value_block: ->(v) { v + '/' + id }
|
15
|
+
)
|
19
16
|
end
|
20
17
|
|
21
|
-
def
|
22
|
-
|
23
|
-
|
18
|
+
def auto_install_groupname
|
19
|
+
uri_component_entry_value(
|
20
|
+
::Avm::Instances::EntryKeys::INSTALL_GROUPNAME,
|
21
|
+
default_value: lambda do
|
22
|
+
read_entry_optional(::Avm::Instances::EntryKeys::INSTALL_USERNAME)
|
23
|
+
end
|
24
|
+
)
|
24
25
|
end
|
25
26
|
|
26
|
-
|
27
|
-
|
28
|
-
|
27
|
+
::Avm::Entries::UriBuilder::ENTRIES_FIELDS.each do |component|
|
28
|
+
method_suffix = "install_#{component}"
|
29
|
+
define_method "auto_#{method_suffix}" do
|
30
|
+
uri_component_entry_value(
|
31
|
+
::Avm::Instances::EntryKeys.const_get(method_suffix.underscore.upcase)
|
32
|
+
)
|
33
|
+
end
|
29
34
|
end
|
30
35
|
|
31
36
|
def auto_install_url
|
@@ -1,11 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'avm/entries/uri_builder'
|
3
4
|
require 'eac_ruby_utils/core_ext'
|
4
5
|
|
5
6
|
module Avm
|
6
7
|
module Instances
|
7
8
|
module EntryKeys
|
8
|
-
URI_FIELDS = %
|
9
|
+
URI_FIELDS = ::Avm::Entries::UriBuilder::ENTRIES_FIELDS + %w[url]
|
9
10
|
|
10
11
|
class << self
|
11
12
|
def all
|
@@ -44,12 +45,12 @@ module Avm
|
|
44
45
|
end
|
45
46
|
|
46
47
|
{
|
47
|
-
'' => %w[
|
48
|
+
'' => %w[fs_path name source_instance_id],
|
48
49
|
admin: URI_FIELDS + %w[api_key],
|
49
50
|
database: URI_FIELDS + %w[id limit name system timeout extra],
|
50
51
|
docker: %w[registry],
|
51
52
|
fs: %w[url],
|
52
|
-
install: URI_FIELDS + %w[id groupname],
|
53
|
+
install: URI_FIELDS + %w[id data_path groupname],
|
53
54
|
mailer: {
|
54
55
|
'' => %w[id from reply_to],
|
55
56
|
smtp: URI_FIELDS + %w[address domain authentication openssl_verify_mode starttls_auto tls]
|
data/sub/avm/lib/avm/version.rb
CHANGED
@@ -16,7 +16,7 @@ RSpec.describe ::Avm::Instances::Base do
|
|
16
16
|
{
|
17
17
|
'app_0' => {
|
18
18
|
fs_path: '/fs_root/app_0',
|
19
|
-
|
19
|
+
::Avm::Instances::EntryKeys::INSTALL_DATA_PATH => '/data_fs_root/app_0',
|
20
20
|
::Avm::Instances::EntryKeys::DATABASE_NAME => 'app_0',
|
21
21
|
::Avm::Instances::EntryKeys::DATABASE_USERNAME => 'user1',
|
22
22
|
::Avm::Instances::EntryKeys::DATABASE_PASSWORD => 'pass1',
|
@@ -57,6 +57,22 @@ RSpec.describe ::Avm::Instances::Base do
|
|
57
57
|
::Avm::Instances::EntryKeys::INSTALL_GROUPNAME => 'group4',
|
58
58
|
::Avm::Instances::EntryKeys::INSTALL_URL => 'ssh://user4@host4.net'
|
59
59
|
},
|
60
|
+
'app_5' => {
|
61
|
+
::Avm::Instances::EntryKeys::INSTALL_SCHEME => 'ssh',
|
62
|
+
::Avm::Instances::EntryKeys::INSTALL_HOSTNAME => 'host5.net',
|
63
|
+
::Avm::Instances::EntryKeys::INSTALL_PORT => '2222',
|
64
|
+
::Avm::Instances::EntryKeys::INSTALL_USERNAME => 'user5',
|
65
|
+
::Avm::Instances::EntryKeys::INSTALL_PASSWORD => 'passwd5',
|
66
|
+
::Avm::Instances::EntryKeys::INSTALL_PATH => '/path/to/app5'
|
67
|
+
},
|
68
|
+
'app_6' => {
|
69
|
+
::Avm::Instances::EntryKeys::INSTALL_SCHEME => 'ssh',
|
70
|
+
::Avm::Instances::EntryKeys::INSTALL_HOSTNAME => 'host5.net',
|
71
|
+
::Avm::Instances::EntryKeys::INSTALL_PORT => '2222',
|
72
|
+
::Avm::Instances::EntryKeys::INSTALL_USERNAME => 'user5',
|
73
|
+
::Avm::Instances::EntryKeys::INSTALL_PASSWORD => 'passwd5',
|
74
|
+
::Avm::Instances::EntryKeys::INSTALL_PATH => '/path/to/app5'
|
75
|
+
},
|
60
76
|
'mailer_0' => {
|
61
77
|
::Avm::Instances::EntryKeys::MAILER_FROM => 'noreply@example.net',
|
62
78
|
::Avm::Instances::EntryKeys::MAILER_REPLY_TO => '',
|
@@ -4,9 +4,9 @@ app_0:
|
|
4
4
|
id: app_1
|
5
5
|
app_1:
|
6
6
|
fs_path: /fs_root
|
7
|
-
data_fs_path: /data_fs_root
|
8
7
|
install:
|
9
8
|
id: app_2
|
9
|
+
data_path: /data_fs_root
|
10
10
|
database:
|
11
11
|
name: app_1_db
|
12
12
|
username: user1
|
@@ -28,6 +28,12 @@ app_4:
|
|
28
28
|
username: user4
|
29
29
|
hostname: host4.net
|
30
30
|
groupname: group4
|
31
|
+
app_5:
|
32
|
+
install:
|
33
|
+
url: ssh://user5:passwd5@host5.net:2222/path/to/app5
|
34
|
+
app_6:
|
35
|
+
install:
|
36
|
+
id: app_5
|
31
37
|
mailer_0:
|
32
38
|
mailer:
|
33
39
|
from: 'noreply@example.net'
|
@@ -12,14 +12,14 @@ Gem::Specification.new do |s|
|
|
12
12
|
|
13
13
|
s.files = Dir['{lib,locale,template}/**/*']
|
14
14
|
|
15
|
-
s.add_dependency 'avm', '~> 0.
|
15
|
+
s.add_dependency 'avm', '~> 0.39', '>= 0.39.1'
|
16
16
|
s.add_dependency 'avm-eac_generic_base0', '~> 0.5'
|
17
17
|
s.add_dependency 'avm-eac_rails_base1', '~> 0.5'
|
18
18
|
s.add_dependency 'avm-eac_ubuntu_base0', '~> 0.3'
|
19
19
|
s.add_dependency 'curb', '~> 0.9', '>= 0.9.11'
|
20
20
|
s.add_dependency 'eac_fs', '~> 0.12', '>= 0.12.3'
|
21
21
|
s.add_dependency 'eac_rest', '~> 0.6', '>= 0.6.1'
|
22
|
-
s.add_dependency 'eac_ruby_utils', '~> 0.
|
22
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.102'
|
23
23
|
|
24
24
|
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
|
25
25
|
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/eac_webapp_base0/deploy'
|
4
|
+
require 'eac_ruby_utils/ruby'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module EacRedmineBase0
|
8
|
+
module Instances
|
9
|
+
class Deploy < ::Avm::EacWebappBase0::Deploy
|
10
|
+
set_callback :assert_instance_branch, :after, :run_installer
|
11
|
+
|
12
|
+
def run_installer
|
13
|
+
infom 'Running installer'
|
14
|
+
::EacRubyUtils::Ruby.on_clean_environment do
|
15
|
+
installer_command.system!
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def installer_command
|
20
|
+
instance.host_env.command(installer_path, install_task)
|
21
|
+
end
|
22
|
+
|
23
|
+
def installer_path
|
24
|
+
::File.join(instance.fs_path, 'plugins', 'redmine_installer', 'installer', 'run.sh')
|
25
|
+
end
|
26
|
+
|
27
|
+
def install_task
|
28
|
+
if instance.web_path_optional.present?
|
29
|
+
'redmine_as_apache_path'
|
30
|
+
else
|
31
|
+
'redmine_as_apache_base'
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'avm/eac_redmine_base0/instances/base'
|
4
|
-
require 'avm/eac_redmine_base0/deploy'
|
4
|
+
require 'avm/eac_redmine_base0/instances/deploy'
|
5
5
|
require 'avm/eac_redmine_base0/apache_host'
|
6
6
|
require 'avm/eac_rails_base1/runner'
|
7
7
|
require 'eac_ruby_utils/core_ext'
|
File without changes
|
File without changes
|
@@ -12,9 +12,9 @@ Gem::Specification.new do |s|
|
|
12
12
|
|
13
13
|
s.files = Dir['{lib,locale,template}/**/*']
|
14
14
|
|
15
|
-
s.add_dependency 'avm', '~> 0.
|
15
|
+
s.add_dependency 'avm', '~> 0.39', '>= 0.39.1'
|
16
16
|
s.add_dependency 'avm-eac_generic_base0', '~> 0.5'
|
17
|
-
s.add_dependency 'eac_ruby_utils', '~> 0.
|
17
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.102'
|
18
18
|
|
19
19
|
s.add_development_dependency 'aranha-parsers', '~> 0.14', '>= 0.14.1'
|
20
20
|
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
|
@@ -11,6 +11,7 @@ module Avm
|
|
11
11
|
class UpdateDependenciesRequirements
|
12
12
|
runner_with :help do
|
13
13
|
bool_opt '-a', '--all'
|
14
|
+
arg_opt '-e', '--exclude', repeat: true
|
14
15
|
pos_arg :gem_name, repeat: true, optional: true
|
15
16
|
end
|
16
17
|
|
@@ -32,8 +33,13 @@ module Avm
|
|
32
33
|
|
33
34
|
private
|
34
35
|
|
36
|
+
def exclude?(gem_name)
|
37
|
+
parsed.exclude.include?(gem_name)
|
38
|
+
end
|
39
|
+
|
35
40
|
def gem_names_uncached
|
36
|
-
::Set.new(parsed.gem_name + gem_names_from_all).
|
41
|
+
::Set.new(parsed.gem_name + gem_names_from_all).reject { |gem_name| exclude?(gem_name) }
|
42
|
+
.sort
|
37
43
|
end
|
38
44
|
|
39
45
|
def gem_names_from_all
|
@@ -12,11 +12,11 @@ Gem::Specification.new do |s|
|
|
12
12
|
|
13
13
|
s.files = Dir['{lib,template}/**/*']
|
14
14
|
|
15
|
-
s.add_dependency 'avm', '~> 0.
|
15
|
+
s.add_dependency 'avm', '~> 0.39', '>= 0.39.1'
|
16
16
|
s.add_dependency 'avm-eac_generic_base0', '~> 0.5'
|
17
17
|
s.add_dependency 'avm-eac_postgresql_base0', '~> 0.2'
|
18
18
|
s.add_dependency 'avm-eac_ubuntu_base0', '~> 0.3'
|
19
|
-
s.add_dependency 'eac_ruby_utils', '~> 0.
|
19
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.102'
|
20
20
|
|
21
21
|
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.2'
|
22
22
|
end
|