vagrant-digitalocean 0.6.2 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 6b505b44641b6c612ed3f9415a063788a97697ed
4
- data.tar.gz: cd483c6ca13e403373dbda1436d866c586f4c7a4
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YWNjZTg3ZGQ4YmYyM2U3YTAxYjBkNDhiMWQxZjk1NzZkNWU4YmJiOQ==
5
+ data.tar.gz: !binary |-
6
+ MjUxMDgyZTdlNDg0MWQzMWQzZWIwYzJhY2ExNjcwNzk3MDQ3ZDJhNQ==
5
7
  SHA512:
6
- metadata.gz: 6a4dcfbb3dde87819cf34839d28fcbb3f8af6f2e622b1cf1cbc753e137e6ab099ade9323f703896d79149985bd88078616783113da279bb7c02c6fabe6e9f0ee
7
- data.tar.gz: 665a616d3bf05643c7d95abfbf739141bc9b7d33d607d46752be5da6e1192c9f2fbd29ee383184fdb4d9fa9b239775f95be821537f1b5c1b37bc0fe6ef96afb9
8
+ metadata.gz: !binary |-
9
+ NTBhNWYwYWU0NWM0OTY3MTY4ODk5NTVjNzdiOGQ5NTUzNzBhMGVkMDQ5M2Zm
10
+ ODU1OGZlNzc1ZjQ2NWNmNmM5YTU5ZmY0MWMxZDI0NjllZDM4Y2JlNzJhMDU3
11
+ MGYzZDAxOWE0ZjFjMGI0MjE5ZjJiNWNhMjQxYmFmNDFkNmM2MmU=
12
+ data.tar.gz: !binary |-
13
+ NjAxMzlkYzVlMDdiZGY2M2Y3ZDI2YzE2YTkzMDhjNmNmNzQ4ZTJmZDM3Yjll
14
+ Y2Q5YjE1YzVkNjQ2ZDg2OGFhMmYyNTYwOTc5MDZjNzY1YWU2MGI2MWE1ZTdl
15
+ M2E3OWNhOTNiYWRmMzQ5MGEyZDkzODNhMThiN2Q1ZTBjOTQzNzI=
data/README.md CHANGED
@@ -29,18 +29,19 @@ Installation of the provider requires two steps:
29
29
  $ vagrant plugin install vagrant-digitalocean
30
30
 
31
31
 
32
- **NOTE:** If you are using a Mac, you may need to install a CA bundle to enable SSL
33
- communication with the Digital Ocean API. It is recommended to first install
34
- [Homebrew](http://mxcl.github.io/homebrew/). With Homebrew installed, run
35
- the following command to install the bundle:
32
+ **NOTE:** If you are using a Mac, and this plugin would not work caused by SSL certificate problem,
33
+ You may need to specify certificate path explicitly.
34
+ You can verify actual certificate path by running:
36
35
 
37
- $ brew install curl-ca-bundle
36
+ ```bash
37
+ ruby -ropenssl -e "p OpenSSL::X509::DEFAULT_CERT_FILE"
38
+ ```
38
39
 
39
- Once the bundle is installed, add the following environment variable to your
40
+ Then, add the following environment variable to your
40
41
  `.bash_profile` script and `source` it:
41
42
 
42
43
  ```bash
43
- export SSL_CERT_FILE=/usr/local/opt/curl-ca-bundle/share/ca-bundle.crt
44
+ export SSL_CERT_FILE=/usr/local/etc/openssl/cert.pem
44
45
  ```
45
46
 
46
47
  Configure
@@ -56,7 +57,7 @@ Vagrant.configure('2') do |config|
56
57
  override.ssh.private_key_path = '~/.ssh/id_rsa'
57
58
  override.vm.box = 'digital_ocean'
58
59
  override.vm.box_url = "https://github.com/smdahlen/vagrant-digitalocean/raw/master/box/digital_ocean.box"
59
-
60
+
60
61
  provider.token = 'YOUR TOKEN'
61
62
  provider.image = 'Ubuntu 14.04 x64'
62
63
  provider.region = 'nyc2'
@@ -70,8 +71,8 @@ Please note the following:
70
71
  with the droplet. The provider will create a new Digital Ocean SSH key using
71
72
  your public key which is assumed to be the `private_key_path` with a *.pub*
72
73
  extension.
73
- - You *must* specify your Digital Ocean Client and API keys. These may be
74
- found on the control panel within the *My Settings > API Access* section.
74
+ - You *must* specify your Digital Ocean Personal Access Token. This may be
75
+ found on the control panel within the *Apps & API* section.
75
76
 
76
77
  **Supported Configuration Attributes**
77
78
 
@@ -100,6 +101,34 @@ The provider will create a new user account with the specified SSH key for
100
101
  authorization if `config.ssh.username` is set and the `provider.setup`
101
102
  attribute is `true`.
102
103
 
104
+ ### provider.region slug
105
+
106
+ Each region has been specify with slug name.
107
+ Current Region-slug table is:
108
+
109
+ | slug | Region Name |
110
+ |:---- |:----------------|
111
+ | nyc1 | New York 1 |
112
+ | ams1 | Amsterdam 1 |
113
+ | sfo1 | San Francisco 1 |
114
+ | nyc2 | New York 2 |
115
+ | ams2 | Amsterdam 2 |
116
+ | sgp1 | Singapore 1 |
117
+ | lon1 | London 1 |
118
+ | nyc3 | New York 3 |
119
+
120
+ You can find latest region slug name using DigitalOcean API V2 call.
121
+
122
+ - example call.
123
+
124
+ ```
125
+ curl -X GET "https://api.digitalocean.com/v2/regions" \
126
+ -H "Authorization: Bearer $DIGITAL_OCEAN_TOKEN" \
127
+ 2>/dev/null | jq '.regions [] | .slug,.name'
128
+ ```
129
+
130
+ More detail: [DigitalOcean API - Regions](https://developers.digitalocean.com/#regions)
131
+
103
132
  Run
104
133
  ---
105
134
  After creating your project's `Vagrantfile` with the required configuration
@@ -29,12 +29,13 @@ module VagrantPlugins
29
29
  :name => @machine.config.vm.hostname || @machine.name,
30
30
  :ssh_keys => ssh_key_id,
31
31
  :private_networking => @machine.provider_config.private_networking,
32
- :backups => @machine.provider_config.backups_enabled
32
+ :backups => @machine.provider_config.backups_enabled,
33
+ :ipv6 => @machine.provider_config.ipv6
33
34
  })
