Giter Site home page Giter Site logo

nickm4062 / stove Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chef-boneyard/stove

0.0 2.0 0.0 248 KB

A utility for packaging and releasing Chef cookbooks

Home Page: http://sethvargo.github.io/stove

License: Apache License 2.0

Ruby 93.33% Gherkin 3.33% HTML 3.34%

stove's Introduction

Stove

Gem Version Build Status

A utility for releasing and managing Chef Cookbooks. It will:

  • Tag and push a new release to git
  • Upload the cookbook to a private or public Supermarket

Why?

Existing tools to package cookbooks (such as Knife Community and knife cookbook site share) require a dependency on Chef. Because of their dependency on Chef, they enforce the use of a "cookbook repo". Especially with the evolution of Berkshelf, cookbooks are individualized artifacts and are often contained in their own repositories. stove is cookbook-centric, rather than Chef-centric.

Installation

  1. Add Stove to your project's Gemfile:
gem 'stove'
  1. Run the bundle command to install:
$ bundle install --binstubs

Configuration

Stove requires your username and private key to upload a cookbook. You can pass these to each command call, or you can set them Stove:

$ stove login --username sethvargo --key ~/.chef/sethvargo.pem

These values will be saved in Stove's configuration file (~/.stove) and persisted across your workstation.

The default publishing endpoint is the Chef Supermarket, but this is configurable. If you want to publish to an internal Supermarket, you can specify the --endpoint value:

$ stove --endpoint https://internal-supermarket.example.com/api/v1

Please note: depending on which version of Chef and which version of Supermarket you are running, you may support the new "extended" metadata fields. By default, Stove writes these new fields when uploading cookbooks, which require Chef 12 or later. If you would like to retain compatibility with Chef 11 you can disable extended metadata with --no-extended-metadata:

$ stove --no-extended-metadata

Usage

There are two ways to use Stove. You can either use the stove command directly or use the embedded rake task.

Command

Execute the stove command from inside the root of a cookbook:

$ bin/stove

This will package (as a tarball) the cookbook in the current working directory, tag a new version, push to git, and publish to a cookbook share.

Rake task

If you are familiar with the Bundler approach to publishing Ruby gems, this approach will feel very familiar. Simply add the following to your Rakefile:

require 'stove/rake_task'
Stove::RakeTask.new

And then use rake to publish the cookbook:

$ bin/rake publish

Artifactory Support

In addition to uploading to a standard Supermarket server, Stove can upload to an Artifactory repository configured to be in Chef mode.

You specify the URL to upload to via --artifactory, which you can find the URL Artifactory repository configuration. Your API key can be specified either in the $ARTIFACTORY_API_KEY environment variable or via --artifactory-key:

# API key in $ARTIFACTORY_API_KEY
$ stove --artifactory https://artifactory.example.com/api/chef/nameofrepo
# API key in a file
$ stove --artifactory https://artifactory.example.com/api/chef/nameofrepo --artifactory-key=@path/to/key/file
# API key on the command line
$ stove --artifactory https://artifactory.example.com/api/chef/nameofrepo --artifactory-key=XZg6tefUZYfiglmSbQ1s1e6habk

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

See Also

License & Authors

Copyright 2013-2014 Seth Vargo <[email protected]>
Copyright 2013-2014 Chef Software, 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.

stove's People

Contributors

sethvargo avatar tas50 avatar coderanger avatar tech101-chastina avatar hartmantis avatar bcobb avatar josacar avatar lamont-granquist avatar smurawski avatar carmstrong avatar eherot avatar emachnic avatar gregsymons avatar jsmartt avatar kohenkatz avatar sbuzonas avatar tknerr avatar directionless avatar

Watchers

James Cloos avatar Nickolas Montgomery avatar

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.