vagrant-linode 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +19 -0
  3. data/CHANGELOG.md +4 -0
  4. data/Gemfile +11 -0
  5. data/LICENSE.txt +23 -0
  6. data/README.md +201 -0
  7. data/Rakefile +22 -0
  8. data/box/README.md +13 -0
  9. data/box/linode.box +0 -0
  10. data/box/metadata.json +3 -0
  11. data/lib/vagrant-linode/actions/check_state.rb +19 -0
  12. data/lib/vagrant-linode/actions/create.rb +191 -0
  13. data/lib/vagrant-linode/actions/destroy.rb +30 -0
  14. data/lib/vagrant-linode/actions/modify_provision_path.rb +38 -0
  15. data/lib/vagrant-linode/actions/power_off.rb +32 -0
  16. data/lib/vagrant-linode/actions/power_on.rb +32 -0
  17. data/lib/vagrant-linode/actions/rebuild.rb +53 -0
  18. data/lib/vagrant-linode/actions/reload.rb +28 -0
  19. data/lib/vagrant-linode/actions/setup_key.rb +52 -0
  20. data/lib/vagrant-linode/actions/setup_sudo.rb +41 -0
  21. data/lib/vagrant-linode/actions/setup_user.rb +62 -0
  22. data/lib/vagrant-linode/actions/sync_folders.rb +80 -0
  23. data/lib/vagrant-linode/actions.rb +160 -0
  24. data/lib/vagrant-linode/commands/rebuild.rb +23 -0
  25. data/lib/vagrant-linode/config.rb +65 -0
  26. data/lib/vagrant-linode/errors.rb +49 -0
  27. data/lib/vagrant-linode/helpers/client.rb +114 -0
  28. data/lib/vagrant-linode/helpers/result.rb +38 -0
  29. data/lib/vagrant-linode/plugin.rb +26 -0
  30. data/lib/vagrant-linode/provider.rb +117 -0
  31. data/lib/vagrant-linode/version.rb +5 -0
  32. data/lib/vagrant-linode.rb +20 -0
  33. data/locales/en.yml +96 -0
  34. data/test/Vagrantfile +60 -0
  35. data/test/cookbooks/test/recipes/default.rb +1 -0
  36. data/test/scripts/provision.sh +3 -0
  37. data/test/test.sh +14 -0
  38. data/test/test_id_rsa +27 -0
  39. data/test/test_id_rsa.pub +1 -0
  40. data/vagrant-linode.gemspec +21 -0
  41. metadata +132 -0
