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