Skip to content
Development repository for the yum-atomic cookbook
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
attributes
recipes
test/integration/default/inspec
.gitignore
.kitchen.dokken.yml
.kitchen.yml
.rubocop.yml
.travis.yml
Berksfile
CHANGELOG.md
LICENSE
README.md
Rakefile
chefignore
metadata.rb

README.md

yum-atomic Cookbook

Build Status Cookbook Version

The yum-atomic cookbook takes over management of the repositoryids of the atomic repository (including popular RPM packages for OSSEC). It allows attribute manipulation of atomic, and atomic-test repositories.

Requirements

  • Chef 12.1 or higher
  • Depends on yum-epel

Platform Support

The following platforms have been tested with Test Kitchen:

|-----------+--------+-------------|
|           | atomic | atomic-test |
|-----------+--------+-------------|
| centos-5  | X      | X           |
|-----------+--------+-------------|
| centos-6  | X      | X           |
|-----------+--------+-------------|
| centos-7  | X      | X           |
|-----------+--------+-------------|
| fedora-20 | X      |             |
|-----------+--------+-------------|
| fedora-21 | X      |             |
|-----------+--------+-------------|

Fedora and RHEL based distributions (RHEL, CentOS, and Scientific Linux) are supported

Attributes

The following attributes are set by default

default['yum']['atomic']['repositoryid'] = 'atomic'
default['yum']['atomic']['mirrorlist'] = 'http://updates.atomicorp.com/channels/mirrorlist/atomic/centos-$releasever-$basearch'
default['yum']['atomic']['description'] = 'CentOS / Red Hat Enterprise Linux $releasever - atomicrocketturtle.com'
default['yum']['atomic']['enabled'] = true
default['yum']['atomic']['gpgcheck'] = true
default['yum']['atomic']['gpgkey'] = %w(https://www.atomicorp.com/RPM-GPG-KEY.art.txt https://www.atomicorp.com/RPM-GPG-KEY.atomicorp.txt)
default['yum']['atomic-testing']['repositoryid'] = 'atomic-testing'
default['yum']['atomic-testing']['mirrorlist'] = 'http://updates.atomicorp.com/channels/mirrorlist/atomic-testing/centos-$releasever-$basearch'
default['yum']['atomic-testing']['description'] = 'CentOS / Red Hat Enterprise Linux $releasever - atomicrocketturtle.com - (Testing)'
default['yum']['atomic-testing']['enabled'] = false
default['yum']['atomic-testing']['gpgcheck'] = false
default['yum']['atomic-testing']['gpgkey'] = %w(https://www.atomicorp.com/RPM-GPG-KEY.art.txt https://www.atomicorp.com/RPM-GPG-KEY.atomicorp.txt)

Recipes

  • default - Walks through node attributes and feeds a yum_resource parameters. The following is an example a resource generated by the recipe during compilation.
  yum_repository 'atomic' do
    mirrorlist 'http://updates.atomicorp.com/channels/mirrorlist/atomic/centos-$releasever-$basearch'
    description 'CentOS / Red Hat Enterprise Linux $releasever - atomicrocketturtle.com'
    enabled true
    gpgcheck true
    gpgkey %w(https://www.atomicorp.com/RPM-GPG-KEY.art.txt
              https://www.atomicorp.com/RPM-GPG-KEY.atomicorp.txt
              )
  end

Usage Example

To disable the atomic repository through a Role or Environment definition

default_attributes(
  :yum => {
    :atomic => {
      :enabled => {
        false
       }
     }
   }
 )

Uncommonly used repositoryids are not managed by default. This is speeds up integration testing pipelines by avoiding yum-cache builds that nobody cares about. To enable the atomic-testing repository with a wrapper cookbook, place the following in a recipe:

node.default['yum']['atomic-testing']['enabled'] = true
node.default['yum']['atomic-testing']['managed'] = true
include_recipe 'yum-atomic'

More Examples

Point the atomic repositories at an internally hosted server.

node.default['yum']['atomic']['enabled'] = true
node.default['yum']['atomic']['mirrorlist'] = nil
node.default['yum']['atomic']['baseurl'] = 'https://internal.example.com/atomic/centos/6/os/x86_64'
node.default['yum']['atomic']['sslverify'] = false

include_recipe 'yum-atomic'

License & Authors

Copyright 2015, Brian Hays

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.
You can’t perform that action at this time.