/nodejs-cookbook

Chef cookbook for building and installing multiple versions of nodejs

Primary LanguageRuby

DESCRIPTION:

  • Installs nodejs from S3/cloudfront.

  • Builds nodejs from source and pushes to S3.

REQUIREMENTS:

  • AWS account and an S3 bucket

Platform:

Tested on Ubuntu.

Dependencies:

ATTRIBUTES:

Default:

  • nodejs - release versions of node to build & install

  • nodejs - default version to which links are created under /usr/local/bin

  • nodejs - main directory under which node versions will be installed, default /opt/nodejs

  • nodejs - base download url (extends to [base_url]/[distribution codename]/nodejs-.tgz)

DATA BAG:

The builder recipe uses “aws” item from data bag “nodejs”

Attributes:

  • aws_id - Your AWS ID

  • aws_secret - Your AWS Secret Key

  • s3_bucket - S3 bucket used to store the built binary packages

Example:

{
  "id": "aws",
  "aws_id": "YOUR_AWS_ACCESS_KEY_ID",
  "aws_secret": "YOUR_AWS_SECRET_ACCESS_KEY",
  "s3_bucket": "YOUR_BUCKET_NAME"
}

USAGE:

Include nodejs::builder recipe on host(s) where you want to build nodejs versions.

Include nodejs recipe on host(s) where you want to install the node versions.

You should configure at least the nodejs attribute.

LICENSE:

Copyright 2012 Flowdock Ltd.

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.