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: e32e9668221d3bd80ba155414a2dd8886a8bc8c8
4
- data.tar.gz: 798b2452ef18d89c88df9b086b2f1d3106a924c1
3
+ metadata.gz: 46b49e80f348d8c6cc151c9c0c849d834a32f5e9
4
+ data.tar.gz: 547f29c9484b7039ed9859f2a9371a3aa7bc12f6
5
5
  SHA512:
6
- metadata.gz: 1ca65677b5276e2f0239beffe0da50c8eda9b0cae4a06dc745aab8018fed41111645da7e49a5ee14e61f02f035921f2a22c632115cd38261fe366c355cf1441a
7
- data.tar.gz: 27aba54eefc1613aa98dbf0093c8a2c09218f27a93cebdc99d39b984ad0642257d5862ca9265a1c393bcdf7753497a3f07c7079871c5ae9cce46996c2357b66a
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.16 teamd-installer
7
+ RUN gem install --no-ri --no-rdoc --version 0.0.17 teamd-installer
8
8
 
9
9
  ENTRYPOINT ["/usr/bin/teamd-installer"]
@@ -21,6 +21,7 @@ module Teamd
21
21
  @config.sshd_port = 2220
22
22
  @config.dynamic_environment = true
23
23
  @config.inspect_etcd = true
24
+ @config.flannel_network = "10.10.0.0/16"
24
25
  @config = CloudConfig.new @config.to_h
25
26
  File.write(options[:cloud_config],@config.to_yaml)
26
27
  end
@@ -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,5 +1,5 @@
1
1
  module Teamd
2
2
  module Installer
3
- VERSION = "0.0.16"
3
+ VERSION = "0.0.17"
4
4
  end
5
5
  end
@@ -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/20-cloudinit.conf
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
- ExecStartPre=/usr/bin/mkdir /etc/systemd/system/teamd-discover.service.d
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
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.16
4
+ version: 0.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mathias Kaufmann