vagrant-chassis-digitalocean 1.0.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.
Files changed (39) hide show
  1. data/.gitignore +19 -0
  2. data/CHANGELOG.md +8 -0
  3. data/Gemfile +5 -0
  4. data/LICENSE.txt +23 -0
  5. data/README.md +95 -0
  6. data/Rakefile +22 -0
  7. data/box/digital_ocean.box +0 -0
  8. data/box/metadata.json +3 -0
  9. data/lib/vagrant-chassis-digitalocean.rb +20 -0
  10. data/lib/vagrant-chassis-digitalocean/actions.rb +160 -0
  11. data/lib/vagrant-chassis-digitalocean/actions/check_state.rb +19 -0
  12. data/lib/vagrant-chassis-digitalocean/actions/create.rb +96 -0
  13. data/lib/vagrant-chassis-digitalocean/actions/destroy.rb +35 -0
  14. data/lib/vagrant-chassis-digitalocean/actions/modify_provision_path.rb +38 -0
  15. data/lib/vagrant-chassis-digitalocean/actions/power_off.rb +33 -0
  16. data/lib/vagrant-chassis-digitalocean/actions/power_on.rb +34 -0
  17. data/lib/vagrant-chassis-digitalocean/actions/rebuild.rb +52 -0
  18. data/lib/vagrant-chassis-digitalocean/actions/reload.rb +31 -0
  19. data/lib/vagrant-chassis-digitalocean/actions/setup_key.rb +58 -0
  20. data/lib/vagrant-chassis-digitalocean/actions/setup_sudo.rb +41 -0
  21. data/lib/vagrant-chassis-digitalocean/actions/setup_user.rb +64 -0
  22. data/lib/vagrant-chassis-digitalocean/actions/sync_folders.rb +91 -0
  23. data/lib/vagrant-chassis-digitalocean/commands/rebuild.rb +23 -0
  24. data/lib/vagrant-chassis-digitalocean/config.rb +62 -0
  25. data/lib/vagrant-chassis-digitalocean/errors.rb +37 -0
  26. data/lib/vagrant-chassis-digitalocean/helpers/client.rb +88 -0
  27. data/lib/vagrant-chassis-digitalocean/helpers/result.rb +40 -0
  28. data/lib/vagrant-chassis-digitalocean/plugin.rb +26 -0
  29. data/lib/vagrant-chassis-digitalocean/provider.rb +100 -0
  30. data/lib/vagrant-chassis-digitalocean/version.rb +5 -0
  31. data/locales/en.yml +84 -0
  32. data/test/Vagrantfile +38 -0
  33. data/test/cookbooks/test/recipes/default.rb +1 -0
  34. data/test/scripts/provision.sh +3 -0
  35. data/test/test.sh +14 -0
  36. data/test/test_id_rsa +27 -0
  37. data/test/test_id_rsa.pub +1 -0
  38. data/vagrant-chassis-digitalocean.gemspec +21 -0
  39. metadata +137 -0
