Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

RSS

vagrant-node-simple (9) Versions 0.1.13

A simple cookbook to deploy your NodeJS app on Vagrant Ubuntu

Berkshelf/Librarian
Policyfile
Knife
cookbook 'vagrant-node-simple', '~> 0.1.13'
cookbook 'vagrant-node-simple', '~> 0.1.13', :supermarket
knife cookbook site install vagrant-node-simple
knife cookbook site download vagrant-node-simple
README
Dependencies
Quality 22%

Simple Chef Cookbook for NodeJS on Ubuntu 14.04 for Vagrant [complementary to OpsWorks NodeJS cookbook]

This recipe enables to deploy of a NodeJS app in your Vagrant box. It is complementary to Opsworks NodeJS cookebook for Opsworks deployment : recipes vagrant-node-simple::deploy,vagrant-node-simple::install,vagrant-node-simple:start are equivalent to opsworks_nodejs:default, deploy:nodejs, and parametrization of an Opsworks app is the same as the parametrization of the environment's JSON.

As for OpsWorks, this cookbook require a server.js file at the root of your YOUR_NODE_APP_REPO, with listening on port 80. Link

Usage :

Create your Chef repository with a Berksfile, a Vagrantfile and environments and roles directories :

  1. In the Berksfile
cookbook 'ark'
cookbook 'git'
cookbook 'apt', git: 'git://github.com/opscode-cookbooks/apt.git'
cookbook 'swap-simple', git: 'git://github.com/christopher5106/swap-simple.git'
cookbook 'vagrant-node-simple', git: 'git://github.com/christopher5106/vagrant-node-simple.git'
  1. In environments/development.rb :
{
  "name": "development",
  "description": "The master development branch",
  "cookbook_versions": {},
  "json_class": "Chef::Environment",
  "chef_type": "environment",
  "default_attributes": {},
  "override_attributes":
  {
    "environment":"development",
    "nodejs":{
      "name":"YOUR_APP_NAME",
      "repo":"git@bitbucket.org:YOUR_ORG/YOUR_NODE_APP_REPO.git",
      "revision":"HEAD"
    }
  }
}
  1. In roles/nodejs_role.rb :
name "my node app"
description "The base role"
run_list "recipe[git]","recipe[apt]","recipe[ark]","recipe[swap-simple]","recipe[vagrant-node-simple::deploy]","recipe[vagrant-node-simple::install]","recipe[vagrant-node-simple:start]"
  1. In the Vagrantfile
    VAGRANTFILE_API_VERSION = "2"

    Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
      config.vm.box = "ubuntu/trusty64"
      config.vm.network "forwarded_port", guest: 80, host: 3000
      config.berkshelf.enabled = true;
      config.vm.provision :chef_solo do |chef|
        chef.cookbooks_path = "./"
        chef.roles_path = "roles"
        chef.environments_path = "environments"
        chef.environment = "development"
        chef.add_role("nodejs_role")
      end
    end
  1. Add your node app repository deploy key deploy.pem.

  2. Commit your Chef repository.

You can Launch your instance with vagrant up command.

In Opsworks,

  • create a stack with your Chef repository, Chef and Berkshelf enabled (no need for a custom JSON, everything will be in the app settings.)

  • create a NodeJS layer (you can also create a custom layer and add the recipe "opsworks_nodejs" to the setup step, the recipe "opsworks_nodejs::configure" to the configure step, and the recipe to "deploy::nodejs" to the deploy step).

  • create an app with the link to your YOUR_NODE_APP_REPO.

Launch your instance in Opsworks. Opsworks will deploy the code corresponding to the Branch/Revision specified in the app configuration, to the HEAD if not specified.

You can configure a hook in Github so that committed code will be automatically deployed in Opsworks.

Dependent cookbooks

git >= 0.0.0
apt >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Collaborator Number Metric
            

0.1.13 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

0.1.13 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

0.1.13 failed this metric

FC055: Ensure maintainer is set in metadata: vagrant-node-simple/metadata.rb:1
FC056: Ensure maintainer_email is set in metadata: vagrant-node-simple/metadata.rb:1
FC064: Ensure issues_url is set in metadata: vagrant-node-simple/metadata.rb:1
FC065: Ensure source_url is set in metadata: vagrant-node-simple/metadata.rb:1
FC066: Ensure chef_version is set in metadata: vagrant-node-simple/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: vagrant-node-simple/metadata.rb:1
FC068: Ensure license is set in metadata: vagrant-node-simple/metadata.rb:1
FC069: Ensure standardized license defined in metadata: vagrant-node-simple/metadata.rb:1
Run with Foodcritic Version 12.0.1 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

License Metric
            

0.1.13 failed this metric

vagrant-node-simple does not have a valid open source license.
Acceptable licenses include Apache-2.0, apachev2, Apache 2.0, MIT, mit, GPL-2.0, gplv2, GNU Public License 2.0, GPL-3.0, gplv3, GNU Public License 3.0.

No Binaries Metric
            

0.1.13 passed this metric

Publish Metric
            

0.1.13 passed this metric

Supported Platforms Metric
            

0.1.13 failed this metric

vagrant-node-simple should declare what platform(s) it supports.

Testing File Metric
            

0.1.13 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

0.1.13 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number