knife-rightscale 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +17 -0
- data/.rspec +2 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +201 -0
- data/README.md +191 -0
- data/Rakefile +32 -0
- data/knife-rightscale.gemspec +37 -0
- data/lib/chef/knife/rightscale_base.rb +113 -0
- data/lib/chef/knife/rightscale_cloud_list.rb +72 -0
- data/lib/chef/knife/rightscale_deployment_list.rb +70 -0
- data/lib/chef/knife/rightscale_image_list.rb +116 -0
- data/lib/chef/knife/rightscale_securitygroup_list.rb +78 -0
- data/lib/chef/knife/rightscale_server_create.rb +181 -0
- data/lib/chef/knife/rightscale_server_delete.rb +52 -0
- data/lib/chef/knife/rightscale_server_list.rb +73 -0
- data/lib/chef/knife/rightscale_servertemplate_list.rb +73 -0
- data/lib/knife-rightscale.rb +30 -0
- data/lib/knife-rightscale/version.rb +22 -0
- data/lib/right_api_provision.rb +92 -0
- data/lib/right_api_provision/api15.rb +372 -0
- data/lib/right_api_provision/exception.rb +23 -0
- data/lib/right_api_provision/provisioner.rb +139 -0
- data/lib/right_api_provision/version.rb +21 -0
- data/spec/chef/knife/rightscale_server_create_spec.rb +32 -0
- data/spec/right_api_provision/api15_spec.rb +203 -0
- data/spec/spec_helper.rb +20 -0
- data/test/create_server_test.rb +58 -0
- data/test/list_actions_test.rb +51 -0
- metadata +78 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NjlmZjJjMDYxMTlhOWUzMjNiYzgzNzE2NzMzNTMzNTE3NmQxZTk0Mg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
ZTBlZDM1NDAxODRhYzQzYzk1Nzg3NGViZDQzMjlmZTUxN2ZmYmI4OQ==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ZmQ1OTI1MDVmYzE2MTA1MzM1MTk4ODY2NjJkY2JiNzU2NmRmNmNmYzFhZTVl
|
10
|
+
YzYzOWViZTliZTM2NjUyMjhjNzEzYTcwNGVmOTZhNWE1ZjhiNGUxZDY5YTRj
|
11
|
+
NDc3ZDQ1YzMzNzdjNjc2NDcxMjYxNWI3ZTM4MDllZmUyNGY3MmY=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ODQwMmQ3NmY3ZGMzMDJhNGMyNGMwZGM2NjExY2M5MjM1Mzg2MTkzMTNhMjkz
|
14
|
+
YzhlZTIzZjk3NWU0Nzc4YTYwZDQ2OTM0ZDExYmJjNTAzZTg0MGY5MzJhOGVl
|
15
|
+
OTIxYzZhOWIxMzQ3ZTRjOWMwZWI4ZjA1MzEyZTA4M2RmMzhjZGU=
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,201 @@
|
|
1
|
+
Apache License
|
2
|
+
Version 2.0, January 2004
|
3
|
+
http://www.apache.org/licenses/
|
4
|
+
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
6
|
+
|
7
|
+
1. Definitions.
|
8
|
+
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
11
|
+
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
13
|
+
the copyright owner that is granting the License.
|
14
|
+
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
16
|
+
other entities that control, are controlled by, or are under common
|
17
|
+
control with that entity. For the purposes of this definition,
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
19
|
+
direction or management of such entity, whether by contract or
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
22
|
+
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
24
|
+
exercising permissions granted by this License.
|
25
|
+
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
27
|
+
including but not limited to software source code, documentation
|
28
|
+
source, and configuration files.
|
29
|
+
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
31
|
+
transformation or translation of a Source form, including but
|
32
|
+
not limited to compiled object code, generated documentation,
|
33
|
+
and conversions to other media types.
|
34
|
+
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
36
|
+
Object form, made available under the License, as indicated by a
|
37
|
+
copyright notice that is included in or attached to the work
|
38
|
+
(an example is provided in the Appendix below).
|
39
|
+
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
46
|
+
the Work and Derivative Works thereof.
|
47
|
+
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
49
|
+
the original version of the Work and any modifications or additions
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
61
|
+
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
64
|
+
subsequently incorporated within the Work.
|
65
|
+
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
72
|
+
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
78
|
+
where such license applies only to those patent claims licensable
|
79
|
+
by such Contributor that are necessarily infringed by their
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
82
|
+
institute patent litigation against any entity (including a
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
85
|
+
or contributory patent infringement, then any patent licenses
|
86
|
+
granted to You under this License for that Work shall terminate
|
87
|
+
as of the date such litigation is filed.
|
88
|
+
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
91
|
+
modifications, and in Source or Object form, provided that You
|
92
|
+
meet the following conditions:
|
93
|
+
|
94
|
+
(a) You must give any other recipients of the Work or
|
95
|
+
Derivative Works a copy of this License; and
|
96
|
+
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
98
|
+
stating that You changed the files; and
|
99
|
+
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
102
|
+
attribution notices from the Source form of the Work,
|
103
|
+
excluding those notices that do not pertain to any part of
|
104
|
+
the Derivative Works; and
|
105
|
+
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
108
|
+
include a readable copy of the attribution notices contained
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
111
|
+
of the following places: within a NOTICE text file distributed
|
112
|
+
as part of the Derivative Works; within the Source form or
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
114
|
+
within a display generated by the Derivative Works, if and
|
115
|
+
wherever such third-party notices normally appear. The contents
|
116
|
+
of the NOTICE file are for informational purposes only and
|
117
|
+
do not modify the License. You may add Your own attribution
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
120
|
+
that such additional attribution notices cannot be construed
|
121
|
+
as modifying the License.
|
122
|
+
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
124
|
+
may provide additional or different license terms and conditions
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
128
|
+
the conditions stated in this License.
|
129
|
+
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
133
|
+
this License, without any additional terms or conditions.
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
135
|
+
the terms of any separate license agreement you may have executed
|
136
|
+
with Licensor regarding such Contributions.
|
137
|
+
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
140
|
+
except as required for reasonable and customary use in describing the
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
142
|
+
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
152
|
+
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
158
|
+
incidental, or consequential damages of any character arising as a
|
159
|
+
result of this License or out of the use or inability to use the
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
162
|
+
other commercial damages or losses), even if such Contributor
|
163
|
+
has been advised of the possibility of such damages.
|
164
|
+
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
168
|
+
or other liability obligations and/or rights consistent with this
|
169
|
+
License. However, in accepting such obligations, You may act only
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
174
|
+
of your accepting any such warranty or additional liability.
|
175
|
+
|
176
|
+
END OF TERMS AND CONDITIONS
|
177
|
+
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
179
|
+
|
180
|
+
To apply the Apache License to your work, attach the following
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
182
|
+
replaced with your own identifying information. (Don't include
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
184
|
+
comment syntax for the file format. We also recommend that a
|
185
|
+
file or class name and description of purpose be included on the
|
186
|
+
same "printed page" as the copyright notice for easier
|
187
|
+
identification within third-party archives.
|
188
|
+
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
190
|
+
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
192
|
+
you may not use this file except in compliance with the License.
|
193
|
+
You may obtain a copy of the License at
|
194
|
+
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
196
|
+
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
200
|
+
See the License for the specific language governing permissions and
|
201
|
+
limitations under the License.
|
data/README.md
ADDED
@@ -0,0 +1,191 @@
|
|
1
|
+
# Knife RightScale
|
2
|
+
|
3
|
+
This is a Knife plugin for RightScale. This plugin gives knife the ability to
|
4
|
+
provision servers on clouds managed by the RightScale platform. It is expected
|
5
|
+
that you already have a Chef Server running or are using a hosted Chef solution
|
6
|
+
from OpsCode.
|
7
|
+
|
8
|
+
NOTE: this plugin is currently under development and subject to change
|
9
|
+
|
10
|
+
## REQUIREMENTS:
|
11
|
+
|
12
|
+
You will need a RightScale account with at least one cloud registered. You can
|
13
|
+
sign up for a free trial account [here](https://www.rightscale.com).
|
14
|
+
|
15
|
+
This plugin cannot currently provision servers on EC2. If you need this
|
16
|
+
capability and would like to part in a private beta to enable that
|
17
|
+
functionality, please contact support@rightscale.com.
|
18
|
+
|
19
|
+
You will also need a running Chef Server. If you don't already have one you can
|
20
|
+
sign up for a free trial of Hosted Chef from Opscode [here](http://www.opscode.com/hosted-chef/).
|
21
|
+
|
22
|
+
|
23
|
+
## INSTALLATION:
|
24
|
+
|
25
|
+
Be sure you are running the latest version Chef 10. Versions earlier than 0.10.0
|
26
|
+
don't support plugins. This has not yet been tested with Chef 11.
|
27
|
+
|
28
|
+
gem install chef -v 10.24.0
|
29
|
+
|
30
|
+
This plugin is distributed as a Ruby Gem. To install it, run:
|
31
|
+
|
32
|
+
gem install knife-rightscale
|
33
|
+
|
34
|
+
Depending on your system's configuration, you may need to run this command with
|
35
|
+
root privileges.
|
36
|
+
|
37
|
+
## CONFIGURATION:
|
38
|
+
|
39
|
+
In order to communicate with the RightScale API you will have to tell Knife
|
40
|
+
about your RightScale account information. The easiest way to accomplish this
|
41
|
+
is to create some entries in your <tt>knife.rb</tt> file:
|
42
|
+
|
43
|
+
knife[:rightscale_user] = "you@yourdomain.com"
|
44
|
+
knife[:rightscale_password] = "supersecretpassword"
|
45
|
+
knife[:rightscale_account_id] = "1234"
|
46
|
+
|
47
|
+
If your knife.rb file will be checked into a SCM system (ie readable by others)
|
48
|
+
you may want to read the values from environment variables:
|
49
|
+
|
50
|
+
knife[:rightscale_user] = "#{ENV['RIGHTSCALE_EMAIL']}"
|
51
|
+
knife[:rightscale_password] = "#{ENV['RIGHTSCALE_PASSWORD']}"
|
52
|
+
|
53
|
+
You also have the option of passing your RightScale credentials into the
|
54
|
+
individual knife subcommands using the <tt>-A</tt> (or <tt>--rightscale-account-id</tt>),
|
55
|
+
<tt>-U</tt> (or <tt>--rightscale-user</tt>), <tt>-P</tt> (or <tt>--rightscale-password</tt>) command options
|
56
|
+
|
57
|
+
## Provision a Server
|
58
|
+
|
59
|
+
### List Clouds
|
60
|
+
This will list all the registered clouds available in your RightScale account:
|
61
|
+
|
62
|
+
knife rightscale cloud list
|
63
|
+
|
64
|
+
to filter by partial name match use ```-n``` or ```--name``` option
|
65
|
+
|
66
|
+
knife rightscale cloud list --name rackspace
|
67
|
+
|
68
|
+
### List ServerTemplates
|
69
|
+
List the ServerTemplates available in your account. Typically you will just want to find a Chef Client template. For example:
|
70
|
+
|
71
|
+
knife rightscale servertemplate list --name "Chef Client"
|
72
|
+
|
73
|
+
### Launch a server
|
74
|
+
To provision a new server, supply ServerTemplate choice and target cloud as options:
|
75
|
+
|
76
|
+
knife rightscale server create \
|
77
|
+
--cloud "Rackspace Open Cloud - Chicago" \
|
78
|
+
--server-template "Chef Client (v13.4)" \
|
79
|
+
--deployment "CKP: My Sandbox" \
|
80
|
+
--name "CKP:ChefClient" \
|
81
|
+
--input "chef/client/server_url":"text:https://api.opscode.com/organizations/kindsol" \
|
82
|
+
--input "chef/client/validation_name":"cred:CKP: validation_client_name" \
|
83
|
+
--input "chef/client/validator_pem":"cred:CKP:validator.pem" \
|
84
|
+
--input "chef/client/node_name":"text:MyChefClient" \
|
85
|
+
--input "chef/client/roles":"text:hello_world"
|
86
|
+
|
87
|
+
The server with a name specified by the ```--name``` option will be created in the specified ```--deployment```. If the deployment is not found, it will be created. You can supply ServerTemplate inputs values using the ```--input``` option, which can be specified multiple times as shown.
|
88
|
+
|
89
|
+
The ```--server-template``` option can pass either an name or ID.
|
90
|
+
|
91
|
+
For a list of all possible options run:
|
92
|
+
|
93
|
+
knife rightscale server create --help
|
94
|
+
|
95
|
+
### Delete Server
|
96
|
+
Once done with the server, you can terminate and delete it using:
|
97
|
+
|
98
|
+
knife rightscale server delete SERVER_NAME
|
99
|
+
|
100
|
+
use the ```--yes``` option to bypass confirmation.
|
101
|
+
|
102
|
+
|
103
|
+
## OTHER SUBCOMMANDS:
|
104
|
+
|
105
|
+
Some other subcommands that can be useful for provisioning servers are listed
|
106
|
+
below. These are intended to query possible options that you can pass to the
|
107
|
+
server create command.
|
108
|
+
|
109
|
+
All supported command options can be found by invoking:
|
110
|
+
|
111
|
+
knife rightscale --help
|
112
|
+
|
113
|
+
Specific details for each command can be found by passing the ```--help```
|
114
|
+
option the the subcommand. For example:
|
115
|
+
|
116
|
+
knife rightscale <subcommand> --help
|
117
|
+
|
118
|
+
|
119
|
+
### List Images
|
120
|
+
List the supported images for a given ServerTemplate and target cloud
|
121
|
+
|
122
|
+
knife rightscale image list \
|
123
|
+
--server-template "Chef Client (v13.4)" \
|
124
|
+
--cloud "Rackspace Open Cloud - Chicago"
|
125
|
+
|
126
|
+
This will also indicate the default Instance Type or flavor for each image.
|
127
|
+
|
128
|
+
|
129
|
+
### List Deployments
|
130
|
+
To list all the deployments available in your RightScale account:
|
131
|
+
|
132
|
+
knife rightscale deployment list
|
133
|
+
|
134
|
+
to filter by partial name match use the ```--name``` option
|
135
|
+
|
136
|
+
|
137
|
+
### List Security Groups
|
138
|
+
To list all the Security Groups available per cloud:
|
139
|
+
|
140
|
+
knife rightscale securitygroup list
|
141
|
+
|
142
|
+
to filter by partial name match use the ```--name``` option or narrow the
|
143
|
+
results using the ```--cloud``` option
|
144
|
+
|
145
|
+
|
146
|
+
### List Servers
|
147
|
+
To list all the servers in your RightScale account:
|
148
|
+
|
149
|
+
knife rightscale server list
|
150
|
+
|
151
|
+
to filter by partial name match use the ```--name``` option
|
152
|
+
|
153
|
+
|
154
|
+
## FUTURE FEATURES
|
155
|
+
* create action
|
156
|
+
* ability to select image other than the default image on ServerTemplate
|
157
|
+
* ability to select instance type other than default (needed for cloudstack)
|
158
|
+
* add support for instance type (list and for server create)
|
159
|
+
* add support for datacents/zone type (list and for server create)
|
160
|
+
** Private beta
|
161
|
+
* display audit entry when server strands
|
162
|
+
* ability to add server tags on create
|
163
|
+
* server array create action
|
164
|
+
* add timeout for operational
|
165
|
+
* credentials list action (waiting for new API release)
|
166
|
+
* add VPC support to create action
|
167
|
+
|
168
|
+
|
169
|
+
## LICENSE:
|
170
|
+
|
171
|
+
Author:: Cary Penniman (<cary@rightscale.com>)
|
172
|
+
Copyright:: Copyright (c) 2013 RightScale, Inc.
|
173
|
+
License:: Apache License, Version 2.0
|
174
|
+
See attribution notice in README.md
|
175
|
+
|
176
|
+
This readme is modified from the knife-ec2 plugin project code
|
177
|
+
That project is located at https://github.com/opscode/knife-ec2
|
178
|
+
Author:: Adam Jacob (<adam@opscode.com>)
|
179
|
+
Copyright:: Copyright (c) 2009-2011 Opscode, Inc.
|
180
|
+
|
181
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
182
|
+
you may not use this file except in compliance with the License.
|
183
|
+
You may obtain a copy of the License at
|
184
|
+
|
185
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
186
|
+
|
187
|
+
Unless required by applicable law or agreed to in writing, software
|
188
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
189
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
190
|
+
See the License for the specific language governing permissions and
|
191
|
+
limitations under the License.
|
data/Rakefile
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
|
3
|
+
#
|
4
|
+
# Author:: Cary Penniman (<cary@rightscale.com>)
|
5
|
+
# Copyright:: Copyright (c) 2013 RightScale, Inc.
|
6
|
+
# License:: Apache License, Version 2.0
|
7
|
+
#
|
8
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
# you may not use this file except in compliance with the License.
|
10
|
+
# You may obtain a copy of the License at
|
11
|
+
#
|
12
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
#
|
14
|
+
# Unless required by applicable law or agreed to in writing, software
|
15
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
# See the License for the specific language governing permissions and
|
18
|
+
# limitations under the License.
|
19
|
+
#
|
20
|
+
require 'rspec/core/rake_task'
|
21
|
+
|
22
|
+
desc "Run all specs in spec directory"
|
23
|
+
RSpec::Core::RakeTask.new(:spec) do |t|
|
24
|
+
t.pattern = 'spec/**/*_spec.rb'
|
25
|
+
end
|
26
|
+
|
27
|
+
desc "Run functional tests. Requires RightScale account information in knife.rb file."
|
28
|
+
RSpec::Core::RakeTask.new(:test) do |t|
|
29
|
+
t.pattern = 'test/**/*_test.rb'
|
30
|
+
end
|
31
|
+
|
32
|
+
task :default => :spec
|