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,27 @@
|
|
1
|
+
FROM %%base_image%%
|
2
|
+
|
3
|
+
# Base system update
|
4
|
+
ENV DEBIAN_FRONTEND=noninteractive
|
5
|
+
RUN apt-get update -y
|
6
|
+
RUN apt-get dist-upgrade -y
|
7
|
+
|
8
|
+
# Timezone
|
9
|
+
RUN apt-get install -y tzdata
|
10
|
+
RUN ln -fs /usr/share/zoneinfo/America/Sao_Paulo /etc/localtime
|
11
|
+
RUN dpkg-reconfigure --frontend noninteractive tzdata
|
12
|
+
|
13
|
+
# Default user
|
14
|
+
RUN /usr/sbin/groupmod --new-name '%%user_name%%' ubuntu
|
15
|
+
RUN /usr/sbin/usermod --shell /bin/bash --home %%user_home%% --move-home --login %%user_name%% \
|
16
|
+
ubuntu
|
17
|
+
RUN /bin/echo '%%user_name%%:%%user_password%%' | /usr/sbin/chpasswd
|
18
|
+
RUN /bin/chown %%user_name%%:%%user_name%% %%user_home%% -R
|
19
|
+
|
20
|
+
# Sudo
|
21
|
+
RUN apt-get install -y sudo
|
22
|
+
RUN /bin/echo "%%user_name%% ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/%%user_name%%_all_nopasswd && chmod 0440 /etc/sudoers.d/%%user_name%%_all_nopasswd
|
23
|
+
|
24
|
+
# Container
|
25
|
+
USER %%user_name%%
|
26
|
+
WORKDIR %%user_home%%
|
27
|
+
CMD /bin/bash
|
@@ -0,0 +1,24 @@
|
|
1
|
+
FROM '%%base_image%%'
|
2
|
+
MAINTAINER Aleksandar Diklic "https://github.com/rastasheep"
|
3
|
+
|
4
|
+
RUN apt-get update
|
5
|
+
|
6
|
+
RUN apt-get install -y openssh-server
|
7
|
+
RUN mkdir /var/run/sshd
|
8
|
+
|
9
|
+
RUN echo 'root:root' |chpasswd
|
10
|
+
|
11
|
+
RUN sed -ri 's/^#?PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config
|
12
|
+
RUN sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config
|
13
|
+
|
14
|
+
RUN mkdir -p /root/.ssh
|
15
|
+
ADD id_rsa /root/.ssh/id_rsa
|
16
|
+
ADD id_rsa.pub /root/.ssh/id_rsa.pub
|
17
|
+
ADD id_rsa.pub /root/.ssh/authorized_keys
|
18
|
+
|
19
|
+
RUN apt-get clean && \
|
20
|
+
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
21
|
+
|
22
|
+
EXPOSE 22
|
23
|
+
|
24
|
+
CMD ["/usr/sbin/sshd", "-D"]
|
@@ -0,0 +1,27 @@
|
|
1
|
+
-----BEGIN RSA PRIVATE KEY-----
|
2
|
+
MIIEowIBAAKCAQEAyZfl6Z+r/Is396PdKgYEWAf0O2xt7a1UwlaP7ozRvZjmmd/X
|
3
|
+
dkPo2ZsXe7tACAJzDHMO9UO1/WQ0ZirkVfLTe82CInwggYLxEf1vRtCV1NuVtttZ
|
4
|
+
+D0yZWb/kXEApVAIzKvCBPZJuspBPuJcEuVygJn646WXqi1X3CBDqV+YEI8sm1o3
|
5
|
+
xn9xmsyXmW7AfIT07F1W6u4/vfGnZ3zjyXwA0ef1wZ46RgzFgVTBZOnpf0ELjcW0
|
6
|
+
VRfvgGRytoY22pvqxtYc5Yumgddp2oi3fUKMoRrDAwU7+VFKUQv0XmMsZKKp2iei
|
7
|
+
hl/WRI9ScXs16QNQZqVqnw9ll2aUaPVVf1Jk4QIDAQABAoIBADDiWKoyQe5XhBbU
|
8
|
+
8YiDNQJzy1GtlWqRIYCOpRBfrWygayrdEM5o4UoDRcqHOZu3nFZkgDgRV0w+xEYS
|
9
|
+
GJSO8aGP0AK0vt0o93Q5VIaDhhG7va49uq9rh5D3TPnjwRhVNA0NiVrSrkZRTUkG
|
10
|
+
cvVSFlYBAMm7Ge/2VtvWJxInUCSTZPZfh+7ySAOYfDCpENgEcQKYXhx2WFrd0O/Q
|
11
|
+
I2QgIpbpOAgqNxvaRT60gNiIKmIGAFHEJiKsK94mkaVj28GJ4kZkXkdaGQDuypYp
|
12
|
+
nB7sO3Z5Gq2pCjAgFHxtDP2lZHN4IaX6uQBWupCPhJ63V9gLTvxTMZfI9sn6O2PS
|
13
|
+
F50wQcECgYEA88o22sA5ZoEZ7CtXVZ9EzNOopNMFNX4IeMdu7c8+qgZWWFJDbmXV
|
14
|
+
AqDZ0W72miSETZB8FR9unJLXlgBJWSR7R4s6KfTo9PKvfN3x0H3l+4AZXcDTexJN
|
15
|
+
vdYWJbR+NnsW3lh5dzBiRE70GQ2QU9zQKMl9mCWVL+3o1YAz9XqTYKUCgYEA07Cn
|
16
|
+
rPLHUQvmm4+DUlyNp8H0SBWl0jx1+cMnfWpdMMs/7bLYpkbnpqN/IgKQOf3AYI//
|
17
|
+
lncnk1NRdNfpuf3yLtvhdqZFg9N11dbT0i0rTNlHvWzrVB4Rtu9OD3EWvCoqOPKQ
|
18
|
+
ey+XdVyasI8W6k4hYuZiClsm2pFwxbTMBBTbYo0CgYAuQMVbh3Dcg835QtfVBNy2
|
19
|
+
x8mNTAQG/Bx7XcssD0/iTkV/iEwG3Acn8oCg/Z6H7Dm1xZ3lHAuOZUXFzdQct5E0
|
20
|
+
J7QnVbIFFy44UJuaZOiHaOxnHziAdx6Mz9tv1+jCSWQzVzHkbSeXsisZvbsOTiyo
|
21
|
+
MGJFxYuihk7QgvxYrKLdiQKBgGb/aeYFTiNJ5g9EWYHmVGoOPZwhJEhRcJlwcbNc
|
22
|
+
4DDQg69UuILWtvlmTYIvuxrsMwEIrzP3j8Ln5Bc0wpzjSUWxaFcBeYs1hPzhhLib
|
23
|
+
j5jZk0VATJPl+XqHnvR2crhkz5xbsR6uvkO1JfLH/D9OeoITVBpz1Ui9QSCA4k8O
|
24
|
+
Etw1AoGBAKRMXd+BxObb7+Qr0QSSjsAo2/5Ca782X1G8LoXkKqXqSiY+Y98ugpoC
|
25
|
+
Gu+oeiHLHDW47hHbtC5rdXigcLEZQRiLVsOiwgua8AcnQxBhF4/Xi877+C8hB7ge
|
26
|
+
JjlolpGpvjYN3QEnYxki4Fbgxxz4PX91NjnT5RF4dILhTa5kavP7
|
27
|
+
-----END RSA PRIVATE KEY-----
|
data/sub/avm-eac_ubuntu_base0/template/avm/eac_ubuntu_base0/rspec/ssh_docker_server/id_rsa.pub
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDJl+Xpn6v8izf3o90qBgRYB/Q7bG3trVTCVo/ujNG9mOaZ39d2Q+jZmxd7u0AIAnMMcw71Q7X9ZDRmKuRV8tN7zYIifCCBgvER/W9G0JXU25W221n4PTJlZv+RcQClUAjMq8IE9km6ykE+4lwS5XKAmfrjpZeqLVfcIEOpX5gQjyybWjfGf3GazJeZbsB8hPTsXVbq7j+98adnfOPJfADR5/XBnjpGDMWBVMFk6el/QQuNxbRVF++AZHK2hjbam+rG1hzli6aB12naiLd9QoyhGsMDBTv5UUpRC/ReYyxkoqnaJ6KGX9ZEj1JxezXpA1BmpWqfD2WXZpRo9VV/UmTh avm@localhost
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
$LOAD_PATH.push File.expand_path('lib', __dir__)
|
4
|
+
|
5
|
+
require 'eac_docker/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = 'eac_docker'
|
9
|
+
s.version = EacDocker::VERSION
|
10
|
+
s.authors = ['Put here the authors']
|
11
|
+
s.summary = 'Put here de description.'
|
12
|
+
|
13
|
+
s.files = Dir['{lib}/**/*']
|
14
|
+
s.required_ruby_version = '>= 2.7'
|
15
|
+
|
16
|
+
s.add_dependency 'eac_ruby_utils', '~> 0.128', '>= 0.128.2'
|
17
|
+
s.add_dependency 'eac_templates', '~> 0.8', '>= 0.8.1'
|
18
|
+
|
19
|
+
s.add_development_dependency 'eac_ruby_gem_support', '~> 0.12'
|
20
|
+
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module EacDocker
|
4
|
+
class Container
|
5
|
+
enable_immutable
|
6
|
+
immutable_accessor :interactive, :temporary, :tty, type: :boolean
|
7
|
+
immutable_accessor :env, type: :hash
|
8
|
+
immutable_accessor :capability, :command_arg, :volume, type: :array
|
9
|
+
attr_reader :id
|
10
|
+
|
11
|
+
common_constructor :image
|
12
|
+
|
13
|
+
def immutable_constructor_args
|
14
|
+
[image]
|
15
|
+
end
|
16
|
+
|
17
|
+
alias immutable_volume volume
|
18
|
+
|
19
|
+
def hostname
|
20
|
+
::EacDocker::Executables.docker.command(
|
21
|
+
'inspect', '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}',
|
22
|
+
id
|
23
|
+
).execute!.strip
|
24
|
+
end
|
25
|
+
|
26
|
+
# @return [String]
|
27
|
+
def logs
|
28
|
+
::EacDocker::Executables.docker.command('logs', id).execute!
|
29
|
+
end
|
30
|
+
|
31
|
+
def on_detached
|
32
|
+
command = ::EacDocker::Executables.docker.command(*(%w[run --detach] + run_command_args))
|
33
|
+
self.id = command.execute!.strip
|
34
|
+
begin
|
35
|
+
yield(self)
|
36
|
+
ensure
|
37
|
+
stop
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def volume(left_part, right_part = nil)
|
42
|
+
immutable_volume(right_part.if_present(left_part) { |v| "#{left_part}:#{v}" })
|
43
|
+
end
|
44
|
+
|
45
|
+
def run_command
|
46
|
+
::EacDocker::Executables.docker.command('run', *run_command_args)
|
47
|
+
end
|
48
|
+
|
49
|
+
def run_command_args
|
50
|
+
%w[boolean capabilities envs volumes]
|
51
|
+
.inject([]) { |a, e| a + send("run_command_#{e}_args") } +
|
52
|
+
[image.provide.id] + command_args
|
53
|
+
end
|
54
|
+
|
55
|
+
def stop
|
56
|
+
::EacDocker::Executables.docker.command('stop', id).execute!
|
57
|
+
end
|
58
|
+
|
59
|
+
private
|
60
|
+
|
61
|
+
attr_writer :id
|
62
|
+
|
63
|
+
def run_command_boolean_args
|
64
|
+
r = []
|
65
|
+
r << '--interactive' if interactive?
|
66
|
+
r << '--tty' if tty?
|
67
|
+
r << '--rm' if temporary?
|
68
|
+
r
|
69
|
+
end
|
70
|
+
|
71
|
+
def run_command_capabilities_args
|
72
|
+
capabilities.flat_map { |capability| ['--cap-add', capability] }
|
73
|
+
end
|
74
|
+
|
75
|
+
def run_command_volumes_args
|
76
|
+
volumes.flat_map { |volume| ['--volume', volume] }
|
77
|
+
end
|
78
|
+
|
79
|
+
def run_command_envs_args
|
80
|
+
envs.flat_map { |name, value| ['--env', "#{name}=#{value}"] }
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module EacDocker
|
4
|
+
module Images
|
5
|
+
class Coded < ::EacDocker::Images::Base
|
6
|
+
enable_simple_cache
|
7
|
+
enable_immutable
|
8
|
+
immutable_accessor :tag
|
9
|
+
common_constructor :path do
|
10
|
+
self.path = path.to_pathname
|
11
|
+
end
|
12
|
+
|
13
|
+
def immutable_constructor_args
|
14
|
+
[path]
|
15
|
+
end
|
16
|
+
|
17
|
+
def provide
|
18
|
+
id
|
19
|
+
self
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def id_uncached
|
25
|
+
if ::EacDocker::Debug.enabled?
|
26
|
+
::EacDocker::Executables.docker.command(*build_args.excluding('--quiet')).system!
|
27
|
+
end
|
28
|
+
::EacDocker::Executables.docker.command(*build_args).execute!.strip
|
29
|
+
.then { |digest| tag.presence || digest }
|
30
|
+
end
|
31
|
+
|
32
|
+
def build_args
|
33
|
+
args = %w[build --quiet]
|
34
|
+
args += ['--tag', tag] if tag.present?
|
35
|
+
args + [path.to_path]
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module EacDocker
|
4
|
+
module Images
|
5
|
+
class Named < ::EacDocker::Images::Base
|
6
|
+
common_constructor :source_tag
|
7
|
+
|
8
|
+
def id
|
9
|
+
source_tag
|
10
|
+
end
|
11
|
+
|
12
|
+
def provide
|
13
|
+
provide_command.execute!
|
14
|
+
self
|
15
|
+
end
|
16
|
+
|
17
|
+
def provide_command
|
18
|
+
::EacDocker::Executables.docker.command(*docker_provide_args)
|
19
|
+
end
|
20
|
+
|
21
|
+
def docker_provide_args
|
22
|
+
['pull', source_tag]
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module EacDocker
|
4
|
+
module Images
|
5
|
+
class Templatized < ::EacDocker::Images::Base
|
6
|
+
enable_immutable
|
7
|
+
immutable_accessor :tag
|
8
|
+
attr_reader :provide_dir
|
9
|
+
|
10
|
+
def id
|
11
|
+
tag
|
12
|
+
end
|
13
|
+
|
14
|
+
def provide
|
15
|
+
::EacRubyUtils::Fs::Temp.on_directory do |provide_dir|
|
16
|
+
self.provide_dir = provide_dir
|
17
|
+
write_in_provide_dir
|
18
|
+
coded_image(provide_dir).tag(tag).provide
|
19
|
+
ensure
|
20
|
+
self.provide_dir = nil
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def coded_image(provide_dir)
|
25
|
+
::EacDocker::Images::Coded.new(provide_dir)
|
26
|
+
end
|
27
|
+
|
28
|
+
protected
|
29
|
+
|
30
|
+
def variables_source
|
31
|
+
self
|
32
|
+
end
|
33
|
+
|
34
|
+
def write_in_provide_dir
|
35
|
+
template.apply(variables_source, provide_dir)
|
36
|
+
end
|
37
|
+
|
38
|
+
private
|
39
|
+
|
40
|
+
attr_writer :provide_dir
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module EacDocker
|
4
|
+
module Rspec
|
5
|
+
module Setup
|
6
|
+
def self.extended(obj)
|
7
|
+
obj.setup_conditional_docker_executable
|
8
|
+
end
|
9
|
+
|
10
|
+
def setup_conditional_docker_executable
|
11
|
+
conditional(:docker) { ::EacDocker::Executables.docker.validate }
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module EacDocker
|
4
|
+
module Rspec
|
5
|
+
class StubImage
|
6
|
+
include ::ActiveSupport::Callbacks
|
7
|
+
|
8
|
+
define_callbacks :on_container
|
9
|
+
common_constructor :image
|
10
|
+
|
11
|
+
def build_container
|
12
|
+
image.provide.container.temporary(true)
|
13
|
+
end
|
14
|
+
|
15
|
+
def container
|
16
|
+
raise 'internal container is blank' if internal_container.blank?
|
17
|
+
|
18
|
+
internal_container
|
19
|
+
end
|
20
|
+
|
21
|
+
def on_container(&block)
|
22
|
+
raise 'A container was already created' if internal_container.present?
|
23
|
+
|
24
|
+
build_container.on_detached do |container|
|
25
|
+
self.internal_container = container
|
26
|
+
begin
|
27
|
+
run_callbacks(:on_container, &block)
|
28
|
+
ensure
|
29
|
+
self.internal_container = nil
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
private
|
35
|
+
|
36
|
+
attr_accessor :internal_container
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RSpec.describe(EacDocker::Images::Coded, :docker) do
|
4
|
+
let(:fixtures_dir) { Pathname.new('coded_spec_files').expand_path(__dir__) }
|
5
|
+
let(:instance) { described_class.new(fixtures_dir / 'image1') }
|
6
|
+
|
7
|
+
describe '#provide' do
|
8
|
+
it { expect { instance.provide }.not_to raise_error }
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
from ubuntu:bionic
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RSpec.describe(EacDocker::Images::Templatized, :docker) do
|
4
|
+
let(:fixtures_dir) { Pathname.new('templatized_spec_files').expand_path(__dir__) }
|
5
|
+
let(:instance) { StubDockerImage.new }
|
6
|
+
|
7
|
+
before do
|
8
|
+
EacTemplates::Sources::Set.default.included_paths << fixtures_dir
|
9
|
+
stub_const('StubDockerImage', Class.new(described_class))
|
10
|
+
end
|
11
|
+
|
12
|
+
describe '#provide' do
|
13
|
+
it { expect { instance.provide }.not_to raise_error }
|
14
|
+
end
|
15
|
+
end
|
data/sub/eac_docker/spec/lib/eac_docker/images/templatized_spec_files/stub_docker_image/Dockerfile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
from ubuntu:bionic
|