shiplane_bootstrappers_chef 0.1.15 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cookbooks.tar.gz +0 -0
- data/lib/capistrano/chef_host.rb +17 -1
- data/lib/capistrano/tasks/shiplane_bootstrap.rake +9 -1
- data/lib/shiplane/bootstrappers/chef/version.rb +1 -1
- metadata +26 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 408457ed820a25b86fa9bbdaf43d02aa8995280f3b4cc5191d755726260f698a
|
4
|
+
data.tar.gz: 4a95a658ba3fd90a01a7782f27fcce908d86cf6ee630e4f6089ed3890bb4a3b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7abb9ba612dd9d933676eca88daeb06145151c59e8a97108fc3bbc89dc02859a9ea7907321195a21a675461a1680e7a478222bc809d40d344b1bf51b4170dec5
|
7
|
+
data.tar.gz: 868ed925c554f1b40554132e8bc1bdda19f512f412c40ade73d4cf11a4c6d892a2295859979d5730519a37556dfb400168452f2d63b1bb3f69723076f02622a2
|
data/cookbooks.tar.gz
CHANGED
Binary file
|
data/lib/capistrano/chef_host.rb
CHANGED
@@ -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
|
@@ -3,14 +3,16 @@ namespace :shiplane do
|
|
3
3
|
task :bootstrap, [:role] => ['bootstrap:default']
|
4
4
|
|
5
5
|
namespace :bootstrap do
|
6
|
-
task :
|
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
|
|
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.
|
4
|
+
version: 0.2.3
|
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:
|
11
|
+
date: 2021-05-02 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
|
-
|
141
|
-
|
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.
|