Giter Site home page Giter Site logo

jc1738 / chef-npm-registry Goto Github PK

View Code? Open in Web Editor NEW

This project forked from banno/chef-npm-registry

0.0 2.0 0.0 328 KB

Installs and configures an NPM package registry for use with Node.js using the official NPM project layout.

Home Page: http://community.opscode.com/cookbooks/npm_registry

License: Apache License 2.0

chef-npm-registry's Introduction

chef-npm-registry Build Status Dependency Status Code Climate

The npm_registry cookbook installs and configures an NPM package registry using the official NPM project layout. Includes support for replicating the official isaacs NPM registry (continuously or scheduled).

If you are installing this locally (such as with Vagrant), it is recommended you set the following attributes:

  • node['couch_db']['httpd']['bind_address'] = '0.0.0.0'
  • node['couch_db']['httpd']['secure_rewrites'] = false

This cookbook also makes use of the couch_db attributes:

  • node['couch_db']['config']['couchdb']['httpsd']
  • node['couch_db']['config']['httpd']['port']
  • node['couch_db']['config']['couchdb']['database_dir']

Requirements

Platform

  • Ubuntu

Tested on:

  • Ubuntu 12.04
  • Ubuntu 12.10

Cookbooks

Requires Opscode's git and couchdb cookbooks and Marius Ducea's nodejs cookbook. Opscode's cron cookbook is only required if using scheduled replication. See Attributes and Usage for more information.

Attributes

See the attributes/defaults.rb for default values.

  • node['npm_registry']['git']['url'] - The URL to NPM's registry repository. Attribute is provided in case the repository is ever moved.
  • node['npm_registry']['git']['reference'] - The branch or tag name to checkout from the Git repository.
  • node['npm_registry']['isaacs']['registry']['url'] - The URL to the official NPM registry (used for replication).
  • node['npm_registry']['replication']['flavor'] - Allowed values: none, scheduled or continuous
  • node['npm_registry']['replication']['scheduled']['minute'] - The scheduled minute value.
  • node['npm_registry']['replication']['scheduled']['hour'] - The scheduled hour value.
  • node['npm_registry']['replication']['scheduled']['weekday'] - The scheduled weekday value.
  • node['npm_registry']['replication']['scheduled']['day'] - The scheduled day value.
  • node['npm_registry']['replication']['scheduled']['month'] - The scheduled month value.

Usage

To install and configure the default NPM package registry, use:

{ "run_list": ["recipe[npm_registry]"] }

For scheduled replication, use:

{ "run_list": ["recipe[cron]", "recipe[npm_registry]"] }

Testing

This cookbook includes support for running tests via FoodCritic, ChefSpec, Kitchen and Minitest.

  1. Install Vagrant, Gem, Cookbook and Vagrant plugin dependencies:

    vagrant plugin install vagrant-berkshelf
    bundle install
    berks install
  2. Run Vagrant instance with default attributes:

    vagrant up
  3. Run FoodCritic, ChefSpec, Kitchen and Minitest:

    strainer test

chef-npm-registry's People

Contributors

jackcviers avatar

Watchers

 avatar  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.