@@ -0,0 +1,114 @@
1
+ require 'vagrant-linode/helpers/result'
2
+ require 'linode'
3
+ require 'json'
4
+ require 'vagrant/util/retryable'
5
+
6
+ module VagrantPlugins
7
+ module Linode
8
+ module Helpers
9
+ module Client
10
+ def client
11
+ def wait_for_event(env, id)
12
+ retryable(tries: 120, sleep: 10) do
13
+ # stop waiting if interrupted
14
+ next if env[:interrupted]
15
+ # check action status
16
+ result = @client.linode.job.list(jobid: id, linodeid: env[:machine].id)
17
+ result = result[0] if result.is_a?(Array)
18
+
19
+ yield result if block_given?
20
+ fail 'not ready' if result['host_finish_dt'] > ''
21
+ end
22
+ end
23
+ linodeapi = ::Linode.new(api_key: @machine.provider_config.token,
24
+ api_url: @machine.provider_config.api_url || nil)
25
+ # linodeapi.wait_for_event = wait_for_event
26
+ # linodeapi.extend wait_for_event
27
+ end
28
+ end
29
+
30
+ class ApiClient
31
+ include Vagrant::Util::Retryable
32
+
33
+ def initialize(machine)
34
+ @logger = Log4r::Logger.new('vagrant::linode::apiclient')
35
+ @config = machine.provider_config
36
+ @client = ::Linode.new(api_key: @config.token)
37
+ end
38
+
39
+ attr_reader :client
40
+
41
+ def delete(path, params = {}, _method = :delete)
42
+ @client.request :url_encoded
43
+ request(path, params, :delete)
44
+ end
45
+
46
+ def post(path, params = {}, _method = :post)
47
+ @client.headers['Content-Type'] = 'application/json'
48
+ request(path, params, :post)
49
+ end
50
+
51
+ def request(path, params = {}, method = :get)
52
+ begin
53
+ @logger.info "Request: #{path}"
54
+ result = @client.send(method) do |req|
55
+ req.url path, params
56
+ req.headers['Authorization'] = "Bearer #{@config.token}"
57
+ end
58
+ rescue Faraday::Error::ConnectionFailed => e
59
+ # TODO this is suspect but because farady wraps the exception
60
+ # in something generic there doesn't appear to be another
61
+ # way to distinguish different connection errors :(
62
+ if e.message =~ /certificate verify failed/
63
+ raise Errors::CertificateError
64
+ end
65
+
66
+ raise e
67
+ end
68
+
69
+ unless method == :delete
70
+ begin
71
+ body = JSON.parse(result.body)
72
+ @logger.info "Response: #{body}"
73
+ next_page = body['links']['pages']['next'] rescue nil
74
+ unless next_page.nil?
75
+ uri = URI.parse(next_page)
76
+ new_path = path.split('?')[0]
77
+ next_result = request("#{new_path}?#{uri.query}")
78
+ req_target = new_path.split('/')[-1]
79
+ body["#{req_target}"].concat(next_result["#{req_target}"])
80
+ end
81
+ rescue JSON::ParserError => e
82
+ raise(Errors::JSONError, message: e.message,
83
+ path: path,
84
+ params: params,
85
+ response: result.body)
86
+ end
87
+ end
88
+
89
+ unless /^2\d\d$/ =~ result.status.to_s
90
+ fail(Errors::APIStatusError, path: path,
91
+ params: params,
92
+ status: result.status,
93
+ response: body.inspect)
94
+ end
95
+
96
+ Result.new(body)
97
+ end
98
+
99
+ def wait_for_event(env, id)
100
+ retryable(tries: 120, sleep: 10) do
101
+ # stop waiting if interrupted
102
+ next if env[:interrupted]
103
+
104
+ # check action status
105
+ result = @client.linode.job.list(jobid: id, linodeid: env[:machine].id)
106
+
107
+ yield result if block_given?
108
+ fail 'not ready' if result['host_finish_dt'] > ''
109
+ end
110
+ end
111
+ end
112
+ end
113
+ end
114
+ end
@@ -0,0 +1,38 @@
1
+ module VagrantPlugins
2
+ module Linode
3
+ module Helpers
4
+ class Result
5
+ def initialize(body)
6
+ @result = body
7
+ end
8
+
9
+ def [](key)
10
+ @result[key.to_s]
11
+ end
12
+
13
+ def find_id(sub_obj, search) #:ssh_keys, {:name => 'ijin (vagrant)'}
14
+ find(sub_obj, search)['id']
15
+ end
16
+
17
+ def find(sub_obj, search)
18
+ key = search.keys.first #:slug
19
+ value = search[key].to_s # sfo1
20
+ key = key.to_s # slug
21
+
22
+ result = @result[sub_obj.to_s].reduce(nil) do |result, obj|
23
+ obj[key] == value ? obj : result
24
+ end
25
+
26
+ result || error(sub_obj, key, value)
27
+ end
28
+
29
+ def error(sub_obj, key, value)
30
+ fail(Errors::ResultMatchErro r, key: key,
31
+ value: value,
32
+ collection_name: sub_obj.to_s,
33
+ sub_obj: @result[sub_obj.to_s])
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,26 @@
1
+ module VagrantPlugins
2
+ module Linode
3
+ class Plugin < Vagrant.plugin('2')
4
+ name 'Linode'
5
+ description <<-DESC
6
+ This plugin installs a provider that allows Vagrant to manage
7
+ machines using Linode's API.
8
+ DESC
9
+
10
+ config(:linode, :provider) do
11
+ require_relative 'config'
12
+ Config
13
+ end
14
+
15
+ provider(:linode, parallel: true) do
16
+ require_relative 'provider'
17
+ Provider
18
+ end
19
+
20
+ command(:rebuild) do
21
+ require_relative 'commands/rebuild'
22
+ Commands::Rebuild
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,117 @@
1
+ require 'vagrant-linode/actions'
2
+
3
+ module VagrantPlugins
4
+ module Linode
5
+ class Provider < Vagrant.plugin('2', :provider)
6
+ # This class method caches status for all linodes within
7
+ # the Linode account. A specific linode's status
8
+ # may be refreshed by passing :refresh => true as an option.
9
+ def self.linode(machine, opts = {})
10
+ client = Helpers::ApiClient.new(machine).client
11
+
12
+ # load status of linodes if it has not been done before
13
+ unless @linodes
14
+ @linodes = client.linode.list.each { |l| l.network = client.linode.ip.list linodeid: l.linodeid }
15
+ end
16
+
17
+ if opts[:refresh] && machine.id
18
+ # refresh the linode status for the given machine
19
+ @linodes.delete_if { |d| d['linodeid'].to_s == machine.id }
20
+ linode = client.linode.list(linodeid: machine.id).first
21
+ linode.network = client.linode.ip.list linodeid: linode['linodeid']
22
+ @linodes << linode
23
+ else
24
+ # lookup linode status for the given machine
25
+ linode = @linodes.find { |d| d['linodeid'].to_s == machine.id }
26
+ end
27
+
28
+ # if lookup by id failed, check for a linode with a matching name
29
+ # and set the id to ensure vagrant stores locally
30
+ # TODO allow the user to configure this behavior
31
+ unless linode
32
+ name = machine.config.vm.hostname || machine.name
33
+ linode = @linodes.find { |d| d['label'] == name.to_s }
34
+ machine.id = linode['linodeid'].to_s if linode
35
+ end
36
+
37
+ linode ||= { status: :not_created }
38
+ end
39
+
40
+ def initialize(machine)
41
+ @machine = machine
42
+ end
43
+
44
+ # Attempt to get the action method from the Action class if it
45
+ # exists, otherwise return nil to show that we don't support the
46
+ # given action.
47
+ def action(name)
48
+ return Actions.send(name) if Actions.respond_to?(name)
49
+ nil
50
+ end
51
+
52
+ # This method is called if the underying machine ID changes. Providers
53
+ # can use this method to load in new data for the actual backing
54
+ # machine or to realize that the machine is now gone (the ID can
55
+ # become `nil`). No parameters are given, since the underlying machine
56
+ # is simply the machine instance given to this object. And no
57
+ # return value is necessary.
58
+ def machine_id_changed
59
+ end
60
+
61
+ # This should return a hash of information that explains how to
62
+ # SSH into the machine. If the machine is not at a point where
63
+ # SSH is even possible, then `nil` should be returned.
64
+ #
65
+ # The general structure of this returned hash should be the
66
+ # following:
67
+ #
68
+ # {
69
+ # :host => "1.2.3.4",
70
+ # :port => "22",
71
+ # :username => "mitchellh",
72
+ # :private_key_path => "/path/to/my/key"
73
+ # }
74
+ #
75
+ # **Note:** Vagrant only supports private key based authenticatonion,
76
+ # mainly for the reason that there is no easy way to exec into an
77
+ # `ssh` prompt with a password, whereas we can pass a private key
78
+ # via commandline.
79
+ def ssh_info
80
+ linode = Provider.linode(@machine, refresh: true)
81
+
82
+ return nil if self.state.id != :active
83
+
84
+ public_network = linode.network.find { |network| network['ispublic'] == 1 }
85
+
86
+ {
87
+ host: public_network['ipaddress'],
88
+ port: '22',
89
+ username: 'root',
90
+ private_key_path: @machine.config.ssh.private_key_path
91
+ }
92
+ end
93
+
94
+ # This should return the state of the machine within this provider.
95
+ # The state must be an instance of {MachineState}. Please read the
96
+ # documentation of that class for more information.
97
+ def state
98
+ status = Provider.linode(@machine)['status']
99
+ states = {
100
+ "" => :not_created,
101
+ '-2' => :boot_failed,
102
+ '-1' => :being_created,
103
+ '0' => :brand_new, # brand new
104
+ '1' => :active, # running
105
+ '2' => :off, # powered off
106
+ '3' => :shutting_down
107
+ }
108
+ id = long = short = states[status.to_s]
109
+ Vagrant::MachineState.new(id, short, long)
110
+ end
111
+
112
+ def to_s
113
+ "Linode"
114
+ end
115
+ end
116
+ end
117
+ end
@@ -0,0 +1,5 @@
1
+ module VagrantPlugins
2
+ module Linode
3
+ VERSION = '0.1.0'
4
+ end
5
+ end
@@ -0,0 +1,20 @@
1
+ require 'vagrant-linode/version'
2
+ require 'vagrant-linode/plugin'
3
+ require 'vagrant-linode/errors'
4
+
5
+ module VagrantPlugins
6
+ module Linode
7
+ def self.source_root
8
+ @source_root ||= Pathname.new(File.expand_path('../../', __FILE__))
9
+ end
10
+
11
+ def self.public_key(private_key_path)
12
+ File.read("#{private_key_path}.pub")
13
+ rescue
14
+ raise Errors::PublicKeyError, path: "#{private_key_path}.pub"
15
+ end
16
+
17
+ I18n.load_path << File.expand_path('locales/en.yml', source_root)
18
+ I18n.reload!
19
+ end
20
+ end
data/locales/en.yml ADDED
@@ -0,0 +1,96 @@
1
+ en:
2
+ vagrant_linode:
3
+ info:
4
+ off: "Linode is off"
5
+ not_created: "Linode has not been created"
6
+ already_active: "Linode is already active"
7
+ already_off: "Linode is already off"
8
+ creating: "Creating a new linode..."
9
+ created: "Created a new linode... %{linodeid}"
10
+ booting: "Booting Linode %{linodeid} ..."
11
+ linode_ip: "Assigned IP address: %{ip}"
12
+ linode_private_ip: "Private IP address: %{ip}"
13
+ destroying: "Destroying the linode..."
14
+ powering_off: "Powering off the linode..."
15
+ powering_on: "Powering on the linode..."
16
+ rebuilding: "Rebuilding the linode..."
17
+ reloading: "Rebooting the linode..."
18
+ creating_user: "Creating user account: %{user}..."
19
+ modifying_sudo: "Modifying sudoers file to remove tty requirement..."
20
+ using_key: "Using existing SSH key: %{name}"
21
+ creating_key: "Creating new SSH key: %{name}..."
22
+ trying_rsync_install: "Rsync not found, attempting to install with yum..."
23
+ rsyncing: "Rsyncing folder: %{hostpath} => %{guestpath}..."
24
+ rsync_missing: "The rsync executable was not found in the current path."
25
+ config:
26
+ token: "Token is required"
27
+ private_key: "SSH private key path is required"
28
+ public_key: "SSH public key not found: %{key}"
29
+ disk_too_large: "Disk Images use more drive space than plan allocates"
30
+ errors:
31
+ public_key: |-
32
+ There was an issue reading the public key at:
33
+
34
+ Path: %{path}
35
+
36
+ Please check the file's permissions.
37
+ api_status: |-
38
+ There was an issue with the request made to the Linode
39
+ API at:
40
+
41
+ Path: %{path}
42
+ URI Params: %{params}
43
+
44
+ The response status from the API was:
45
+
46
+ Status: %{status}
47
+ Response: %{response}
48
+ rsync: |-
49
+ There was an error when attemping to rsync a share folder.
50
+ Please inspect the error message below for more info.
51
+
52
+ Host path: %{hostpath}
53
+ Guest path: %{guestpath}
54
+ Error: %{stderr}
55
+ json: |-
56
+ There was an issue with the JSON response from the Linode
57
+ API at:
58
+
59
+ Path: %{path}
60
+ URI Params: %{params}
61
+
62
+ The response JSON from the API was:
63
+
64
+ Response: %{response}
65
+ result_match: |-
66
+ The result collection for %{collection_name}:
67
+
68
+ %{sub_obj}
69
+
70
+ Contained no object with the value "%{value}" for the the
71
+ key "%{key}".
72
+
73
+ Please ensure that the configured value exists in the collection.
74
+ certificate: |-
75
+ The secure connection to the Linode API has failed. Please
76
+ ensure that your local certificates directory is defined in the
77
+ provider config.
78
+
79
+ config.vm.provider :linode do |vm|
80
+ vm.ca_path = "/path/to/ssl/ca/cert.crt"
81
+ end
82
+
83
+ This is generally caused by the OpenSSL configuration associated
84
+ with the Ruby install being unaware of the system specific ca
85
+ certs.
86
+ local_ip: |-
87
+ The Linode provider was unable to determine the host's IP.
88
+ distro_match: !-
89
+ The provider does not support your configurations chosen Distribution %{distro}.
90
+ Supported distributions can be found at the following url - https://www.linode.com/distributions
91
+ disk_size: !-
92
+ The space which you have specified for your Disk Images is too large for your
93
+ plans allocations. Current = %{current}MB, Max = %{max}
94
+ plan_id: !-
95
+ The plan which you have specified ( %{plan} ) is not available at this time,
96
+ for more information regarding plans review the following url - https://www.linode.com/pricing
data/test/Vagrantfile ADDED
@@ -0,0 +1,60 @@
1
+ # -*- mode: ruby -*-
2
+ # vi: set ft=ruby :
3
+
4
+ Vagrant.require_plugin('vagrant-linode')
5
+ Vagrant.require_plugin('vagrant-omnibus')
6
+
7
+ Vagrant.configure('2') do |config|
8
+ config.omnibus.chef_version = :latest
9
+
10
+ config.ssh.username = 'tester'
11
+ config.ssh.private_key_path = './test_id_rsa'
12
+
13
+ config.vm.synced_folder '.', '/vagrant', disabled: true
14
+
15
+ config.vm.provider :linode do |provider, override|
16
+ override.vm.box = 'linode'
17
+ override.vm.box_url = 'https://github.com/displague/vagrant-linode/raw/master/box/linode.box'
18
+ provider.token = ENV['LINODE_TOKEN']
19
+ provider.ssh_key_name = 'Test Key'
20
+ provider.distribution = 'Ubuntu 14.04 LTS'
21
+ provider.datacenter = 'newark'
22
+ provider.plan = '1024'
23
+
24
+ # Disk Image Sizes (Optional configuration)
25
+
26
+ # Main Disk Image Size
27
+ # [str] ( Full Allocation - Swap ) if nil
28
+ provider.xvda_size = '1024'
29
+
30
+ # Swap Image Size
31
+ # [str] 256 if nil
32
+ provider.swap_size = '256'
33
+
34
+ # Networking (Optional Configuration)
35
+
36
+ # Enable private networking
37
+ # [boolean] disabled if nil
38
+ #provider.private_networking = true
39
+ end
40
+
41
+ config.vm.provision :shell, path: 'scripts/provision.sh'
42
+
43
+ config.vm.provision :chef_solo do |chef|
44
+ chef.cookbooks_path = 'cookbooks'
45
+ chef.add_recipe 'test'
46
+ end
47
+
48
+ # Linode Specific Configurations
49
+ config.vm.define :ubuntu do |ubuntu|
50
+ ubuntu.vm.provider :linode do |provider|
51
+ provider.distribution = 'Ubuntu 14.04 LTS'
52
+ end
53
+ end
54
+
55
+ config.vm.define :centos do |centos|
56
+ centos.vm.provider :linode do |provider|
57
+ provider.distribution = 'CentOS 7'
58
+ end
59
+ end
60
+ 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 ! bundle exec vagrant box list | grep linode 1>/dev/null; then
2
+ # bundle exec vagrant box add linode box/linode.box
3
+ # fi
4
+
5
+ cd test
6
+
7
+ bundle exec vagrant up --provider=linode
8
+ bundle exec vagrant up
9
+ bundle exec vagrant provision
10
+ bundle exec vagrant rebuild
11
+ bundle exec vagrant halt
12
+ bundle exec vagrant destroy
13
+
14
+ cd ..
data/test/test_id_rsa ADDED
@@ -0,0 +1,27 @@
1
+ -----BEGIN RSA PRIVATE KEY-----
2
+ MIIEpAIBAAKCAQEAzbDbxYaq3ANDCzU+c+BCpiPNeSCwj9PS6IgUNdP5tZzaL3M5
3
+ l+iy5rS0lsjw4229AdF5oO1TOGzefvIkqHd/3feizsUFzvvSM+ytPCadMkPA+bHi
4
+ hWGJPyjLDLWCF5kHo9gdNxCDc72cPmGWJqm4YdwWA8Pgk2X8gSx3klutOWg+vWrk
5
+ bX/LENaG8r5uk/tIGvDHV/CZQFZEUDo6ECJ4Din4mLlBbLGaE0swQSthEePlro/k
6
+ s2eJ2TceOo9qcTkQnIaIb6WUETfylDkl1z/PiDt+7QwmALmEttWjzrOvUoJ6FA7H
7
+ 3Hi41des6wKUYjtCN2R+bvR9b9SNj9BXj+ljmwIDAQABAoIBAA0ObOTc53uPuXG8
8
+ r3orgg+JtkE6EfsPNxQLjzzbd75PdooMhlteKfz6+3uWxbOqA5VZ9p6Acgfi4Tyt
9
+ oiYPb85nKa52UygQVAd3vodS7CeEpXs0D2zoBA4+SKVF4DwfOpzr2u7j3XQ7VO+g
10
+ wicyHsIXdk5G4Lp6fsy0ReLEbvp1xknODE6y7mXfnFjV0SfbrB9vBYfljjD3aDmT
11
+ nrAK1EMx1OLqh9p0fnHYS2d7q8kw6XE8DRVS/XCQEfqAmNr6ZPizVWrUWe9AN+dA
12
+ 31atcA+UE+mOTnN/AL2BGE0Dndi8+ZUONxKkBKOdY2tIRPUbap8BANyXDJstFdFH
13
+ ZTQlPgECgYEA+YF0NKbQ2/+TOPyLa988pJRiq6tCw1kYf98pwtyUbqVYCeldkCGc
14
+ yNGSePvN0bhJrC5knI/05ia31VjQ7gtKZAz8RjnvfMCJyyYR8Dg00KvbUHm6NEWS
15
+ Xw+5pz9Uhblaee9QmJ+oQ6VBZPZb98g+tBTTJDEucW61y1LCGp+BVUUCgYEA0wtz
16
+ W0yjTBBmnTIgrDP0jDItT27zXl0M9KCU4VCB9NqpENq3lWrQVM4bWML1+WOm3NCR
17
+ yQnX4n53QFqxerOEVrVt0hOiGwgttrltsjPrErydA0XkKMIzr7bAD2JUpeJWInro
18
+ wuCQAoEzYv3HFtryuc0s7hTq5Xeph0MihBsWM18CgYBSC/bZpY2C+r0//RQf6e34
19
+ NO9pgkzXDkJXMlx6Pqz04Zxczge9cMAs7XWcITmiYFahrzPYpCIlWNAU8TrrPH0+
20
+ /2Ip+b0+KdZmHmPBucnsYMci5JSNwd8LMZGcZN/3hWcyN7cqKT5c2Efz2muNxKSR
21
+ 9VMlUKL0HDLd5J39wTv3fQKBgQDGrQDr8jnIYag4U/huJHsTgCknnkt9ihuoL4P4
22
+ mNG+sBp4w24QO33kWCNmbCMjo6xyM+cKWzng/y1EaBysZlMvTZ0VJ2Z0DD78xZN/
23
+ L2EdQnKNoj4oIKqHwIMN+IO3pltwGkUFMGJh+T9m8YF7AqN+RqkFeKupWf0+WPUl
24
+ aFp+AQKBgQDhTM46yr+6TGanepYon6XlTjFCtXEzdfVIP9GLoGQakKukX1XAJgX3
25
+ QYzjsQp4Ig26dXTjTd8y+0Wwf8tuSeQzBE1ZJK/EjFgP/je7NEMMfRgB06Tcnzhs
26
+ s5hIxs8t9OB/Um6DtWGMA0myQsNt4jcLcINvsEQhNR3bk2iBIPwofA==
27
+ -----END RSA PRIVATE KEY-----
@@ -0,0 +1 @@
1
+ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDNsNvFhqrcA0MLNT5z4EKmI815ILCP09LoiBQ10/m1nNovczmX6LLmtLSWyPDjbb0B0Xmg7VM4bN5+8iSod3/d96LOxQXO+9Iz7K08Jp0yQ8D5seKFYYk/KMsMtYIXmQej2B03EINzvZw+YZYmqbhh3BYDw+CTZfyBLHeSW605aD69auRtf8sQ1obyvm6T+0ga8MdX8JlAVkRQOjoQIngOKfiYuUFssZoTSzBBK2ER4+Wuj+SzZ4nZNx46j2pxORCchohvpZQRN/KUOSXXP8+IO37tDCYAuYS21aPOs69SgnoUDsfceLjV16zrApRiO0I3ZH5u9H1v1I2P0FeP6WOb test@vagrant-linode
@@ -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-linode/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = 'vagrant-linode'
8
+ gem.version = VagrantPlugins::Linode::VERSION
9
+ gem.authors = ['Marques Johansson', 'Jonathan Leal']
10
+ gem.email = ['marques@linode.com', 'jleal@linode.com']
11
+ gem.description = 'Enables Vagrant to manage Linode linodes'
12
+ gem.summary = gem.description
13
+
14
+ gem.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
15
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
16
+ gem.require_paths = ['lib']
17
+
18
+ gem.add_dependency 'linode'
19
+ gem.add_dependency 'json'
20
+ gem.add_dependency 'log4r'
21
+ end
metadata ADDED
@@ -0,0 +1,132 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: vagrant-linode
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Marques Johansson
8
+ - Jonathan Leal
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2014-09-24 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: linode
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ! '>='
19
+ - !ruby/object:Gem::Version
20
+ version: '0'
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ! '>='
26
+ - !ruby/object:Gem::Version
27
+ version: '0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: json
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ! '>='
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ! '>='
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: log4r
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ! '>='
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ description: Enables Vagrant to manage Linode linodes
57
+ email:
58
+ - marques@linode.com
59
+ - jleal@linode.com
60
+ executables: []
61
+ extensions: []
62
+ extra_rdoc_files: []
63
+ files:
64
+ - .gitignore
65
+ - CHANGELOG.md
66
+ - Gemfile
67
+ - LICENSE.txt
68
+ - README.md
69
+ - Rakefile
70
+ - box/README.md
71
+ - box/linode.box
72
+ - box/metadata.json
73
+ - lib/vagrant-linode.rb
74
+ - lib/vagrant-linode/actions.rb
75
+ - lib/vagrant-linode/actions/check_state.rb
76
+ - lib/vagrant-linode/actions/create.rb
77
+ - lib/vagrant-linode/actions/destroy.rb
78
+ - lib/vagrant-linode/actions/modify_provision_path.rb
79
+ - lib/vagrant-linode/actions/power_off.rb
80
+ - lib/vagrant-linode/actions/power_on.rb
81
+ - lib/vagrant-linode/actions/rebuild.rb
82
+ - lib/vagrant-linode/actions/reload.rb
83
+ - lib/vagrant-linode/actions/setup_key.rb
84
+ - lib/vagrant-linode/actions/setup_sudo.rb
85
+ - lib/vagrant-linode/actions/setup_user.rb
86
+ - lib/vagrant-linode/actions/sync_folders.rb
87
+ - lib/vagrant-linode/commands/rebuild.rb
88
+ - lib/vagrant-linode/config.rb
89
+ - lib/vagrant-linode/errors.rb
90
+ - lib/vagrant-linode/helpers/client.rb
91
+ - lib/vagrant-linode/helpers/result.rb
92
+ - lib/vagrant-linode/plugin.rb
93
+ - lib/vagrant-linode/provider.rb
94
+ - lib/vagrant-linode/version.rb
95
+ - locales/en.yml
96
+ - test/Vagrantfile
97
+ - test/cookbooks/test/recipes/default.rb
98
+ - test/scripts/provision.sh
99
+ - test/test.sh
100
+ - test/test_id_rsa
101
+ - test/test_id_rsa.pub
102
+ - vagrant-linode.gemspec
103
+ homepage:
104
+ licenses: []
105
+ metadata: {}
106
+ post_install_message:
107
+ rdoc_options: []
108
+ require_paths:
109
+ - lib
110
+ required_ruby_version: !ruby/object:Gem::Requirement
111
+ requirements:
112
+ - - ! '>='
113
+ - !ruby/object:Gem::Version
114
+ version: '0'
115
+ required_rubygems_version: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - ! '>='
118
+ - !ruby/object:Gem::Version
119
+ version: '0'
120
+ requirements: []
121
+ rubyforge_project:
122
+ rubygems_version: 2.4.1
123
+ signing_key:
124
+ specification_version: 4
125
+ summary: Enables Vagrant to manage Linode linodes
126
+ test_files:
127
+ - test/Vagrantfile
128
+ - test/cookbooks/test/recipes/default.rb
129
+ - test/scripts/provision.sh
130
+ - test/test.sh
131
+ - test/test_id_rsa
132
+ - test/test_id_rsa.pub