shiplane_bootstrappers_chef 0.1.14 → 0.2.2

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: 4030ed72c0135d66b257116dac76d2cafc9c8e6bc21eb0c79e78ad50c1277dfc
4
- data.tar.gz: 2639e7074d24a4fc0f8fb555b28c9529eeda294964ac0cf096d8c50f90068cd2
3
+ metadata.gz: 1451a74466fca827914195ec0d3cc14ae82beeceb548bd4e1d99c2092c035446
4
+ data.tar.gz: d81665d8edd1ddd696c2991776a53a3b89abf0ba55b2571dbba5148d6f61c711
5
5
  SHA512:
6
- metadata.gz: 9af17b09e7a1881938c2bb363c02acdc2a72c91472d7084e490a84ea7e0924606730c71e7c592a61dc7cbf75d48f7955655d451ffbab8dda3cd9f1de1182a353
7
- data.tar.gz: 11e1ea0e93c5eb40b9669b2cf69d4b5b6b816fc29d9e3f8a1b09213ce1fe2e1c79d6f3e90a25719d11cb5925dfda6c9bf4b5747f71d5d8460088952f4d63ed4c
6
+ metadata.gz: d7da41d8aa8cc3c65fdb5b9f7b79420b4a6bcca1e17466719e090acc8810881e64c6ab0296f4b56d07b5b7d5bb84cfa4390f24cae0ac119109b09e178fb83047
7
+ data.tar.gz: 65dd0b85a3db69e5ee288b7695bd0275579c04df3384c7daacc505be0a700b7caa4f4253116005a453846cceb5ea0fc82d8d9b1cdf303485711ed91ef1f2bafa
data/cookbooks.tar.gz CHANGED
Binary file
@@ -28,6 +28,8 @@ module Shiplane
28
28
  end
29
29
 
30
30
  unless install_finished
31
+ execute :sudo, :sysctl, "-w", "net.ipv6.conf.all.disable_ipv6=1", interaction_handler: context_variables[:interaction_handler]
32
+ execute :sudo, :sysctl, "-w", "net.ipv6.conf.default.disable_ipv6=1", interaction_handler: context_variables[:interaction_handler]
31
33
  execute :sudo, :mkdir, '-m', '2777', '-p', Shiplane::ChefHost::REMOTE_CHEF_FOLDER_PATH, interaction_handler: context_variables[:interaction_handler]
32
34
  execute :sudo, :touch, File.join(Shiplane::ChefHost::REMOTE_CHEF_FOLDER_PATH, '.install-started'), interaction_handler: context_variables[:interaction_handler]
33
35
  execute :sudo, 'apt-get', 'update', interaction_handler: context_variables[:interaction_handler]
@@ -36,6 +38,20 @@ module Shiplane
36
38
  execute :sudo, :dpkg, '-i', Shiplane::ChefHost::CHEF_PACKAGE_NAME, interaction_handler: context_variables[:interaction_handler]
37
39
  execute :sudo, :ls, '-al', Shiplane::ChefHost::REMOTE_CHEF_FOLDER_PATH, interaction_handler: context_variables[:interaction_handler]
38
40
  execute :sudo, :touch, File.join(Shiplane::ChefHost::REMOTE_CHEF_FOLDER_PATH, '.install'), interaction_handler: context_variables[:interaction_handler]
41
+ execute :sudo, :sysctl, "-w", "net.ipv6.conf.all.disable_ipv6=0", interaction_handler: context_variables[:interaction_handler]
42
+ execute :sudo, :sysctl, "-w", "net.ipv6.conf.default.disable_ipv6=0", interaction_handler: context_variables[:interaction_handler]
43
+ end
44
+ end
45
+ end
46
+ end
47
+
48
+ def reinstall
49
+ with_context do
50
+ SSHKit::Coordinator.new(host).each in: :parallel do
51
+ context_variables = fetch(:shiplane_sshkit_values)
52
+
53
+ if(test("[ -f #{File.join(Shiplane::ChefHost::REMOTE_CHEF_FOLDER_PATH, '.install')} ]"))
54
+ execute :sudo, :rm, File.join(Shiplane::ChefHost::REMOTE_CHEF_FOLDER_PATH, '.install'), interaction_handler: context_variables[:interaction_handler]
39
55
  end
40
56
  end
41
57
  end
@@ -48,7 +64,7 @@ module Shiplane
48
64
  context_variables = fetch(:shiplane_sshkit_values)
49
65
 
50
66
  begin
