This cookbook is designed to be able to describe and deploy playframework 2 web applications. Application is deployed as a service.
Currently supported:
- SCM deployment / Play2 dist package deployment
- External application configuration file
- External logger file
- http / https port
Note that this cookbook provides the play2-specific bindings for the application
cookbook; you will find general documentation in that cookbook.
Chef 0.10.0 or higher required (for Chef environment use).
application
- Opscode application cookbookplay2
- play2 cookbook
Key | Type | Description | Default |
---|---|---|---|
initd_template | String | Service script template file | nil (use the cookbook one) |
ivy_credentials | String | Ivy credentials file | nil |
application_conf | String | Application configuration file | nil |
log_file | String | Log file | nil |
http_port | Integer | 80 | |
https_port | Integer | nil | |
app_opts | String | Additional java options | Empty string |
app_dir | String | Subdirectory within the repo where the play app is located | ./ |
application "my_app" do
path "/var/www/playapps/#{name}"
repository "http://my_app.distribution_url.zip"
revision "1.0.0"
strategy :dist_remote_file
play2 do
ivy_credentials "credentials"
http_port 80
application_conf "application.conf"
log_file "logger.xml"
app_opts "-Xms6144M -Xmx6144M -Xss1M -XX:MaxPermSize=256M"
end
end
credentials
, application.conf
, logger.xml
must be in your cookbook files.
application "my_app" do
path "/var/www/playapps/#{name}"
repository "git@repo.url.git"
revision "master"
deploy_key "-----BEGIN RSA PRIVATE KEY-----
ZO83161L458DqWszVwblp4HValWWUm6382OkaGvVGrwGLNTNcoYeWAP0xvpuDLfi
…U13bIttKqAmYNMK0o+699VWGDf9uBEfwDgBbrMUt+RchxyM3BA==
-----END RSA PRIVATE KEY-----
"
play2 do
ivy_credentials "credentials"
http_port 80
application_conf "application.conf"
log_file "logger.xml"
app_opts "-Xms6144M -Xmx6144M -Xss1M -XX:MaxPermSize=256M"
app_dir "my-play-app"
end
end
If your are a ruby guy, please contribute. This cookbook was made by a developer who knows nothing of ruby. You can surely improve the code.
Author:: Didier Bathily (bathily@njin.fr)
Copyright 2013, njin
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.