eac_tools 0.102.1 → 0.103.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +42 -34
- data/lib/eac_tools/version.rb +1 -1
- data/sub/avm-eac_redmine_base0/avm-eac_redmine_base0.gemspec +26 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/apache_host.rb +12 -0
- 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/files.rb +22 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/gitolite.rb +55 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/install.rb +46 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/base/nodejs.rb +22 -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 +59 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/deploy.rb +19 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/docker_image.rb +116 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/rest_api/entity_base.rb +35 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/rest_api/project.rb +26 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/rest_api/root.rb +21 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/rest_api/wiki_page.rb +54 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/rest_api.rb +14 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/runners/docker.rb +17 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/runners/project/wiki_page/read.rb +27 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/runners/project/wiki_page/write.rb +70 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/runners/project/wiki_page.rb +30 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/runners/project.rb +26 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/runners/project_rename.rb +56 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances/runners.rb +14 -0
- data/sub/{avm-git/lib/avm/git/runners.rb → avm-eac_redmine_base0/lib/avm/eac_redmine_base0/instances.rb} +4 -2
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/sources/base.rb +36 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/sources/core_update.rb +131 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/sources/runners/core_update.rb +65 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/sources/runners/docker.rb +19 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/sources/runners.rb +13 -0
- data/sub/{avm-git/lib/avm/git/organize.rb → avm-eac_redmine_base0/lib/avm/eac_redmine_base0/sources.rb} +4 -2
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0/version.rb +7 -0
- data/sub/avm-eac_redmine_base0/lib/avm/eac_redmine_base0.rb +16 -0
- data/sub/avm-eac_redmine_base0/locale/en.yml +6 -0
- data/sub/avm-eac_redmine_base0/locale/pt-BR.yml +6 -0
- data/sub/avm-eac_redmine_base0/spec/lib/avm/eac_redmine_base0/instances/apache_host_spec.rb +22 -0
- data/sub/avm-eac_redmine_base0/spec/lib/avm/eac_redmine_base0/instances/apache_host_spec_files/apache_host_spec_no_ssl_content.conf +11 -0
- 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/spec/spec_helper.rb +6 -0
- data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/deploy/config/install.sh.template +45 -0
- data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/deploy/config/secrets.yml +8 -0
- data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/Dockerfile.template +36 -0
- data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/apache_host_dockerfile +8 -0
- data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/apache_http_virtualhost.conf.template +10 -0
- data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/apache_https_virtualhost.conf.template +16 -0
- data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/apache_path_dockerfile +5 -0
- data/sub/avm-eac_redmine_base0/template/avm/eac_redmine_base0/instances/docker_image/start.sh.template +52 -0
- data/sub/avm-eac_ubuntu_base0/Gemfile +8 -0
- data/sub/avm-eac_ubuntu_base0/avm-eac_ubuntu_base0.gemspec +21 -0
- data/sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/apache/resource.rb +57 -0
- data/sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/apache.rb +24 -0
- data/sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/docker_image.rb +31 -0
- data/sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/instances/base.rb +24 -0
- data/sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/rspec/ssh_docker_server.rb +82 -0
- data/sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/runners/base/docker.rb +15 -0
- data/sub/avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0/runners/base.rb +26 -0
- data/sub/{avm-git/lib/avm/git → avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0}/version.rb +2 -2
- data/sub/{avm-git/lib/avm/git.rb → avm-eac_ubuntu_base0/lib/avm/eac_ubuntu_base0.rb} +5 -8
- data/sub/avm-eac_ubuntu_base0/spec/lib/avm/eac_ubuntu_base0/docker_image_spec.rb +12 -0
- data/sub/avm-eac_ubuntu_base0/spec/lib/avm/eac_ubuntu_base0/rspec/ssh_docker_server_spec.rb +11 -0
- data/sub/avm-eac_ubuntu_base0/spec/lib/avm/eac_ubuntu_base0/runners/base/docker_spec.rb +11 -0
- data/sub/avm-eac_ubuntu_base0/spec/lib/avm/eac_ubuntu_base0/runners/base_spec.rb +5 -0
- data/sub/avm-eac_ubuntu_base0/spec/rubocop_spec.rb +3 -0
- data/sub/{avm-git → avm-eac_ubuntu_base0}/spec/spec_helper.rb +1 -1
- data/sub/avm-eac_ubuntu_base0/template/avm/eac_ubuntu_base0/docker_image/Dockerfile.template +27 -0
- data/sub/avm-eac_ubuntu_base0/template/avm/eac_ubuntu_base0/rspec/ssh_docker_server/Dockerfile.template +24 -0
- data/sub/avm-eac_ubuntu_base0/template/avm/eac_ubuntu_base0/rspec/ssh_docker_server/id_rsa +27 -0
- data/sub/avm-eac_ubuntu_base0/template/avm/eac_ubuntu_base0/rspec/ssh_docker_server/id_rsa.pub +1 -0
- data/sub/eac_docker/Gemfile +8 -0
- data/sub/eac_docker/eac_docker.gemspec +20 -0
- data/sub/eac_docker/lib/eac_docker/container.rb +83 -0
- data/sub/eac_docker/lib/eac_docker/debug.rb +13 -0
- data/sub/eac_docker/lib/eac_docker/executables.rb +15 -0
- data/sub/eac_docker/lib/eac_docker/images/base.rb +11 -0
- data/sub/eac_docker/lib/eac_docker/images/coded.rb +39 -0
- data/sub/eac_docker/lib/eac_docker/images/named.rb +26 -0
- data/sub/eac_docker/lib/eac_docker/images/templatized.rb +43 -0
- data/sub/eac_docker/lib/eac_docker/registry.rb +15 -0
- data/sub/eac_docker/lib/eac_docker/rspec/setup.rb +15 -0
- data/sub/eac_docker/lib/eac_docker/rspec/stub_image.rb +39 -0
- data/sub/eac_docker/lib/eac_docker/version.rb +5 -0
- data/sub/eac_docker/lib/eac_docker.rb +9 -0
- data/sub/eac_docker/spec/lib/eac_docker/executables_spec.rb +7 -0
- data/sub/eac_docker/spec/lib/eac_docker/images/coded_spec.rb +10 -0
- data/sub/eac_docker/spec/lib/eac_docker/images/coded_spec_files/image1/Dockerfile +1 -0
- data/sub/eac_docker/spec/lib/eac_docker/images/templatized_spec.rb +15 -0
- data/sub/eac_docker/spec/lib/eac_docker/images/templatized_spec_files/stub_docker_image/Dockerfile +1 -0
- data/sub/eac_docker/spec/rubocop_spec.rb +3 -0
- data/sub/eac_docker/spec/spec_helper.rb +5 -0
- metadata +101 -134
- data/sub/avm-git/avm-git.gemspec +0 -25
- data/sub/avm-git/lib/avm/git/application_scms/base/assert_main_at.rb +0 -44
- data/sub/avm-git/lib/avm/git/application_scms/base.rb +0 -18
- data/sub/avm-git/lib/avm/git/application_scms.rb +0 -9
- data/sub/avm-git/lib/avm/git/commit/class_methods.rb +0 -29
- data/sub/avm-git/lib/avm/git/commit/diff_tree_line.rb +0 -32
- data/sub/avm-git/lib/avm/git/commit/file.rb +0 -42
- data/sub/avm-git/lib/avm/git/commit.rb +0 -57
- data/sub/avm-git/lib/avm/git/issue/complete/commits.rb +0 -40
- data/sub/avm-git/lib/avm/git/issue/complete/git_subrepos.rb +0 -20
- data/sub/avm-git/lib/avm/git/issue/complete/local_branch.rb +0 -59
- data/sub/avm-git/lib/avm/git/issue/complete/local_tag.rb +0 -37
- data/sub/avm-git/lib/avm/git/issue/complete/push.rb +0 -60
- data/sub/avm-git/lib/avm/git/issue/complete/remote.rb +0 -33
- data/sub/avm-git/lib/avm/git/issue/complete/test.rb +0 -34
- data/sub/avm-git/lib/avm/git/issue/complete/tracker.rb +0 -21
- data/sub/avm-git/lib/avm/git/issue/complete/validation.rb +0 -36
- data/sub/avm-git/lib/avm/git/issue/complete/validations.rb +0 -54
- data/sub/avm-git/lib/avm/git/issue/complete/working_tree.rb +0 -19
- data/sub/avm-git/lib/avm/git/issue/complete.rb +0 -66
- data/sub/avm-git/lib/avm/git/issue.rb +0 -10
- data/sub/avm-git/lib/avm/git/launcher/base/class_methods.rb +0 -28
- data/sub/avm-git/lib/avm/git/launcher/base/dirty_files.rb +0 -21
- data/sub/avm-git/lib/avm/git/launcher/base/remotes.rb +0 -37
- data/sub/avm-git/lib/avm/git/launcher/base/subrepo.rb +0 -42
- data/sub/avm-git/lib/avm/git/launcher/base/underlying.rb +0 -54
- data/sub/avm-git/lib/avm/git/launcher/base.rb +0 -81
- data/sub/avm-git/lib/avm/git/launcher/error.rb +0 -13
- data/sub/avm-git/lib/avm/git/launcher/mirror_update.rb +0 -36
- data/sub/avm-git/lib/avm/git/launcher/publish_base.rb +0 -127
- data/sub/avm-git/lib/avm/git/launcher/remote.rb +0 -53
- data/sub/avm-git/lib/avm/git/launcher/sub_warp_base.rb +0 -36
- data/sub/avm-git/lib/avm/git/launcher/warp_base.rb +0 -63
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git/local_project_mixin.rb +0 -16
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git/publish.rb +0 -13
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git/warp.rb +0 -25
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git.rb +0 -22
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subrepo/publish.rb +0 -29
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subrepo/warp.rb +0 -82
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subrepo.rb +0 -32
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subtree/publish.rb +0 -12
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subtree/warp.rb +0 -29
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subtree.rb +0 -47
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/provider.rb +0 -17
- data/sub/avm-git/lib/avm/git/launcher_stereotypes.rb +0 -9
- data/sub/avm-git/lib/avm/git/organize/reference_update.rb +0 -32
- data/sub/avm-git/lib/avm/git/organize/repository.rb +0 -74
- data/sub/avm-git/lib/avm/git/revision_test.rb +0 -102
- data/sub/avm-git/lib/avm/git/runners/base/commit.rb +0 -96
- data/sub/avm-git/lib/avm/git/runners/base/deploy.rb +0 -108
- data/sub/avm-git/lib/avm/git/runners/base/dirty_files.rb +0 -42
- data/sub/avm-git/lib/avm/git/runners/base/organize.rb +0 -72
- data/sub/avm-git/lib/avm/git/runners/base/revisions_test.rb +0 -63
- data/sub/avm-git/lib/avm/git/runners/base/subrepo/check.rb +0 -45
- data/sub/avm-git/lib/avm/git/runners/base/subrepo/clone.rb +0 -80
- data/sub/avm-git/lib/avm/git/runners/base/subrepo/fix.rb +0 -69
- data/sub/avm-git/lib/avm/git/runners/base/subrepo.rb +0 -17
- data/sub/avm-git/lib/avm/git/runners/base.rb +0 -40
- data/sub/avm-git/lib/avm/git/scms/git/branch.rb +0 -28
- data/sub/avm-git/lib/avm/git/scms/git/branches.rb +0 -17
- data/sub/avm-git/lib/avm/git/scms/git/change_tracker.rb +0 -34
- data/sub/avm-git/lib/avm/git/scms/git/changed_file.rb +0 -25
- data/sub/avm-git/lib/avm/git/scms/git/changed_files.rb +0 -21
- data/sub/avm-git/lib/avm/git/scms/git/commit/deploy.rb +0 -37
- data/sub/avm-git/lib/avm/git/scms/git/commit/deploy_methods.rb +0 -24
- data/sub/avm-git/lib/avm/git/scms/git/commit.rb +0 -64
- data/sub/avm-git/lib/avm/git/scms/git/commit_dirty.rb +0 -32
- data/sub/avm-git/lib/avm/git/scms/git/commits.rb +0 -44
- data/sub/avm-git/lib/avm/git/scms/git/interval.rb +0 -28
- data/sub/avm-git/lib/avm/git/scms/git/milestones.rb +0 -18
- data/sub/avm-git/lib/avm/git/scms/git/remote.rb +0 -18
- data/sub/avm-git/lib/avm/git/scms/git/remotes.rb +0 -29
- data/sub/avm-git/lib/avm/git/scms/git/run_commit.rb +0 -54
- data/sub/avm-git/lib/avm/git/scms/git.rb +0 -46
- data/sub/avm-git/lib/avm/git/scms/git_sub_base/changed_file.rb +0 -19
- data/sub/avm-git/lib/avm/git/scms/git_sub_base/commit.rb +0 -23
- data/sub/avm-git/lib/avm/git/scms/git_sub_base/interval.rb +0 -23
- data/sub/avm-git/lib/avm/git/scms/git_sub_base.rb +0 -30
- data/sub/avm-git/lib/avm/git/scms/git_subrepo.rb +0 -33
- data/sub/avm-git/lib/avm/git/scms/git_subtree.rb +0 -29
- data/sub/avm-git/lib/avm/git/scms/provider.rb +0 -16
- data/sub/avm-git/lib/avm/git/scms.rb +0 -9
- data/sub/avm-git/lib/avm/git/subrepo_check/parent.rb +0 -48
- data/sub/avm-git/lib/avm/git/subrepo_check/remote.rb +0 -86
- data/sub/avm-git/lib/avm/git/subrepo_check/show_result.rb +0 -30
- data/sub/avm-git/lib/avm/git/subrepo_check.rb +0 -36
- data/sub/avm-git/lib/avm/git/subrepo_checks.rb +0 -57
- data/sub/avm-git/lib/avm/git/vendor/github.rb +0 -20
- data/sub/avm-git/lib/avm/git/vendor.rb +0 -9
- data/sub/avm-git/locale/en.yml +0 -6
- data/sub/avm-git/locale/pt-BR.yml +0 -6
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec.rb +0 -13
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/add.source.out +0 -1
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/add.target.yaml +0 -7
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/modify.source.out +0 -1
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/modify.target.yaml +0 -7
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/remove.source.out +0 -1
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/remove.target.yaml +0 -7
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename.source.out +0 -2
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename.target.yaml +0 -13
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename_modify.source.out +0 -2
- data/sub/avm-git/spec/lib/avm/git/commit/diff_tree_line_spec_files/rename_modify.target.yaml +0 -13
- data/sub/avm-git/spec/lib/avm/git/commit_spec.rb +0 -56
- data/sub/avm-git/spec/lib/avm/git/launcher/base_spec.rb +0 -45
- data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/publish_spec.rb +0 -83
- data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/publish_spec_files/config.yml +0 -5
- data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/publish_spec_settings.yml +0 -6
- data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/warp_spec.rb +0 -53
- data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/warp_spec_files/config.yml +0 -3
- data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/warp_spec_settings.yml +0 -6
- data/sub/avm-git/spec/lib/avm/git/runners/base/deploy_spec.rb +0 -126
- data/sub/avm-git/spec/lib/avm/git/runners/base/deploy_spec_files/append1/stub3.txt.template +0 -1
- data/sub/avm-git/spec/lib/avm/git/runners/base/deploy_spec_files/append2/stub4.txt +0 -1
- data/sub/avm-git/spec/lib/avm/git/scms/git/commit/deploy_spec.rb +0 -92
- data/sub/avm-git/spec/lib/avm/git/scms/git_spec.rb +0 -8
- data/sub/avm-git/spec/lib/avm/git/scms/git_subrepo_spec.rb +0 -8
- data/sub/avm-git/spec/lib/avm/git/vendor/github_spec.rb +0 -23
- /data/sub/{avm-git → avm-eac_redmine_base0}/Gemfile +0 -0
- /data/sub/{avm-git → avm-eac_redmine_base0}/spec/rubocop_spec.rb +0 -0
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'avm/eac_redmine_base0/instances/apache_host'
|
4
|
+
require 'avm/eac_redmine_base0/instances/base'
|
5
|
+
|
6
|
+
RSpec.describe Avm::EacRedmineBase0::Instances::ApacheHost do
|
7
|
+
describe '#no_ssl_site_content' do
|
8
|
+
let(:instance) { Avm::EacRedmineBase0::Instances::Base.by_id('stub-app_0') }
|
9
|
+
let(:apache_host) { described_class.new(instance) }
|
10
|
+
let(:fixtures_dir) { Pathname.new('apache_host_spec_files').expand_path(__dir__) }
|
11
|
+
let(:expected_content) { fixtures_dir.join('apache_host_spec_no_ssl_content.conf').read }
|
12
|
+
|
13
|
+
before do
|
14
|
+
instance.entry('install.path').write('/path/to/stub-app_0')
|
15
|
+
instance.entry('web.url').write('http://stubapp.net')
|
16
|
+
end
|
17
|
+
|
18
|
+
it do
|
19
|
+
expect(apache_host.no_ssl_site_content).to eq(expected_content)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -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, '#gitolite' 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
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# Ruby
|
2
|
+
export ruby_version='%%INSTALL.RUBY.VERSION%%'
|
3
|
+
|
4
|
+
# NodeJs
|
5
|
+
export nodejs_version='%%INSTALL.NODEJS.VERSION%%'
|
6
|
+
|
7
|
+
# Database
|
8
|
+
export postgresql_internal='%%DATABASE_INTERNAL%%'
|
9
|
+
export postgresql_host='%%DATABASE.HOSTNAME%%'
|
10
|
+
export postgresql_port='%%DATABASE.PORT%%'
|
11
|
+
export postgresql_database='%%DATABASE.NAME%%'
|
12
|
+
export postgresql_user='%%DATABASE.USERNAME%%'
|
13
|
+
export postgresql_password='%%DATABASE.PASSWORD%%'
|
14
|
+
export postgresql_version='%%POSTGRESQL.VERSION%%'
|
15
|
+
export postgresql_extra_settings='%%DATABASE.EXTRA%%'
|
16
|
+
|
17
|
+
# Web
|
18
|
+
if [ '%%WEB.SCHEME%%' == 'https' ]; then
|
19
|
+
export address_https='true'
|
20
|
+
else
|
21
|
+
export address_https='false'
|
22
|
+
fi
|
23
|
+
export address_host='%%WEB.AUTHORITY%%'
|
24
|
+
export address_path='%%WEB.PATH%%'
|
25
|
+
|
26
|
+
# Git
|
27
|
+
export git_repositories_hierarchical_organisation=false
|
28
|
+
export gitolite_user='%%GITOLITE.USERNAME%%'
|
29
|
+
export gitolite_user_home='%%GITOLITE.PATH%%'
|
30
|
+
export redmine_git_hosting_ssh_key_name=redmine_git_hosting_id
|
31
|
+
|
32
|
+
# Mail settings
|
33
|
+
export smtp_server='%%MAILER.SMTP.ADDRESS%%'
|
34
|
+
export smtp_port='%%MAILER.SMTP.PORT%%'
|
35
|
+
export smtp_domain='%%MAILER.SMTP.DOMAIN%%'
|
36
|
+
export smtp_tls='%%MAILER.SMTP.TLS%%'
|
37
|
+
export smtp_enable_starttls_auto='%%MAILER.SMTP.STARTTLS_AUTO%%'
|
38
|
+
export smtp_openssl_verify_mode='%%MAILER.SMTP.OPENSSL_VERIFY_MODE%%'
|
39
|
+
export smtp_authentication='%%MAILER.SMTP.AUTHENTICATION%%'
|
40
|
+
export smtp_username='%%MAILER.SMTP.USERNAME%%'
|
41
|
+
export smtp_password='%%MAILER.SMTP.PASSWORD%%'
|
42
|
+
export mail_from='%%MAILER.FROM%%'
|
43
|
+
|
44
|
+
# Extra
|
45
|
+
%%INSTALL.EXTRA%%
|
@@ -0,0 +1,36 @@
|
|
1
|
+
FROM '%%base_image%%'
|
2
|
+
USER root
|
3
|
+
|
4
|
+
# Redmine / Código-fonte
|
5
|
+
RUN echo '%%redmine_source_git_id%%' '%%redmine_user_home%%/redmine_source_git_id'
|
6
|
+
ADD '%%redmine_source_path%%' '%%redmine_path%%/'
|
7
|
+
RUN chown -R '%%redmine_user%%:%%redmine_user%%' '%%redmine_user_home%%'
|
8
|
+
|
9
|
+
# Redmine / Configuração de instalação
|
10
|
+
USER '%%redmine_user%%'
|
11
|
+
WORKDIR '%%redmine_user_home%%'
|
12
|
+
COPY install_settings.sh "%%redmine_path%%/config/install.sh"
|
13
|
+
|
14
|
+
# Redmine / Instalação
|
15
|
+
USER '%%redmine_user%%'
|
16
|
+
WORKDIR '%%redmine_user_home%%'
|
17
|
+
RUN SKIP_DATABASE='%%skip_database%%' \
|
18
|
+
'%%redmine_path%%/plugins/redmine_installer/installer/run.sh' '%%installer_target_task%%'
|
19
|
+
|
20
|
+
# Apache / Configuração do virtualhost
|
21
|
+
%%apache_setup%%
|
22
|
+
|
23
|
+
# Portas
|
24
|
+
EXPOSE 80/tcp 443/tcp
|
25
|
+
|
26
|
+
# Servidor SSH
|
27
|
+
%%ssh_server_install%%
|
28
|
+
|
29
|
+
# Execução
|
30
|
+
USER root
|
31
|
+
COPY start.sh '%%start_path%%'
|
32
|
+
RUN /bin/chmod +x '%%start_path%%'
|
33
|
+
RUN /bin/chown '%%redmine_user%%:%%redmine_user%%' '%%start_path%%'
|
34
|
+
USER '%%redmine_user%%'
|
35
|
+
WORKDIR '%%redmine_user_home%%'
|
36
|
+
CMD '%%start_path%%'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
COPY apache_http_virtualhost.conf /etc/apache2/sites-available/redmine.conf
|
2
|
+
COPY apache_https_virtualhost.conf /etc/apache2/sites-available/redmine_ssl.conf
|
3
|
+
USER root
|
4
|
+
RUN a2ensite redmine
|
5
|
+
RUN a2ensite redmine_ssl
|
6
|
+
RUN a2dissite 000-default
|
7
|
+
RUN a2enmod ssl
|
8
|
+
RUN service apache2 restart
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<IfModule mod_ssl.c>
|
2
|
+
<VirtualHost _default_:443>
|
3
|
+
SSLEngine on
|
4
|
+
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
|
5
|
+
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
|
6
|
+
|
7
|
+
DocumentRoot "%%redmine_path%%/public"
|
8
|
+
PassengerEnabled On
|
9
|
+
|
10
|
+
<Directory "%%redmine_path%%/public" >
|
11
|
+
Allow from all
|
12
|
+
Options -MultiViews
|
13
|
+
Require all granted
|
14
|
+
</Directory>
|
15
|
+
</VirtualHost>
|
16
|
+
</IfModule>
|
@@ -0,0 +1,52 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
set -u
|
4
|
+
set -e
|
5
|
+
|
6
|
+
source '%%redmine_path%%/plugins/redmine_installer/installer/environment.sh'
|
7
|
+
|
8
|
+
function title() {
|
9
|
+
infom ">>>> $1 <<<<"
|
10
|
+
}
|
11
|
+
|
12
|
+
function redmine_install() {
|
13
|
+
title 'Installing Redmine...'
|
14
|
+
"$INSTALL_ROOT/run.sh" '%%installer_target_task%%'
|
15
|
+
}
|
16
|
+
|
17
|
+
function apache_start() {
|
18
|
+
title 'Restarting Apache HTTPD service...'
|
19
|
+
sudo service apache2 restart
|
20
|
+
}
|
21
|
+
|
22
|
+
function ssh_start() {
|
23
|
+
title 'Restarting SSH service...'
|
24
|
+
sudo service ssh restart
|
25
|
+
}
|
26
|
+
|
27
|
+
function postgresql_start() {
|
28
|
+
if bool_r "$SKIP_DATABASE"; then return 0; fi
|
29
|
+
if ! bool_r "$postgresql_internal"; then return 0; fi
|
30
|
+
|
31
|
+
title 'Restarting PostgresSQL service...'
|
32
|
+
sudo service postgresql restart
|
33
|
+
}
|
34
|
+
|
35
|
+
function request_http_interface() {
|
36
|
+
title 'Requesting web interface...'
|
37
|
+
wget 'http://localhost%%web.path%%' &> /dev/null
|
38
|
+
}
|
39
|
+
|
40
|
+
function redmine_log() {
|
41
|
+
title 'Reading production log...'
|
42
|
+
LOG_FILE='%%redmine_path%%/log/production.log'
|
43
|
+
printf " * tail -f \"$LOG_FILE\":\n"
|
44
|
+
sudo tail -f "$LOG_FILE"
|
45
|
+
}
|
46
|
+
|
47
|
+
redmine_install
|
48
|
+
apache_start
|
49
|
+
ssh_start
|
50
|
+
postgresql_start
|
51
|
+
request_http_interface
|
52
|
+
redmine_log
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
$LOAD_PATH.push File.expand_path('lib', __dir__)
|
4
|
+
|
5
|
+
require 'avm/eac_ubuntu_base0/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = 'avm-eac_ubuntu_base0'
|
9
|
+
s.version = Avm::EacUbuntuBase0::VERSION
|
10
|
+
s.authors = ['Put here the authors']
|
11
|
+
s.summary = 'Put here de description.'
|
12
|
+
|
13
|
+
s.files = Dir['{lib,template}/**/*']
|
14
|
+
s.required_ruby_version = '>= 2.7'
|
15
|
+
|
16
|
+
s.add_dependency 'avm', '~> 0.97'
|
17
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.128', '>= 0.128.3'
|
18
|
+
s.add_dependency 'eac_templates', '~> 0.8', '>= 0.8.1'
|
19
|
+
|
20
|
+
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.12'
|
21
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module EacUbuntuBase0
|
5
|
+
class Apache
|
6
|
+
class Resource
|
7
|
+
common_constructor :apache, :type, :directory_prefix, :name
|
8
|
+
|
9
|
+
def available_path
|
10
|
+
::File.join(apache.etc_root, "#{directory_prefix}-available", "#{name}.conf")
|
11
|
+
end
|
12
|
+
|
13
|
+
def available?
|
14
|
+
apache.host_env.file(available_path).exist?
|
15
|
+
end
|
16
|
+
|
17
|
+
def disable
|
18
|
+
apache.host_env.command('sudo', "a2dis#{type}", name).execute!
|
19
|
+
end
|
20
|
+
|
21
|
+
def enable
|
22
|
+
apache.host_env.command('sudo', "a2en#{type}", name).execute!
|
23
|
+
end
|
24
|
+
|
25
|
+
def enabled_path
|
26
|
+
::File.join(apache.etc_root, "#{directory_prefix}-enabled", "#{name}.conf")
|
27
|
+
end
|
28
|
+
|
29
|
+
def enabled?
|
30
|
+
apache.host_env.file(enabled_path).exist?
|
31
|
+
end
|
32
|
+
|
33
|
+
def remove
|
34
|
+
remove_disabled
|
35
|
+
remove_available
|
36
|
+
end
|
37
|
+
|
38
|
+
def remove_available
|
39
|
+
raise 'Remove enabled before' if enabled?
|
40
|
+
|
41
|
+
apache.host_env.command('sudo', 'rm', '-f', available_path).execute! if available?
|
42
|
+
end
|
43
|
+
|
44
|
+
def remove_disabled
|
45
|
+
disable if enabled?
|
46
|
+
apache.host_env.command('sudo', 'rm', '-f', enabled_path).execute! if enabled?
|
47
|
+
end
|
48
|
+
|
49
|
+
def write(content)
|
50
|
+
::EacRubyUtils::Envs.local.command('echo', content).pipe(
|
51
|
+
apache.host_env.command('sudo', 'tee', available_path)
|
52
|
+
).execute!
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module EacUbuntuBase0
|
5
|
+
class Apache
|
6
|
+
require_sub __FILE__
|
7
|
+
common_constructor :host_env
|
8
|
+
|
9
|
+
def etc_root
|
10
|
+
'/etc/apache2'
|
11
|
+
end
|
12
|
+
|
13
|
+
def service(command)
|
14
|
+
host_env.command('sudo', 'service', 'apache2', command)
|
15
|
+
end
|
16
|
+
|
17
|
+
{ conf: :conf, site: :sites }.each do |type, directory_prefix|
|
18
|
+
define_method type do |name|
|
19
|
+
::Avm::EacUbuntuBase0::Apache::Resource.new(self, type, directory_prefix, name)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module EacUbuntuBase0
|
5
|
+
class DockerImage < ::Avm::Docker::Image
|
6
|
+
BASE_IMAGE = 'ubuntu:24.04'
|
7
|
+
USER_NAME = 'myuser'
|
8
|
+
|
9
|
+
# @return [String]
|
10
|
+
def base_image
|
11
|
+
BASE_IMAGE
|
12
|
+
end
|
13
|
+
|
14
|
+
def stereotype_tag
|
15
|
+
'eac_ubuntu_base0'
|
16
|
+
end
|
17
|
+
|
18
|
+
def user_home
|
19
|
+
::File.join('/home', user_name)
|
20
|
+
end
|
21
|
+
|
22
|
+
def user_name
|
23
|
+
USER_NAME
|
24
|
+
end
|
25
|
+
|
26
|
+
def user_password
|
27
|
+
user_name
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module EacUbuntuBase0
|
5
|
+
module Instances
|
6
|
+
class Base < ::Avm::Instances::Base
|
7
|
+
# @return [Avm::EacUbuntuBase0::Apache]
|
8
|
+
def apache
|
9
|
+
::Avm::EacUbuntuBase0::Apache.new(host_env)
|
10
|
+
end
|
11
|
+
|
12
|
+
def docker_image_class
|
13
|
+
::Avm::EacUbuntuBase0::DockerImage
|
14
|
+
end
|
15
|
+
|
16
|
+
def file_sudo_write(path, content)
|
17
|
+
::EacRubyUtils::Envs.local.command('echo', content).pipe(
|
18
|
+
host_env.command('sudo', 'tee', path)
|
19
|
+
).execute!
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module EacUbuntuBase0
|
5
|
+
module Rspec
|
6
|
+
class SshDockerServer < ::EacDocker::Images::Templatized
|
7
|
+
def base_image
|
8
|
+
::Avm::EacUbuntuBase0::DockerImage::BASE_IMAGE
|
9
|
+
end
|
10
|
+
|
11
|
+
# @return [EacRubyUtils::Envs::SshEnv]
|
12
|
+
def env
|
13
|
+
raise '@env is blank' if @env.blank?
|
14
|
+
|
15
|
+
@env
|
16
|
+
end
|
17
|
+
|
18
|
+
def on_run(&block)
|
19
|
+
on_container do
|
20
|
+
on_env(&block)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def container
|
27
|
+
raise '@container is blank' if @container.blank?
|
28
|
+
|
29
|
+
@container
|
30
|
+
end
|
31
|
+
|
32
|
+
def env_identity_file
|
33
|
+
template.child('id_rsa').path
|
34
|
+
end
|
35
|
+
|
36
|
+
def env_identity_file_good_permissions
|
37
|
+
r = ::EacRubyUtils::Fs::Temp.file
|
38
|
+
::FileUtils.cp env_identity_file, r
|
39
|
+
r.chmod(0o600)
|
40
|
+
r
|
41
|
+
end
|
42
|
+
|
43
|
+
def close_env
|
44
|
+
@identity_file.remove
|
45
|
+
@env = nil
|
46
|
+
end
|
47
|
+
|
48
|
+
def on_env
|
49
|
+
open_env
|
50
|
+
begin
|
51
|
+
yield
|
52
|
+
ensure
|
53
|
+
close_env
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def on_container
|
58
|
+
provide.container.temporary(true).on_detached do |container|
|
59
|
+
@container = container
|
60
|
+
begin
|
61
|
+
yield
|
62
|
+
ensure
|
63
|
+
@container = nil
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
def open_env
|
69
|
+
raise 'Environment already open' if @env.present?
|
70
|
+
|
71
|
+
@identity_file = env_identity_file_good_permissions
|
72
|
+
@env = ::EacRubyUtils::Envs::SshEnv.new(
|
73
|
+
"ssh://root@#{container.hostname}" \
|
74
|
+
'?StrictHostKeyChecking=no' \
|
75
|
+
'&BatchMode=yes' \
|
76
|
+
"&IdentityFile=#{@identity_file}"
|
77
|
+
)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module EacUbuntuBase0
|
5
|
+
module Runners
|
6
|
+
class Base < ::Avm::Runners::Base
|
7
|
+
enable_simple_cache
|
8
|
+
require_sub __FILE__
|
9
|
+
|
10
|
+
INSTANCE_ID = 'eac-ubuntu-base0_self'
|
11
|
+
|
12
|
+
runner_with :help, :subcommands do
|
13
|
+
subcommands
|
14
|
+
end
|
15
|
+
|
16
|
+
for_context :instance
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def instance_uncached
|
21
|
+
::Avm::EacUbuntuBase0::Instances::Base.by_id(INSTANCE_ID)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -3,14 +3,11 @@
|
|
3
3
|
require 'eac_ruby_utils'
|
4
4
|
EacRubyUtils::RootModuleSetup.perform __FILE__
|
5
5
|
|
6
|
-
require 'avm'
|
7
|
-
require 'eac_cli'
|
8
|
-
require 'eac_config'
|
9
|
-
require 'eac_git'
|
10
|
-
require 'filesize'
|
11
|
-
require 'git'
|
12
|
-
|
13
6
|
module Avm
|
14
|
-
module
|
7
|
+
module EacUbuntuBase0
|
15
8
|
end
|
16
9
|
end
|
10
|
+
|
11
|
+
require 'avm'
|
12
|
+
require 'eac_docker'
|
13
|
+
require 'eac_templates'
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RSpec.describe Avm::EacUbuntuBase0::DockerImage do
|
4
|
+
let(:registry) { EacDocker::Registry.new('stub') }
|
5
|
+
let(:instance) { described_class.new(registry) }
|
6
|
+
|
7
|
+
describe '#provide' do
|
8
|
+
it do
|
9
|
+
expect(instance.provide).to be_a(EacDocker::Images::Base)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RSpec.describe Avm::EacUbuntuBase0::Runners::Base::Docker do
|
4
|
+
it do
|
5
|
+
expect { run_command('--registry-name', 'testing', '--image-name') }.not_to raise_error
|
6
|
+
end
|
7
|
+
|
8
|
+
def run_command(*argv)
|
9
|
+
Avm::EacUbuntuBase0::Runners::Base.run(argv: %w[docker] + argv)
|
10
|
+
end
|
11
|
+
end
|