teamd-installer 0.0.28 → 0.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7bb8c0bb401c364936797d4af441b8db7b2ed280
4
- data.tar.gz: c0458f5c89149aa506642933dd08ffd3bbace20a
3
+ metadata.gz: da9d128870b271dd4468c613d757919b9fd87caa
4
+ data.tar.gz: 59992ecaccf528714d9f3e027428d2fd325b3ae8
5
5
  SHA512:
6
- metadata.gz: 991b1645aa4f4939624ad89fb5e4b2a0045907456d4e2ee8fbb91cf439035ed825f144a88c4c2c9a00bffcd391f25c2e12f9d8f3cc53255fe0fd5234c7c72883
7
- data.tar.gz: 546006c2e687572e1c82b0dafb6969b07384bb80c11cf6b386649056c2adbc57418f8e0c5bfc77447f73243e0cfbda8cfde9c9197b387a5a533683495906392e
6
+ metadata.gz: e524b3bf22725f49458b0b939513fc5995aa730ec4bfd88760861c039ed510b4135890455a5673cfcaf49c2458b6608324f9870043c9044ae13da5e7b765f38a
7
+ data.tar.gz: dd162be6747862747852ed44719a5655e3c9a39780771c6e2744413d91a9031c08fd58153a20e6d523cd2750c01798686d8c6414e2abb31f01f531e7f4809c55
@@ -6,23 +6,23 @@ module Teamd
6
6
  class Cli < Thor
7
7
  class << self
8
8
  def build_cloud_config options
9
- @token ||= options[:etcd_discovery_id]
10
- @token ||= TeamdTokenProvider.token
11
- @token ||= EtcdTokenProvider.token
12
- puts "Using Token #{@token}"
13
- @public_ipv4 ||= Interfaces.public_ipv4
14
- @private_ipv4 ||= Interfaces.internal_ipv4 except: ["127.0.0.1",@public_ipv4]
15
- @config = TemplateConfig.new
16
- @config.etcd_discovery_id = @token
17
- @config.public_ipv4 = @public_ipv4
18
- @config.private_ipv4 = @private_ipv4
19
- @config.use_flannel = true
20
- @config.docker_tcp = true
21
- @config.sshd_port = 2220
22
- @config.dynamic_environment = true
23
- @config.inspect_etcd = true
24
- @config.flannel_network = "10.10.0.0/16"
25
- @config = CloudConfig.new @config.to_h
9
+ @token ||= options[:etcd_discovery_id]
10
+ @token ||= TeamdTokenProvider.token
11
+ @token ||= EtcdTokenProvider.token
12
+ @public_ipv4 ||= Interfaces.public_ipv4
13
+ @private_ipv4 ||= Interfaces.internal_ipv4 except: ["127.0.0.1",@public_ipv4]
14
+ @config = TemplateConfig.new
15
+ @config.etcd_discovery_id = @token
16
+ @config.public_ipv4 = @public_ipv4
17
+ @config.private_ipv4 = @private_ipv4
18
+ @config.use_flannel = true
19
+ @config.docker_tcp = true
20
+ @config.sshd_port = 2220
21
+ @config.dynamic_environment = true
22
+ @config.inspect_etcd = true
23
+ @config.flannel_network = "10.10.0.0/16"
24
+ @config.flannel_backend_type = "vxlan"
25
+ @config = CloudConfig.new @config.to_h
26
26
  File.write(options[:cloud_config],@config.to_yaml)
27
27
  end
28
28
  def build_install_command options
@@ -6,7 +6,9 @@ module Teamd
6
6
  class EtcdTokenProvider < TokenProvider
7
7
  PROVIDER_URL = "https://discovery.etcd.io/new?size=1"
8
8
  def self.token
9
- URI(open(PROVIDER_URL).read).path[1..-1]
9
+ token = URI(open(PROVIDER_URL).read).path[1..-1]
10
+ puts "Use Etcd-Discovery-Token #{token}"
11
+ token
10
12
  end
11
13
  end
12
14
  end
@@ -5,7 +5,9 @@ module Teamd
5
5
  module Installer
6
6
  class TeamdTokenProvider < TokenProvider
7
7
  def self.token
8
- Teamd::Discover.discover
8
+ token = Teamd::Discover.discover
9
+ puts "Use Teamd-Token #{token}"
10
+ token
9
11
  end
10
12
  end
11
13
  end
@@ -6,7 +6,7 @@ module Teamd
6
6
  attr_accessor :etcd_discovery_id, :public_ipv4, :private_ipv4,
7
7
  :public_ipv6, :private_ipv6, :use_flannel, :docker_tcp,
8
8
  :sshd_port, :dynamic_environment, :inspect_etcd,
9
- :flannel_network
9
+ :flannel_network, :flannel_backend_type
10
10
  def to_h
11
11
  puts "Set discovery token, hostname and manage_etc_hosts"
12
12
  output = {
@@ -15,7 +15,7 @@ module Teamd
15
15
  "discovery" => "https://discovery.etcd.io/#{@etcd_discovery_id}",
16
16
  "advertise-client-urls" => "http://$private_ipv4:2379",
17
17
  "initial-advertise-peer-urls" => "http://$private_ipv4:2380",
18
- "listen-client-urls" => "http://0.0.0.0:2379,http://0.0.0.0:4001",
18
+ "listen-client-urls" => "http://$private_ipv4:2379,http://$private_ipv4:4001",
19
19
  "listen-peer-urls" => "http://$private_ipv4:2380,http://$private_ipv4:7001",
20
20
  },
21
21
  "units" => [],
@@ -106,7 +106,7 @@ module Teamd
106
106
  "command" => "start",
107
107
  "drop-ins" => [
108
108
  "name" => "50-network-config.conf",
109
- "content" => "[Service]\nExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{ \"Network\": \"#{@flannel_network}\" }'",
109
+ "content" => "[Service]\nExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{ \"Network\": \"#{@flannel_network}\",\"Backend\":{\"Type\":\"#{@flannel_backend_type}\"} }'",
110
110
  ],
111
111
  }
112
112
  end
@@ -1,5 +1,5 @@
1
1
  module Teamd
2
2
  module Installer
3
- VERSION = "0.0.28"
3
+ VERSION = "0.0.29"
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.28
4
+ version: 0.0.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mathias Kaufmann