Skip to content

Commit

Permalink
Refactor to be resource driven cookbook
Browse files Browse the repository at this point in the history
- Remove all recipes and replace them with resources
- Only support RHEL-based platforms for now (adding EL8)

Signed-off-by: Lance Albertson <[email protected]>
  • Loading branch information
ramereth committed Feb 28, 2024
1 parent ce14230 commit a736191
Show file tree
Hide file tree
Showing 49 changed files with 771 additions and 6,493 deletions.
2 changes: 0 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
AllCops:
TargetChefVersion: 16.latest
Chef/Modernize/FoodcriticComments:
Enabled: true
Chef/Style/CopyrightCommentFormat:
Expand Down
2 changes: 2 additions & 0 deletions Berksfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
source 'https://supermarket.chef.io'

cookbook 'ganeti-test', path: 'test/cookbooks/ganeti-test'
cookbook 'osl-repos', github: 'osuosl-cookbooks/osl-repos'
cookbook 'osl-resources', github: 'osuosl-cookbooks/osl-resources', branch: 'main'

metadata
56 changes: 13 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,57 +4,27 @@ This cookbook is designed to install Ganeti.

## Supported Platforms

* CentOS 6
* CentOS 7
* Ubuntu 14.04

## Attributes

- `['ganeti']['version']` - Ganeti version to install. Defaults to `nil`
- `['ganeti']['hypervisor']` - Hypervisor to install and use. Defaults to `kvm`
- `['ganeti']['master-node']` - FQDN of the host that will be set as the initial
master and will initialize the cluster. A value of `true` is also valid but
only used for testing purposes or single master clusters. Defaults to `false`.
- `['ganeti']['bin-path']` - Path for the Ganeti binaries. Defaults to
`/usr/sbin/`.
- `['ganeti']['data_bag']` - Data bag name for RAPI users. Defaults to
`rapi_users`.

### Cluster Initialization attributes
- `['ganeti']['cluster']['name']` - FQDN of the cluster. Must be resolvable.
Defaults to `nil`.
- `['ganeti']['cluster']['disk-templates']` - Array of disk templates to be
enabled. Defaults to `[ 'plain', 'drbd' ]`.
- `['ganeti']['cluster']['master-netdev']` - Master network device for the
Ganeti cluster. Must exist before installing ganeti. Defaults to `br0`.
- `['ganeti']['cluster']['enabled-hypervisors']` - An array of hypervisors to
enable in the cluster. Defaults to `[ 'kvm' ]`
- `['ganeti']['cluster']['nic']['mode']`- Default NIC mode for the guests on the
cluster. Defaults to `bridged`.
- `['ganeti']['cluster']['nic']['link']` - Default NIC link for the guests on
the cluster. Defaults to `br0`.
- `['ganeti']['cluster']['extra-opts']` - Arbitrary list of commands to send to
the `gnt-cluster init` prompt outside of options already sent from the other
attributes. Defaults to `nil`.
* RHEL 8

## Usage

### ganeti::default
```ruby
ganeti_install 'default'

Include `ganeti` in your node's `run_list`:
ganeti_initialize 'ganeti.example.com' do
disk_templates %w(plain)
master_netdev 'eth0'
enabled_hypervisors %w(kvm)
nic_mode 'bridged'
nic_link 'br0'
end

```json
{
"run_list": [
"recipe[ganeti::default]"
]
}
ganeti_service 'default' do
action :enable
end
```

## TODO

* Add Debian 7 support

## Contributing

1. Fork the repository on Github
Expand Down
66 changes: 0 additions & 66 deletions attributes/default.rb

This file was deleted.

Loading

0 comments on commit a736191

Please sign in to comment.