Skip to content

thirdwavellc/chef-capistrano-base

Repository files navigation

capistrano-base

Latest Version Build Status Coverage Status

Installs and configures the basic elements needed for Capistrano deployment.

We currently assume that Apache is the web server. This may be configurable in the future, however we are keeping things simple for the moment.

LWRPs

This cookbook is intended to be consumed through its LWRPs, and therefore doesn't include any recipes. Here is an overview of the LWRPs provided:

Note: The first attribute listed for each LWRP is also the name attribute.

capistrano_app

Attributes:

Name Description Type Required Default
app_name Name of the application. String true N/A
cookbook Cookbook that contains web config template. String false 'capistrano-base'
template Name of the web config template. String false 'web_app.conf.erb'
deploy_root Directory where all applications are deployed. String false '/var/www'
web_root Directory where app is served (relative to the root of the repo) String false nil
deployment_user User that deploys the application. String false 'deploy'
deployment_group Group that deploys the application. String false 'deploy'
server_name ServerName in Apache config. String true N/A
server_aliases List of ServerAlias in Apache config. Array false nil

Example:

capistrano_app 'my-app' do
  server_name 'my-app.com'
end

capistrano_shared_file

Attributes:

Name Description Type Required Default
file The shared file's name String true N/A
cookbook Cookbook that contains the file's template String false nil
template Template used for the file String true N/A
app_root The root directory for the app. String true N/A
owner User that owns the file String false 'deploy'
group Group that owns the file String false 'deploy'
variables Variables to be passed into template Hash false Empty Hash

Example:

capistrano_shared_file '.env' do
  app_root '/var/www/my-app'
  template '.env.erb'
end

capistrano_user

Attributes:

Name Default Type Required Default
name Name of the deployment user. String true N/A
group Group for the deployment user. String false nil
group_id Group ID for the deployment group. Integer true N/A

If a group is not provided, it defaults to the user's name.

Example:

capistrano_user 'deploy' do
  group_id 3000
  action :create
end

About

Chef recipe for shared configuration of a Capistrano-ready app

Resources

License

Stars

Watchers

Forks

Packages

No packages published