kontena-cli 1.0.5.pre1 → 1.0.5.rc1

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: 6be9c6889c31d67688c01b9aced3db7e083980a7
4
- data.tar.gz: bd96d874a308fc55a55ef3e53362291e56b21550
3
+ metadata.gz: f9d74fda613380c98386db5b23b0a49eaf1f89dc
4
+ data.tar.gz: 69930dba0063a295d6085cb5b427ba187711f783
5
5
  SHA512:
6
- metadata.gz: c42e2e6420436d1a904eee2f415ef176c9ae4eb4238f88d850c8905a3bdac0ffb4f9685a99f8fc3a5ab5198cf9af9bc5b663159496deb13d0009addb63ea429e
7
- data.tar.gz: fabb7cddcf98ddb96dbfeb825ea3ae0c44f114f16524610ab8988ece373d1e2f4b43909aa47217be91b5177b75b13810786055c45c65199d71b5b1f46c2d97ad
6
+ metadata.gz: 23fd9a032e8e8df59bc65585824252c00e7dd6a6c95837ebce1df88fce04f9ebcc137a0614aaec68aa13f506e0558c49efe71148e9dd536b1f01a1bb9ace2240
7
+ data.tar.gz: f7b0467fec172628749cbec0bd5b5a672ffe8014027d82e7151f2c40145bd25f902b8f235b6b3fe54a7fcce760ba8c14ec2ed81881dc04d65ddf1140cdcb3c19
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.5.pre1
1
+ 1.0.5.rc1
@@ -8,6 +8,7 @@ module Kontena::Cli::Grids
8
8
  parameter "NAME", "Grid name"
9
9
  option "--dns", "DNS", "DNS server", multivalued: true
10
10
  option "--peer-interface", "IFACE", "Peer (private) network interface", default: "eth1"
11
+ option "--default-interface-match", "IFACE-GLOB", "Match default network interfaces", default: nil
11
12
  option "--docker-bip", "BIP", "Docker bridge ip", default: "172.17.43.1/16"
12
13
  option "--version", "VERSION", "Agent version", default: "latest"
13
14
 
@@ -25,6 +26,15 @@ module Kontena::Cli::Grids
25
26
  dns_servers = [default_dns, '8.8.8.8', '8.8.4.4']
26
27
  end
27
28
 
29
+ if default_interface_match
30
+ # use explicit value
31
+ elsif peer_interface =~ /^([a-z]+)(\d+)$/
32
+ default_interface_match = "#{$1}*"
33
+ warning "Guessing --default-interface-match=#{default_interface_match} from --peer-interface=#{peer_interface}, make sure that this matches the interface names used by the node platform"
34
+ else
35
+ exit_with_error "Unable to determine --default-interface-match from --peer-interface=#{peer_interface}, configure --default-interface-match= explicitly"
36
+ end
37
+
28
38
  require 'kontena/machine/cloud_config/node_generator'
29
39
  generator = Kontena::Machine::CloudConfig::NodeGenerator.new
30
40
  config = generator.generate(
@@ -33,7 +43,8 @@ module Kontena::Cli::Grids
33
43
  peer_interface: peer_interface,
34
44
  dns_servers: dns_servers,
35
45
  docker_bip: docker_bip,
36
- version: version
46
+ version: version,
47
+ match_default_network_name: default_interface_match,
37
48
  )
38
49
  puts config
39
50
  end
@@ -19,27 +19,26 @@ write_files:
19
19
  fs.inotify.max_user_instances = 8192
20
20
  coreos:
21
21
  units:
22
- - name: 00-eth.network
23
- runtime: true
22
+ - name: 50-docker.network
23
+ mask: true
24
+ - name: 50-docker-veth.network
25
+ mask: true
26
+ - name: zz-default.network
24
27
  content: |
28
+ # default should not match virtual Docker/weave bridge/veth network interfaces
25
29
  [Match]
26
- Name=eth*
30
+ Name=<%= match_default_network_name %>
31
+
27
32
  [Network]
28
33
  DHCP=yes
29
34
  <% dns_servers.each do |dns| %>DNS=<%= dns %>
30
35
  <% end %>
31
- DOMAINS=kontena.local
36
+ Domains=kontena.local
37
+
32
38
  [DHCP]
39
+ UseMTU=true
33
40
  UseDNS=false
34
41
 
35
- - name: 10-weave.network
36
- runtime: false
37
- content: |
38
- [Match]
39
- Type=bridge
40
- Name=weave*
41
-
42
- [Network]
43
42
  - name: kontena-agent.service
44
43
  command: start
45
44
  enable: true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kontena-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5.pre1
4
+ version: 1.0.5.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kontena, Inc