avm-eac_ubuntu_base0 0.3.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 68c659397d70f0b0b46d7bdb3398413bf313cedc2582215a6f8a12e7fba79f58
4
- data.tar.gz: d4a64bcbc6b0a0310c2f0fb18fd03882c56294119181eae37e9021e01d0f70e2
3
+ metadata.gz: 6b8d6bc2e48f970d19b70a2a0bc3038aa6c95a76280c4d496497de9a6573236c
4
+ data.tar.gz: b8dbb0d8d7a96d28213d74912cbe85db85cc354f86c4318518d55ef318c6b3d5
5
5
  SHA512:
6
- metadata.gz: 49755ee661da708823681e16589c53c1d5b4786e040f536f38986b6a690691914ad682537e45248dce5f75b4cb03dd29492b24414bd2e233bca7f15d4c0a58c0
7
- data.tar.gz: 03b7115d14f0a177f851adce03ef0e1acb095411f3542a43873d140543109a319b29d930141636df6f9a30eb86e04f0bbca40eb646e8bd04084384e48c2a5ed0
6
+ metadata.gz: 95e6bef855bd6594f1438b81ab37e60bb2c9d013839116e3da3fad5c7ffa46aa9160ebdaf2854d1819216f2fc28a8582eaeae3dc7b0dbc252df63550ceeef50b
7
+ data.tar.gz: '03018251fdd75512ffc4e5793406170a3f7487e27d87876f94c5e78a20512ae86917134f329fabc24f67ee742aceb0c7ad01fb55e72fb49f0b7008c48c4b95c5'
@@ -0,0 +1,84 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_docker/images/templatized'
4
+ require 'eac_ruby_utils/core_ext'
5
+ require 'eac_templates/core_ext'
6
+
7
+ module Avm
8
+ module EacUbuntuBase0
9
+ module Rspec
10
+ class SshDockerServer < ::EacDocker::Images::Templatized
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
19
+ on_container do
20
+ on_env do
21
+ yield
22
+ end
23
+ end
24
+ end
25
+
26
+ private
27
+
28
+ def container
29
+ raise '@container is blank' if @container.blank?
30
+
31
+ @container
32
+ end
33
+
34
+ def env_identity_file
35
+ template.child('id_rsa').path
36
+ end
37
+
38
+ def env_identity_file_good_permissions
39
+ r = ::EacRubyUtils::Fs::Temp.file
40
+ ::FileUtils.cp env_identity_file, r
41
+ r.chmod(0o600)
42
+ r
43
+ end
44
+
45
+ def close_env
46
+ @identity_file.remove
47
+ @env = nil
48
+ end
49
+
50
+ def on_env
51
+ open_env
52
+ begin
53
+ yield
54
+ ensure
55
+ close_env
56
+ end
57
+ end
58
+
59
+ def on_container
60
+ provide.container.temporary(true).on_detached do |container|
61
+ @container = container
62
+ begin
63
+ yield
64
+ ensure
65
+ @container = nil
66
+ end
67
+ end
68
+ end
69
+
70
+ def open_env
71
+ raise 'Environment already open' if @env.present?
72
+
73
+ @identity_file = env_identity_file_good_permissions
74
+ @env = ::EacRubyUtils::Envs::SshEnv.new(
75
+ "ssh://root@#{container.hostname}" \
76
+ '?StrictHostKeyChecking=no' \
77
+ '&BatchMode=yes' \
78
+ "&IdentityFile=#{@identity_file}"
79
+ )
80
+ end
81
+ end
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_utils/core_ext'
4
+
5
+ module Avm
6
+ module EacUbuntuBase0
7
+ module Rspec
8
+ require_sub __FILE__
9
+ end
10
+ end
11
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module EacUbuntuBase0
5
- VERSION = '0.3.0'
5
+ VERSION = '0.4.1'
6
6
  end
7
7
  end
@@ -1,6 +1,7 @@
1
1
  FROM ubuntu:20.04
2
2
 
3
3
  # Base system update
4
+ ENV DEBIAN_FRONTEND=noninteractive
4
5
  RUN apt-get update -y
