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

deployer (2) Versions 0.1.1

Installs/Configures a deployment user

Berkshelf/Librarian
Policyfile
Knife
cookbook 'deployer', '~> 0.1.1'
cookbook 'deployer', '~> 0.1.1', :supermarket
knife cookbook site install deployer
knife cookbook site download deployer
README
Dependencies
Quality

deployer

Set up a deploy user with the necessary ssh authorized keys. This is great for working with Capistrano where you need to deploy code, but it doesn't make sense for each user to have a shell account.

This cookbook will create a deployment user (deploy by default) with passwordless-sudo permissions for deployment. As a result, it is highly recommended that you disable password authentication and only support key-based authentication.

Requirements

At this time, you must have a Unix-based machine. This could easily be adapted for Windows machines. Please submit a Pull Request if you wish to add Windows support.

Configuration

There are three attributes that you can override in your node:

  • node['deployer']['user'] - the name of the deploy user (default: deploy)
  • node['deployer']['group'] - the group for the deploy user (default: deploy)
  • node['deployer']['home'] - the home directory for the deploy user (default: /home/deploy)

Adding keys

There are two ways to add keys to the deployer. If you're using the opscode users cookbook, deployer easily integrates with the existing :users data_bags. Simply add the servers key to an existing user:

// data_bags/users/svargo.json
{
  "id": "svargo",
  "uid": "1000",
  "deploy": "any"
}

or specify an array of servers or IP addresses that the user should be allowed to deploy to:

// data_bags/users/svargo.json
{
  "id": "svargo",
  "uid": "1000",
  "deploy": [
    "1.2.3.4",
    "mynode.example.com"
  ]
}

If you're not using the users cookbook, or if you have a conflict, you can use the :deployers data_bag instead:

Create the data_bag:

knife data bag create deployers

Create a deployer:

// data_bags/deployers/svargo.json
{
  "id": "svargo",
  "deploy": [
    "1.2.3.4",
    "mynode.example.com"
  ]
}

The same options apply to the servers key as above. Note: this will not actually create system user accounts.

Usage

If you're using Berkshelf, just add deployer to your Berksfile:

cookbook 'deployer'

Otherwise, install the cookbook from the community site:

knife cookbook site install deployer

Have any other cookbooks depend on deployer by editing editing the metadata.rb for your cookbook.

depends 'deployer'

Once you have the cookbook installed, add it to your node's run_list or role:

"run_list": [
  "recipe[deployer]"
]

And override attributes as necessary:

# mynode.example.com
"override_attributes": {
  "deployer": {
    "user": "apache",
    "group": "apache",
    "home": "/usr/bin/false"
  }
},
"run_list": [
  "recipe[deployer]"
]

Contributing

  1. Fork the project
  2. Create a feature branch corresponding to you change
  3. Commit and test thoroughly
  4. Create a Pull Request on github
    • ensure you add a detailed description of your changes

License and Authors

Authors: Seth Vargo (@sethvargo)

Copyright 2012, Seth Vargo

Collaborator Number Metric
            

0.1.1 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.1 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.1 failed this metric

FC064: Ensure issues_url is set in metadata: deployer/metadata.rb:1
FC065: Ensure source_url is set in metadata: deployer/metadata.rb:1
FC066: Ensure chef_version is set in metadata: deployer/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: deployer/metadata.rb:1
Run with Foodcritic Version 11.1.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

License Metric
            

0.1.1 failed this metric

deployer 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.1 passed this metric

Publish Metric
            

0.1.1 passed this metric

Supported Platforms Metric
            

0.1.1 failed this metric

deployer should declare what platform(s) it supports.

Testing File Metric
            

0.1.1 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.1 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