biosphere 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/biosphere +15 -3
- data/lib/biosphere/kube.rb +1 -0
- data/lib/biosphere/settings.rb +1 -1
- data/lib/biosphere/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88020767bf9108cca1476004ddf0341b5feafe88
|
4
|
+
data.tar.gz: 063cb05d2a0cba8246a49cccdf0d7c396e18ddcb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97728c5ec497caa18604445a6bea2e2adb0cde5f0c906f98a24d97dd62eece20c28519acd4e7072dd8fbf9937594a43e970269e06d28e18b1a325e4a3f8348e9
|
7
|
+
data.tar.gz: e900d8d19297fe53e4d35d4b2c8b1135d99d4dd80b2174a0b1018e0b631693b8b77650965ac9878bdd4242e7ba12739357ca9939f7e6c672564ae20ad6ec971c
|
data/bin/biosphere
CHANGED
@@ -7,6 +7,7 @@ require 'pp'
|
|
7
7
|
require "awesome_print"
|
8
8
|
require 'colorize'
|
9
9
|
require 'biosphere/s3.rb'
|
10
|
+
require 'pty'
|
10
11
|
|
11
12
|
class BiosphereOpts
|
12
13
|
|
@@ -89,7 +90,7 @@ if options.src
|
|
89
90
|
STDERR.puts "Loading suite from current directory (#{File.expand_path(options.src)}). Use --src to change the path"
|
90
91
|
end
|
91
92
|
|
92
|
-
if suite.load_all(options.src) == 0
|
93
|
+
if suite.load_all(options.src) == 0 || suite.deployments.size == 0
|
93
94
|
STDERR.puts "No files found. Are you in the right directory where your biosphere .rb files are?"
|
94
95
|
exit -1
|
95
96
|
end
|
@@ -197,8 +198,19 @@ elsif ARGV[0] == "commit" && options.src
|
|
197
198
|
elsif answer == "y"
|
198
199
|
puts "\nApplying the changes (this may take several minutes)"
|
199
200
|
state_file = "#{options.build_dir}/#{deployment}.tfstate"
|
200
|
-
tf_apply = %x( terraform apply -state=#{state_file} #{options.build_dir})
|
201
|
-
puts "\n" + tf_apply
|
201
|
+
#tf_apply = %x( terraform apply -state=#{state_file} #{options.build_dir})
|
202
|
+
#puts "\n" + tf_apply
|
203
|
+
begin
|
204
|
+
PTY.spawn("terraform apply -state=#{state_file} #{options.build_dir}") do |stdout, stdin, pid|
|
205
|
+
begin
|
206
|
+
stdout.each { |line| puts line }
|
207
|
+
rescue Errno::EIO
|
208
|
+
end
|
209
|
+
end
|
210
|
+
rescue PTY::ChildExited
|
211
|
+
puts "The child process exited!"
|
212
|
+
end
|
213
|
+
|
202
214
|
puts "Loading outputs for #{deployment} from #{state_file}"
|
203
215
|
suite.deployments[deployment].load_outputs(state_file)
|
204
216
|
state.save()
|
data/lib/biosphere/kube.rb
CHANGED
@@ -32,6 +32,7 @@ class Biosphere
|
|
32
32
|
|
33
33
|
@clients << ::Kubeclient::Client.new("#{hostname}/api" , "v1", ssl_options: ssl_options)
|
34
34
|
@clients << ::Kubeclient::Client.new("#{hostname}/apis/extensions/" , "v1beta1", ssl_options: ssl_options)
|
35
|
+
@clients << ::Kubeclient::Client.new("#{hostname}/apis/batch/" , "v2alpha1", ssl_options: ssl_options)
|
35
36
|
|
36
37
|
@clients.each { |c| c.discover }
|
37
38
|
end
|
data/lib/biosphere/settings.rb
CHANGED
data/lib/biosphere/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: biosphere
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juho Mäkinen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|