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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da9d128870b271dd4468c613d757919b9fd87caa
|
4
|
+
data.tar.gz: 59992ecaccf528714d9f3e027428d2fd325b3ae8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e524b3bf22725f49458b0b939513fc5995aa730ec4bfd88760861c039ed510b4135890455a5673cfcaf49c2458b6608324f9870043c9044ae13da5e7b765f38a
|
7
|
+
data.tar.gz: dd162be6747862747852ed44719a5655e3c9a39780771c6e2744413d91a9031c08fd58153a20e6d523cd2750c01798686d8c6414e2abb31f01f531e7f4809c55
|
data/lib/teamd/installer/cli.rb
CHANGED
@@ -6,23 +6,23 @@ module Teamd
|
|
6
6
|
class Cli < Thor
|
7
7
|
class << self
|
8
8
|
def build_cloud_config options
|
9
|
-
@token
|
10
|
-
@token
|
11
|
-
@token
|
12
|
-
|
13
|
-
@
|
14
|
-
@
|
15
|
-
@config
|
16
|
-
@config.
|
17
|
-
@config.
|
18
|
-
@config.
|
19
|
-
@config.
|
20
|
-
@config.
|
21
|
-
@config.
|
22
|
-
@config.
|
23
|
-
@config.
|
24
|
-
@config.
|
25
|
-
@config
|
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
|
@@ -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
|
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
|