34
35
 
35
36
  # wait for request to complete
36
37
  env[:ui].info I18n.t('vagrant_digital_ocean.info.creating')
37
- @client.wait_for_event(env, result['droplet']['action_ids'].first)
38
+ @client.wait_for_event(env, result['links']['actions'].first['id'])
38
39
 
39
40
  # assign the machine id for reference in other commands
40
41
  @machine.id = result['droplet']['id'].to_s
@@ -6,6 +6,7 @@ module VagrantPlugins
6
6
  attr_accessor :region
7
7
  attr_accessor :size
8
8
  attr_accessor :private_networking
9
+ attr_accessor :ipv6
9
10
  attr_accessor :backups_enabled
10
11
  attr_accessor :ca_path
11
12
  attr_accessor :ssh_key_name
@@ -19,6 +20,7 @@ module VagrantPlugins
19
20
  @region = UNSET_VALUE
20
21
  @size = UNSET_VALUE
21
22
  @private_networking = UNSET_VALUE
23
+ @ipv6 = UNSET_VALUE
22
24
  @backups_enable = UNSET_VALUE
23
25
  @ca_path = UNSET_VALUE
24
26
  @ssh_key_name = UNSET_VALUE
@@ -31,6 +33,7 @@ module VagrantPlugins
31
33
  @region = 'nyc2' if @region == UNSET_VALUE
32
34
  @size = '512mb' if @size == UNSET_VALUE
33
35
  @private_networking = false if @private_networking == UNSET_VALUE
36
+ @ipv6 = false if @ipv6 == UNSET_VALUE
34
37
  @backups_enabled = false if @backups_enabled == UNSET_VALUE
35
38
  @ca_path = nil if @ca_path == UNSET_VALUE
36
39
  @ssh_key_name = 'Vagrant' if @ssh_key_name == UNSET_VALUE
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module DigitalOcean
3
- VERSION = '0.6.2'
3
+ VERSION = '0.7.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-digitalocean
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Bender
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-31 00:00:00.000000000 Z
11
+ date: 2014-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - ! '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.8.6
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - ! '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.8.6
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: json
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - ! '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - ! '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: log4r
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - ! '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - ! '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  description: Enables Vagrant to manage Digital Ocean droplets
@@ -59,7 +59,7 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
- - ".gitignore"
62
+ - .gitignore
63
63
  - CHANGELOG.md
64
64
  - Gemfile
65
65
  - LICENSE.txt
@@ -106,17 +106,17 @@ require_paths:
106
106
  - lib
107
107
  required_ruby_version: !ruby/object:Gem::Requirement
108
108
  requirements:
109
- - - ">="
109
+ - - ! '>='
110
110
  - !ruby/object:Gem::Version
111
111
  version: '0'
112
112
  required_rubygems_version: !ruby/object:Gem::Requirement
113
113
  requirements:
114
- - - ">="
114
+ - - ! '>='
115
115
  - !ruby/object:Gem::Version
116
116
  version: '0'
117
117
  requirements: []
118
118
  rubyforge_project:
119
- rubygems_version: 2.3.0
119
+ rubygems_version: 2.2.2
120
120
  signing_key:
121
121
  specification_version: 4
122
122
  summary: Enables Vagrant to manage Digital Ocean droplets