kontena-plugin-azure 0.2.0.pre1 → 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
- MWFjMDEyZmFhMzgzZGJhNDc0OWFlMjcyMzNlNGRmY2Q1ZmFhNGFlYw==
4
+ NDUzOWViOTQzYWU2ZDFkZmY4M2VmODU3NDliMTgyMzM3MWQzMDEzNA==
5
5
  data.tar.gz: !binary |-
6
- MDRkOTk0YzNmYzg0ZTRhNDVlMDQwNTkzYzlkZGVmMDBlZGUwNzM1NQ==
6
+ NzM5YzI3ZjYyZGQyZTUyMjU3NjVjMThkZDUwNjE1NmFjYmJlOWQ2Ng==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MjgwMTJlZjliMzkxZjVmODdhYmEwYTgzZjRiZDlmNGRlYzJlNWQ3OTlhODY3
10
- OTc2ZjIyMWI0YTg1YTUzY2E3ZmQzM2Y0NDcyOWMyNDllMDhiMDQ3YTdjMDZh
11
- NzgyNGRhZmYwYThhNmI1ZWM5YjgxN2ZjZDlmZDg1YWU1MGVlZmY=
9
+ ZjE5MjdjZGM0NTBmZjVjNWM5YjUyZGMyMDk3MDAwOTdkZDRhYmJiM2Q2YTY0
10
+ NDQzMWFjODZkOThjYTBhMDBlNDJhYTA2MGRiMWI1ZjI5ZjNiMTA2NGQyZjY2
11
+ M2MyOGZmMzUxYmFhOTc5YWY3ZWI2NTM2N2I5MWI1Mjk3NjU1Njc=
12
12
  data.tar.gz: !binary |-
13
- NjY0NTkyMGQwYTVkMWRlMjBlNDFhZjgzYjYyNzMxYzVlZTc5ZTRlZjkzMDEx
14
- OTUwNDQ3MDJhYjU5NDY4N2U5NDhiMTE0NjM1ZGY5NmIzZjc0YmJlZDAwMWNl
15
- ZTgzNDEzZTEzYjYyMGE5MzQ0YmFjMTE5NTI2ZGFkZmFjY2IwMGU=
13
+ NTIzNTc2MTgxOTdmYjEyYjBlYmUxOGMwOTg3ZDMwYjJjY2E1NDE0ZTg1NWU0
14
+ MzNjYjUzMWIxYWNlNWI5OTRjZDJjMWJlYzYzMWIwOTFhNGFkNTBlNGYyM2E2
15
+ Nzc4MWIxMjM2MTk2YTg2ZTgwZmQyODE1MTE5ODVlOGYzODYxYWQ=
@@ -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: |
@@ -81,8 +81,8 @@ coreos:
81
81
  --link kontena-server-mongo:mongodb \
82
82
  -e MONGODB_URI=mongodb://mongodb:27017/kontena_server \
83
83
  -e VAULT_KEY=${KONTENA_VAULT_KEY} -e VAULT_IV=${KONTENA_VAULT_IV} \
84
- <% if server_name %>-e KONTENA_SERVER_NAME=<%= server_name %><% end %> \
85
- <% if initial_admin_code %>-e KONTENA_INITIAL_ADMIN_CODE=<%= intial_admin_code %><% end %> \
84
+ <% if server_name %>-e SERVER_NAME=<%= server_name %><% end %> \
85
+ <% if initial_admin_code %>-e INITIAL_ADMIN_CODE=<%= intial_admin_code %><% end %> \
86
86
  kontena/server:${KONTENA_VERSION}
87
87
 
88
88
  - name: kontena-server-haproxy.service
@@ -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
@@ -32,7 +33,7 @@ module Kontena
32
33
  cloud_service_name = generate_cloud_service_name
33
34
  vm_name = cloud_service_name
34
35
  master_url = ''
35
- spinner "Creating Azure Virtual Machine #{vm_name.colorize(:cyan)}" do
36
+ spinner "Creating an Azure Virtual Machine #{vm_name.colorize(:cyan)}" do
36
37
  if opts[:virtual_network].nil?
37
38
  location = opts[:location].downcase.gsub(' ', '-')
38
39
  default_network_name = "kontena-#{location}"
@@ -83,13 +84,18 @@ module Kontena
83
84
  sleep 0.5 until master_running?
84
85
  end
85
86
 
86
- puts
87
- puts "Kontena Master is now running at #{master_url}".colorize(:green)
88
- puts
87
+ master_version = nil
88
+ spinner "Retrieving Kontena Master version" do
89
+ master_version = JSON.parse(@http_client.get(path: '/').body["version"]) rescue nil
90
+ end
91
+
92
+ spinner "Kontena Master #{master_version} is now running at #{master_url}".colorize(:green)
89
93
 
90
94
  {
91
95
  name: opts[:name] || cloud_service_name.sub('kontena-master-', ''),
92
96
  public_ip: virtual_machine.ipaddress,
97
+ provider: 'azure',
98
+ version: master_version,
93
99
  code: opts[:initial_admin_code]
94
100
  }
95
101
  end
@@ -39,7 +39,7 @@ module Kontena::Plugin::Azure::Master
39
39
  # @param [String] certificate
40
40
  # @return [Kontena::Machine::Azure::MasterProvisioner]
41
41
  def provisioner(subscription_id, certificate)
42
- Kontena::Machine::Azure::MasterProvisioner.new
42
+ Kontena::Machine::Azure::MasterProvisioner.new subscription_id, certificate
43
43
  end
44
44
  end
45
45
  end
@@ -40,7 +40,7 @@ module Kontena::Plugin::Azure::Nodes
40
40
  # @param [String] certificate
41
41
  # @return [Kontena::Machine::Azure::NodeProvisioner]
42
42
  def provisioner(client, subscription_id, certificate)
43
- Kontena::Machine::Azure::NodeProvisioner.new
43
+ Kontena::Machine::Azure::NodeProvisioner.new client, subscription_id, certificate
44
44
  end
45
45
 
46
46
  # @return [Hash]
@@ -1,7 +1,7 @@
1
1
  module Kontena
2
2
  module Plugin
3
3
  module Azure
4
- VERSION = "0.2.0.pre1"
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-azure
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.pre1
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-09-29 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
@@ -112,9 +112,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
112
112
  version: '0'
113
113
  required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ! '>'
115
+ - - ! '>='
116
116
  - !ruby/object:Gem::Version
117
- version: 1.3.1
117
+ version: '0'
118
118
  requirements: []
119
119
  rubyforge_project:
120
120
  rubygems_version: 2.4.5