Skip to content

sillymoi/osops-utils

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Support

Issues have been disabled for this repository.
Any issues with this cookbook should be raised here:

https://github.com/rcbops/chef-cookbooks/issues

Please title the issue as follows:

[osops-utils]: <short description of problem>

In the issue description, please include a longer description of the issue, along with any relevant log/command/error output.
If logfiles are extremely long, please place the relevant portion into the issue description, and link to a gist containing the entire logfile

Description

Miscellaneous library functions and recipes for OpenStack. This currently includes:

  • ip address location
  • simple /etc/hosts manipulation
  • set up package repositories for various distributions
  • hot patching of package components

IP Resources

Requirements

Uses the Ruby libraries chef/search/query, ipaddr and uri

Attributes

osops_networks is a list of network names and associated CIDR. These are used in the get_ip functions. osops: apply_patches Set to true to apply RCB patches to installed packages. Default is false. osops: do_package_upgrades Set to true to upgrade certain packages during a chef run. Default is false.

Usage


node['osops_networks']['localnet'] = 127.0.0.0/8
node['osops_networks']['management'] = 10.0.1.0/24
ip = get_ip_for_net("localnet")  # returns 127.0.0.1
ip = get_ip_for_net("management") # returns the address on management, or error
node['osops']['apply_patches'] = true

autoetchosts

This is included by nova::nova-common

Usage

include_recipe "osops-utils::autoetchosts"

Package Resources

This is part of the base role

Attributes

Usage

include_recipe "osops-utils::packages"

patching

Provide a mechanism for hot patching a file that may be part of a package. Any changes will most likely be overwritten when the package is updated.

Usage

Example


template "/usr/share/pyshared/nova/scheduler/filters/affinity_filter.py" do
  source "patches/affinity_filter.py.2012.1+stable~20120612-3ee026e-0ubuntu1.2"
  owner "root"
  group "root"
  mode "0644"
  notifies :restart, resources(:service => "nova-scheduler"), :immediately
  only_if { ::Chef::Recipe::Patch.check_package_version("nova-scheduler","2012.1+stable~20120612-3ee026e-0ubuntu1.2",node) ||
            ::Chef::Recipe::Patch.check_package_version("nova-scheduler","2012.1+stable~20120612-3ee026e-0ubuntu1.3",node) }
end

License and Author

==================

Author:: Justin Shepherd ([email protected])

Author:: Jason Cannavale ([email protected])

Author:: Ron Pedde ([email protected])

Author:: Joseph Breu ([email protected])

Author:: William Kelly ([email protected])

Author:: Darren Birkett ([email protected])

Author:: Evan Callicoat ([email protected])

Author:: Matt Ray ([email protected])

Copyright 2012 Rackspace US, Inc.

Copyright 2012 Opscode, Inc.

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.

About

misc utility library for osops receipies

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published