vagrant-digitalocean 0.7.6 → 0.7.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ef5c3f904718ef36fb85e42b715de9a9d5c5bdd6
4
- data.tar.gz: bca0e6246c88e22102e4889c2d8eef34fee0a907
3
+ metadata.gz: 2d25d71a7736e890b2690c5f6da785e9ba9002de
4
+ data.tar.gz: 645d770371e722a0037bac2d3ef29860b7c9f6c7
5
5
  SHA512:
6
- metadata.gz: faa1625fadc559371b3a3897caafa27e38f25ee37e0a44ff89dc6723fe90c08a35d37d759109b224cb8345dcfb954609be0bfe76db58db59d3e749b3a9ec1dac
7
- data.tar.gz: 16396c4e94a5fac78991ef6fc610cd8a12aa7f9c00437a88629d5d567c023b4d2db00e0338d99862dc061c2e60343a1853e23e9b46e0d10e388b43256e26330a
6
+ metadata.gz: 879e4bb295023cc2fa52b8bda80f9b1ee774c62c6edfd5817a1fca8c24fa0ce538a603ad9f8a65ee43d0e620cf77f33315e153b6de32f2d2a31f929e4b3b2747
7
+ data.tar.gz: 9e6b1d61b080d828c2c593126a36ef3f3deea301e35de718f6e3b79ba89f6f2ab8ebdc5a0be68f2dca6090da53b20aeb227ae11507cc33d6ab743ec7ce4d9bf6
data/README.md CHANGED
@@ -1,54 +1,28 @@
1
1
  Digital Ocean Vagrant Provider
2
2
  ==============================
