teamd-installer 0.0.16 → 0.0.17
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46b49e80f348d8c6cc151c9c0c849d834a32f5e9
|
4
|
+
data.tar.gz: 547f29c9484b7039ed9859f2a9371a3aa7bc12f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52f7a312868ea5cbc97c423fb70b35896202278e25275e80b1c93d1ecc96dc6709985fbd930ba9263da6d281da1c749db8998215bd4f4134827d327fde15a49b
|
7
|
+
data.tar.gz: 600403f8c13f2524eca97d37bc3881d4c624785c853847858fd0db7760a9090272b2eac4cc14e69ca091e2a1c06f77eec6657f04eae5d135e56883b5340dd813
|
data/docker/Dockerfile
CHANGED
@@ -4,6 +4,6 @@ MAINTAINER Mathias Kaufmann <me@stei.gr>
|
|
4
4
|
RUN apk update && \
|
5
5
|
apk add ruby ruby-dev ca-certificates bash wget gnupg util-linux coreutils bzip2 && \
|
6
6
|
gem update --system --no-ri --no-rdoc
|
7
|
-
RUN gem install --no-ri --no-rdoc --version 0.0.
|
7
|
+
RUN gem install --no-ri --no-rdoc --version 0.0.17 teamd-installer
|
8
8
|
|
9
9
|
ENTRYPOINT ["/usr/bin/teamd-installer"]
|
data/lib/teamd/installer/cli.rb
CHANGED
@@ -5,7 +5,8 @@ module Teamd
|
|
5
5
|
class TemplateConfig
|
6
6
|
attr_accessor :etcd_discovery_id, :public_ipv4, :private_ipv4,
|
7
7
|
:public_ipv6, :private_ipv6, :use_flannel, :docker_tcp,
|
8
|
-
:sshd_port, :dynamic_environment, :inspect_etcd
|
8
|
+
:sshd_port, :dynamic_environment, :inspect_etcd,
|
9
|
+
:flannel_network
|
9
10
|
def to_h
|
10
11
|
puts "Set discovery token, hostname and manage_etc_hosts"
|
11
12
|
output = {
|
@@ -15,7 +16,6 @@ module Teamd
|
|
15
16
|
},
|
16
17
|
"units" => [],
|
17
18
|
},
|
18
|
-
"write_files" => [],
|
19
19
|
"hostname" => SecureRandom.hex(8),
|
20
20
|
"manage_etc_hosts" => "localhost",
|
21
21
|
}
|
@@ -28,6 +28,7 @@ module Teamd
|
|
28
28
|
}
|
29
29
|
else
|
30
30
|
puts "Create Unit for publishing discovery token"
|
31
|
+
output["write_files"] ||= []
|
31
32
|
output["write_files"] << {
|
32
33
|
"path" => "/run/teamd/etcd.env",
|
33
34
|
"permissions" => "0444",
|
@@ -64,6 +65,7 @@ module Teamd
|
|
64
65
|
content = ""
|
65
66
|
content << "COREOS_PUBLIC_IPV4=#{@public_ipv4}\n" if @public_ipv4
|
66
67
|
content << "COREOS_PRIVATE_IPV4=#{@private_ipv4}\n" if @private_ipv4
|
68
|
+
output["write_files"] ||= []
|
67
69
|
output["write_files"] << {
|
68
70
|
"path" => "/etc/environment",
|
69
71
|
"permissions" => "0444",
|
@@ -83,7 +85,11 @@ module Teamd
|
|
83
85
|
puts "Enable flannel"
|
84
86
|
output["coreos"]["units"] << {
|
85
87
|
"name" => "flanneld.service",
|
86
|
-
"command" => "start"
|
88
|
+
"command" => "start",
|
89
|
+
"drop-ins" => [
|
90
|
+
"name" => "50-network-config.conf",
|
91
|
+
"content" => "[Service]\nExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{ \"Network\": \"#{@flannel_network}\" }'",
|
92
|
+
],
|
87
93
|
}
|
88
94
|
end
|
89
95
|
if @docker_tcp
|
@@ -1,11 +1,10 @@
|
|
1
1
|
[Unit]
|
2
2
|
Description=Teamd Etcd2 Unit Reuse
|
3
3
|
Documentation=https://teamd.stei.gr/discover
|
4
|
-
ConditionPathExists=/run/systemd/system/etcd2.service.d
|
4
|
+
ConditionPathExists=/run/systemd/system/etcd2.service.d
|
5
5
|
Requires=etcd2.service
|
6
6
|
After=etcd2.service
|
7
7
|
|
8
8
|
[Service]
|
9
9
|
Type=oneshot
|
10
|
-
|
11
|
-
ExecStart=/usr/bin/ln -s /run/systemd/system/etcd2.service.d/20-cloudinit.conf /etc/systemd/system/teamd-discover.service.d
|
10
|
+
ExecStart=/usr/bin/ln -s /run/systemd/system/etcd2.service.d /etc/systemd/system/teamd-discover.service.d
|