51
- execute :sudo, 'chef-solo', '-c', "#{Shiplane::ChefHost::REMOTE_CHEF_FOLDER_PATH}/solo.rb", interaction_handler: context_variables[:interaction_handler]
67
+ execute :sudo, 'chef-solo', '-c', "#{Shiplane::ChefHost::REMOTE_CHEF_FOLDER_PATH}/solo.rb", "--chef-license", "accept", interaction_handler: context_variables[:interaction_handler]
52
68
  rescue => e
53
69
  errors["#{h}"] = Shiplane::ChefErrorParser.parse(e)
54
70
  end
@@ -24,6 +24,11 @@ namespace :shiplane do
24
24
  task :evaluate_erb_files, :username, :keypath do |task, args|
25
25
  Dotenv.load Shiplane::ChefHost.env_file
26
26
  on fetch(:shiplane_hosts).map(&:capistrano_role) do |host|
27
+ @shiplane_users = [
28
+ "docker",
29
+ host.user,
30
+ ].compact.uniq.join("\",\"")
31
+
27
32
  Dir["#{File.expand_path("../../../chef", __FILE__)}/**/*.erb"].map do |filename|
28
33
  compiled_template = ERB.new(File.read(filename)).result(binding)
29
34
  compiled_file_name = filename.match(/.*\/chef\/(.*)\.erb/)[1]
@@ -3,14 +3,16 @@ namespace :shiplane do
3
3
  task :bootstrap, [:role] => ['bootstrap:default']
4
4
 
5
5
  namespace :bootstrap do
6
- task :default, [:role] do |task, args|
6
+ task :setup, [:role] do |task, args|
7
7
  filter = args.fetch('role', 'all')
8
8
  hosts = roles(filter).map do |host|
9
9
  Shiplane::ChefHost.new(host, env)
10
10
  end
11
11
 
12
12
  set :shiplane_hosts, hosts
13
+ end
13
14
 
15
+ task :default, [:role] => :setup do |task, args|
14
16
  %w{ prepare install configure cleanup }.each do |task|
15
17
  invoke "shiplane:bootstrap:#{task}"
16
18
  end
@@ -22,6 +24,12 @@ namespace :shiplane do
22
24
  task :install do
23
25
  end
24
26
 
27
+ task reinstall: :setup do
28
+ %w{ prepare reinstall install configure cleanup }.each do |task|
29
+ invoke "shiplane:bootstrap:#{task}"
30
+ end
31
+ end
32
+
25
33
  task :configure do
26
34
  end
27
35
 
@@ -9,9 +9,7 @@
9
9
  "group": {
10
10
  "name": "docker"
11
11
  },
12
- "user": {
13
- "name": "docker"
14
- }
12
+ "users": ["<%= @shiplane_users %>"]
15
13
  },
16
14
  "run_list":
17
15
  [
@@ -3,7 +3,7 @@
3
3
  module Shiplane
4
4
  module Bootstrappers
5
5
  module Chef
6
- VERSION = "0.1.14"
6
+ VERSION = "0.2.2"
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shiplane_bootstrappers_chef
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.14
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Epperson
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-03 00:00:00.000000000 Z
11
+ date: 2021-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano
@@ -90,6 +90,26 @@ dependencies:
90
90
  - - ">="
91
91
  - !ruby/object:Gem::Version
92
92
  version: 7.0.8
93
+ - !ruby/object:Gem::Dependency
94
+ name: gem-release
95
+ requirement: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: 2.0.4
100
+ - - "~>"
101
+ - !ruby/object:Gem::Version
102
+ version: 2.2.1
103
+ type: :development
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: 2.0.4
110
+ - - "~>"
111
+ - !ruby/object:Gem::Version
112
+ version: 2.2.1
93
113
  description: Converts docker-compose.yml files into images that can be uploaded to
94
114
  any docker image repository.
95
115
  email:
@@ -122,7 +142,7 @@ homepage: https://github.com/kirillian/shiplane
122
142
  licenses:
123
143
  - MIT
124
144
  metadata: {}
125
- post_install_message:
145
+ post_install_message:
126
146
  rdoc_options: []
127
147
  require_paths:
128
148
  - lib
@@ -137,9 +157,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
137
157
  - !ruby/object:Gem::Version
138
158
  version: '0'
139
159
  requirements: []
140
- rubyforge_project:
141
- rubygems_version: 2.7.7
142
- signing_key:
160
+ rubygems_version: 3.0.3
161
+ signing_key:
143
162
  specification_version: 4
144
163
  summary: A toolbox for converting developer docker-compose files into production-ready
145
164
  images.