kontena-plugin-upcloud 0.2.0.pre2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MWJkMTY1MThhNDQ4ZmUyMzI0NTE1NTJkZjFhNGVmNTQ1MjY4NjA5YQ==
4
+ NjY2ZmMzNjU2OWM2MjJjNjcyODAzNGY2ZWFlNWNjYTVkMWE0ZmNjZA==
5
5
  data.tar.gz: !binary |-
6
- OWFhMWJkZWQyZmFlNTE5MmVkZTJiYTI3ZDYyYjE2M2JjYjEzZGIxMw==
6
+ ZWJiNjE5YjFiYjJiZWI1OGY2YWY2YWNiNTFmMGFkZWJjMTY4YTJiNA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ODNlNWQxOGNhMmQwNmI4MDhkMDkzMDBmNjJjYTYwN2ZiMDBkODg0ZGRjODVm
10
- ZTM3OGNjYjE1NWQyYWMwMGMzMmNmYmViYjU1Y2MzZTY3YTIzM2I5NDMzZTQx
11
- ZDY3ZTY4Njk0ZjRmOTkzNWIyOTE5YmJiMmE1MTliM2U3ZDA3MzA=
9
+ MTRjYzE2NzYxZjRmMzIxMGVkMWM2MTg0YTFiZTg4MTJkZGMyZjE4Njk2OGZi
10
+ ZWU5ZTYxNTQ3MzEwMTA5N2M2NGIyYWI3ODM0MTI4ZjRlYWFhNzNkNDQ5OTRj
11
+ MGQ3MTVhODhiYmNkMDMyZGQ3NGRlMzEwYjYyMTg1YzY5OTc4Nzk=
12
12
  data.tar.gz: !binary |-
13
- NDM0NTdkN2MyYzhiNzgzNTBlMmE4MzI5YjcyODdiM2I5MTY3YmY2YTM0Njdm
14
- YmRjNGRlNzIyYzJkMjVhOTRkY2RiOTNkMjQ1MTJlOTZlMTk1ZjdjY2I1NGEy
15
- OWQ3NWI5ZmEyY2VlMDg5OWViZjU3OWQzN2VjZWZmZDUwYmZlZDc=
13
+ MWQ0ZTM3MjQ5ZGJkNTE2N2Y4NGFkYzZhMjFlOGJhMDAxZTEzYTRhN2Y5ZDg3
14
+ MDc4NDllYjA3YzM0NGIxOTM3NjYyMThmOTRiMDhjYjExOTMxYjFhZTM4OGMy
15
+ ZjVjODEzODUyNmQxNjkxNmEyOTRkMjk3ZjY2ZDZiNGM2ZGQ3ODI=
@@ -27,6 +27,16 @@ write_files:
27
27
  nameserver 8.8.4.4
28
28
  coreos:
29
29
  units:
30
+ - name: etcd2.service
31
+ command: start
32
+ enable: true
33
+ content: |
34
+ Description=etcd 2.0
35
+ After=docker.service
36
+ [Service]
37
+ Restart=always
38
+ RestartSec=5
39
+ ExecStart=/usr/bin/docker logs --tail=10 -f kontena-etcd
30
40
  - name: 10-weave.network
31
41
  runtime: false
32
42
  content: |
@@ -1,6 +1,7 @@
1
1
  require 'fileutils'
2
2
  require 'erb'
3
3
  require 'open3'
4
+ require 'json'
4
5
 
5
6
  module Kontena
6
7
  module Machine
@@ -30,7 +31,7 @@ module Kontena
30
31
  abort('Invalid ssl cert') unless File.exists?(File.expand_path(opts[:ssl_cert]))
31
32
  ssl_cert = File.read(File.expand_path(opts[:ssl_cert]))
32
33
  else
33
- spinner "Generating self-signed SSL certificate" do
34
+ spinner "Generating a self-signed SSL certificate" do
34
35
  ssl_cert = generate_self_signed_cert
35
36
  end
36
37
  end
@@ -88,7 +89,7 @@ module Kontena
88
89
  }
89
90
  }.to_json
90
91
 
91
- spinner "Creating Upcloud master #{hostname.colorize(:cyan)} " do
92
+ spinner "Creating an Upcloud server #{hostname.colorize(:cyan)} " do
92
93
  response = post('server', body: device_data)
93
94
  if response.has_key?(:error)
94
95
  abort("\nUpcloud server creation failed (#{response[:error].fetch(:error_message, '')})")
@@ -115,11 +116,18 @@ module Kontena
115
116
  sleep 1 until master_running?
116
117
  end
117
118
 
118
- vfakespinner "Kontena Master is now running at #{master_url}"
119
+ master_version = nil
120
+ spinner "Retrieving Kontena Master version" do
121
+ master_version = JSON.parse(@http_client.get(path: '/').body)["version"] rescue nil
122
+ end
123
+
124
+ spinner "Kontena Master #{master_version} is now running at #{master_url}"
119
125
 
120
126
  {
121
127
  name: server_name,
122
128
  public_ip: device_public_ip[:address],
129
+ provider: 'upcloud',
130
+ version: master_version,
123
131
  code: opts[:initial_admin_code]
124
132
  }
125
133
  end
@@ -1,7 +1,7 @@
1
1
  module Kontena
2
2
  module Plugin
3
3
  module Upcloud
4
- VERSION = "0.2.0.pre2"
4
+ VERSION = "0.2.0"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kontena-plugin-upcloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.pre2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kontena, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-11 00:00:00.000000000 Z
11
+ date: 2016-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kontena-cli
@@ -98,9 +98,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
98
98
  version: '0'
99
99
  required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ! '>'
101
+ - - ! '>='
102
102
  - !ruby/object:Gem::Version
103
- version: 1.3.1
103
+ version: '0'
104
104
  requirements: []
105
105
  rubyforge_project:
106
106
  rubygems_version: 2.4.5