data/test/Vagrantfile ADDED
@@ -0,0 +1,38 @@
1
+ Vagrant.require_plugin('vagrant-digitalocean')
2
+ Vagrant.require_plugin('vagrant-omnibus')
3
+
4
+ Vagrant.configure('2') do |config|
5
+ config.omnibus.chef_version = :latest
6
+
7
+ config.ssh.username = 'tester'
8
+ config.ssh.private_key_path = 'test_id_rsa'
9
+
10
+ config.vm.synced_folder '.', '/vagrant', :disabled => true
11
+
12
+ config.vm.provider :digital_ocean do |provider, override|
13
+ override.vm.box = 'digital_ocean'
14
+ override.vm.box_url = "https://github.com/smdahlen/vagrant-digitalocean/raw/master/box/digital_ocean.box"
15
+ provider.client_id = ENV['DO_CLIENT_ID']
16
+ provider.api_key = ENV['DO_API_KEY']
17
+ provider.ssh_key_name = 'Test Key'
18
+ end
19
+
20
+ config.vm.provision :shell, :path => 'scripts/provision.sh'
21
+
22
+ config.vm.provision :chef_solo do |chef|
23
+ chef.cookbooks_path = 'cookbooks'
24
+ chef.add_recipe 'test'
25
+ end
26
+
27
+ config.vm.define :ubuntu do |ubuntu|
28
+ ubuntu.vm.provider :digital_ocean do |provider|
29
+ provider.image = 'Ubuntu 12.04.4 x64'
30
+ end
31
+ end
32
+
33
+ config.vm.define :centos do |centos|
34
+ centos.vm.provider :digital_ocean do |provider|
35
+ provider.image = 'CentOS 6.4 x64'
36
+ end
37
+ end
38
+ end
@@ -0,0 +1 @@
1
+ log 'Testing 1 2 3!'
@@ -0,0 +1,3 @@
1
+ #!/bin/bash
2
+
3
+ echo 'Testing 1 2 3!'
data/test/test.sh ADDED
@@ -0,0 +1,14 @@
1
+ # if ! vagrant box list | grep digital_ocean 1>/dev/null; then
2
+ # vagrant box add digital_ocean box/digital_ocean.box
3
+ # fi
4
+
5
+ cd test
6
+
7
+ vagrant up --provider=digital_ocean
8
+ vagrant up
9
+ vagrant provision
10
+ vagrant rebuild
11
+ vagrant halt
12
+ vagrant destroy
13
+
14
+ cd ..
data/test/test_id_rsa ADDED
@@ -0,0 +1,27 @@
1
+ -----BEGIN RSA PRIVATE KEY-----
2
+ MIIEowIBAAKCAQEAmxZRyfvgXFxlPW9ivoxffdK9erqpCp1oitghUtDxbzPSCbNw
3
+ qBoiJcnPVA/TuCxMnruUcNEXYgKfTL8lD3A1Hom8N1pTAhSed5m4qAGqTMubT15s
4
+ cSR+SnDdriShErB/9YSb9LVn1aR0MsFS3H/+x1j4w5d6hBas8BhDfuVd16shvoaA
5
+ OKy0ywy+NBuvGy/6Au3q3t7M9wdelODRnYLSWWqaLeYExRKxWWc7ape+oduQoe4r
6
+ BNVwGmIOjWOM9aFPEPVHdLGO+LQyPExdeuS0rW96a39U4p8GjGzsrkNcKzVOGjM3
7
+ pIsGs3qOi7RzJ3z48HiBj9NT8I2fFpGHERerbQIDAQABAoIBABXsIcObhyuHJAh7
8
+ JkopLZZro70lhZ+qgIyf4JYEUxyVBqu4YcRhbVJKJLSNSDBQksQdX+5SoCuKk1oV
9
+ 6vcztU6Lyb9JVVKF96CQajnVgm04msutXUbhEbkUG0Hyi5JIwM3D4QfGXNcmWAaU
10
+ rVHeBfXH7eI4F2l0ix2lUGUvpwRFRDq9HgpOjXzyc57B4jeF7na/UTnt+Uoi4hzZ
11
+ FjjQ7nSLqEJLXtQBqt4EnAZu6/9JlAApunyMOX2oTqRNn8XGmD0Rc+AouipHM+Mc
12
+ 9/fN9oqVxxXw2MdJA6S/sEFLEDrbifmyyHOereuZtOjdWLqsCdZwewYl8nuBnYEU
13
+ GjVzYgECgYEAx+efis7xma28HWqtW9GLvjBcFAD/f+MDDeqX9TKFwf+91tUq0Q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J53mbioAapMy5tPXmxxJH5KcN2uJKESsH/1hJv0tWfVpHQywVLcf/7HWPjDl3qEFqzwGEN+5V3XqyG+hoA4rLTLDL40G68bL/oC7ere3sz3B16U4NGdgtJZapot5gTFErFZZztql76h25Ch7isE1XAaYg6NY4z1oU8Q9Ud0sY74tDI8TF165LStb3prf1TinwaMbOyuQ1wrNU4aMzekiwazeo6LtHMnfPjweIGP01PwjZ8WkYcRF6tt digital_ocean provider test key
@@ -0,0 +1,21 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'vagrant-chassis-digitalocean/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "vagrant-chassis-digitalocean"
8
+ gem.version = VagrantPlugins::DigitalOcean::VERSION
9
+ gem.authors = ["Bronson Quick"]
10
+ gem.email = ["bronson@sennza.com.au"]
11
+ gem.description = %q{Enables Vagrant to manage instances of Chassis on Digital Ocean droplets}
12
+ gem.summary = gem.description
13
+
14
+ gem.files = `git ls-files`.split($/)
15
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
16
+ gem.require_paths = ["lib"]
17
+
18
+ gem.add_dependency "faraday", ">= 0.8.6"
19
+ gem.add_dependency "json"
20
+ gem.add_dependency "log4r"
21
+ end
metadata ADDED
@@ -0,0 +1,137 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: vagrant-chassis-digitalocean
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Bronson Quick
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2014-05-12 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: faraday
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: 0.8.6
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 0.8.6
30
+ - !ruby/object:Gem::Dependency
31
+ name: json
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: log4r
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ description: Enables Vagrant to manage instances of Chassis on Digital Ocean droplets
63
+ email:
64
+ - bronson@sennza.com.au
65
+ executables: []
66
+ extensions: []
67
+ extra_rdoc_files: []
68
+ files:
69
+ - .gitignore
70
+ - CHANGELOG.md
71
+ - Gemfile
72
+ - LICENSE.txt
73
+ - README.md
74
+ - Rakefile
75
+ - box/digital_ocean.box
76
+ - box/metadata.json
77
+ - lib/vagrant-chassis-digitalocean.rb
78
+ - lib/vagrant-chassis-digitalocean/actions.rb
79
+ - lib/vagrant-chassis-digitalocean/actions/check_state.rb
80
+ - lib/vagrant-chassis-digitalocean/actions/create.rb
81
+ - lib/vagrant-chassis-digitalocean/actions/destroy.rb
82
+ - lib/vagrant-chassis-digitalocean/actions/modify_provision_path.rb
83
+ - lib/vagrant-chassis-digitalocean/actions/power_off.rb
84
+ - lib/vagrant-chassis-digitalocean/actions/power_on.rb
85
+ - lib/vagrant-chassis-digitalocean/actions/rebuild.rb
86
+ - lib/vagrant-chassis-digitalocean/actions/reload.rb
87
+ - lib/vagrant-chassis-digitalocean/actions/setup_key.rb
88
+ - lib/vagrant-chassis-digitalocean/actions/setup_sudo.rb
89
+ - lib/vagrant-chassis-digitalocean/actions/setup_user.rb
90
+ - lib/vagrant-chassis-digitalocean/actions/sync_folders.rb
91
+ - lib/vagrant-chassis-digitalocean/commands/rebuild.rb
92
+ - lib/vagrant-chassis-digitalocean/config.rb
93
+ - lib/vagrant-chassis-digitalocean/errors.rb
94
+ - lib/vagrant-chassis-digitalocean/helpers/client.rb
95
+ - lib/vagrant-chassis-digitalocean/helpers/result.rb
96
+ - lib/vagrant-chassis-digitalocean/plugin.rb
97
+ - lib/vagrant-chassis-digitalocean/provider.rb
98
+ - lib/vagrant-chassis-digitalocean/version.rb
99
+ - locales/en.yml
100
+ - test/Vagrantfile
101
+ - test/cookbooks/test/recipes/default.rb
102
+ - test/scripts/provision.sh
103
+ - test/test.sh
104
+ - test/test_id_rsa
105
+ - test/test_id_rsa.pub
106
+ - vagrant-chassis-digitalocean.gemspec
107
+ homepage:
108
+ licenses: []
109
+ post_install_message:
110
+ rdoc_options: []
111
+ require_paths:
112
+ - lib
113
+ required_ruby_version: !ruby/object:Gem::Requirement
114
+ none: false
115
+ requirements:
116
+ - - ! '>='
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
119
+ required_rubygems_version: !ruby/object:Gem::Requirement
120
+ none: false
121
+ requirements:
122
+ - - ! '>='
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ requirements: []
126
+ rubyforge_project:
127
+ rubygems_version: 1.8.23
128
+ signing_key:
129
+ specification_version: 3
130
+ summary: Enables Vagrant to manage instances of Chassis on Digital Ocean droplets
131
+ test_files:
132
+ - test/Vagrantfile
133
+ - test/cookbooks/test/recipes/default.rb
134
+ - test/scripts/provision.sh
135
+ - test/test.sh
136
+ - test/test_id_rsa
137
+ - test/test_id_rsa.pub