eac_tools 0.31.0 → 0.32.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +54 -49
- data/lib/eac_tools/version.rb +1 -1
- data/sub/avm/avm.gemspec +4 -4
- data/sub/avm/lib/avm/entries/auto_values/entry.rb +11 -4
- data/sub/avm/lib/avm/entries/base/uri_components_entries_values/component_factory.rb +42 -0
- data/sub/avm/lib/avm/entries/base/uri_components_entries_values/generic_component.rb +52 -0
- data/sub/avm/lib/avm/entries/base/uri_components_entries_values/path_component.rb +19 -0
- data/sub/avm/lib/avm/entries/base/uri_components_entries_values/url_component.rb +28 -0
- data/sub/avm/lib/avm/entries/base/uri_components_entries_values.rb +25 -0
- data/sub/avm/lib/avm/entries/base.rb +7 -0
- data/sub/avm/lib/avm/entries/jobs/base.rb +62 -0
- data/sub/avm/lib/avm/entries/jobs/variables_source/read_entry.rb +50 -0
- data/sub/avm/lib/avm/entries/jobs/variables_source.rb +15 -0
- data/sub/avm/lib/avm/entries/jobs/with_variables_source.rb +15 -0
- data/sub/avm/lib/avm/entries/jobs.rb +11 -0
- data/sub/avm/lib/avm/entries/keys_constants_set.rb +43 -0
- data/sub/avm/lib/avm/instances/base/entry_keys.rb +1 -1
- data/sub/avm/lib/avm/instances/base/install.rb +24 -0
- data/sub/avm/lib/avm/instances/base/web.rb +16 -0
- data/sub/avm/lib/avm/instances/base.rb +1 -1
- data/sub/avm/lib/avm/instances/entry_keys.rb +3 -22
- data/sub/avm/lib/avm/rspec/setup.rb +7 -8
- data/sub/avm/lib/avm/rspec/shared_examples/entries_values.rb +23 -0
- data/sub/avm/lib/avm/version.rb +1 -1
- data/sub/avm/spec/lib/avm/instances/base_spec.rb +77 -97
- data/sub/avm/spec/lib/avm/instances/{base_spec_configs_storage.yml → base_spec_files/config.yml} +0 -0
- data/sub/avm-eac_asciidoctor_base0/avm-eac_asciidoctor_base0.gemspec +2 -2
- data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/apache_host.rb +2 -2
- data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/apache_path.rb +2 -2
- data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/instances/deploy.rb +2 -2
- data/sub/avm-eac_asciidoctor_base0/lib/avm/eac_asciidoctor_base0/version.rb +1 -1
- data/sub/avm-eac_latex_base0/avm-eac_latex_base0.gemspec +3 -3
- data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/instances/apache_host.rb +2 -2
- data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/instances/deploy.rb +2 -2
- data/sub/avm-eac_latex_base0/lib/avm/eac_latex_base0/version.rb +1 -1
- data/sub/avm-eac_rails_base0/avm-eac_rails_base0.gemspec +2 -2
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/apache_host.rb +2 -2
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/apache_path.rb +2 -2
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/deploy.rb +2 -2
- data/sub/avm-eac_rails_base0/lib/avm/eac_rails_base0/version.rb +1 -1
- data/sub/avm-eac_rails_base1/avm-eac_rails_base1.gemspec +4 -4
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/apache_host.rb +19 -0
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/systemd_unit/service.rb +72 -0
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/systemd_unit/tasks_scheduler_command.rb +31 -0
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/instances/systemd_unit.rb +59 -0
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/runner/tasks_scheduler/systemd_unit.rb +4 -4
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/version.rb +1 -1
- data/sub/avm-eac_rails_base1/template/avm/eac_rails_base1/{systemd_unit → instances/systemd_unit}/tasks_scheduler.service +0 -0
- data/sub/avm-eac_rails_base1/template/avm/eac_rails_base1/{systemd_unit → instances/systemd_unit}/tasks_scheduler_command.sh +0 -0
- 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/apache_host.rb +2 -2
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/database.rb +30 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/gitolite.rb +42 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/web.rb +20 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base.rb +1 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/deploy.rb +2 -2
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/docker_image.rb +2 -6
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +1 -1
- data/sub/avm-eac_redmine_base0/spec/lib/avm/eac_redmine_base0/instances/base/gitolite_spec.rb +26 -0
- data/sub/avm-eac_redmine_base0/spec/lib/avm/eac_redmine_base0/instances/base/gitolite_spec_files/config.yml +10 -0
- data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/deploy/config/install.sh.template +11 -3
- data/sub/avm-eac_webapp_base0/avm-eac_webapp_base0.gemspec +2 -2
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/apache_host.rb +85 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/apache_path.rb +54 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/base.rb +1 -1
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/appended_directories.rb +27 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/build.rb +50 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/file_unit.rb +44 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/git_info.rb +64 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/version.rb +26 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/write_on_target.rb +20 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy.rb +75 -0
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/version.rb +1 -1
- data/sub/avm-eac_webapp_base0/template/avm/eac_webapp_base0/{apache_host → instances/apache_host}/no_ssl.conf +0 -0
- data/sub/avm-eac_webapp_base0/template/avm/eac_webapp_base0/{apache_path → instances/apache_path}/default.conf +0 -0
- data/sub/avm-eac_wordpress_base0/avm-eac_wordpress_base0.gemspec +3 -3
- data/sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/instances/apache_host.rb +2 -2
- data/sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/instances/deploy.rb +2 -2
- data/sub/avm-eac_wordpress_base0/lib/avm/eac_wordpress_base0/version.rb +1 -1
- data/sub/avm-tools/avm-tools.gemspec +2 -2
- data/sub/avm-tools/lib/avm/tools/version.rb +1 -1
- data/sub/eac_git/Gemfile +8 -0
- data/sub/eac_git/eac_git.gemspec +20 -0
- data/sub/eac_git/lib/eac_git/executables.rb +48 -0
- data/sub/eac_git/lib/eac_git/local/branch.rb +27 -0
- data/sub/eac_git/lib/eac_git/local/commit/archive.rb +19 -0
- data/sub/eac_git/lib/eac_git/local/commit/changed_file.rb +46 -0
- data/sub/eac_git/lib/eac_git/local/commit/diff_tree_line.rb +32 -0
- data/sub/eac_git/lib/eac_git/local/commit.rb +73 -0
- data/sub/eac_git/lib/eac_git/local/dirty_files.rb +37 -0
- data/sub/eac_git/lib/eac_git/local/log.rb +17 -0
- data/sub/eac_git/lib/eac_git/local/remote.rb +27 -0
- data/sub/eac_git/lib/eac_git/local/remotes.rb +20 -0
- data/sub/eac_git/lib/eac_git/local/subrepo/config.rb +43 -0
- data/sub/eac_git/lib/eac_git/local/subrepo.rb +49 -0
- data/sub/eac_git/lib/eac_git/local.rb +127 -0
- data/sub/eac_git/lib/eac_git/remote/ls_result.rb +20 -0
- data/sub/eac_git/lib/eac_git/remote.rb +19 -0
- data/sub/eac_git/lib/eac_git/rspec/setup.rb +23 -0
- data/sub/eac_git/lib/eac_git/rspec/stubbed_git_local_repo.rb +71 -0
- data/sub/{avm/lib/avm/jobs.rb → eac_git/lib/eac_git/rspec.rb} +2 -2
- data/sub/eac_git/lib/eac_git/version.rb +5 -0
- data/sub/eac_git/lib/eac_git.rb +7 -0
- data/sub/eac_git/spec/lib/eac_git/executables_spec.rb +13 -0
- data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec.rb +13 -0
- data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/add.source.out +1 -0
- data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/add.target.yaml +7 -0
- data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/modify.source.out +1 -0
- data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/modify.target.yaml +7 -0
- data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/remove.source.out +1 -0
- data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/remove.target.yaml +7 -0
- data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/rename.source.out +2 -0
- data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/rename.target.yaml +13 -0
- data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/rename_modify.source.out +2 -0
- data/sub/eac_git/spec/lib/eac_git/local/commit/diff_tree_line_spec_files/rename_modify.target.yaml +13 -0
- data/sub/eac_git/spec/lib/eac_git/local/commit_spec.rb +58 -0
- data/sub/eac_git/spec/rubocop_spec.rb +3 -0
- data/sub/eac_git/spec/spec_helper.rb +4 -0
- data/sub/eac_git/vendor/git-subrepo/Changes +110 -0
- data/sub/eac_git/vendor/git-subrepo/Intro.pod +509 -0
- data/sub/eac_git/vendor/git-subrepo/License +21 -0
- data/sub/eac_git/vendor/git-subrepo/Makefile +82 -0
- data/sub/eac_git/vendor/git-subrepo/Meta +28 -0
- data/sub/eac_git/vendor/git-subrepo/ReadMe.pod +698 -0
- data/sub/eac_git/vendor/git-subrepo/doc/comparison.swim +35 -0
- data/sub/eac_git/vendor/git-subrepo/doc/git-subrepo.swim +608 -0
- data/sub/eac_git/vendor/git-subrepo/doc/intro-to-subrepo.swim +387 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/Changes +15 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/License +21 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/Makefile +45 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/Meta +28 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/ReadMe.pod +77 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/bin/bash+ +43 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/doc/bash+.swim +61 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/lib/bash+.bash +92 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/man/man1/bash+.1 +134 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/man/man3/bash+.3 +134 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/base.t +12 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/fcopy.t +22 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/lib/foo/bar.bash +3 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/lib/foo/foo.bash +3 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/source-bash+-std.t +18 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/source-bash+.t +23 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/test.bash +70 -0
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/use.t +19 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/Changes +15 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/License +21 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/Makefile +20 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/Meta +30 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ReadMe.pod +115 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/doc/test-more.swim +89 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/Changes +15 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/License +21 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/Makefile +45 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/Meta +28 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/ReadMe.pod +77 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/bin/bash+ +43 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/doc/bash+.swim +61 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/lib/bash+.bash +92 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/man/man1/bash+.1 +134 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/man/man3/bash+.3 +134 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/base.t +12 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/fcopy.t +22 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/lib/foo/bar.bash +3 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/lib/foo/foo.bash +3 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/source-bash+-std.t +18 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/source-bash+.t +23 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/test.bash +70 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/use.t +19 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/Changes +15 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/License +21 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/Makefile +37 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/Meta +28 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/ReadMe.pod +66 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/doc/test-tap.swim +48 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/lib/test/tap.bash +153 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/man/man3/test-tap.3 +119 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/bail_out.t +13 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/done.t +10 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/fail.t +20 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/fail_fast.t +15 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/helper.bash +9 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/pass.t +9 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/plan.t +10 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/skip_all.t +20 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/tap.t +13 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/test/bail.t +14 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/test/fail.t +7 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/test/fail_fast.t +12 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/test/skip-all-init.t +8 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/test/skip-all-plan.t +9 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/lib/test/more.bash +95 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/man/man3/test-more.3 +173 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/fail.t +20 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/more.t +20 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/pass.t +9 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/setup +8 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/skip_all.t +11 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/test/fail1.t +12 -0
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/test/skip_all.t +10 -0
- data/sub/eac_git/vendor/git-subrepo/lib/git-subrepo +1903 -0
- data/sub/eac_git/vendor/git-subrepo/lib/git-subrepo.d/bash+.bash +1 -0
- data/sub/eac_git/vendor/git-subrepo/lib/git-subrepo.d/help-functions.bash +339 -0
- data/sub/eac_git/vendor/git-subrepo/man/man1/git-subrepo.1 +743 -0
- data/sub/eac_git/vendor/git-subrepo/note/0.4.0 +12 -0
- data/sub/eac_git/vendor/git-subrepo/note/AllGitCmds +148 -0
- data/sub/eac_git/vendor/git-subrepo/note/Cases +32 -0
- data/sub/eac_git/vendor/git-subrepo/note/Commands +33 -0
- data/sub/eac_git/vendor/git-subrepo/note/Dags +199 -0
- data/sub/eac_git/vendor/git-subrepo/note/Gists +7 -0
- data/sub/eac_git/vendor/git-subrepo/note/Links +25 -0
- data/sub/eac_git/vendor/git-subrepo/note/Plugins +10 -0
- data/sub/eac_git/vendor/git-subrepo/note/Spec +39 -0
- data/sub/eac_git/vendor/git-subrepo/note/Story1 +57 -0
- data/sub/eac_git/vendor/git-subrepo/note/ToDo +55 -0
- data/sub/eac_git/vendor/git-subrepo/note/design.swim +137 -0
- data/sub/eac_git/vendor/git-subrepo/note/design2.swim +85 -0
- data/sub/eac_git/vendor/git-subrepo/note/init-test +38 -0
- data/sub/eac_git/vendor/git-subrepo/note/pull-dance.txt +18 -0
- data/sub/eac_git/vendor/git-subrepo/note/recreate-rebase-conflict.sh +56 -0
- data/sub/eac_git/vendor/git-subrepo/note/subtree-rebase-fail-example/test.bash +29 -0
- data/sub/eac_git/vendor/git-subrepo/note/test-subrepo-push.sh +69 -0
- data/sub/eac_git/vendor/git-subrepo/note/test.sh +58 -0
- data/sub/eac_git/vendor/git-subrepo/pkg/bin/generate-completion.pl +210 -0
- data/sub/eac_git/vendor/git-subrepo/pkg/bin/generate-help-functions.pl +89 -0
- data/sub/eac_git/vendor/git-subrepo/share/completion.bash +42 -0
- data/sub/eac_git/vendor/git-subrepo/share/enable-completion.sh +50 -0
- data/sub/eac_git/vendor/git-subrepo/share/git-completion.bash +2738 -0
- data/sub/eac_git/vendor/git-subrepo/share/zsh-completion/_git-subrepo +81 -0
- data/sub/eac_git/vendor/git-subrepo/test/branch-all.t +41 -0
- data/sub/eac_git/vendor/git-subrepo/test/branch-rev-list-one-path.t +43 -0
- data/sub/eac_git/vendor/git-subrepo/test/branch-rev-list.t +47 -0
- data/sub/eac_git/vendor/git-subrepo/test/branch.t +52 -0
- data/sub/eac_git/vendor/git-subrepo/test/clean.t +43 -0
- data/sub/eac_git/vendor/git-subrepo/test/clone-annotated-tag.t +45 -0
- data/sub/eac_git/vendor/git-subrepo/test/clone.t +107 -0
- data/sub/eac_git/vendor/git-subrepo/test/compile.t +19 -0
- data/sub/eac_git/vendor/git-subrepo/test/config.t +58 -0
- data/sub/eac_git/vendor/git-subrepo/test/encode.t +91 -0
- data/sub/eac_git/vendor/git-subrepo/test/error.t +171 -0
- data/sub/eac_git/vendor/git-subrepo/test/fetch.t +43 -0
- data/sub/eac_git/vendor/git-subrepo/test/gitignore.t +61 -0
- data/sub/eac_git/vendor/git-subrepo/test/init.t +64 -0
- data/sub/eac_git/vendor/git-subrepo/test/issue29.t +98 -0
- data/sub/eac_git/vendor/git-subrepo/test/issue95.t +98 -0
- data/sub/eac_git/vendor/git-subrepo/test/issue96.t +96 -0
- data/sub/eac_git/vendor/git-subrepo/test/pull-all.t +38 -0
- data/sub/eac_git/vendor/git-subrepo/test/pull-merge.t +113 -0
- data/sub/eac_git/vendor/git-subrepo/test/pull-message.t +88 -0
- data/sub/eac_git/vendor/git-subrepo/test/pull-new-branch.t +58 -0
- data/sub/eac_git/vendor/git-subrepo/test/pull-ours.t +90 -0
- data/sub/eac_git/vendor/git-subrepo/test/pull-theirs.t +82 -0
- data/sub/eac_git/vendor/git-subrepo/test/pull-twice.t +44 -0
- data/sub/eac_git/vendor/git-subrepo/test/pull-worktree.t +40 -0
- data/sub/eac_git/vendor/git-subrepo/test/pull.t +99 -0
- data/sub/eac_git/vendor/git-subrepo/test/push-after-init.t +51 -0
- data/sub/eac_git/vendor/git-subrepo/test/push-force.t +56 -0
- data/sub/eac_git/vendor/git-subrepo/test/push-new-branch.t +61 -0
- data/sub/eac_git/vendor/git-subrepo/test/push-no-changes.t +29 -0
- data/sub/eac_git/vendor/git-subrepo/test/push-squash.t +56 -0
- data/sub/eac_git/vendor/git-subrepo/test/push.t +176 -0
- data/sub/eac_git/vendor/git-subrepo/test/reclone.t +45 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/bar/HEAD +1 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/bar/config +4 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/bar/objects/1f/0c4b264caed0126814a0ede851a1e0b4e16ae6 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/bar/objects/87/46903fdb1b9c2101377880125917c2e05b4d69 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/bar/objects/94/c86ffc745232d89f78c6f895e11e71272518db +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/bar/objects/c6/76c57b6576743fa56278527aa60ebd2e202a7c +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/bar/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/bar/objects/f6/2a8ff3feadf39b0a98f1a86ec6d1eb33858ee9 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/bar/refs/heads/master +1 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/bar/refs/tags/A +1 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/foo/HEAD +1 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/foo/config +4 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/foo/objects/a0/f4cdaaf533a936296cdebbed8206c3b9ededa8 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/foo/objects/e2/1291a1ad392a9d4c51dd9586804f1467b28afd +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/foo/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/foo/refs/heads/master +1 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/HEAD +1 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/config +5 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/11/523f5dcf03b4c89b592dc8a3d0308f68da2386 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/14/2addf8ec5f37334e837440122c62f2c68a29ad +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/32/5180321750a21cd7a4e7ecda319e557a4f6a09 +2 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/3d/918c6901c02f43af5d31779dd5e1f9166aeb36 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/3e/4cb596066dce63ba4d047abddb677389b65e19 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/4b/6e53022e7a04f07887697e4f3d7c377fd9822b +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/58/931fc1bd559b59c41ea738fc7ad04f9ad01bd3 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/5e/c0c28e1b806f25efdca18fcf7a74b49c3755bd +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/75/fa6584e748f57eff06eebdc55e9ac21d4fcbf2 +1 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/80/2d5edbd5e1cb7fca82b5bd38e7c8a0a496fb20 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/94/7b3d714c38791e95ad6f928b48c98bb8708acd +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/95/e1f2df3f4d5f3d7a60588c25a7ca8a913d3c2a +1 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/b1/5f4a7666baf40d949548ead946a3370e273479 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/c3/ee8978c4c5d84c3b7d00ba8e5906933d027882 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/c8/b0bffbc405ef3fad7354ff833fbec36d67ddfa +3 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/dd/8bdb934ec848137f011fe423b185505c343626 +2 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/e2/9be58c767cfeb27235c995d293a7d71aac0135 +2 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/ee/1224401fc6aac595145fa727dcf6706ac8aec1 +1 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/f1/cc1a657b2e805c400f5dcaaa76bd29c6178b1b +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/refs/heads/master +1 -0
- data/sub/eac_git/vendor/git-subrepo/test/setup +205 -0
- data/sub/eac_git/vendor/git-subrepo/test/status.t +68 -0
- data/sub/eac_git/vendor/git-subrepo/test/submodule.t +45 -0
- data/sub/eac_ruby_utils/eac_ruby_utils.gemspec +1 -1
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/method_class.rb +4 -2
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/{module → class}/method_class.rb +0 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/patches/class/static_method_class.rb +9 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/static_method_class.rb +12 -0
- data/sub/eac_ruby_utils/lib/eac_ruby_utils/version.rb +1 -1
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/{module → class}/method_class_spec.rb +1 -1
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/class/static_method_class_spec.rb +20 -0
- data/sub/eac_ruby_utils/spec/lib/eac_ruby_utils/static_method_class_spec.rb +44 -0
- metadata +303 -40
- data/sub/avm/lib/avm/instances/base/auto_values/install.rb +0 -47
- data/sub/avm/lib/avm/instances/base/auto_values/web.rb +0 -46
- data/sub/avm/lib/avm/jobs/base.rb +0 -63
- data/sub/avm/lib/avm/jobs/variables_source.rb +0 -22
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/apache_host.rb +0 -17
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/systemd_unit/service.rb +0 -70
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/systemd_unit/tasks_scheduler_command.rb +0 -29
- data/sub/avm-eac_rails_base1/lib/avm/eac_rails_base1/systemd_unit.rb +0 -57
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/apache_host.rb +0 -83
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/apache_path.rb +0 -51
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy/appended_directories.rb +0 -25
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy/build.rb +0 -48
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy/file_unit.rb +0 -42
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy/git_info.rb +0 -62
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy/version.rb +0 -24
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy/write_on_target.rb +0 -18
- data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/deploy.rb +0 -73
- data/sub/avm-tools/lib/avm/tools/runner/eac_webapp_base0.rb +0 -14
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module EacRailsBase1
|
7
|
+
module Instances
|
8
|
+
class SystemdUnit
|
9
|
+
module TasksSchedulerCommand
|
10
|
+
def tasks_scheduler_command_content
|
11
|
+
template.child('tasks_scheduler_command.sh').apply(variables_source)
|
12
|
+
end
|
13
|
+
|
14
|
+
def tasks_scheduler_command_path
|
15
|
+
"/opt/aux/#{instance.id}/tasks_scheduler.sh"
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def write_tasks_scheduler_command
|
21
|
+
infom 'Writing tasks scheduler\'s command...'
|
22
|
+
sudo_execute!('mkdir', '-p', ::File.dirname(tasks_scheduler_command_path))
|
23
|
+
platform_instance.file_sudo_write(tasks_scheduler_command_path,
|
24
|
+
tasks_scheduler_command_content)
|
25
|
+
sudo_execute!('chmod', '+x', tasks_scheduler_command_path)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/entries/jobs/base'
|
4
|
+
require 'avm/eac_ubuntu_base0/apache'
|
5
|
+
require 'eac_ruby_utils/core_ext'
|
6
|
+
|
7
|
+
module Avm
|
8
|
+
module EacRailsBase1
|
9
|
+
module Instances
|
10
|
+
class SystemdUnit
|
11
|
+
JOBS = %w[write_tasks_scheduler_command write_service link_service verify_service
|
12
|
+
reload_systemd enable_service start_service].freeze
|
13
|
+
|
14
|
+
include ::Avm::Entries::Jobs::Base
|
15
|
+
require_sub __FILE__, include_modules: true
|
16
|
+
delegate :platform_instance, to: :instance
|
17
|
+
|
18
|
+
enable_listable
|
19
|
+
lists.add_symbol :option, :exec_run, :restart
|
20
|
+
|
21
|
+
def description
|
22
|
+
"#{instance.id} Tasks Scheduler"
|
23
|
+
end
|
24
|
+
|
25
|
+
def exec_run?
|
26
|
+
options[OPTION_EXEC_RUN]
|
27
|
+
end
|
28
|
+
|
29
|
+
def option_list
|
30
|
+
self.class.lists.option
|
31
|
+
end
|
32
|
+
|
33
|
+
def restart
|
34
|
+
options[OPTION_RESTART]
|
35
|
+
end
|
36
|
+
|
37
|
+
def unit_name
|
38
|
+
"#{instance.id}_tasks_scheduler.service"
|
39
|
+
end
|
40
|
+
|
41
|
+
def user
|
42
|
+
instance.install_username
|
43
|
+
end
|
44
|
+
|
45
|
+
private
|
46
|
+
|
47
|
+
def sudo_execute!(*args)
|
48
|
+
platform_instance.host_env.command(['sudo'] + args).execute!
|
49
|
+
end
|
50
|
+
|
51
|
+
def sudo_system!(*args)
|
52
|
+
command_args = ['sudo'] + args
|
53
|
+
infom "Running \"#{::Shellwords.join(command_args)}\"..."
|
54
|
+
platform_instance.host_env.command(command_args).system!
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/eac_rails_base1/systemd_unit'
|
3
|
+
require 'avm/eac_rails_base1/instances/systemd_unit'
|
4
4
|
require 'eac_ruby_utils/core_ext'
|
5
5
|
|
6
6
|
module Avm
|
@@ -31,9 +31,9 @@ module Avm
|
|
31
31
|
private
|
32
32
|
|
33
33
|
def systemd_unit_uncached
|
34
|
-
::Avm::EacRailsBase1::SystemdUnit.new(runner_context.call(:instance),
|
35
|
-
|
36
|
-
|
34
|
+
::Avm::EacRailsBase1::Instances::SystemdUnit.new(runner_context.call(:instance),
|
35
|
+
restart: parsed.restart,
|
36
|
+
exec_run: parsed.exec_run?)
|
37
37
|
end
|
38
38
|
|
39
39
|
def result_uncached
|
File without changes
|
File without changes
|
@@ -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.44'
|
16
16
|
s.add_dependency 'avm-eac_generic_base0', '~> 0.5'
|
17
17
|
s.add_dependency 'avm-eac_rails_base1', '~> 0.6'
|
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.104'
|
23
23
|
|
24
24
|
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.5.1'
|
25
25
|
end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/eac_rails_base1/apache_host'
|
3
|
+
require 'avm/eac_rails_base1/instances/apache_host'
|
4
4
|
|
5
5
|
module Avm
|
6
6
|
module EacRedmineBase0
|
7
7
|
module Instances
|
8
|
-
class ApacheHost < ::Avm::EacRailsBase1::ApacheHost
|
8
|
+
class ApacheHost < ::Avm::EacRailsBase1::Instances::ApacheHost
|
9
9
|
end
|
10
10
|
end
|
11
11
|
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/eac_rails_base1/instances/base'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module EacRedmineBase0
|
8
|
+
module Instances
|
9
|
+
class Base < ::Avm::EacRailsBase1::Instances::Base
|
10
|
+
module Database
|
11
|
+
DATABASE_INTERNAL_HOSTNAME = 'localhost'
|
12
|
+
DEFAULT_POSTGRESQL_VERSION = '12'
|
13
|
+
|
14
|
+
common_concern do
|
15
|
+
uri_components_entries_values 'postgresql', %w[version]
|
16
|
+
end
|
17
|
+
|
18
|
+
def database_internal
|
19
|
+
entry(::Avm::Instances::EntryKeys::DATABASE_HOSTNAME).value ==
|
20
|
+
DATABASE_INTERNAL_HOSTNAME
|
21
|
+
end
|
22
|
+
|
23
|
+
def postgresql_version_default_value
|
24
|
+
DEFAULT_POSTGRESQL_VERSION
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/eac_rails_base1/instances/base'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module EacRedmineBase0
|
8
|
+
module Instances
|
9
|
+
class Base < ::Avm::EacRailsBase1::Instances::Base
|
10
|
+
module Gitolite
|
11
|
+
GITOLITE_ENTRY_KEYS_PREFIX = 'gitolite'
|
12
|
+
DEFAULT_HOSTNAME = 'localhost'
|
13
|
+
DEFAULT_PATH_PARENT = '/var/lib'
|
14
|
+
DEFAULT_SCHEME = 'file'
|
15
|
+
DEFAULT_USERNAME = 'git'
|
16
|
+
|
17
|
+
common_concern do
|
18
|
+
uri_components_entries_values GITOLITE_ENTRY_KEYS_PREFIX
|
19
|
+
end
|
20
|
+
|
21
|
+
def gitolite_hostname_default_value
|
22
|
+
DEFAULT_HOSTNAME
|
23
|
+
end
|
24
|
+
|
25
|
+
def gitolite_path_default_value
|
26
|
+
read_entry_optional([GITOLITE_ENTRY_KEYS_PREFIX, 'username']).if_present do |v|
|
27
|
+
::File.join(DEFAULT_PATH_PARENT, v)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def gitolite_scheme_default_value
|
32
|
+
DEFAULT_SCHEME
|
33
|
+
end
|
34
|
+
|
35
|
+
def gitolite_username_default_value
|
36
|
+
DEFAULT_USERNAME
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/eac_rails_base1/instances/base'
|
4
|
+
require 'eac_ruby_utils/core_ext'
|
5
|
+
|
6
|
+
module Avm
|
7
|
+
module EacRedmineBase0
|
8
|
+
module Instances
|
9
|
+
class Base < ::Avm::EacRailsBase1::Instances::Base
|
10
|
+
module Web
|
11
|
+
def web_authority
|
12
|
+
web_hostname.if_present do |h|
|
13
|
+
h.to_s + web_port_optional.if_present('') { |p| ":#{p}" }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/eac_webapp_base0/deploy'
|
3
|
+
require 'avm/eac_webapp_base0/instances/deploy'
|
4
4
|
require 'eac_ruby_utils/ruby'
|
5
5
|
|
6
6
|
module Avm
|
7
7
|
module EacRedmineBase0
|
8
8
|
module Instances
|
9
|
-
class Deploy < ::Avm::EacWebappBase0::Deploy
|
9
|
+
class Deploy < ::Avm::EacWebappBase0::Instances::Deploy
|
10
10
|
set_callback :assert_instance_branch, :after, :run_installer
|
11
11
|
|
12
12
|
def run_installer
|
@@ -14,9 +14,10 @@ module Avm
|
|
14
14
|
BASE_IMAGE = 'ubuntu:20.04'
|
15
15
|
INSTALLER_TARGET_TASK_WITH_WEB_PATH_BLANK = 'redmine_as_apache_base'
|
16
16
|
INSTALLER_TARGET_TASK_WITH_WEB_PATH_PRESENT = 'redmine_as_apache_path'
|
17
|
-
DATABASE_INTERNAL_HOSTNAME = 'localhost'
|
18
17
|
REDMINE_SOURCE_HOST_SUBPATH = 'redmine_source'
|
19
18
|
|
19
|
+
delegate :database_internal, to: :instance
|
20
|
+
|
20
21
|
def avm_fs_cache_object_id
|
21
22
|
instance.id
|
22
23
|
end
|
@@ -31,11 +32,6 @@ module Avm
|
|
31
32
|
eac_ubuntu_base0_instance.docker_image.provide.id
|
32
33
|
end
|
33
34
|
|
34
|
-
def database_internal
|
35
|
-
instance.entry(::Avm::Instances::EntryKeys::DATABASE_HOSTNAME).value ==
|
36
|
-
DATABASE_INTERNAL_HOSTNAME
|
37
|
-
end
|
38
|
-
|
39
35
|
def installer_target_task
|
40
36
|
if web_path_present?
|
41
37
|
INSTALLER_TARGET_TASK_WITH_WEB_PATH_PRESENT
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/eac_redmine_base0/instances/base'
|
4
|
+
|
5
|
+
RSpec.describe ::Avm::EacRedmineBase0::Instances::Base do
|
6
|
+
include_examples 'entries_values', __FILE__, {
|
7
|
+
'app_0' => {
|
8
|
+
'gitolite.username' => 'git',
|
9
|
+
'gitolite.path' => '/var/lib/git',
|
10
|
+
'gitolite.scheme' => 'file',
|
11
|
+
'gitolite.hostname' => 'localhost'
|
12
|
+
},
|
13
|
+
'app_1' => {
|
14
|
+
'gitolite.username' => 'git1',
|
15
|
+
'gitolite.path' => '/var/lib/git1',
|
16
|
+
'gitolite.scheme' => 'file',
|
17
|
+
'gitolite.hostname' => 'localhost'
|
18
|
+
},
|
19
|
+
'app_2' => {
|
20
|
+
'gitolite.username' => 'git2',
|
21
|
+
'gitolite.path' => '/home/git2',
|
22
|
+
'gitolite.scheme' => 'file',
|
23
|
+
'gitolite.hostname' => 'localhost'
|
24
|
+
}
|
25
|
+
}
|
26
|
+
end
|
@@ -1,10 +1,17 @@
|
|
1
|
+
# Ruby
|
2
|
+
export rvm_ruby='ruby-%%RUBY.VERSION%%'
|
3
|
+
|
4
|
+
# Database
|
5
|
+
export postgresql_internal='%%DATABASE_INTERNAL%%'
|
6
|
+
export postgresql_host='%%DATABASE.HOSTNAME%%'
|
7
|
+
export postgresql_port='%%DATABASE.PORT%%'
|
1
8
|
export postgresql_database='%%DATABASE.NAME%%'
|
2
|
-
export postgresql_database_test='%%DATABASE.NAME%%_test'
|
3
9
|
export postgresql_user='%%DATABASE.USERNAME%%'
|
4
10
|
export postgresql_password='%%DATABASE.PASSWORD%%'
|
5
11
|
export postgresql_version='%%POSTGRESQL.VERSION%%'
|
6
|
-
export
|
7
|
-
|
12
|
+
export postgresql_extra_settings='%%DATABASE.EXTRA%%'
|
13
|
+
|
14
|
+
# Web
|
8
15
|
if [ '%%WEB.SCHEME%%' == 'https' ]; then
|
9
16
|
export address_https='true'
|
10
17
|
else
|
@@ -17,6 +24,7 @@ export address_path='%%WEB.PATH%%'
|
|
17
24
|
export git_repositories_hierarchical_organisation=false
|
18
25
|
export gitolite_user='%%GIT.USERNAME%%'
|
19
26
|
export gitolite_user_home="/var/lib/${gitolite_user}"
|
27
|
+
export redmine_git_hosting_ssh_key_name=redmine_git_hosting_id
|
20
28
|
|
21
29
|
# Mail settings
|
22
30
|
export smtp_server='%%MAILER.SMTP.ADDRESS%%'
|
@@ -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.45'
|
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.104'
|
20
20
|
|
21
21
|
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.2'
|
22
22
|
end
|
@@ -0,0 +1,85 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'eac_ruby_utils/core_ext'
|
4
|
+
require 'avm/entries/jobs/base'
|
5
|
+
require 'avm/eac_ubuntu_base0/apache'
|
6
|
+
require 'eac_templates/core_ext'
|
7
|
+
|
8
|
+
module Avm
|
9
|
+
module EacWebappBase0
|
10
|
+
module Instances
|
11
|
+
class ApacheHost
|
12
|
+
APACHE_DIRECTORY_EXTRA_CONFIG_KEY = 'install.apache_directory_extra_config'
|
13
|
+
JOBS = %w[write_available_no_ssl_site enable_no_ssl_site remove_ssl_site reload_apache
|
14
|
+
run_certbot enable_ssl_site reload_apache].freeze
|
15
|
+
include ::Avm::Entries::Jobs::Base
|
16
|
+
|
17
|
+
def directory_extra_config
|
18
|
+
instance.entry(APACHE_DIRECTORY_EXTRA_CONFIG_KEY).value.if_present { |v| " #{v}\n" }
|
19
|
+
end
|
20
|
+
|
21
|
+
def no_ssl_site_content
|
22
|
+
::Avm::EacWebappBase0::Instances::ApacheHost
|
23
|
+
.template.child('no_ssl.conf')
|
24
|
+
.apply(variables_source)
|
25
|
+
end
|
26
|
+
|
27
|
+
def ssl?
|
28
|
+
options[:certbot]
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
def apache_uncached
|
34
|
+
::Avm::EacUbuntuBase0::Apache.new(instance.host_env)
|
35
|
+
end
|
36
|
+
|
37
|
+
def enable_no_ssl_site
|
38
|
+
infom 'Enabling no SSL site...'
|
39
|
+
no_ssl_site.enable
|
40
|
+
end
|
41
|
+
|
42
|
+
def enable_ssl_site
|
43
|
+
return unless ssl?
|
44
|
+
|
45
|
+
infom 'Enabling SSL site...'
|
46
|
+
ssl_site.enable
|
47
|
+
end
|
48
|
+
|
49
|
+
def no_ssl_site_uncached
|
50
|
+
apache.site(instance.id)
|
51
|
+
end
|
52
|
+
|
53
|
+
def reload_apache
|
54
|
+
infom 'Reloading Apache...'
|
55
|
+
apache.service('reload')
|
56
|
+
end
|
57
|
+
|
58
|
+
def remove_ssl_site
|
59
|
+
infom 'Removing SSL site...'
|
60
|
+
ssl_site.remove
|
61
|
+
end
|
62
|
+
|
63
|
+
def run_certbot
|
64
|
+
return unless ssl?
|
65
|
+
|
66
|
+
infom 'Running Certbot...'
|
67
|
+
instance.host_env.command(
|
68
|
+
'sudo', 'certbot', '--apache', '--domain', instance.read_entry('web.hostname'),
|
69
|
+
'--redirect', '--non-interactive', '--agree-tos',
|
70
|
+
'--email', instance.install_email
|
71
|
+
).system!
|
72
|
+
end
|
73
|
+
|
74
|
+
def ssl_site_uncached
|
75
|
+
apache.site(no_ssl_site.name + '-le-ssl')
|
76
|
+
end
|
77
|
+
|
78
|
+
def write_available_no_ssl_site
|
79
|
+
infom 'Writing no SSL site conf...'
|
80
|
+
no_ssl_site.write(no_ssl_site_content)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/entries/jobs/base'
|
4
|
+
require 'avm/eac_ubuntu_base0/apache'
|
5
|
+
require 'eac_ruby_utils/core_ext'
|
6
|
+
|
7
|
+
module Avm
|
8
|
+
module EacWebappBase0
|
9
|
+
module Instances
|
10
|
+
class ApachePath
|
11
|
+
JOBS = %w[write_available_conf enable_conf reload_apache].freeze
|
12
|
+
include ::Avm::Entries::Jobs::Base
|
13
|
+
|
14
|
+
def content
|
15
|
+
::Avm::EacWebappBase0::Instances::ApachePath.template.child('default.conf')
|
16
|
+
.apply(variables_source)
|
17
|
+
end
|
18
|
+
|
19
|
+
def document_root
|
20
|
+
instance.read_entry(::Avm::Instances::EntryKeys::INSTALL_PATH)
|
21
|
+
end
|
22
|
+
|
23
|
+
def extra_content
|
24
|
+
''
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
def apache_uncached
|
30
|
+
::Avm::EacUbuntuBase0::Apache.new(instance.host_env)
|
31
|
+
end
|
32
|
+
|
33
|
+
def enable_conf
|
34
|
+
infom 'Enabling configuration...'
|
35
|
+
conf.enable
|
36
|
+
end
|
37
|
+
|
38
|
+
def reload_apache
|
39
|
+
infom 'Reloading Apache...'
|
40
|
+
apache.service('reload')
|
41
|
+
end
|
42
|
+
|
43
|
+
def conf_uncached
|
44
|
+
apache.conf(instance.id)
|
45
|
+
end
|
46
|
+
|
47
|
+
def write_available_conf
|
48
|
+
infom 'Writing available configuration...'
|
49
|
+
conf.write(content)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -4,7 +4,7 @@ require 'avm/instances/base'
|
|
4
4
|
require 'avm/eac_postgresql_base0/instance_with'
|
5
5
|
require 'avm/data/instance/files_unit'
|
6
6
|
require 'avm/data/instance/package'
|
7
|
-
require 'avm/eac_webapp_base0/deploy/file_unit'
|
7
|
+
require 'avm/eac_webapp_base0/instances/deploy/file_unit'
|
8
8
|
require 'avm/eac_webapp_base0/instances/runners'
|
9
9
|
require 'avm/eac_ubuntu_base0/instances/base'
|
10
10
|
|
data/sub/avm-eac_webapp_base0/lib/avm/eac_webapp_base0/instances/deploy/appended_directories.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/path_string'
|
4
|
+
|
5
|
+
module Avm
|
6
|
+
module EacWebappBase0
|
7
|
+
module Instances
|
8
|
+
class Deploy
|
9
|
+
module AppendedDirectories
|
10
|
+
APPENDED_DIRECTORIES_ENTRY_KEY = 'deploy.appended_directories'
|
11
|
+
|
12
|
+
def appended_directories
|
13
|
+
appended_directories_from_instance_entry + appended_directories_from_options
|
14
|
+
end
|
15
|
+
|
16
|
+
def appended_directories_from_instance_entry
|
17
|
+
::Avm::PathString.paths(instance.read_entry_optional(APPENDED_DIRECTORIES_ENTRY_KEY))
|
18
|
+
end
|
19
|
+
|
20
|
+
def appended_directories_from_options
|
21
|
+
options[OPTION_APPENDED_DIRECTORIES] || []
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/files/appender'
|
4
|
+
require 'avm/files/deploy'
|
5
|
+
require 'eac_ruby_utils/envs'
|
6
|
+
require 'eac_ruby_utils/fs/temp'
|
7
|
+
|
8
|
+
module Avm
|
9
|
+
module EacWebappBase0
|
10
|
+
module Instances
|
11
|
+
class Deploy
|
12
|
+
module Build
|
13
|
+
private
|
14
|
+
|
15
|
+
attr_accessor :build_dir
|
16
|
+
|
17
|
+
def append_instance_content
|
18
|
+
::Avm::Files::Appender
|
19
|
+
.new
|
20
|
+
.variables_source_set(variables_source)
|
21
|
+
.append_templatized_directory(template.path)
|
22
|
+
.append_templatized_directories(appended_directories)
|
23
|
+
.append_file_content(version_target_path, version)
|
24
|
+
.write_appended_on(build_dir)
|
25
|
+
end
|
26
|
+
|
27
|
+
def build_dir_env
|
28
|
+
::EacRubyUtils::Envs.local
|
29
|
+
end
|
30
|
+
|
31
|
+
def create_build_dir
|
32
|
+
self.build_dir = ::EacRubyUtils::Fs::Temp.directory
|
33
|
+
end
|
34
|
+
|
35
|
+
def remove_build_dir
|
36
|
+
build_dir&.remove
|
37
|
+
end
|
38
|
+
|
39
|
+
def build_content
|
40
|
+
infom 'Writing Git source code...'
|
41
|
+
::Avm::Git::Commit.new(git, commit_sha1).deploy_to_env_path(
|
42
|
+
build_dir_env,
|
43
|
+
build_dir
|
44
|
+
).variables_source_set(variables_source).run
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module EacWebappBase0
|
5
|
+
module Instances
|
6
|
+
class Deploy
|
7
|
+
class FileUnit < ::SimpleDelegator
|
8
|
+
attr_reader :data_key, :fs_path_subpath
|
9
|
+
|
10
|
+
def initialize(deploy, data_key, fs_path_subpath)
|
11
|
+
super(deploy)
|
12
|
+
@data_key = data_key
|
13
|
+
@fs_path_subpath = fs_path_subpath
|
14
|
+
end
|
15
|
+
|
16
|
+
def run
|
17
|
+
assert_source_directory
|
18
|
+
link_source_target
|
19
|
+
end
|
20
|
+
|
21
|
+
def assert_source_directory
|
22
|
+
infom "Asserting \"#{data_key}\" source directory..."
|
23
|
+
instance.host_env.command('mkdir', '-p', source_path).execute!
|
24
|
+
end
|
25
|
+
|
26
|
+
def source_path
|
27
|
+
::File.join(instance.install_data_path, data_key.to_s)
|
28
|
+
end
|
29
|
+
|
30
|
+
def target_path
|
31
|
+
::File.join(instance.read_entry(::Avm::Instances::EntryKeys::INSTALL_PATH),
|
32
|
+
fs_path_subpath.to_s)
|
33
|
+
end
|
34
|
+
|
35
|
+
def link_source_target
|
36
|
+
infom "Linking \"#{data_key}\" directory..."
|
37
|
+
instance.host_env.command('rm', '-rf', target_path).execute!
|
38
|
+
instance.host_env.command('ln', '-s', source_path, target_path).execute!
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|