vagrant-scaleway 0.3.1 → 0.4.0
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: 2d888f4cfc2ccc9db3c6adaf6e58771349685c88
|
4
|
+
data.tar.gz: 93a3157878dff2451e50c13faec1833bae2a9b9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85f3d5b27171c273719de6ff3f09e849b51d7f1468562147d7c78086b1ed0080c66ec9f887e35122f2afce4f4ac9ee014c2fbc81855eede2afd0b118db63b35a
|
7
|
+
data.tar.gz: 07147d526adc8a108d237b5cb381c4ea910e74f102dbe27609794f9e96eded98cc59ee9c5df22dfd0c9acfae88882c95edbfdb0f2759207ef8c0efc426b32600
|
data/README.md
CHANGED
@@ -38,6 +38,10 @@ Vagrant.configure('2') do |config|
|
|
38
38
|
config.vm.provider :scaleway do |scaleway, override|
|
39
39
|
scaleway.organization = 'YOUR_ORGANIZATION_UUID'
|
40
40
|
scaleway.token = 'YOUR_TOKEN'
|
41
|
+
scaleway.volumes = [
|
42
|
+
{ id: 'ADDITIONAL_VOLUME_UUID' },
|
43
|
+
{ size: 50_000_000_000 }
|
44
|
+
]
|
41
45
|
|
42
46
|
override.ssh.private_key_path = '~/.ssh/id_rsa'
|
43
47
|
end
|
@@ -25,6 +25,7 @@ module VagrantPlugins
|
|
25
25
|
name = config.name
|
26
26
|
security_group = config.security_group
|
27
27
|
tags = config.tags
|
28
|
+
volumes = config.volumes.map.with_index(1).to_h.invert
|
28
29
|
|
29
30
|
env[:ui].info(I18n.t('vagrant_scaleway.creating_server'))
|
30
31
|
env[:ui].info(" -- Bootscript: #{bootscript}") if bootscript
|
@@ -33,10 +34,12 @@ module VagrantPlugins
|
|
33
34
|
env[:ui].info(" -- Name: #{name}")
|
34
35
|
env[:ui].info(" -- Security Group: #{security_group}") if security_group
|
35
36
|
env[:ui].info(" -- Tags: #{tags}") unless tags.empty?
|
37
|
+
env[:ui].info(" -- Volumes: #{volumes}") unless volumes.empty?
|
36
38
|
|
37
39
|
options = {
|
38
40
|
name: name,
|
39
41
|
image: image,
|
42
|
+
volumes: volumes,
|
40
43
|
commercial_type: commercial_type,
|
41
44
|
tags: tags
|
42
45
|
}
|
@@ -30,7 +30,7 @@ module VagrantPlugins
|
|
30
30
|
# read attribute override
|
31
31
|
ssh_host_attribute = machine.provider_config.ssh_host_attribute
|
32
32
|
# default host attributes to try. NOTE: Order matters!
|
33
|
-
ssh_attrs = %i
|
33
|
+
ssh_attrs = %i[public_ip_address public_dns_name private_ip_address private_dns_name]
|
34
34
|
ssh_attrs = (Array(ssh_host_attribute) + ssh_attrs).uniq if ssh_host_attribute
|
35
35
|
# try each attribute, get out on first value
|
36
36
|
host = nil
|
@@ -65,7 +65,7 @@ module VagrantPlugins
|
|
65
65
|
|
66
66
|
# Tags to apply to the server.
|
67
67
|
#
|
68
|
-
# @return [Array]
|
68
|
+
# @return [Array<String>]
|
69
69
|
attr_accessor :tags
|
70
70
|
|
71
71
|
# The API token to access Scaleway. It can also be configured with
|
@@ -74,6 +74,11 @@ module VagrantPlugins
|
|
74
74
|
# @return [String]
|
75
75
|
attr_accessor :token
|
76
76
|
|
77
|
+
# Volumes to be attached to the server.
|
78
|
+
#
|
79
|
+
# @return [Array<Hash>]
|
80
|
+
attr_accessor :volumes
|
81
|
+
|
77
82
|
def initialize
|
78
83
|
@bootscript = UNSET_VALUE
|
79
84
|
@commercial_type = UNSET_VALUE
|
@@ -87,6 +92,7 @@ module VagrantPlugins
|
|
87
92
|
@ssh_host_attribute = UNSET_VALUE
|
88
93
|
@tags = []
|
89
94
|
@token = UNSET_VALUE
|
95
|
+
@volumes = []
|
90
96
|
end
|
91
97
|
|
92
98
|
def finalize!
|
@@ -106,6 +112,18 @@ module VagrantPlugins
|
|
106
112
|
@security_group = nil if @security_group == UNSET_VALUE
|
107
113
|
@ssh_host_attribute = nil if @ssh_host_attribute == UNSET_VALUE
|
108
114
|
@token = ENV['SCW_TOKEN'] if @token == UNSET_VALUE
|
115
|
+
|
116
|
+
@volumes = @volumes.map do |volume|
|
117
|
+
if volume.key?(:id)
|
118
|
+
{ name: 'volume' }.merge(volume)
|
119
|
+
else
|
120
|
+
{
|
121
|
+
name: 'volume',
|
122
|
+
volume_type: 'l_ssd',
|
123
|
+
organization: @organization
|
124
|
+
}.merge(volume)
|
125
|
+
end
|
126
|
+
end
|
109
127
|
end
|
110
128
|
end
|
111
129
|
|
data/vagrant-scaleway.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-scaleway
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Satoshi Matsumoto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|