Skip to content

Opscode chef cookbook to deploy a playframework 2 application

Notifications You must be signed in to change notification settings

colindean/application_play2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

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.

Requirements

Chef 0.10.0 or higher required (for Chef environment use).

packages

Attributes

play2 sub-resource LWRP

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 ./
sub_projec String The sub project which is currently being installed, i.e. `play project sub_project run` nil (the main project)

Usage

A sample application using zip package distribution (Recommended)

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.

A sample application using scm provider

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

Contributing

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.

License and Authors

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.

About

Opscode chef cookbook to deploy a playframework 2 application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published