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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +59 -5
- data/lib/kitchen/driver/linode.rb +6 -5
- data/lib/kitchen/driver/linode_version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af31affc32b5e1a6b472f845b7f2de4e7c32616e
|
4
|
+
data.tar.gz: 81d76b2323efe86aebb1f5a08dd4135dc872526a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97d2db6f9274821a5b26f0f89b930aaab0ff679ef2471b6abbd9e5f6255cf5e29026a32a0bc1becad9785793c244cefebddef10c4a98cc5f70fb5346fb7ee87c
|
7
|
+
data.tar.gz: a5f2145e6ebc06801f7ca9d75e68b34eeea96ddb45f203d1deb59b5a3308da7f991fe6565d245f475f0288657f04e580c7e8856bc224d211486bc5130bf09f79
|
data/CHANGELOG.md
CHANGED
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
|
-
|
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/
|
60
|
-
[issues]: https://github.com/
|
61
|
-
[license]: https://github.com/
|
62
|
-
[repo]: https://github.com/
|
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
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
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
|