5
6
  RUN apt-get dist-upgrade -y
6
7
 
@@ -0,0 +1,24 @@
1
+ FROM ubuntu:18.04
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 /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+7ySAOYfDCpENgE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i877+C8hB7ge
26
+ JjlolpGpvjYN3QEnYxki4Fbgxxz4PX91NjnT5RF4dILhTa5kavP7
27
+ -----END RSA PRIVATE KEY-----
@@ -0,0 +1 @@
1
+ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDJl+Xpn6v8izf3o90qBgRYB/Q7bG3trVTCVo/ujNG9mOaZ39d2Q+jZmxd7u0AIAnMMcw71Q7X9ZDRmKuRV8tN7zYIifCCBgvER/W9G0JXU25W221n4PTJlZv+RcQClUAjMq8IE9km6ykE+4lwS5XKAmfrjpZeqLVfcIEOpX5gQjyybWjfGf3GazJeZbsB8hPTsXVbq7j+98adnfOPJfADR5/XBnjpGDMWBVMFk6el/QQuNxbRVF++AZHK2hjbam+rG1hzli6aB12naiLd9QoyhGsMDBTv5UUpRC/ReYyxkoqnaJ6KGX9ZEj1JxezXpA1BmpWqfD2WXZpRo9VV/UmTh avm@localhost
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avm-eac_ubuntu_base0
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Put here the authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-08 00:00:00.000000000 Z
11
+ date: 2023-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avm
@@ -16,34 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.7'
19
+ version: '0.64'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.7'
26
+ version: '0.64'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: eac_ruby_utils
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.77'
34
- - - ">="
35
- - !ruby/object:Gem::Version
36
- version: 0.77.1
33
+ version: '0.112'
37
34
  type: :runtime
38
35
  prerelease: false
39
36
  version_requirements: !ruby/object:Gem::Requirement
40
37
  requirements:
41
38
  - - "~>"
42
39
  - !ruby/object:Gem::Version
43
- version: '0.77'
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- version: 0.77.1
40
+ version: '0.112'
47
41
  - !ruby/object:Gem::Dependency
48
42
  name: eac_templates
49
43
  requirement: !ruby/object:Gem::Requirement
@@ -51,6 +45,9 @@ dependencies:
51
45
  - - "~>"
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0.3'
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: 0.3.2
54
51
  type: :runtime
55
52
  prerelease: false
56
53
  version_requirements: !ruby/object:Gem::Requirement
@@ -58,6 +55,23 @@ dependencies:
58
55
  - - "~>"
59
56
  - !ruby/object:Gem::Version
60
57
  version: '0.3'
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: 0.3.2
61
+ - !ruby/object:Gem::Dependency
62
+ name: avm-eac_ubuntu_base0
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
61
75
  - !ruby/object:Gem::Dependency
62
76
  name: eac_ruby_gem_support
63
77
  requirement: !ruby/object:Gem::Requirement
@@ -84,10 +98,15 @@ files:
84
98
  - lib/avm/eac_ubuntu_base0/docker_image.rb
85
99
  - lib/avm/eac_ubuntu_base0/instances.rb
86
100
  - lib/avm/eac_ubuntu_base0/instances/base.rb
101
+ - lib/avm/eac_ubuntu_base0/rspec.rb
102
+ - lib/avm/eac_ubuntu_base0/rspec/ssh_docker_server.rb
87
103
  - lib/avm/eac_ubuntu_base0/runners/base.rb
88
104
  - lib/avm/eac_ubuntu_base0/runners/base/docker.rb
89
105
  - lib/avm/eac_ubuntu_base0/version.rb
90
106
  - template/avm/eac_ubuntu_base0/docker_image/Dockerfile.template
107
+ - template/avm/eac_ubuntu_base0/rspec/ssh_docker_server/Dockerfile
108
+ - template/avm/eac_ubuntu_base0/rspec/ssh_docker_server/id_rsa
109
+ - template/avm/eac_ubuntu_base0/rspec/ssh_docker_server/id_rsa.pub
91
110
  homepage:
92
111
  licenses: []
93
112
  metadata: {}