kitchen-oci 1.10.0 → 1.12.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 +4 -4
- data/CHANGELOG.md +17 -0
- data/Gemfile +14 -0
- data/LICENSE +177 -10
- data/NOTICE +96 -0
- data/README.md +43 -0
- data/Rakefile +14 -0
- data/kitchen-oci.gemspec +15 -1
- data/lib/kitchen/driver/oci.rb +50 -15
- data/lib/kitchen/driver/oci_version.rb +1 -1
- data/tpl/setup_winrm.ps1.erb +14 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11ed05e70686843c964b5c60daa05f4c51401c744a2888b4720835e4ae5995ed
|
4
|
+
data.tar.gz: d5a53b2b2c15be6f8bf2c85b4fbdf96fc8491c7c7bcb14a499861663d9748384
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 599edf15843fd3307cfa19ff36a256739fa39d3e692a7851fb047570e9e1dd4697ab4b6805479c99932bddd198a165718807316d60921265e3d53d07d7206ba7
|
7
|
+
data.tar.gz: c053a1aca424b140bfee1c7e30ffb40f5420c296e4820cd5321033d3b9e00a75103454adbb73780f2479a12ccde4fff4de94c9d26ab779b1b5feb91e069ab633
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,21 @@
|
|
1
1
|
|
2
|
+
## 1.12.0
|
3
|
+
- Added support for Flex and Preemptible instances
|
4
|
+
- Set dependency on oci gem to 2.14.0
|
5
|
+
- Further reduction of characters known to cause winrm password issues
|
6
|
+
|
7
|
+
## 1.11.2
|
8
|
+
- Set dependency on oci gem to 2.10.0
|
9
|
+
|
10
|
+
## 1.11.1
|
11
|
+
- Removed characters from password string known to break winrm
|
12
|
+
|
13
|
+
## 1.11.0
|
14
|
+
- Added support for user_data raw string
|
15
|
+
|
16
|
+
## 1.10.1 Issue 22
|
17
|
+
- Added safeguard for cluster_name length restriction in DBaaS.
|
18
|
+
|
2
19
|
## 1.10.0 DBaaS support
|
3
20
|
- Added support for DBaaS.
|
4
21
|
- instance_type is new optional parameter (compute or dbaas)
|
data/Gemfile
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# Copyright 2020 Stephen Pearson <stephen.pearson@oracle.com>
|
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.
|
16
|
+
|
3
17
|
source 'https://rubygems.org'
|
4
18
|
|
5
19
|
gemspec
|
data/LICENSE
CHANGED
@@ -1,15 +1,182 @@
|
|
1
1
|
Author:: Stephen Pearson (<stephen.pearson@oracle.com>)
|
2
2
|
|
3
|
-
Copyright (C)
|
3
|
+
Copyright (C) 2020, Stephen Pearson
|
4
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
5
|
|
9
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
10
6
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
7
|
+
Apache License
|
8
|
+
Version 2.0, January 2004
|
9
|
+
http://www.apache.org/licenses/
|
10
|
+
|
11
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
12
|
+
|
13
|
+
1. Definitions.
|
14
|
+
|
15
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
16
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
17
|
+
|
18
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
19
|
+
the copyright owner that is granting the License.
|
20
|
+
|
21
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
22
|
+
other entities that control, are controlled by, or are under common
|
23
|
+
control with that entity. For the purposes of this definition,
|
24
|
+
"control" means (i) the power, direct or indirect, to cause the
|
25
|
+
direction or management of such entity, whether by contract or
|
26
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
27
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
28
|
+
|
29
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
30
|
+
exercising permissions granted by this License.
|
31
|
+
|
32
|
+
"Source" form shall mean the preferred form for making modifications,
|
33
|
+
including but not limited to software source code, documentation
|
34
|
+
source, and configuration files.
|
35
|
+
|
36
|
+
"Object" form shall mean any form resulting from mechanical
|
37
|
+
transformation or translation of a Source form, including but
|
38
|
+
not limited to compiled object code, generated documentation,
|
39
|
+
and conversions to other media types.
|
40
|
+
|
41
|
+
"Work" shall mean the work of authorship, whether in Source or
|
42
|
+
Object form, made available under the License, as indicated by a
|
43
|
+
copyright notice that is included in or attached to the work
|
44
|
+
(an example is provided in the Appendix below).
|
45
|
+
|
46
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
47
|
+
form, that is based on (or derived from) the Work and for which the
|
48
|
+
editorial revisions, annotations, elaborations, or other modifications
|
49
|
+
represent, as a whole, an original work of authorship. For the purposes
|
50
|
+
of this License, Derivative Works shall not include works that remain
|
51
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
52
|
+
the Work and Derivative Works thereof.
|
53
|
+
|
54
|
+
"Contribution" shall mean any work of authorship, including
|
55
|
+
the original version of the Work and any modifications or additions
|
56
|
+
to that Work or Derivative Works thereof, that is intentionally
|
57
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
58
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
59
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
60
|
+
means any form of electronic, verbal, or written communication sent
|
61
|
+
to the Licensor or its representatives, including but not limited to
|
62
|
+
communication on electronic mailing lists, source code control systems,
|
63
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
64
|
+
Licensor for the purpose of discussing and improving the Work, but
|
65
|
+
excluding communication that is conspicuously marked or otherwise
|
66
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
67
|
+
|
68
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
69
|
+
on behalf of whom a Contribution has been received by Licensor and
|
70
|
+
subsequently incorporated within the Work.
|
71
|
+
|
72
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
73
|
+
this License, each Contributor hereby grants to You a perpetual,
|
74
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
75
|
+
copyright license to reproduce, prepare Derivative Works of,
|
76
|
+
publicly display, publicly perform, sublicense, and distribute the
|
77
|
+
Work and such Derivative Works in Source or Object form.
|
78
|
+
|
79
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
80
|
+
this License, each Contributor hereby grants to You a perpetual,
|
81
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
82
|
+
(except as stated in this section) patent license to make, have made,
|
83
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
84
|
+
where such license applies only to those patent claims licensable
|
85
|
+
by such Contributor that are necessarily infringed by their
|
86
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
87
|
+
with the Work to which such Contribution(s) was submitted. If You
|
88
|
+
institute patent litigation against any entity (including a
|
89
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
90
|
+
or a Contribution incorporated within the Work constitutes direct
|
91
|
+
or contributory patent infringement, then any patent licenses
|
92
|
+
granted to You under this License for that Work shall terminate
|
93
|
+
as of the date such litigation is filed.
|
94
|
+
|
95
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
96
|
+
Work or Derivative Works thereof in any medium, with or without
|
97
|
+
modifications, and in Source or Object form, provided that You
|
98
|
+
meet the following conditions:
|
99
|
+
|
100
|
+
(a) You must give any other recipients of the Work or
|
101
|
+
Derivative Works a copy of this License; and
|
102
|
+
|
103
|
+
(b) You must cause any modified files to carry prominent notices
|
104
|
+
stating that You changed the files; and
|
105
|
+
|
106
|
+
(c) You must retain, in the Source form of any Derivative Works
|
107
|
+
that You distribute, all copyright, patent, trademark, and
|
108
|
+
attribution notices from the Source form of the Work,
|
109
|
+
excluding those notices that do not pertain to any part of
|
110
|
+
the Derivative Works; and
|
111
|
+
|
112
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
113
|
+
distribution, then any Derivative Works that You distribute must
|
114
|
+
include a readable copy of the attribution notices contained
|
115
|
+
within such NOTICE file, excluding those notices that do not
|
116
|
+
pertain to any part of the Derivative Works, in at least one
|
117
|
+
of the following places: within a NOTICE text file distributed
|
118
|
+
as part of the Derivative Works; within the Source form or
|
119
|
+
documentation, if provided along with the Derivative Works; or,
|
120
|
+
within a display generated by the Derivative Works, if and
|
121
|
+
wherever such third-party notices normally appear. The contents
|
122
|
+
of the NOTICE file are for informational purposes only and
|
123
|
+
do not modify the License. You may add Your own attribution
|
124
|
+
notices within Derivative Works that You distribute, alongside
|
125
|
+
or as an addendum to the NOTICE text from the Work, provided
|
126
|
+
that such additional attribution notices cannot be construed
|
127
|
+
as modifying the License.
|
128
|
+
|
129
|
+
You may add Your own copyright statement to Your modifications and
|
130
|
+
may provide additional or different license terms and conditions
|
131
|
+
for use, reproduction, or distribution of Your modifications, or
|
132
|
+
for any such Derivative Works as a whole, provided Your use,
|
133
|
+
reproduction, and distribution of the Work otherwise complies with
|
134
|
+
the conditions stated in this License.
|
135
|
+
|
136
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
137
|
+
any Contribution intentionally submitted for inclusion in the Work
|
138
|
+
by You to the Licensor shall be under the terms and conditions of
|
139
|
+
this License, without any additional terms or conditions.
|
140
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
141
|
+
the terms of any separate license agreement you may have executed
|
142
|
+
with Licensor regarding such Contributions.
|
143
|
+
|
144
|
+
6. Trademarks. This License does not grant permission to use the trade
|
145
|
+
names, trademarks, service marks, or product names of the Licensor,
|
146
|
+
except as required for reasonable and customary use in describing the
|
147
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
148
|
+
|
149
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
150
|
+
agreed to in writing, Licensor provides the Work (and each
|
151
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
152
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
153
|
+
implied, including, without limitation, any warranties or conditions
|
154
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
155
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
156
|
+
appropriateness of using or redistributing the Work and assume any
|
157
|
+
risks associated with Your exercise of permissions under this License.
|
158
|
+
|
159
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
160
|
+
whether in tort (including negligence), contract, or otherwise,
|
161
|
+
unless required by applicable law (such as deliberate and grossly
|
162
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
163
|
+
liable to You for damages, including any direct, indirect, special,
|
164
|
+
incidental, or consequential damages of any character arising as a
|
165
|
+
result of this License or out of the use or inability to use the
|
166
|
+
Work (including but not limited to damages for loss of goodwill,
|
167
|
+
work stoppage, computer failure or malfunction, or any and all
|
168
|
+
other commercial damages or losses), even if such Contributor
|
169
|
+
has been advised of the possibility of such damages.
|
170
|
+
|
171
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
172
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
173
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
174
|
+
or other liability obligations and/or rights consistent with this
|
175
|
+
License. However, in accepting such obligations, You may act only
|
176
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
177
|
+
of any other Contributor, and only if You agree to indemnify,
|
178
|
+
defend, and hold each Contributor harmless for any liability
|
179
|
+
incurred by, or claims asserted against, such Contributor by reason
|
180
|
+
of your accepting any such warranty or additional liability.
|
181
|
+
|
182
|
+
END OF TERMS AND CONDITIONS
|
data/NOTICE
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
LICENSING INFORMATION
|
2
|
+
---------------------
|
3
|
+
|
4
|
+
This code has dependencies upon oci-ruby-sdk and Chef Kitchen
|
5
|
+
|
6
|
+
oci-ruby-sdk: https://github.com/oracle/oci-ruby-sdk (Universal Permissive License, or Apache License 2.0)
|
7
|
+
chef-dk : https://github.com/chef/chef-dk (Apache License 2.0)
|
8
|
+
|
9
|
+
LICENSES
|
10
|
+
--------
|
11
|
+
|
12
|
+
Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
13
|
+
|
14
|
+
This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 or Apache License 2.0. See below for license terms. You may choose either license.
|
15
|
+
____________________________
|
16
|
+
The Universal Permissive License (UPL), Version 1.0
|
17
|
+
Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
18
|
+
|
19
|
+
Subject to the condition set forth below, permission is hereby granted to any person obtaining a copy of this software, associated documentation and/or data (collectively the "Software"), free of charge and under any and all copyright rights in the Software, and any and all patent rights owned or freely licensable by each licensor hereunder covering either (i) the unmodified Software as contributed to or provided by such licensor, or (ii) the Larger Works (as defined below), to deal in both
|
20
|
+
|
21
|
+
(a) the Software, and
|
22
|
+
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if one is included with the Software (each a "Larger Work" to which the Software is contributed by such licensors),
|
23
|
+
|
24
|
+
without restriction, including without limitation the rights to copy, create derivative works of, display, perform, and distribute the Software and make, use, sell, offer for sale, import, export, have made, and have sold the Software and the Larger Work(s), and to sublicense the foregoing rights on either these or other terms.
|
25
|
+
|
26
|
+
This license is subject to the following condition:
|
27
|
+
|
28
|
+
The above copyright notice and either this complete permission notice or at a minimum a reference to the UPL must be included in all copies or substantial portions of the Software.
|
29
|
+
|
30
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
31
|
+
|
32
|
+
The Apache Software License, Version 2.0
|
33
|
+
Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
34
|
+
|
35
|
+
Licensed under the Apache License, Version 2.0 (the "License"); You may not use this product except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. A copy of the license is also reproduced below. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
36
|
+
|
37
|
+
Apache License
|
38
|
+
|
39
|
+
Version 2.0, January 2004
|
40
|
+
|
41
|
+
http://www.apache.org/licenses/
|
42
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
43
|
+
1. Definitions.
|
44
|
+
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
45
|
+
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
46
|
+
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
47
|
+
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
48
|
+
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
49
|
+
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
50
|
+
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
51
|
+
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
52
|
+
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
53
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
54
|
+
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
55
|
+
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
56
|
+
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
57
|
+
You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
58
|
+
You must cause any modified files to carry prominent notices stating that You changed the files; and
|
59
|
+
You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
60
|
+
If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
61
|
+
|
62
|
+
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
63
|
+
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
64
|
+
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
65
|
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
66
|
+
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
67
|
+
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
68
|
+
END OF TERMS AND CONDITIONS
|
69
|
+
|
70
|
+
APPENDIX: How to apply the Apache License to your work.
|
71
|
+
|
72
|
+
To apply the Apache License to your work, attach the following
|
73
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
74
|
+
replaced with your own identifying information. (Don't include
|
75
|
+
the brackets!) The text should be enclosed in the appropriate
|
76
|
+
comment syntax for the file format. We also recommend that a
|
77
|
+
file or class name and description of purpose be included on the
|
78
|
+
same "printed page" as the copyright notice for easier
|
79
|
+
identification within third-party archives.
|
80
|
+
|
81
|
+
Copyright [yyyy] [name of copyright owner]
|
82
|
+
|
83
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
84
|
+
you may not use this file except in compliance with the License.
|
85
|
+
You may obtain a copy of the License at
|
86
|
+
|
87
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
88
|
+
|
89
|
+
Unless required by applicable law or agreed to in writing, software
|
90
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
91
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
92
|
+
See the License for the specific language governing permissions and
|
93
|
+
limitations under the License.
|
94
|
+
|
95
|
+
|
96
|
+
|
data/README.md
CHANGED
@@ -84,6 +84,11 @@ These settings are optional:
|
|
84
84
|
- `hostname_prefix`, Prefix for the generated hostnames (note that OCI doesn't like underscores)
|
85
85
|
- `freeform_tags`, Hash containing tag name(s) and values(s)
|
86
86
|
- `use_instance_principals`, Boolean flag indicated whether Instance Principals should be used as credentials (see below)
|
87
|
+
- `preemptible_instance`, Boolean flag to indicate if the compute instance should be preemptible, default is `false`.
|
88
|
+
- `shape_config`, Hash of shape config parameters required when using Flex shapes.
|
89
|
+
- `ocpus`, number of CPUs requested
|
90
|
+
- `memory_in_gbs`, the amount of memory requested
|
91
|
+
- `baseline_ocpu_utilization`, the minimum CPU utilization, default `BASELINE_1_1`
|
87
92
|
|
88
93
|
Optional settings for WinRM support in Windows:
|
89
94
|
|
@@ -188,6 +193,15 @@ The `filename` parameter must be specified for each entry, and determines the de
|
|
188
193
|
|
189
194
|
The scripts will be encoded into a gzipped, base64 encoded multipart mime message and added as user data when launching the instance.
|
190
195
|
|
196
|
+
Alternately, if you simply pass a string to the user_data, it will be base64 encoded and add as user data when launching the instance.
|
197
|
+
|
198
|
+
```yml
|
199
|
+
user_data: |
|
200
|
+
login: user1
|
201
|
+
uid: 1000
|
202
|
+
gid: 1000
|
203
|
+
```
|
204
|
+
|
191
205
|
## Proxy support
|
192
206
|
|
193
207
|
If running Kitchen on a private subnet with no public IPs permitted, it may be necessary to connect to the OCI API via a web proxy. The proxy URL can either be specified on the command line:
|
@@ -217,6 +231,35 @@ transport:
|
|
217
231
|
|
218
232
|
See also the section above on Instance Principals if you plan to use a proxy in conjunction with a proxy. The proxy needs to be avoided when accessing the metadata address.
|
219
233
|
|
234
|
+
## Preemptible Instances
|
235
|
+
|
236
|
+
This will allow you to create a [preemptible instance](https://docs.oracle.com/en-us/iaas/Content/Compute/Concepts/preemptible.htm). Preemptible instances behave the same as regular compute instances, but the capacity is reclaimed when it's needed elsewhere, and the instances are terminated. If your workloads are fault-tolerant and can withstand interruptions, then preemptible instances can reduce your costs.
|
237
|
+
|
238
|
+
```yml
|
239
|
+
---
|
240
|
+
driver:
|
241
|
+
name: oci
|
242
|
+
...
|
243
|
+
preemptible_instance: true
|
244
|
+
...
|
245
|
+
```
|
246
|
+
|
247
|
+
## Flex Shape Instances
|
248
|
+
|
249
|
+
This will allow you to launch a flexible shape instance. A flexible shape lets you customize the number of CPUs and memory available when launching or resizing the VM. Note that there are smaller number of shapes available and the image ocid must also be compatible. Please consult [OCI documentation](https://docs.oracle.com/en-us/iaas/Content/Compute/References/computeshapes.htm#flexible) to ensure the proper combination of shape and image ocid.
|
250
|
+
|
251
|
+
```yml
|
252
|
+
---
|
253
|
+
driver:
|
254
|
+
name: oci
|
255
|
+
...
|
256
|
+
shape_config:
|
257
|
+
ocpus: 2
|
258
|
+
memory_in_gbs: 8
|
259
|
+
baseline_ocpu_utilization: BASELINE_1_1
|
260
|
+
...
|
261
|
+
```
|
262
|
+
|
220
263
|
## Windows Support
|
221
264
|
|
222
265
|
When launching Oracle provided Windows images, it may be helpful to allow kitchen-oci to inject powershell to configure WinRM and to set a randomized password that does not need to be changed on first login. If the `setup_winrm` parameter is set to true then the following steps will happen:
|
data/Rakefile
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# Copyright 2020 Stephen Pearson <stephen.pearson@oracle.com>
|
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.
|
16
|
+
|
3
17
|
require 'bundler/gem_tasks'
|
4
18
|
require 'cane/rake_task'
|
5
19
|
require 'tailor/rake_task'
|
data/kitchen-oci.gemspec
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# Copyright 2020 Stephen Pearson <stephen.pearson@oracle.com>
|
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.
|
16
|
+
|
3
17
|
lib = File.expand_path('lib', __dir__)
|
4
18
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
19
|
require 'kitchen/driver/oci_version'
|
@@ -21,7 +35,7 @@ Gem::Specification.new do |spec|
|
|
21
35
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
22
36
|
spec.require_paths = ['lib']
|
23
37
|
|
24
|
-
spec.add_dependency 'oci', '~> 2.
|
38
|
+
spec.add_dependency 'oci', '~> 2.14.0'
|
25
39
|
spec.add_dependency 'test-kitchen'
|
26
40
|
|
27
41
|
spec.add_development_dependency 'bundler'
|
data/lib/kitchen/driver/oci.rb
CHANGED
@@ -47,7 +47,7 @@ module Kitchen
|
|
47
47
|
default_config :ssh_keypath, default_keypath
|
48
48
|
default_config :post_create_script, nil
|
49
49
|
default_config :proxy_url, nil
|
50
|
-
default_config :user_data,
|
50
|
+
default_config :user_data, nil
|
51
51
|
default_config :freeform_tags, {}
|
52
52
|
|
53
53
|
# compute config items
|
@@ -59,6 +59,8 @@ module Kitchen
|
|
59
59
|
default_config :winrm_user, 'opc'
|
60
60
|
default_config :winrm_password, nil
|
61
61
|
default_config :use_instance_principals, false
|
62
|
+
default_config :preemptible_instance, false
|
63
|
+
default_config :shape_config, {}
|
62
64
|
|
63
65
|
# dbaas config items
|
64
66
|
default_config :dbaas, {}
|
@@ -223,7 +225,7 @@ module Kitchen
|
|
223
225
|
[prefix, random_hostname(instance.name)].compact.join('-')
|
224
226
|
elsif instance_type == 'dbaas'
|
225
227
|
# 30 character limit for hostname in DBaaS
|
226
|
-
if prefix.length
|
228
|
+
if prefix.length >= 30
|
227
229
|
[prefix[0, 26], 'db1'].compact.join('-')
|
228
230
|
else
|
229
231
|
[prefix, random_string(25 - prefix.length), 'db1'].compact.join('-')
|
@@ -237,7 +239,7 @@ module Kitchen
|
|
237
239
|
|
238
240
|
def random_password
|
239
241
|
if instance_type == 'compute'
|
240
|
-
special_chars = %w[
|
242
|
+
special_chars = %w[@ - ( ) .]
|
241
243
|
elsif instance_type == 'dbaas'
|
242
244
|
special_chars = %w[# _ -]
|
243
245
|
end
|
@@ -279,12 +281,12 @@ module Kitchen
|
|
279
281
|
metadata = {}
|
280
282
|
metadata.store('ssh_authorized_keys', pubkey)
|
281
283
|
data = user_data
|
282
|
-
metadata.store('user_data', data) if config[:user_data].
|
284
|
+
metadata.store('user_data', data) if config[:user_data] && !config[:user_data].empty?
|
283
285
|
request.metadata = metadata
|
284
286
|
request
|
285
287
|
end
|
286
288
|
|
287
|
-
def compute_launch_details
|
289
|
+
def compute_launch_details # rubocop:disable Metrics/MethodLength
|
288
290
|
OCI::Core::Models::LaunchInstanceDetails.new.tap do |l|
|
289
291
|
hostname = generate_hostname
|
290
292
|
l.availability_domain = config[:availability_domain]
|
@@ -294,6 +296,8 @@ module Kitchen
|
|
294
296
|
l.shape = config[:shape]
|
295
297
|
l.create_vnic_details = create_vnic_details(hostname)
|
296
298
|
l.freeform_tags = process_freeform_tags(config[:freeform_tags])
|
299
|
+
l.preemptible_instance_config = preemptible_instance_config if config[:preemptible_instance]
|
300
|
+
l.shape_config = shape_config unless config[:shape_config].empty?
|
297
301
|
end
|
298
302
|
end
|
299
303
|
|
@@ -304,6 +308,23 @@ module Kitchen
|
|
304
308
|
)
|
305
309
|
end
|
306
310
|
|
311
|
+
def preemptible_instance_config
|
312
|
+
OCI::Core::Models::PreemptibleInstanceConfigDetails.new(
|
313
|
+
preemption_action:
|
314
|
+
OCI::Core::Models::TerminatePreemptionAction.new(
|
315
|
+
type: 'TERMINATE', preserve_boot_volume: true
|
316
|
+
)
|
317
|
+
)
|
318
|
+
end
|
319
|
+
|
320
|
+
def shape_config
|
321
|
+
OCI::Core::Models::LaunchInstanceShapeConfigDetails.new(
|
322
|
+
ocpus: config[:shape_config][:ocpus],
|
323
|
+
memory_in_gbs: config[:shape_config][:memory_in_gbs],
|
324
|
+
baseline_ocpu_utilization: config[:shape_config][:baseline_ocpu_utilization] || 'BASELINE_1_1'
|
325
|
+
)
|
326
|
+
end
|
327
|
+
|
307
328
|
def create_vnic_details(name)
|
308
329
|
OCI::Core::Models::CreateVnicDetails.new(
|
309
330
|
assign_public_ip: public_ip_allowed?,
|
@@ -379,15 +400,19 @@ module Kitchen
|
|
379
400
|
msg
|
380
401
|
end
|
381
402
|
|
382
|
-
def user_data
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
403
|
+
def user_data # rubocop:disable Metrics/MethodLength
|
404
|
+
if config[:user_data].is_a? Array
|
405
|
+
boundary = "MIMEBOUNDARY_#{random_string(20)}"
|
406
|
+
msg = ["Content-Type: multipart/mixed; boundary=\"#{boundary}\"",
|
407
|
+
'MIME-Version: 1.0', '']
|
408
|
+
msg += mime_parts(boundary)
|
409
|
+
txt = msg.join("\n") + "\n"
|
410
|
+
gzip = Zlib::GzipWriter.new(StringIO.new)
|
411
|
+
gzip << txt
|
412
|
+
Base64.encode64(gzip.close.string).delete("\n")
|
413
|
+
elsif config[:user_data].is_a? String
|
414
|
+
Base64.encode64(config[:user_data]).delete("\n")
|
415
|
+
end
|
391
416
|
end
|
392
417
|
|
393
418
|
#################
|
@@ -423,7 +448,7 @@ module Kitchen
|
|
423
448
|
l.hostname = generate_hostname
|
424
449
|
l.shape = config[:shape]
|
425
450
|
l.ssh_public_keys = pubkey
|
426
|
-
l.cluster_name =
|
451
|
+
l.cluster_name = generate_cluster_name
|
427
452
|
l.initial_data_storage_size_in_gb = initial_data_storage_size_in_gb
|
428
453
|
l.node_count = 1
|
429
454
|
l.license_model = license_model
|
@@ -466,6 +491,16 @@ module Kitchen
|
|
466
491
|
end
|
467
492
|
end
|
468
493
|
|
494
|
+
def generate_cluster_name
|
495
|
+
prefix = config[:hostname_prefix].split('-')[0]
|
496
|
+
# 11 character limit for cluster_name in DBaaS
|
497
|
+
if prefix.length >= 11
|
498
|
+
prefix[0, 11]
|
499
|
+
else
|
500
|
+
[prefix, random_string(10 - prefix.length)].compact.join('-')
|
501
|
+
end
|
502
|
+
end
|
503
|
+
|
469
504
|
def dbaas_node(instance_id)
|
470
505
|
dbaas_api.list_db_nodes(
|
471
506
|
config[:compartment_id],
|
data/tpl/setup_winrm.ps1.erb
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
#ps1_sysnative
|
2
2
|
|
3
|
+
# Copyright 2020 Stephen Pearson <stephen.pearson@oracle.com>
|
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.
|
16
|
+
|
3
17
|
Write-Output "Setting <%= state[:username] %> password"
|
4
18
|
net user <%= state[:username] %> '<%= state[:password] %>'
|
5
19
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-oci
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen Pearson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oci
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
19
|
+
version: 2.14.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.
|
26
|
+
version: 2.14.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: test-kitchen
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,6 +122,7 @@ files:
|
|
122
122
|
- CHANGELOG.md
|
123
123
|
- Gemfile
|
124
124
|
- LICENSE
|
125
|
+
- NOTICE
|
125
126
|
- README.md
|
126
127
|
- Rakefile
|
127
128
|
- kitchen-oci.gemspec
|