Giter VIP home page Giter VIP logo

chef-sugar-rackspace's Introduction

chef-sugar-rackspace

Gem Version

Chef Sugar Extensions useful if you use Rackspace as a provider

Usage

Include it in your Chef recipes:

include_recipe 'chef-sugar-rackspace::default'

Rackconnect

Rackconnect helpers require the Rackconnect Ohai plugin to be installed.

  • rackconnected? - return true if the node is rackconnected

####Note If the rackconnect plugin is not installed but the helper is called rackconnected? will return false. This should not be an issue in most cases but could cause unexepected results on a rackconnected server.

rackconnected?

unless rackconnected?
  include_recipes 'firewall'
end

IP

  • cloud_network_ip - return the node's ip from a Rackspace cloud network
  • best_rackspace_ip_for - determine the best IP address for a given node, preferring a cloud network IP address
  • cloud_networks - return Rackspace cloud networks as a Hash with each key being a cloud network label

cloud_network_ip

node.set['redis']['bind'] = cloud_network_ip

cloud_network_ip takes an optional argument of the Cloud Network Label

node.set['redis']['bind'] = cloud_network_ip('mycloudnetwork')

best_rackspace_ip_for

Prefers a connected Rackspace cloud network IP but falls through to using the default Chef Sugar best_ip_for() method if one does not exist.

memcached = search('node', 'tags:memcached').first

memcahed_ip = best_rackspace_ip_for(memcached)

cloud_networks

private_networks = cloud_networks

License & Authors

copyright (C) 2015 Jim Rosser

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the “Software”), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

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.

chef-sugar-rackspace's People

Contributors

jarosser06 avatar martinb3 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

siso martinb3

chef-sugar-rackspace's Issues

Update to newer chef-sugar

Currently, chef-sugar-rackspace depends on chef-sugar ~> 2.0, but chef-sugar released a v3 back in March. We should bump chef-sugar-rackspace's dependencies to the newer one at some point.

chef_gem compile_time installation is deprecated

Seems this needs to be updated since a specific compile_time value is now required or we get a deprecation warning.

[2015-09-21T19:32:13+00:00] WARN: chef_gem[chef-sugar-rackspace] chef_gem compile_time installation is deprecated [2015-09-21T19:32:13+00:00] WARN: chef_gem[chef-sugar-rackspace] Please set compile_time falseon the resource to use the new behavior. [2015-09-21T19:32:13+00:00] WARN: chef_gem[chef-sugar-rackspace] or setcompile_time true on the resource if compile_time behavior is required.

rackconnect? fails on non-cloud

It looks like calls to rackconnect? are failing when used on non-cloud, with error "must have rackconnect ohai plugin installed". It appears that the plugin is installed, the box just isn't a cloud box. Thus, rackconnect? should probably just return false.

Also, if node['rackspace']['foo'] or any other key is set, then it fails as well.

      def rackconnected?(node)
        return false unless node.key? 'rackspace'
        if node['rackspace'].key? 'rackconnect'
          return node['rackspace']['rackconnect']['enabled']
        else
          fail 'must have rackconnect ohai plugin installed'
        end
      end

We should be able to set node['rackspace']['foo'] and still have rackconnect? not raise or fail. Probably the source of rackspace-cookbooks/rackspace_support#8.

Take into rackspace maintenance?

We should probably move this project into rackerlabs or some place where all rackers can help maintain it, if it's not just going to be a side project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.