3
- `vagrant-digitalocean` is a provider plugin for Vagrant that supports the
4
- management of [Digital Ocean](https://www.digitalocean.com/) droplets
5
- (instances).
3
+ `vagrant-digitalocean` is a provider plugin for Vagrant that supports the management of [Digital Ocean](https://www.digitalocean.com/) droplets (instances).
6
4
 
7
- **NOTE:** The Chef provisioner is no longer supported by default (as of 0.2.0).
8
- Please use the `vagrant-omnibus` plugin to install Chef on Vagrant-managed
9
- machines. This plugin provides control over the specific version of Chef
10
- to install.
11
-
12
- Current features include:
5
+ Features include:
13
6
  - create and destroy droplets
14
7
  - power on and off droplets
15
- - rebuild a droplet
16
- - provision a droplet with the shell or Chef provisioners
8
+ - rebuild a droplet (destroys and ups with same IP address)
9
+ - provision a droplet with shell
17
10
  - setup a SSH public key for authentication
18
11
  - create a new user account during droplet creation
19
12
 
20
- The provider has been tested with Vagrant 1.1.5+ using Ubuntu 12.04 and
21
- CentOS 6.3 guest operating systems.
13
+ The provider has been tested with Vagrant 1.1.5+ using Ubuntu 12.04 and CentOS 6.3 guest operating systems.
14
+
22
15
 
23
16
  Install
24
17
  -------
25
- Installation of the provider requires two steps:
26
-
27
- 1. Install the provider plugin using the Vagrant command-line interface:
28
-
29
- $ vagrant plugin install vagrant-digitalocean
30
-
18
+ Install the provider plugin using the Vagrant command-line interface:
31
19
 
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:
20
+ `vagrant plugin install vagrant-digitalocean`
35
21
 
36
- ```bash
37
- ruby -ropenssl -e "p OpenSSL::X509::DEFAULT_CERT_FILE"
38
- ```
39
-
40
- Then, add the following environment variable to your
41
- `.bash_profile` script and `source` it:
42
-
43
- ```bash
44
- export SSL_CERT_FILE=/usr/local/etc/openssl/cert.pem
45
- ```
46
22
 
47
23
  Configure
48
24
  ---------
49
- Once the provider has been installed, you will need to configure your project
50
- to use it. The most basic `Vagrantfile` to create a droplet on Digital Ocean
51
- is shown below:
25
+ Once the provider has been installed, you will need to configure your project to use it. The most basic `Vagrantfile` to create a droplet on Digital Ocean is shown below:
52
26
 
53
27
  ```ruby
54
28
  Vagrant.configure('2') do |config|
@@ -66,50 +40,35 @@ Vagrant.configure('2') do |config|
66
40
  end
67
41
  ```
68
42
 
69
- Please note the following:
70
- - You *must* specify the `override.ssh.private_key_path` to enable authentication
71
- with the droplet. The provider will create a new Digital Ocean SSH key using
72
- your public key which is assumed to be the `private_key_path` with a *.pub*
73
- extension.
74
- - You *must* specify your Digital Ocean Personal Access Token. This may be
75
- found on the control panel within the *Apps & API* section.
43
+ **Configuration Requirements**
44
+ - You *must* specify the `override.ssh.private_key_path` to enable authentication with the droplet. The provider will create a new Digital Ocean SSH key using your public key which is assumed to be the `private_key_path` with a *.pub* extension.
45
+ - You *must* specify your Digital Ocean Personal Access Token at `provider.token`. This may be found on the control panel within the *Apps & API* section.
76
46
 
77
47
  **Supported Configuration Attributes**
78
48
 
79
49
  The following attributes are available to further configure the provider:
80
- - `provider.image` - A string representing the image to use when creating a new
81
- droplet. It defaults to `ubuntu-14-04-x64`. List available images with the
82
- `digitalocean-list images` command. Like when using the DigitalOcean API
83
- directly, [it can be an image ID or slug](https://developers.digitalocean.com/documentation/v2/#create-a-new-droplet).
84
- - `provider.ipv6` - A boolean flag indicating whether to enable IPv6
85
- - `provider.region` - A string representing the region to create the new droplet in. It defaults to `nyc2`. List available regions with the `digitalocean-list regions` command.
86
- - `provider.size` - A string representing the size to use when creating a
87
- new droplet (e.g. `1gb`). It defaults to `512mb`. List available sizes with the `digitalocean-list sizes` command.
88
- - `provider.private_networking` - A boolean flag indicating whether to enable
89
- a private network interface (if the region supports private networking). It
90
- defaults to `false`.
91
- - `provider.backups_enabled` - A boolean flag indicating whether to enable backups for
92
- the droplet. It defaults to `false`.
93
- - `provider.ssh_key_name` - A string representing the name to use when creating
94
- a Digital Ocean SSH key for droplet authentication. It defaults to `Vagrant`.
95
- - `provider.setup` - A boolean flag indicating whether to setup a new user
96
- account and modify sudo to disable tty requirement. It defaults to `true`.
97
- If you are using a tool like [packer](https://packer.io) to create
98
- reusable snapshots with user accounts already provisioned, set to `false`.
99
-
100
- The provider will create a new user account with the specified SSH key for
101
- authorization if `config.ssh.username` is set and the `provider.setup`
102
- attribute is `true`.
103
-
104
- ### image, region and size slugs
105
-
106
- Images, regions and sizes have to be specified with the slug name. You can find the slug names with the `digitalocean-list` commands:
50
+ - `provider.image`
51
+ * A string representing the image to use when creating a new droplet. It defaults to `ubuntu-14-04-x64`.
52
+ List available images with the `digitalocean-list images $DIGITAL_OCEAN_TOKEN` command. Like when using the DigitalOcean API directly, [it can be an image ID or slug](https://developers.digitalocean.com/documentation/v2/#create-a-new-droplet).
53
+ - `provider.ipv6`
54
+ * A boolean flag indicating whether to enable IPv6
55
+ - `provider.region`
56
+ * A string representing the region to create the new droplet in. It defaults to `nyc2`. List available regions with the `digitalocean-list regions $DIGITAL_OCEAN_TOKEN` command.
57
+ - `provider.size`
58
+ * A string representing the size to use when creating a new droplet (e.g. `1gb`). It defaults to `512mb`. List available sizes with the `digitalocean-list sizes $DIGITAL_OCEAN_TOKEN` command.
59
+ - `provider.private_networking`
60
+ * A boolean flag indicating whether to enable a private network interface (if the region supports private networking). It defaults to `false`.
61
+ - `provider.backups_enabled`
62
+ * A boolean flag indicating whether to enable backups for the droplet. It defaults to `false`.
63
+ - `provider.ssh_key_name`
64
+ * A string representing the name to use when creating a Digital Ocean SSH key for droplet authentication. It defaults to `Vagrant`.
65
+ - `provider.setup`
66
+ * A boolean flag indicating whether to setup a new user account and modify sudo to disable tty requirement. It defaults to `true`. If you are using a tool like [Packer](https://packer.io) to create reusable snapshots with user accounts already provisioned, set to `false`.
67
+ - `config.vm.synced_folder`
68
+ * Supports both rsync__args and rsync__exclude, see the [Vagrant Docs](http://docs.vagrantup.com/v2/synced-folders/rsync.html) for more information. rsync__args default to `["--verbose", "--archive", "--delete", "-z", "--copy-links"]` and rsync__exclude defaults to `[".vagrant/"]`.
69
+
70
+ The provider will create a new user account with the specified SSH key for authorization if `config.ssh.username` is set and the `provider.setup` attribute is `true`.
107
71
 
108
- ```
109
- vagrant digitalocean-list images $DIGITAL_OCEAN_TOKEN
110
- vagrant digitalocean-list regions $DIGITAL_OCEAN_TOKEN
111
- vagrant digitalocean-list sizes $DIGITAL_OCEAN_TOKEN
112
- ```
113
72
 
114
73
  Run
115
74
  ---
@@ -126,28 +85,57 @@ create a new user account, and run the provisioners you have configured.
126
85
 
127
86
  The provider supports the following Vagrant sub-commands:
128
87
  - `vagrant destroy` - Destroys the droplet instance.
129
- - `vagrant ssh` - Logs into the droplet instance using the configured user
130
- account.
88
+ - `vagrant ssh` - Logs into the droplet instance using the configured user account.
131
89
  - `vagrant halt` - Powers off the droplet instance.
132
- - `vagrant provision` - Runs the configured provisioners and rsyncs any
133
- specified `config.vm.synced_folder`.
90
+ - `vagrant provision` - Runs the configured provisioners and rsyncs any specified `config.vm.synced_folder`.
134
91
  - `vagrant reload` - Reboots the droplet instance.
135
- - `vagrant rebuild` - Destroys the droplet instance and recreates it with the
136
- same IP address which was previously assigned.
137
- - `vagrant status` - Outputs the status (active, off, not created) for the
138
- droplet instance.
92
+ - `vagrant rebuild` - Destroys the droplet instance and recreates it with the same IP address which was previously assigned.
93
+ - `vagrant status` - Outputs the status (active, off, not created) for the droplet instance.
139
94
 
140
- Contribute
141
- ----------
142
- To contribute, clone the repository, and use [Bundler](http://gembundler.com)
143
- to install dependencies:
144
95
 
145
- $ bundle
96
+ Troubleshooting
97
+ ---------------
146
98
 
147
- To run the provider's tests:
99
+ * `vagrant plugin install vagrant-digitalocean`
100
+ * Installation on OS X may not working due to a SSL certificate problem, and you may need to specify a certificate path explicitly. To do so, run `ruby -ropenssl -e "p OpenSSL::X509::DEFAULT_CERT_FILE"`. Then, add the following environment variable to your `.bash_profile` script and `source` it: `export SSL_CERT_FILE=/usr/local/etc/openssl/cert.pem`.
148
101
 
149
- $ bundle exec rake test
150
102
 
151
- You can now make modifications. Running `vagrant` within the Bundler
152
- environment will ensure that plugins installed in your Vagrant
153
- environment are not loaded.
103
+ FAQ
104
+ ---
105
+
106
+ * The Chef provisioner is no longer supported by default (as of 0.2.0). Please use the `vagrant-omnibus` plugin to install Chef on Vagrant-managed machines. This plugin provides control over the specific version of Chef to install.
107
+
108
+
109
+ Contribute
110
+ ----------
111
+ To contribute, fork then clone the repository, and then the following:
112
+
113
+ **Developing**
114
+
115
+ 1. Install [Bundler](http://bundler.io/)
116
+ 2. Currently the Bundler version is locked to 1.7.9, please install this version.
117
+ * `sudo gem install bundler -v '1.7.9'`
118
+ 3. Then install vagrant-digitalocean dependancies:
119
+ * `bundle _1.7.9_ install`
120
+ 4. Do your development and run a few commands, one to get started would be:
121
+ * `bundle _1.7.9_ exec vagrant digitalocean-list images`
122
+ 5. You can then run a test:
123
+ * `bundle _1.7.9_ exec rake test`
124
+ 6. Once you are satisfied with your changes, please submit a pull request.
125
+
126
+ **Releasing**
127
+
128
+ To release a new version of vagrant-digitalocean you will need to do the following:
129
+
130
+ *(only contributors of the GitHub repo and owners of the project at RubyGems will have rights to do this)*
131
+
132
+ 1. First, create a tag and push:
133
+ * `git tag -a v0.7.6 -m 'v0.7.6'`
134
+ 2. Then, create a release on Github with the same versioning convention:
135
+ * https://github.com/smdahlen/vagrant-digitalocean/releases
136
+ 3. You will then need to build and push the new gem to RubyGems:
137
+ * `rake gem:build`
138
+ * `gem push pkg/vagrant-digitalocean-0.7.6.gem`
139
+ 4. Then, when John Doe runs the following, they will receive the updated vagrant-digitalocean plugin:
140
+ * `vagrant plugin update`
141
+ * `vagrant plugin update vagrant-digitalocean`
@@ -52,14 +52,16 @@ module VagrantPlugins
52
52
  key = ssh_info[:private_key_path]
53
53
  key = key[0] if key.is_a?(Array)
54
54
 
55
- # build exclude rules
55
+ # attach to vagrant's default rsync opetions
56
56
  # http://docs.vagrantup.com/v2/synced-folders/rsync.html
57
- excludes = ['.vagrant/', *Array(data[:rsync_excludes])]
57
+ args = ["--verbose", "--archive", "--delete", "-z", "--copy-links", *Array(data[:rsync__args])]
58
+ exclude = [".vagrant/", *Array(data[:rsync__exclude])]
58
59
 
59
60
  # rsync over to the guest path using the ssh info
60
61
  command = [
61
- "rsync", "--verbose", "--archive", "--delete", "-z", "--copy-links",
62
- *excludes.map{|e|['--exclude', e]}.flatten,
62
+ "rsync",
63
+ *args.map{|e|[e]}.flatten,
64
+ *exclude.map{|e|["--exclude", e]}.flatten,
63
65
  "-e", "ssh -p #{ssh_info[:port]} -o StrictHostKeyChecking=no -i '#{key}'",
64
66
  hostpath,
65
67
  "#{ssh_info[:username]}@#{ssh_info[:host]}:#{guestpath}"]
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module DigitalOcean
3
- VERSION = '0.7.6'
3
+ VERSION = '0.7.7'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-digitalocean
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.6
4
+ version: 0.7.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Bender
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-24 00:00:00.000000000 Z
11
+ date: 2015-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday