kitchen-oci 1.8.0 → 1.11.1
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/.rubocop.yml +5 -0
- data/CHANGELOG.md +19 -0
- data/Gemfile +14 -0
- data/LICENSE +177 -10
- data/NOTICE +96 -0
- data/README.md +135 -72
- data/Rakefile +14 -0
- data/kitchen-oci.gemspec +15 -1
- data/lib/kitchen/driver/oci.rb +294 -111
- data/lib/kitchen/driver/oci_version.rb +1 -1
- data/tpl/setup_winrm.ps1.erb +14 -0
- metadata +9 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f9e64008af5bf37b300fd76d2b90497f085a0ed6e4c0ebd5687ba47fa193c8f
|
4
|
+
data.tar.gz: 4f55d33abaa7fea4c4051474e51ee2cfc479faf48d1bd2c921d4c9377c83bc82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6d42a6f5c2b9cc4c739c1497b6a0c374e2d1c190b67827f974202219a1d94066738431bfa1613c42f15be495ccb566aa2df42566ed5f6765b7ccfb378978c91
|
7
|
+
data.tar.gz: 8406d87165bba80b0a0f13204d7057542f30144fb29885c1464373668e72191a941dafa6fff5785acc24370cf9a2b1cce5cd8f6d0d10e0d649c5b8d2a7675f9e
|
data/.rubocop.yml
ADDED
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,20 @@
|
|
1
1
|
|
2
|
+
## 1.11.1
|
3
|
+
- Removed characters from password string known to break winrm
|
4
|
+
|
5
|
+
## 1.11.0
|
6
|
+
- Added support for user_data raw string
|
7
|
+
|
8
|
+
## 1.10.1 Issue 22
|
9
|
+
- Added safeguard for cluster_name length restriction in DBaaS.
|
10
|
+
|
11
|
+
## 1.10.0 DBaaS support
|
12
|
+
- Added support for DBaaS.
|
13
|
+
- instance_type is new optional parameter (compute or dbaas)
|
14
|
+
|
15
|
+
## 1.9.0 Use instance principals
|
16
|
+
- Added support for `use_instance_principals`
|
17
|
+
|
2
18
|
## 1.8.0 Freeform tags
|
3
19
|
- Added optional parameter `freeform_tags`
|
4
20
|
|
@@ -11,3 +27,6 @@
|
|
11
27
|
- Added support for Windows targets.
|
12
28
|
- Can inject powershell script to set a random password and enable WinRM
|
13
29
|
|
30
|
+
|
31
|
+
steele.justin@gmail.com
|
32
|
+
3s!T8mRb6xbz%y
|
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
@@ -1,6 +1,6 @@
|
|
1
1
|
# Kitchen::OCI
|
2
2
|
|
3
|
-
A Test Kitchen Driver for Oracle
|
3
|
+
A Test Kitchen Driver for Oracle Cloud Infrastructure (OCI)
|
4
4
|
|
5
5
|
## Prerequisites
|
6
6
|
|
@@ -10,7 +10,7 @@ overridden in .kitchen.yml.
|
|
10
10
|
|
11
11
|
You need to create suitable configuration for OCI in ~/.oci/config and this
|
12
12
|
can be created using the CLI:
|
13
|
-
```
|
13
|
+
```bash
|
14
14
|
oci setup config
|
15
15
|
```
|
16
16
|
|
@@ -20,133 +20,194 @@ pull the Chef binaries.
|
|
20
20
|
|
21
21
|
## Building the gem
|
22
22
|
|
23
|
-
|
23
|
+
This step is only necessary if you wish to make local modifications. The gem
|
24
|
+
has already been published to rubygems.org.
|
25
|
+
|
26
|
+
```bash
|
24
27
|
rake build
|
25
28
|
```
|
26
29
|
|
27
30
|
## Installing the gem
|
28
31
|
|
29
|
-
You must install the gem into whatever Ruby is used to run
|
32
|
+
You must install the gem into whatever Ruby is used to run kitchen. On a
|
30
33
|
workstation this will likely be the ChefDK environment. To switch to
|
31
34
|
ChefDK if you haven't already:
|
32
35
|
|
33
|
-
```
|
36
|
+
```bash
|
34
37
|
eval "$(chef shell-init bash)"
|
35
38
|
```
|
36
39
|
|
37
|
-
|
40
|
+
You can install the gem from RubyGems.org with:
|
38
41
|
|
42
|
+
```bash
|
43
|
+
gem install kitchen-oci
|
39
44
|
```
|
45
|
+
|
46
|
+
To install a gem you built yourself:
|
47
|
+
|
48
|
+
```bash
|
40
49
|
gem install pkg/kitchen-oci-<VERSION>.gem
|
41
50
|
```
|
42
51
|
|
43
52
|
## Example .kitchen.yml
|
44
53
|
|
45
|
-
Adjust below template as required. The following configuration is mandatory:
|
54
|
+
Adjust below template as required. The following configuration is mandatory for all instance types:
|
55
|
+
|
56
|
+
- `compartment_id`
|
57
|
+
- `availability_domain`
|
58
|
+
- `shape`
|
59
|
+
- `subnet_id`
|
46
60
|
|
47
|
-
|
48
|
-
|
49
|
-
-
|
50
|
-
|
51
|
-
|
61
|
+
There is an additional configuration item that allows for toggling instance types. If this item is not included, it defaults to `compute`.
|
62
|
+
|
63
|
+
- Permitted values of `instance_type`:
|
64
|
+
- compute
|
65
|
+
- dbaas
|
52
66
|
|
53
67
|
Note: The availability domain should be the full AD name including the tenancy specific prefix. For example: "AaBb:US-ASHBURN-AD-1". Look in the OCI console to get your tenancy specific string.
|
54
68
|
|
69
|
+
### Compute Instance Type
|
70
|
+
|
71
|
+
The following configuration is mandatory:
|
72
|
+
|
73
|
+
- `image_id`
|
74
|
+
|
55
75
|
These settings are optional:
|
56
76
|
|
57
|
-
-
|
58
|
-
-
|
59
|
-
-
|
60
|
-
-
|
61
|
-
-
|
62
|
-
-
|
63
|
-
-
|
64
|
-
-
|
65
|
-
-
|
77
|
+
- `use_private_ip`, Whether to connect to the instance using a private IP, default is false (public ip)
|
78
|
+
- `oci_config_file`, OCI configuration file, by default this is ~/.oci/config
|
79
|
+
- `oci_profile_name`, OCI profile to use, default value is "DEFAULT"
|
80
|
+
- `ssh_keypath`, SSH public key, default is ~/.ssh/id\_rsa.pub
|
81
|
+
- `post_create_script`, run a script on compute\_instance after deployment
|
82
|
+
- `proxy_url`, Connect via the specified proxy URL
|
83
|
+
- `user_data`, Add user data scripts
|
84
|
+
- `hostname_prefix`, Prefix for the generated hostnames (note that OCI doesn't like underscores)
|
85
|
+
- `freeform_tags`, Hash containing tag name(s) and values(s)
|
86
|
+
- `use_instance_principals`, Boolean flag indicated whether Instance Principals should be used as credentials (see below)
|
66
87
|
|
67
88
|
Optional settings for WinRM support in Windows:
|
68
89
|
|
69
|
-
-
|
70
|
-
-
|
71
|
-
-
|
90
|
+
- `setup_winrm`, Inject Windows powershell to set password and enable WinRM, default false.
|
91
|
+
- `winrm_username`, Used to set the WinRM transport username, defaults to 'opc'.
|
92
|
+
- `winrm_password`, Set the winrm password. By default a randomly generated password will be used, so don't set this unless you have to. Beware that the password must meet the Windows password complexity requirements otherwise the bootstrapping procedure will fail silently and Kitchen will eventually time out.
|
72
93
|
|
73
|
-
The
|
94
|
+
The `use_private_ip` influences whether the public or private IP will be used by Kitchen to connect to the instance. If it is set to false (the default) then it will connect to the public IP, otherwise it'll use the private IP.
|
74
95
|
|
75
|
-
If the
|
96
|
+
If the `subnet_id` refers to a subnet configured to disallow public IPs on any attached VNICs, then the VNIC will be created without a public IP and the `use_private_ip` flag will assumed to be true irrespective of the config setting. On subnets that do allow a public IP a public IP will be allocated to the VNIC, but the `use_private_ip` flag can still be used to override whether the private or public IP will be used.
|
76
97
|
|
98
|
+
```yml
|
99
|
+
---
|
100
|
+
driver:
|
101
|
+
name: oci
|
102
|
+
# These are mandatory
|
103
|
+
compartment_id: "ocid1.compartment.oc1..xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
104
|
+
availability_domain: "XyAb:US-ASHBURN-AD-1"
|
105
|
+
image_id: "ocid1.image.oc1.phx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
106
|
+
shape: "VM.Standard1.2"
|
107
|
+
subnet_id: "ocid1.subnet.oc1.phx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
108
|
+
|
109
|
+
# These are optional
|
110
|
+
use_private_ip: false
|
111
|
+
oci_config_file: "~/.oci/config"
|
112
|
+
oci_profile_name: "DEFAULT"
|
113
|
+
ssh_keypath: "~/.ssh/id_rsa.pub"
|
114
|
+
post_create_script: >-
|
77
115
|
```
|
116
|
+
|
117
|
+
### DBaaS Instance Type
|
118
|
+
|
119
|
+
The DBaaS instance type configuration should be written in a hash beginning with `dbaas`.
|
120
|
+
|
121
|
+
The following configuration item is mandatory for the DBaaS `instance_type`:
|
122
|
+
|
123
|
+
- `db_version`, The specific version of the Oracle database software to be installed. Values can be at either the major version level (eg. 12.1.0.2) or at a PSU level (eg. 12.1.0.2.191015). If no PSU is provided, the latest available will be installed.
|
124
|
+
|
125
|
+
The following is a list of optional items for the DBaaS `instance_type`:
|
126
|
+
|
127
|
+
- `cpu_core_count`, CPU core count for DBaaS nodes. Default value is 2
|
128
|
+
- `database_edition`, The edition of the Oracle database software to be installed. Default value is ENTERPRISE_EDITION
|
129
|
+
- `license_model`, The licensing model for the Oracle database software. Default value is BRING_YOUR_OWN_LICENSE
|
130
|
+
- `db_name`, The name of the database to be provisioned. Must be 8 characters or less, alphanumeric. Default value is `dbaas1`.
|
131
|
+
- `pdb_name`, The name of the pdb to be provisioned. Only valid if `db_version` is 12cR1 or higher. Default value is nil (OCI will create a single pdb with the name `db_name`\_PDB1)
|
132
|
+
- `admin_password`, The SYS password of the database to be provisioned. Password must be 9 to 30 characters and contain at least 2 uppercase, 2 lowercase, 2 special, and 2 numeric characters. The special characters must be `_`, `#`, or `-`. Default value will be a randomly generated password
|
133
|
+
- `initial_data_storage_size_in_gb`, The desired amount of database storage in GB. Default value is 256
|
134
|
+
- `character_set`, The characterset of the database. Default value is AL32UTF8
|
135
|
+
- `ncharacter_set`, The national characterset of the database. Default value is AL16UTF16
|
136
|
+
- `db_workload`, The desired workload configuration for the database. Acceptable values are 'OLTP' and 'DSS'. Default value is 'OLTP'
|
137
|
+
|
138
|
+
Note: At this time, `node_count` is forced to be 1. RAC provisioning is not supported.
|
139
|
+
|
140
|
+
```yml
|
78
141
|
---
|
79
|
-
driver:
|
80
|
-
|
142
|
+
driver:
|
143
|
+
name: oci
|
144
|
+
instance_type: dbaas
|
145
|
+
...
|
146
|
+
dbaas:
|
147
|
+
db_version: "12.1.0.2.191015"
|
148
|
+
```
|
81
149
|
|
82
|
-
|
83
|
-
name: chef_zero
|
84
|
-
always_update_cookbooks: true
|
150
|
+
## Instance Principals
|
85
151
|
|
86
|
-
|
87
|
-
name: inspec
|
152
|
+
If you are launching Kitchen from a compute instance running in OCI then you might prefer to use Instance Principals to authenticate to the OCI APIs. To set this up you can omit the `oci_config_file` and `oci_profile_name` settings and insert `use_instance_principals: true` into your .kitchen.yml instead.
|
88
153
|
|
154
|
+
```yml
|
89
155
|
platforms:
|
90
|
-
- name: ubuntu-
|
156
|
+
- name: ubuntu-18.04
|
91
157
|
driver:
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
shape: "VM.Standard1.2"
|
97
|
-
subnet_id: "ocid1.subnet.oc1.phx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
158
|
+
...
|
159
|
+
use_instance_principals: true
|
160
|
+
...
|
161
|
+
```
|
98
162
|
|
99
|
-
|
100
|
-
use_private_ip: false
|
101
|
-
oci_config_file: "~/.oci/config"
|
102
|
-
oci_profile_name: "DEFAULT"
|
103
|
-
ssh_keypath: "~/.ssh/id_rsa.pub"
|
104
|
-
post_create_script: >-
|
105
|
-
touch /tmp/example.txt;
|
106
|
-
transport:
|
107
|
-
username: "ubuntu"
|
163
|
+
__Important__: If you want to configure a proxy when using Instance Principals, ensure you define the `no_proxy` environment variable so that all link-local access bypasses the proxy. For example:
|
108
164
|
|
109
|
-
|
110
|
-
|
111
|
-
run_list:
|
112
|
-
- recipe[my_cookbook::default]
|
113
|
-
verifier:
|
114
|
-
inspec_tests:
|
115
|
-
- test/smoke/default
|
116
|
-
attributes:
|
165
|
+
```sh
|
166
|
+
export no_proxy=169.254.0.0/16
|
117
167
|
```
|
118
168
|
|
169
|
+
This will allow the OCI lib to retrieve the certificate, key and ca-chain from the metadata service.
|
170
|
+
|
119
171
|
## Support for user data scripts and cloud-init
|
120
172
|
|
121
173
|
The driver has support for adding user data that can be executed as scripts by cloud-init. These can either be specified inline or by referencing a file. Examples:
|
122
174
|
|
123
|
-
```
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
175
|
+
```yml
|
176
|
+
user_data:
|
177
|
+
- type: x-shellscript
|
178
|
+
inline: |
|
179
|
+
#!/bin/bash
|
180
|
+
touch /tmp/foo.txt
|
181
|
+
filename: init.sh
|
182
|
+
- type: x-shellscript
|
183
|
+
path: myscript.sh
|
184
|
+
filename: myscript.sh
|
133
185
|
```
|
134
186
|
|
135
187
|
The `filename` parameter must be specified for each entry, and determines the destination filename for the script. If the user data is to be read from a file then the `path` parameter should be specified to indicate where the file is to be read from.
|
136
188
|
|
137
189
|
The scripts will be encoded into a gzipped, base64 encoded multipart mime message and added as user data when launching the instance.
|
138
190
|
|
191
|
+
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.
|
192
|
+
|
193
|
+
```yml
|
194
|
+
user_data: |
|
195
|
+
login: user1
|
196
|
+
uid: 1000
|
197
|
+
gid: 1000
|
198
|
+
```
|
199
|
+
|
139
200
|
## Proxy support
|
140
201
|
|
141
202
|
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:
|
142
|
-
```
|
203
|
+
```bash
|
143
204
|
# With authentication
|
144
205
|
export http_proxy=http://<proxy_user>:<proxy_password>@<proxy_host>:<proxy_port>"
|
145
206
|
# Without authentication
|
146
207
|
export http_proxy=http://<proxy_host>:<proxy_port>"
|
147
208
|
```
|
148
209
|
.. or if preferred in the cookbook's .kitchen.yml file.
|
149
|
-
```
|
210
|
+
```yml
|
150
211
|
driver:
|
151
212
|
...
|
152
213
|
proxy_url: "http://<proxy_user>:<proxy_password>@<proxy_host>:<proxy_port>"
|
@@ -154,7 +215,7 @@ driver:
|
|
154
215
|
|
155
216
|
The SSH transport can also be tunneled via the web proxy using the CONNECT http method, but note that this is not handled by the kitchen-oci gem. Configuration is provided here for convenience only:
|
156
217
|
|
157
|
-
```
|
218
|
+
```yml
|
158
219
|
transport:
|
159
220
|
username: "<os_username>"
|
160
221
|
ssh_http_proxy: "<proxy_host>"
|
@@ -163,9 +224,11 @@ transport:
|
|
163
224
|
ssh_http_proxy_password: <proxy_password>
|
164
225
|
```
|
165
226
|
|
227
|
+
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.
|
228
|
+
|
166
229
|
## Windows Support
|
167
230
|
|
168
|
-
When launching Oracle provided Windows images, it may be helpful to allow
|
231
|
+
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:
|
169
232
|
|
170
233
|
- A random password will be generated and stored into the Kitchen state
|
171
234
|
- A powershell script will be generated which sets the password for whatever username is defined in the transport section.
|
@@ -176,7 +239,7 @@ Make sure that the transport name is set to `winrm` and that the os\_type in the
|
|
176
239
|
|
177
240
|
Full example (.kitchen.yml):
|
178
241
|
|
179
|
-
```
|
242
|
+
```yml
|
180
243
|
---
|
181
244
|
driver:
|
182
245
|
name: oci
|