kitchen-linode 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ad3bb6e0dc353cf7c224e8192eb9953c7613783d
4
- data.tar.gz: 93d6f0aacb1994f67a2a13bf5c662630a5dc105b
3
+ metadata.gz: af31affc32b5e1a6b472f845b7f2de4e7c32616e
4
+ data.tar.gz: 81d76b2323efe86aebb1f5a08dd4135dc872526a
5
5
  SHA512:
6
- metadata.gz: ba9d42e18e810cb95c8843cb71cb238fd9ee0eb7a948df6ea3eb5ea63623929f2ed76d8dea10ac0ed6cbad124805e290fdda2f04d1b56c44e1305825081ac589
7
- data.tar.gz: 9520cb6e9bfc9e72f01dbdde537e7820592247c0b30a77026b947e69a3d40c6dd2d0897d7e1d6cf26d1060af00300269c0f63b6d1cbb6696fe208b85f0508019
6
+ metadata.gz: 97d2db6f9274821a5b26f0f89b930aaab0ff679ef2471b6abbd9e5f6255cf5e29026a32a0bc1becad9785793c244cefebddef10c4a98cc5f70fb5346fb7ee87c
7
+ data.tar.gz: a5f2145e6ebc06801f7ca9d75e68b34eeea96ddb45f203d1deb59b5a3308da7f991fe6565d245f475f0288657f04e580c7e8856bc224d211486bc5130bf09f79
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.2.0
2
+
3
+ * Small updates to configuration logic
4
+
1
5
  ## 0.1.0 / Unreleased
2
6
 
3
7
  * Initial release
data/README.md CHANGED
@@ -10,11 +10,65 @@ class to enforce these requirements in code, if possible.
10
10
 
11
11
  ## <a name="installation"></a> Installation and Setup
12
12
 
13
+ Install the gem file:
14
+ ```
15
+ gem install kitchen-linode
16
+ ```
13
17
  Please read the [Driver usage][driver_usage] page for more details.
14
18
 
15
19
  ## <a name="config"></a> Configuration
16
20
 
17
- **TODO:** Write descriptions of all configuration options
21
+ For many of these, you can specify an ID number, a full name, or a partial name that will try to match something in the list but may not match exactly what you want.
22
+ ```
23
+ LINODE_API_KEY Linode API Key environment variable, default: nil
24
+ :username ssh user name, default: 'root'
25
+ :password password for user, default: randomly generated hash
26
+ :image Linux distribution, default: nil
27
+ :data_center data center, default: 1
28
+ :flavor linode type/amount of RAM, default: 1
29
+ :payment_terms if you happen to have legacy default: 1
30
+ :kernel Linux kernel, default: 215
31
+ :private_key_path Location of your private key file, default: "~/.ssh/id_rsa"
32
+ :public_key_path Location of your public key file, default: "~/.ssh/id_rsa.pub"
33
+ ```
34
+
35
+ ## <a name="usage"></a> Usage
36
+
37
+ First, set your Linode API key in an environment variable:
38
+ ```
39
+ $ export LINODE_API_KEY='myrandomkey123123213h123bh12'
40
+ ```
41
+ Then, create a .kitchen.yml file:
42
+ ```
43
+ ---
44
+ driver:
45
+ name: linode
46
+
47
+ provisioner:
48
+ name: salt_solo
49
+ salt_bootstrap_options: -P
50
+ formula: vim
51
+ state_top:
52
+ base:
53
+ "*":
54
+ - vim
55
+
56
+ platforms:
57
+ - name: debian_jessie
58
+ driver:
59
+ flavor: 1024
60
+ data_center: Dallas
61
+ kernel: 4.0.2-x86_64-linode56
62
+ image: Debian 8.1
63
+
64
+ suites:
65
+ - name: default
66
+
67
+ ```
68
+ then you're ready to run `kitchen test` or `kitchen converge`
69
+ ```
70
+ $ kitchen test
71
+ ```
18
72
 
19
73
  ### <a name="config-require-chef-omnibus"></a> require\_chef\_omnibus
20
74
 
@@ -56,9 +110,9 @@ Created and maintained by [Brett Taylor][author] (<btaylor@linode.com>)
56
110
  Apache 2.0 (see [LICENSE][license])
57
111
 
58
112
 
59
- [author]: https://github.com/enter-github-user
60
- [issues]: https://github.com/enter-github-user/kitchen-linode/issues
61
- [license]: https://github.com/enter-github-user/kitchen-linode/blob/master/LICENSE
62
- [repo]: https://github.com/enter-github-user/kitchen-linode
113
+ [author]: https://github.com/ssplatt
114
+ [issues]: https://github.com/ssplatt/kitchen-linode/issues
115
+ [license]: https://github.com/ssplatt/kitchen-linode/blob/master/LICENSE
116
+ [repo]: https://github.com/ssplatt/kitchen-linode
63
117
  [driver_usage]: http://docs.kitchen-ci.org/drivers/usage
64
118
  [chef_omnibus_dl]: http://www.getchef.com/chef/install/
@@ -115,12 +115,13 @@ module Kitchen
115
115
 
116
116
  # set flavor
117
117
  if config[:flavor].is_a? Integer
118
- flavor = compute.flavors.get(config[:flavor])
119
- else
120
- flavor = compute.flavors.find { |f| f.ram == config[:flavor] }
121
- if flavor.nil?
122
- flavor = compute.flavors.find { |f| f.name == config[:flavor] }
118
+ if config[:flavor] < 10
119
+ flavor = compute.flavors.get(config[:flavor])
120
+ else
121
+ flavor = compute.flavors.find { |f| f.ram == config[:flavor] }
123
122
  end
123
+ else
124
+ flavor = compute.flavors.find { |f| f.name == config[:flavor] }
124
125
  if flavor.nil?
125
126
  flavor = compute.flavors.find { |f| f.name =~ /#{config[:flavor]}/ }
126
127
  end
@@ -20,6 +20,6 @@ module Kitchen
20
20
 
21
21
  module Driver
22
22
  # Version string for Linode Kitchen driver
23
- LINODE_VERSION = "0.1.0"
23
+ LINODE_VERSION = "0.2.0"
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-linode
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Taylor