vagrant-digitalocean 0.7.10 → 0.8.0
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 +4 -4
- data/README.md +13 -2
- data/lib/vagrant-digitalocean/actions.rb +1 -2
- data/lib/vagrant-digitalocean/version.rb +1 -1
- metadata +2 -3
- data/lib/vagrant-digitalocean/actions/sync_folders.rb +0 -89
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e84391852e5ea5d30aa39ad5f21b5f66639fe09
|
4
|
+
data.tar.gz: d97c2cd55f9b1393ab52ef944198ba0336e8d950
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66c39766c64f5c43e30c668c0626337516eaa07c593ff816bf93b0d28841a3a403ba9ad54cfed9622213ef1c01d12c6c8993e5f53c54cd85ca702e7cd28359a8
|
7
|
+
data.tar.gz: 474412b8a92d58fb5697a007a63951a11eb01b62c2be95123aa45ad7a8b4152e434ae2e76c6a3f8a4a603f4f5a7126842d371f0dedadcbb88a66d47ad4df2d42
|
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
DigitalOcean Vagrant Provider
|
2
2
|
==============================
|
3
3
|
|
4
|
+
[](https://rubygems.org/gems/vagrant-digitalocean)
|
4
5
|
[](https://rubygems.org/gems/vagrant-digitalocean)
|
5
6
|
[](https://rubygems.org/gems/vagrant-digitalocean)
|
6
7
|
[](https://twitter.com/intent/tweet?text=Check%20out%20this%20awesome%20Vagrant%20plugin%21&url=https%3A%2F%2Fgithub.com%2Fsmdahlen%2Fvagrant-digitalocean&hashtags=vagrant%2Cdigitalocean&original_referer=)
|
@@ -15,8 +16,6 @@ Features include:
|
|
15
16
|
- setup a SSH public key for authentication
|
16
17
|
- create a new user account during droplet creation
|
17
18
|
|
18
|
-
The provider has been tested with Vagrant 1.1.5+ using Ubuntu 12.04 and CentOS 6.3 guest operating systems.
|
19
|
-
|
20
19
|
|
21
20
|
Install
|
22
21
|
-------
|
@@ -99,9 +98,21 @@ The provider supports the following Vagrant sub-commands:
|
|
99
98
|
- `vagrant rebuild` - Destroys the droplet instance and recreates it with the same IP address which was previously assigned.
|
100
99
|
- `vagrant status` - Outputs the status (active, off, not created) for the droplet instance.
|
101
100
|
|
101
|
+
Compatability
|
102
|
+
-------------
|
103
|
+
This [DigitalOcean API](https://developers.digitalocean.com/documentation/changelog/) provider plugin for Vagrant has been tested with the following technology.
|
104
|
+
|
105
|
+
Date Tested | Vagrant Version | vagrant-digitalocean Version | Host (Workstation) Operating System | Guest (DigitalOcean) Operating System
|
106
|
+
------------|-----------------|------------------------------|-----------------------|--------------------------------------
|
107
|
+
03/22/2016 | 1.8.1 | 0.7.10 | OS X 10.11.4 | CentOS 7.0
|
108
|
+
04/03/2013 | 1.1.5 | 0.1.0 | Ubuntu 12.04 | CentOS 6.3
|
109
|
+
|
102
110
|
|
103
111
|
Troubleshooting
|
104
112
|
---------------
|
113
|
+
Before submitting a GitHub issue, please ensure both Vagrant and vagrant-digitalocean are fully up-to-date.
|
114
|
+
* For the latest Vagrant version, please visit the [Vagrant](https://www.vagrantup.com/) website
|
115
|
+
* To update Vagrant plugins, run the following command: `vagrant plugin update`
|
105
116
|
|
106
117
|
* `vagrant plugin install vagrant-digitalocean`
|
107
118
|
* 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`.
|
@@ -9,7 +9,6 @@ require 'vagrant-digitalocean/actions/reload'
|
|
9
9
|
require 'vagrant-digitalocean/actions/setup_user'
|
10
10
|
require 'vagrant-digitalocean/actions/setup_sudo'
|
11
11
|
require 'vagrant-digitalocean/actions/setup_key'
|
12
|
-
require 'vagrant-digitalocean/actions/sync_folders'
|
13
12
|
require 'vagrant-digitalocean/actions/modify_provision_path'
|
14
13
|
|
15
14
|
module VagrantPlugins
|
@@ -76,7 +75,7 @@ module VagrantPlugins
|
|
76
75
|
when :active
|
77
76
|
b.use Provision
|
78
77
|
b.use ModifyProvisionPath
|
79
|
-
b.use
|
78
|
+
b.use SyncedFolders
|
80
79
|
when :off
|
81
80
|
env[:ui].info I18n.t('vagrant_digital_ocean.info.off')
|
82
81
|
when :not_created
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-digitalocean
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Bender
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-03-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|
@@ -82,7 +82,6 @@ files:
|
|
82
82
|
- lib/vagrant-digitalocean/actions/setup_sudo.rb
|
83
83
|
- lib/vagrant-digitalocean/actions/setup_user.rb
|
84
84
|
- lib/vagrant-digitalocean/actions/shut_down.rb
|
85
|
-
- lib/vagrant-digitalocean/actions/sync_folders.rb
|
86
85
|
- lib/vagrant-digitalocean/commands/list.rb
|
87
86
|
- lib/vagrant-digitalocean/commands/rebuild.rb
|
88
87
|
- lib/vagrant-digitalocean/config.rb
|
@@ -1,89 +0,0 @@
|
|
1
|
-
require 'vagrant/util/subprocess'
|
2
|
-
require 'vagrant/util/which'
|
3
|
-
|
4
|
-
module VagrantPlugins
|
5
|
-
module DigitalOcean
|
6
|
-
module Actions
|
7
|
-
class SyncFolders
|
8
|
-
def initialize(app, env)
|
9
|
-
@app = app
|
10
|
-
@machine = env[:machine]
|
11
|
-
@logger = Log4r::Logger.new('vagrant::digitalocean::sync_folders')
|
12
|
-
end
|
13
|
-
|
14
|
-
def call(env)
|
15
|
-
ssh_info = @machine.ssh_info
|
16
|
-
|
17
|
-
@machine.config.vm.synced_folders.each do |id, data|
|
18
|
-
next if data[:disabled]
|
19
|
-
|
20
|
-
if @machine.guest.capability?(:rsync_installed)
|
21
|
-
installed = @machine.guest.capability(:rsync_installed)
|
22
|
-
if !installed
|
23
|
-
can_install = @machine.guest.capability?(:rsync_install)
|
24
|
-
raise Vagrant::Errors::RSyncNotInstalledInGuest if !can_install
|
25
|
-
@machine.ui.info I18n.t("vagrant.rsync_installing")
|
26
|
-
@machine.guest.capability(:rsync_install)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
hostpath = File.expand_path(data[:hostpath], env[:root_path])
|
31
|
-
guestpath = data[:guestpath]
|
32
|
-
|
33
|
-
# make sure there is a trailing slash on the host path to
|
34
|
-
# avoid creating an additional directory with rsync
|
35
|
-
hostpath = "#{hostpath}/" if hostpath !~ /\/$/
|
36
|
-
|
37
|
-
# on windows rsync.exe requires cygdrive-style paths
|
38
|
-
if Vagrant::Util::Platform.windows?
|
39
|
-
hostpath = hostpath.gsub(/^(\w):/) { "/cygdrive/#{$1}" }
|
40
|
-
end
|
41
|
-
|
42
|
-
env[:ui].info I18n.t('vagrant_digital_ocean.info.rsyncing', {
|
43
|
-
:hostpath => hostpath,
|
44
|
-
:guestpath => guestpath
|
45
|
-
})
|
46
|
-
|
47
|
-
# create the guest path
|
48
|
-
@machine.communicate.sudo("mkdir -p #{guestpath}")
|
49
|
-
@machine.communicate.sudo(
|
50
|
-
"chown -R #{ssh_info[:username]} #{guestpath}")
|
51
|
-
|
52
|
-
key = ssh_info[:private_key_path]
|
53
|
-
key = key[0] if key.is_a?(Array)
|
54
|
-
|
55
|
-
# attach to vagrant's default rsync opetions
|
56
|
-
# http://docs.vagrantup.com/v2/synced-folders/rsync.html
|
57
|
-
args = ["--verbose", "--archive", "--delete", "-z", "--copy-links", *Array(data[:rsync__args])]
|
58
|
-
exclude = [".vagrant/", *Array(data[:rsync__exclude])]
|
59
|
-
|
60
|
-
# rsync over to the guest path using the ssh info
|
61
|
-
command = [
|
62
|
-
"rsync",
|
63
|
-
*args.map{|e|[e]}.flatten,
|
64
|
-
*exclude.map{|e|["--exclude", e]}.flatten,
|
65
|
-
"-e", "ssh -p #{ssh_info[:port]} -o StrictHostKeyChecking=no -i '#{key}'",
|
66
|
-
hostpath,
|
67
|
-
"#{ssh_info[:username]}@#{ssh_info[:host]}:#{guestpath}"]
|
68
|
-
|
69
|
-
# we need to fix permissions when using rsync.exe on windows, see
|
70
|
-
# http://stackoverflow.com/questions/5798807/rsync-permission-denied-created-directories-have-no-permissions
|
71
|
-
if Vagrant::Util::Platform.windows?
|
72
|
-
command.insert(1, "--chmod", "ugo=rwX")
|
73
|
-
end
|
74
|
-
|
75
|
-
r = Vagrant::Util::Subprocess.execute(*command)
|
76
|
-
if r.exit_code != 0
|
77
|
-
raise Errors::RsyncError,
|
78
|
-
:guestpath => guestpath,
|
79
|
-
:hostpath => hostpath,
|
80
|
-
:stderr => r.stderr
|
81
|
-
end
|
82
|
-
end
|
83
|
-
|
84
|
-
@app.call(env)
|
85
|
-
end
|
86
|
-
end
|
87
|
-
end
|
88
|
-
end
|
89
|
-
end
|