teamd-installer 0.0.11 → 0.0.12

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
  SHA1:
3
- metadata.gz: 8578440a9678074b1c3813ab42eb732ce65cbc7a
4
- data.tar.gz: 4ff09896faace3ed727fda649003761eb38d2e64
3
+ metadata.gz: d7674ff320d05b7dcf5a89a445b656050236e3ec
4
+ data.tar.gz: 6886982c245aec43fd20d3f29895017bc35d3a04
5
5
  SHA512:
6
- metadata.gz: 5c99df0a024f1726a90f5ba23de13fd1405807fad9089570467e7d7dd7a700bc614a1a205c95bd455276563978ee357dcd6d74096f393ece14337c4f484b79a1
7
- data.tar.gz: 209c295ca39d0c907e00feede99ef666ee29aa845f28ab6c169dfe67d6f93b2bebed889a3ff4beccc30ffde20b76e5340f64263c127e242864f7f5f92db7b27f
6
+ metadata.gz: ebc82a7306643605d5aa27dd1c4b9467249ccb8296df83530f6c03efca326aa7ccc5a0c93e06d5714b80f8c29fed8ab72f145afc1fc12794c364044a16da5f9d
7
+ data.tar.gz: 8dfb7f8b8e3c8d483e47fe0689ed31e08d54a17769648b1c9eec51b3d61f32562b676b6661ffb9b2e5aceb2aed72f5308bc5cc6bf45aa2ac46e09741bdf260f8
@@ -24,6 +24,13 @@ module Teamd
24
24
  @config = CloudConfig.new @config.to_h
25
25
  File.write(options[:cloud_config],@config.to_yaml)
26
26
  end
27
+ def build_install_command options
28
+ @installer = Script.download options[:installer_url]
29
+ Script.store options[:installer_script],@installer
30
+ @disk,@major,@minor = Disk.default
31
+ Disk.create @disk, @major, @minor
32
+ File.write options[:command_file],[options[:installer_script],"-d",@disk,"-C",(ENV["GROUP"] || "stable"),"-c",options[:cloud_config]].join(" ")
33
+ end
27
34
  end
28
35
 
29
36
  default_task :install
@@ -38,13 +45,11 @@ module Teamd
38
45
  method_option :cloud_config, type: :string, default: "/tmp/user_data"
39
46
  method_option :installer_script, type: :string, default: "/tmp/installer"
40
47
  method_option :reboot, type: :boolean, default: :true
48
+ method_option :command_file, type: :string, default: "/tmp/install_command"
41
49
  def install
42
- Cli.build_cloud_config options
43
- @installer = Script.download options[:installer_url]
44
- @disk,@major,@minor = Disk.default
45
- Disk.create @disk, @major, @minor
46
- Script.store options[:installer_script],@installer
47
- Script.run options[:installer_script],"-d",@disk,"-C",(ENV["GROUP"] || "stable"),"-c",options[:cloud_config]
50
+ Cli.build_cloud_config options
51
+ Cli.build_install_command options
52
+ Script.run [File.read(options[:command_file])]
48
53
  Reboot.hard! if options[:reboot]
49
54
  end
50
55
 
@@ -55,8 +60,10 @@ module Teamd
55
60
  method_option :etcd_initialize_cluster, type: :boolean, default: :false
56
61
  method_option :etcd_cluster_size, type: :numeric, default: 3
57
62
  method_option :cloud_config, type: :string, default: "/tmp/user_data"
63
+ method_option :command_file, type: :string, default: "/tmp/install_command"
58
64
  def prepare
59
65
  Cli.build_cloud_config options
66
+ Cli.build_install_command options
60
67
  end
61
68
  end
62
69
  end
@@ -1,5 +1,5 @@
1
1
  module Teamd
2
2
  module Installer
3
- VERSION = "0.0.11"
3
+ VERSION = "0.0.12"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teamd-installer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mathias Kaufmann