kitchen-zcloudjp 0.1.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 +15 -0
- data/.gitignore +19 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +15 -0
- data/README.md +172 -0
- data/Rakefile +1 -0
- data/kitchen-zcloudjp.gemspec +30 -0
- data/lib/kitchen/driver/zcloudjp.rb +135 -0
- data/lib/kitchen/driver/zcloudjp_version.rb +24 -0
- metadata +151 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
!binary "U0hBMQ==":
|
|
3
|
+
metadata.gz: !binary |-
|
|
4
|
+
YjU3MGE0ZWRhNDg2YmUxODNhY2Y3YTA5MWE2M2VkZjZhMGI0YTc4MQ==
|
|
5
|
+
data.tar.gz: !binary |-
|
|
6
|
+
YTNkNGU5ODA2NGI5OTI4MDMxZWZhODMzZmIwMGFlZjZkYzk5MmJiZQ==
|
|
7
|
+
!binary "U0hBNTEy":
|
|
8
|
+
metadata.gz: !binary |-
|
|
9
|
+
ZjA4ZWFkYzczMDdkNGRlNDhlZDU4ZmQzYzE2OWNmMDYwNGU3NzJlZDkyNDli
|
|
10
|
+
ZDNjOGZkNjBlNmRkNTM1NzIyZmUzMDhlMTU5YWIyNGIzNDU3Y2IxMmRkN2I0
|
|
11
|
+
OTkyMTAxOTI0YTg2NTE2MTgxNjYwZjJlMTI4YzBlYjdkZjIyYTk=
|
|
12
|
+
data.tar.gz: !binary |-
|
|
13
|
+
NzQyYWRiYmY1NmNmMTFkNDU5OGNkZDE4YjFlMzVmMDVhZTQxOGZjYTBhNjEy
|
|
14
|
+
MGRkMmJjNzBjZWU0OTFjYzRiMDgwZDQ0ZDU5YzhlYmZjYzc5YTc1NzJkMGE3
|
|
15
|
+
YjY4ZWM5YTdlMzdhYjM5NzVmYWY1M2YxZTlhMDM0MDcwMmRmMDA=
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Author:: Yukihiko Sawanobori (sawanoboriyu@higanworks.com)
|
|
2
|
+
|
|
3
|
+
Copyright (C) 2013, HiganWorks LLC
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
data/README.md
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# Kitchen::Zcloudjp A Test Kitchen Driver for Z Cloud(joyent)
|
|
2
|
+
|
|
3
|
+
A Test Kitchen Driver for Z Cloud(JP).
|
|
4
|
+
|
|
5
|
+
Current_Status => 'developing'
|
|
6
|
+
|
|
7
|
+
This driver uses the [giraffi/zcloudjp](https://github.com/giraffi/zcloudjp) gem to provision and destroy SmartMachines.
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## Requirements
|
|
11
|
+
|
|
12
|
+
There are no external system requirements for this driver. However you will need access to a [Z Cloud(JP)](http://z-cloud.jp/) account and api-key.
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
Add this line to your application's Gemfile:
|
|
17
|
+
|
|
18
|
+
gem 'kitchen-zcloudjp'
|
|
19
|
+
|
|
20
|
+
And then execute:
|
|
21
|
+
|
|
22
|
+
$ bundle
|
|
23
|
+
|
|
24
|
+
Or install it yourself as:
|
|
25
|
+
|
|
26
|
+
$ gem install kitchen-zcloudjp
|
|
27
|
+
|
|
28
|
+
## Configuration
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### api_key
|
|
32
|
+
|
|
33
|
+
**Required** The Z Cloud(joyent) apikey to use.
|
|
34
|
+
|
|
35
|
+
You can see an account section at Z Cloud controle panel.
|
|
36
|
+
|
|
37
|
+
### dataset
|
|
38
|
+
|
|
39
|
+
The Z Cloud(joyent) dataset image to use.
|
|
40
|
+
|
|
41
|
+
The default is SmartOS base64 image `sdc:sdc:base64:13.1.0`.
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### package
|
|
45
|
+
|
|
46
|
+
The Z Cloud(joyent) smartmachine size to use.
|
|
47
|
+
|
|
48
|
+
The default is `Small_1GB`.
|
|
49
|
+
|
|
50
|
+
### require_chef_omnibus
|
|
51
|
+
|
|
52
|
+
For `VirtualMachine` only option. Install chef from omnibus installer on boot.
|
|
53
|
+
|
|
54
|
+
The default is `nil`.
|
|
55
|
+
|
|
56
|
+
### Other Options
|
|
57
|
+
|
|
58
|
+
This driver based on `Kitchen::Driver::SSHBase`. You can set ssh configurations and more.
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
### `.kitchen.yml` Example
|
|
62
|
+
|
|
63
|
+
Cookbook test on smartos and ubuntu.
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
---
|
|
67
|
+
driver_plugin: zcloudjp
|
|
68
|
+
driver_config:
|
|
69
|
+
api_key: ZCLOUD_API_KEY
|
|
70
|
+
|
|
71
|
+
platforms:
|
|
72
|
+
- name: smartos-base64
|
|
73
|
+
- name: ubuntu12
|
|
74
|
+
driver_config:
|
|
75
|
+
require_chef_omnibus: true
|
|
76
|
+
dataset: sdc:jpc:ubuntu-12.04:2.4.1
|
|
77
|
+
|
|
78
|
+
suites:
|
|
79
|
+
- name: default
|
|
80
|
+
run_list: ['recipe[dustbox::default]']
|
|
81
|
+
attributes: {}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
## Product List (2013-07-09)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
name os dataset package
|
|
91
|
+
MySQL Small 1 SmartOS sdc:sdc:mysql:1.4.1 Small_1GB
|
|
92
|
+
MySQL Medium 2 SmartOS sdc:sdc:mysql:1.4.1 Medium_2GB
|
|
93
|
+
MySQL Medium 4 SmartOS sdc:sdc:mysql:1.4.1 Medium_4GB
|
|
94
|
+
MySQL Large 1 SmartOS sdc:sdc:mysql:1.4.1 Large_8GB
|
|
95
|
+
Fedora Small 1 Fedora 14 sdc:sdc:fedora-14:1.0.1 Small_1GB
|
|
96
|
+
Fedora Medium 2 Fedora 14 sdc:sdc:fedora-14:1.0.1 Medium_2GB
|
|
97
|
+
Fedora Medium 4 Fedora 14 sdc:sdc:fedora-14:1.0.1 Medium_4GB
|
|
98
|
+
Fedora Large 8 Fedora 14 sdc:sdc:fedora-14:1.0.1 Large_8GB
|
|
99
|
+
CentOS Small 1 CentOS 5.7 sdc:jpc:centos-5.7:1.3.0 Small_1GB
|
|
100
|
+
CentOS Medium 2 CentOS 5.7 sdc:jpc:centos-5.7:1.3.0 Medium_2GB
|
|
101
|
+
CentOS Medium 4 CentOS 5.7 sdc:jpc:centos-5.7:1.3.0 Medium_4GB
|
|
102
|
+
CentOS Large 8 CentOS 5.7 sdc:jpc:centos-5.7:1.3.0 Large_8GB
|
|
103
|
+
Ubuntu Small 1 Ubuntu 10.04 sdc:sdc:ubuntu10.04:0.1.0 Small_1GB
|
|
104
|
+
Ubuntu Medium 2 Ubuntu 10.04 sdc:sdc:ubuntu10.04:0.1.0 Medium_2GB
|
|
105
|
+
Ubuntu Medium 4 Ubuntu 10.04 sdc:sdc:ubuntu10.04:0.1.0 Medium_4GB
|
|
106
|
+
Ubuntu Large 8 Ubuntu 10.04 sdc:sdc:ubuntu10.04:0.1.0 Large_8GB
|
|
107
|
+
SmartOS Plus Small 1 SmartOS sdc:sdc:standard:1.0.7 Small_1GB
|
|
108
|
+
SmartOS Plus Medium 2 SmartOS sdc:sdc:standard:1.0.7 Medium_2GB
|
|
109
|
+
SmartOS Plus Medium 4 SmartOS sdc:sdc:standard:1.0.7 Medium_4GB
|
|
110
|
+
SmartOS Plus Large 8 SmartOS sdc:sdc:standard:1.0.7 Large_8GB
|
|
111
|
+
Hadoop Small 1 SmartOS sdc:sdc:hadoop:1.0.0 Small_1GB
|
|
112
|
+
Hadoop Medium 2 SmartOS sdc:sdc:hadoop:1.0.0 Medium_2GB
|
|
113
|
+
Hadoop Medium 4 SmartOS sdc:sdc:hadoop:1.0.0 Medium_4GB
|
|
114
|
+
Hadoop Large 8 SmartOS sdc:sdc:hadoop:1.0.0 Large_8GB
|
|
115
|
+
Chef Server Small 1 SmartOS sdc:sdc:chefserver:1.0.0 Small_1GB
|
|
116
|
+
Chef Server Medium 2 SmartOS sdc:sdc:chefserver:1.0.0 Medium_2GB
|
|
117
|
+
Chef Server Medium 4 SmartOS sdc:sdc:chefserver:1.0.0 Medium_4GB
|
|
118
|
+
Chef Server Large 8 SmartOS sdc:sdc:chefserver:1.0.0 Large_8GB
|
|
119
|
+
Ubuntu Small 1 Ubuntu 12.04 sdc:jpc:ubuntu-12.04:2.4.1 Small_1GB
|
|
120
|
+
Ubuntu Medium 2 Ubuntu 12.04 sdc:jpc:ubuntu-12.04:2.4.1 Medium_2GB
|
|
121
|
+
Ubuntu Medium 4 Ubuntu 12.04 sdc:jpc:ubuntu-12.04:2.4.1 Medium_4GB
|
|
122
|
+
Ubuntu Medium 8 Ubuntu 12.04 sdc:jpc:ubuntu-12.04:2.4.1 Large_8GB
|
|
123
|
+
Debian Small 1 Debian 6.0.7 sdc:sdc:debian-6.0.7:2.4.1 Small_1GB
|
|
124
|
+
Debian Medium 2 Debian 6.0.7 sdc:sdc:debian-6.0.7:2.4.1 Medium_2GB
|
|
125
|
+
Debian Medium 4 Debian 6.0.7 sdc:sdc:debian-6.0.7:2.4.1 Medium_4GB
|
|
126
|
+
Debian Large 8 Debian 6.0.7 sdc:sdc:debian-6.0.7:2.4.1 Large_8GB
|
|
127
|
+
SmartOS Small 1 SmartOS sdc:sdc:base64:13.1.0 Small_1GB
|
|
128
|
+
SmartOS Medium 2 SmartOS sdc:sdc:base64:13.1.0 Medium_2GB
|
|
129
|
+
SmartOS Medium 4 SmartOS sdc:sdc:base64:13.1.0 Medium_4GB
|
|
130
|
+
SmartOS Large 8 SmartOS sdc:sdc:base64:13.1.0 Large_8GB
|
|
131
|
+
MongoDB Small 1 SmartOS sdc:sdc:mongodb:1.4.5 Small_1GB
|
|
132
|
+
MongoDB Medium 2 SmartOS sdc:sdc:mongodb:1.4.5 Medium_2GB
|
|
133
|
+
MongoDB Medium 4 SmartOS sdc:sdc:mongodb:1.4.5 Medium_4GB
|
|
134
|
+
MongoDB Large 8 SmartOS sdc:sdc:mongodb:1.4.5 Large_8GB
|
|
135
|
+
Node.js Small 1 SmartOS sdc:sdc:nodejs:13.1.0 Small_1GB
|
|
136
|
+
Node.js Medium 2 SmartOS sdc:sdc:nodejs:13.1.0 Medium_2GB
|
|
137
|
+
Node.js Medium 4 SmartOS sdc:sdc:nodejs:13.1.0 Medium_4GB
|
|
138
|
+
Node.js Large 8 SmartOS sdc:sdc:nodejs:13.1.0 Large_8GB
|
|
139
|
+
Percona Small 1 SmartOS sdc:sdc:percona:13.1.0 Small_1GB
|
|
140
|
+
Percona Medium 2 SmartOS sdc:sdc:percona:13.1.0 Medium_2GB
|
|
141
|
+
Percona Medium 4 SmartOS sdc:sdc:percona:13.1.0 Medium_4GB
|
|
142
|
+
Percona Large 8 SmartOS sdc:sdc:percona:13.1.0 Large_8GB
|
|
143
|
+
Riak Small 1 SmartOS sdc:sdc:riak:13.1.0 Small_1GB
|
|
144
|
+
Riak Medium 2 SmartOS sdc:sdc:riak:13.1.0 Medium_2GB
|
|
145
|
+
Riak Medium 4 SmartOS sdc:sdc:riak:13.1.0 Medium_4GB
|
|
146
|
+
Riak Large 1 SmartOS sdc:sdc:riak:13.1.0 Large_8GB
|
|
147
|
+
CentOS Small 1 CentOS 6.4 sdc:sdc:centos-6:2.4.1 Small_1GB
|
|
148
|
+
CentOS Medium 2 CentOS 6.4 sdc:sdc:centos-6:2.4.1 Medium_2GB
|
|
149
|
+
CentOS Medium 4 CentOS 6.4 sdc:sdc:centos-6:2.4.1 Medium_4GB
|
|
150
|
+
CentOS Large 8 CentOS 6.4 sdc:sdc:centos-6:2.4.1 Large_8GB
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Contributing
|
|
154
|
+
|
|
155
|
+
1. Fork it
|
|
156
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
157
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
|
158
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
|
159
|
+
5. Create new Pull Request
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
## <a name="authors"></a> Authors
|
|
163
|
+
|
|
164
|
+
Created and maintained by [Yukihiko Sawanobori][author] (<sawanoboriyu@higanworks.com>)
|
|
165
|
+
|
|
166
|
+
## <a name="license"></a> License
|
|
167
|
+
|
|
168
|
+
Apache 2.0 (see [LICENSE][license])
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
[author]: https://github.com/sawanoboly
|
|
172
|
+
[license]: https://github.com/higanworks/kitchen-zcloudjp/blob/master/LICENSE
|
data/Rakefile
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require "bundler/gem_tasks"
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
+
require 'kitchen/driver/zcloudjp_version'
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |spec|
|
|
7
|
+
spec.name = 'kitchen-zcloudjp'
|
|
8
|
+
spec.version = Kitchen::Driver::ZCLOUDJP_VERSION
|
|
9
|
+
spec.authors = ['sawanoboly']
|
|
10
|
+
spec.email = ['sawanoboriyu@higanworks.com']
|
|
11
|
+
spec.description = %q{A Test Kitchen Driver for Zcloudjp}
|
|
12
|
+
spec.summary = spec.description
|
|
13
|
+
spec.homepage = 'https://github.com/higanworks/kitchen-zcloudjp'
|
|
14
|
+
spec.license = 'Apache 2.0'
|
|
15
|
+
|
|
16
|
+
spec.files = `git ls-files`.split($/)
|
|
17
|
+
spec.executables = []
|
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
19
|
+
spec.require_paths = ['lib']
|
|
20
|
+
|
|
21
|
+
spec.add_dependency 'test-kitchen', '~> 1.0.0.alpha.3'
|
|
22
|
+
spec.add_dependency 'zcloudjp'
|
|
23
|
+
|
|
24
|
+
spec.add_development_dependency 'bundler', '~> 1.3'
|
|
25
|
+
spec.add_development_dependency 'rake'
|
|
26
|
+
|
|
27
|
+
spec.add_development_dependency 'cane'
|
|
28
|
+
spec.add_development_dependency 'tailor'
|
|
29
|
+
spec.add_development_dependency 'countloc'
|
|
30
|
+
end
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Author:: Yukihiko Sawanobori (sawanoboriyu@higanworks.com)
|
|
4
|
+
#
|
|
5
|
+
# Copyright (C) 2013, HiganWorks LLC
|
|
6
|
+
#
|
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
# you may not use this file except in compliance with the License.
|
|
9
|
+
# You may obtain a copy of the License at
|
|
10
|
+
#
|
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
#
|
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
# See the License for the specific language governing permissions and
|
|
17
|
+
# limitations under the License.
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
require 'zcloudjp'
|
|
21
|
+
|
|
22
|
+
require 'benchmark'
|
|
23
|
+
require 'kitchen'
|
|
24
|
+
|
|
25
|
+
module Kitchen
|
|
26
|
+
module Driver
|
|
27
|
+
class Zcloudjp < Kitchen::Driver::SSHBase
|
|
28
|
+
default_config :dataset, 'sdc:sdc:base64:13.1.0' # base64 image
|
|
29
|
+
default_config :package, 'Small_1GB'
|
|
30
|
+
|
|
31
|
+
required_config :api_key
|
|
32
|
+
|
|
33
|
+
def create(state)
|
|
34
|
+
server = create_server
|
|
35
|
+
state[:server_id] = server.id
|
|
36
|
+
|
|
37
|
+
info("SmartMachine <#{state[:server_id]}> created.")
|
|
38
|
+
server.wait_for { print "."; ready? } ; print "(provision queued)"
|
|
39
|
+
state[:hostname] = server.ips.first
|
|
40
|
+
wait_for_sshd(state[:hostname]) ; print "(first reboot)\n"
|
|
41
|
+
sleep 10
|
|
42
|
+
wait_for_sshd(state[:hostname]) ; print "(second reboot)\n"
|
|
43
|
+
sleep 10
|
|
44
|
+
|
|
45
|
+
unless server.os == "SmartOS"
|
|
46
|
+
info("wait for SSH Connection. It takes few minutes. (Only VirtualMachine)")
|
|
47
|
+
ssh_args = build_ssh_args(state)
|
|
48
|
+
sleep 5 until wait_for_sshd_vm(ssh_args)
|
|
49
|
+
print "(ssh ready)\n"
|
|
50
|
+
else
|
|
51
|
+
wait_for_sshd(state[:hostname]) ; print "(ssh ready)\n"
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def destroy(state)
|
|
56
|
+
return if state[:server_id].nil?
|
|
57
|
+
server = client.machine.show(:id => state[:server_id])
|
|
58
|
+
server.stop unless server.nil?
|
|
59
|
+
until client.machine.show(:id => state[:server_id]).state == "stopped"
|
|
60
|
+
sleep 3
|
|
61
|
+
info("SmartMachine <#{state[:server_id]}> is stopping, wait for minutes...")
|
|
62
|
+
end
|
|
63
|
+
server.delete unless server.nil?
|
|
64
|
+
info("SmartMachine <#{state[:server_id]}> destroyed.")
|
|
65
|
+
state.delete(:server_id)
|
|
66
|
+
state.delete(:hostname)
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def converge(state)
|
|
70
|
+
server = client.machine.show(:id => state[:server_id])
|
|
71
|
+
ssh_args = build_ssh_args(state)
|
|
72
|
+
|
|
73
|
+
if server.os == "SmartOS"
|
|
74
|
+
install_chef_for_smartos(ssh_args)
|
|
75
|
+
else
|
|
76
|
+
fix_monkey_dataset(ssh_args)
|
|
77
|
+
install_omnibus(ssh_args) if config[:require_chef_omnibus]
|
|
78
|
+
end
|
|
79
|
+
prepare_chef_home(ssh_args)
|
|
80
|
+
upload_chef_data(ssh_args)
|
|
81
|
+
run_chef_solo(ssh_args)
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
def client
|
|
85
|
+
::Zcloudjp::Client.new(
|
|
86
|
+
:api_key => config[:api_key]
|
|
87
|
+
)
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
def create_server
|
|
91
|
+
client.machine.create(
|
|
92
|
+
:dataset => config[:dataset],
|
|
93
|
+
:package => config[:package]
|
|
94
|
+
)
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
def install_chef_for_smartos(ssh_args)
|
|
98
|
+
ssh(ssh_args, <<-INSTALL.gsub(/^ {10}/, ''))
|
|
99
|
+
if [ ! -f /opt/local/bin/chef-client ]; then
|
|
100
|
+
# pkgin -y install gcc47 gcc47-runtime scmgit-base scmgit-docs gmake ruby193-base ruby193-yajl ruby193-nokogiri ruby193-readline pkg-config
|
|
101
|
+
pkgin -y install ruby193-base ruby193-yajl ruby193-nokogiri ruby193-readline
|
|
102
|
+
|
|
103
|
+
## for smf cookbook
|
|
104
|
+
pkgin -y install libxslt
|
|
105
|
+
|
|
106
|
+
## install chef
|
|
107
|
+
gem update --system
|
|
108
|
+
gem install --no-ri --no-rdoc ohai
|
|
109
|
+
gem install --no-ri --no-rdoc chef
|
|
110
|
+
gem install --no-ri --no-rdoc rb-readline
|
|
111
|
+
fi
|
|
112
|
+
INSTALL
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
def fix_monkey_dataset(ssh_args)
|
|
116
|
+
ssh(ssh_args, <<-__PATCH__.gsub(/^ {10}/, ''))
|
|
117
|
+
## set sticky bit for /tmp
|
|
118
|
+
chmod 01777 /tmp
|
|
119
|
+
__PATCH__
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
def wait_for_sshd_vm(ssh_args)
|
|
123
|
+
ssh(ssh_args, <<-__PATCH__.gsub(/^ {10}/, ''))
|
|
124
|
+
id
|
|
125
|
+
__PATCH__
|
|
126
|
+
true
|
|
127
|
+
rescue => ex
|
|
128
|
+
debug([ex.class,ex.message].join(': '))
|
|
129
|
+
logger << "x"
|
|
130
|
+
false
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Author:: Yukihiko Sawanobori (sawanoboriyu@higanworks.com)
|
|
4
|
+
#
|
|
5
|
+
# Copyright (C) 2013, HiganWorks LLC
|
|
6
|
+
#
|
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
# you may not use this file except in compliance with the License.
|
|
9
|
+
# You may obtain a copy of the License at
|
|
10
|
+
#
|
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
#
|
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
# See the License for the specific language governing permissions and
|
|
17
|
+
# limitations under the License.
|
|
18
|
+
|
|
19
|
+
module Kitchen
|
|
20
|
+
module Driver
|
|
21
|
+
# Version string for Zcloudjp Test Kitchen driver
|
|
22
|
+
ZCLOUDJP_VERSION = "0.1.0"
|
|
23
|
+
end
|
|
24
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: kitchen-zcloudjp
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- sawanoboly
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2013-07-09 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: test-kitchen
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - ~>
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: 1.0.0.alpha.3
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - ~>
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: 1.0.0.alpha.3
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: zcloudjp
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - ! '>='
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '0'
|
|
34
|
+
type: :runtime
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - ! '>='
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '0'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: bundler
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - ~>
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '1.3'
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - ~>
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '1.3'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: rake
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - ! '>='
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '0'
|
|
62
|
+
type: :development
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - ! '>='
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '0'
|
|
69
|
+
- !ruby/object:Gem::Dependency
|
|
70
|
+
name: cane
|
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
|
72
|
+
requirements:
|
|
73
|
+
- - ! '>='
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: '0'
|
|
76
|
+
type: :development
|
|
77
|
+
prerelease: false
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - ! '>='
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: '0'
|
|
83
|
+
- !ruby/object:Gem::Dependency
|
|
84
|
+
name: tailor
|
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
|
86
|
+
requirements:
|
|
87
|
+
- - ! '>='
|
|
88
|
+
- !ruby/object:Gem::Version
|
|
89
|
+
version: '0'
|
|
90
|
+
type: :development
|
|
91
|
+
prerelease: false
|
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
+
requirements:
|
|
94
|
+
- - ! '>='
|
|
95
|
+
- !ruby/object:Gem::Version
|
|
96
|
+
version: '0'
|
|
97
|
+
- !ruby/object:Gem::Dependency
|
|
98
|
+
name: countloc
|
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
|
100
|
+
requirements:
|
|
101
|
+
- - ! '>='
|
|
102
|
+
- !ruby/object:Gem::Version
|
|
103
|
+
version: '0'
|
|
104
|
+
type: :development
|
|
105
|
+
prerelease: false
|
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
+
requirements:
|
|
108
|
+
- - ! '>='
|
|
109
|
+
- !ruby/object:Gem::Version
|
|
110
|
+
version: '0'
|
|
111
|
+
description: A Test Kitchen Driver for Zcloudjp
|
|
112
|
+
email:
|
|
113
|
+
- sawanoboriyu@higanworks.com
|
|
114
|
+
executables: []
|
|
115
|
+
extensions: []
|
|
116
|
+
extra_rdoc_files: []
|
|
117
|
+
files:
|
|
118
|
+
- .gitignore
|
|
119
|
+
- Gemfile
|
|
120
|
+
- LICENSE.txt
|
|
121
|
+
- README.md
|
|
122
|
+
- Rakefile
|
|
123
|
+
- kitchen-zcloudjp.gemspec
|
|
124
|
+
- lib/kitchen/driver/zcloudjp.rb
|
|
125
|
+
- lib/kitchen/driver/zcloudjp_version.rb
|
|
126
|
+
homepage: https://github.com/higanworks/kitchen-zcloudjp
|
|
127
|
+
licenses:
|
|
128
|
+
- Apache 2.0
|
|
129
|
+
metadata: {}
|
|
130
|
+
post_install_message:
|
|
131
|
+
rdoc_options: []
|
|
132
|
+
require_paths:
|
|
133
|
+
- lib
|
|
134
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
135
|
+
requirements:
|
|
136
|
+
- - ! '>='
|
|
137
|
+
- !ruby/object:Gem::Version
|
|
138
|
+
version: '0'
|
|
139
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
|
+
requirements:
|
|
141
|
+
- - ! '>='
|
|
142
|
+
- !ruby/object:Gem::Version
|
|
143
|
+
version: '0'
|
|
144
|
+
requirements: []
|
|
145
|
+
rubyforge_project:
|
|
146
|
+
rubygems_version: 2.0.3
|
|
147
|
+
signing_key:
|
|
148
|
+
specification_version: 4
|
|
149
|
+
summary: A Test Kitchen Driver for Zcloudjp
|
|
150
|
+
test_files: []
|
|
151
|
+
has_rdoc:
|