cookbook 'cloud_init', '= 0.1.0'
cloud_init (4) Versions 0.1.0 Follow2
Deploy cloud-init configuration files
cookbook 'cloud_init', '= 0.1.0', :supermarket
knife supermarket install cloud_init
knife supermarket download cloud_init
cloud_init Cookbook
Deploy cloud_init configuration files from attributes or LWRP.
Requirements
Platforms
The following platforms and versions are tested and supported using Opscode's test-kitchen.
- Debian 7
- Debian 8
- Ubuntu 12.04
- Ubuntu 14.04
Attributes
cloud_init::default
Key | Type | Description |
---|---|---|
[cloud_init][cfgs] |
Hash | Hash of configuration files (default: {} ) |
Usage
cloud_init::default
Include cloud_init
in your node's run_list
and set the cfgs
attribute to create configuration files:
{ "name":"my_node", "run_list": [ "recipe[cloud_init]" ], "attributes": { "cloud_init": { "cfgs": { "hostname": { "priority": "90", "config": { "preserve_hostname": "true" } } } } } }
This setup will create the configuration file /etc/cloud/cloud.cfg.d/90_hostname.cfg
with following content:
preserve_hostname: true
Custom resources
cloud_init_cfg
This LWRP can be used to deploy cloud_init configuration files.
Actions
Action | Description |
---|---|
:create |
Create a cloud-init configuration file |
:delete |
Delete a cloud-init configuration file |
Attributes
Attribute | Type | Description |
---|---|---|
name |
String | Name of the configuration file, this is the name attribute |
priority |
Interger | Priority of configuration file, The config filename is prefixed by this value |
config |
Hash | Hash configuration, used by the template. |
Example
cloud_init_cfg 'hostname' do priority 90 config preserve_hostname: true end
Tests
First, install dependencies:
bundle install
Run Checkstyle and ChefSpec:
bundle exec rake
Run Kitchen tests:
bundle exec rake kitchen
Docker driver is used for integration testing with test-kitchen. You will need to have docker installed to run integration testing, or adapt the existing .kitchen.yml for your driver.
Contributing
- Fork the repository on Github
- Create a named feature branch (like
add_component_x
) - Write your change
- Write tests for your change (if applicable)
- Run the tests, ensuring they all pass
- Submit a Pull Request using Github
License and Authors
Authors: Sliim sliim@mailoo.org
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
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.
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
cloud_init CHANGELOG
This file is used to list changes made in each version of the cloud_init cookbook.
0.1.0
- Initial release of cloud_init cookbook
Collaborator Number Metric
0.1.0 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
0.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.1.0 failed this metric
FC074: LWRP should use DSL to define resource's default action: cloud_init/resources/cfg.rb:1
Run with Foodcritic Version 12.2.1 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
License Metric
0.1.0 passed this metric
No Binaries Metric
0.1.0 passed this metric
Testing File Metric
0.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.0 passed this metric
0.1.0 failed this metric
0.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.1.0 failed this metric
FC074: LWRP should use DSL to define resource's default action: cloud_init/resources/cfg.rb:1
Run with Foodcritic Version 12.2.1 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
License Metric
0.1.0 passed this metric
No Binaries Metric
0.1.0 passed this metric
Testing File Metric
0.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.0 passed this metric
0.1.0 failed this metric
Run with Foodcritic Version 12.2.1 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.1.0 passed this metric
No Binaries Metric
0.1.0 passed this metric
Testing File Metric
0.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.0 passed this metric
0.1.0 passed this metric
0.1.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.0 passed this metric
0.1.0 passed this metric