Cookbook for setup and configure gottwall application.
The gottwall.conf.py file are dynamically generated from attributes.
All default values of attributes you can see in attributes/default.rb
To use the cookbook we recommend creating a cookbook named after the application, e.g. my_app. In metadata.rb you should declare a dependency on this cookbook:
depends "gottwall"
Include recipe[gottwall] to you runlist.
Replace you own node['gottwall']['secret_key'] random key.
Add sites for monitoring node['gottwall']['projects'] = [{"projectname" => "secret_key"}]
We recommend change temporary passwords after from web interface.
To configure database override node['gottwall']['backends']['gottwall.backends.redis.RedisBackend'] keys:
"backends" => {
""gottwall.backends.redis.RedisBackend"" => {
"HOST" => "0.0.0.0",
"PORT" => 4343
},
}
Add "recipe[gottwall::instance]" to you runlist.
Or make you own custom configuration via resouces and definitions.
Create gottwall config
gottwall_conf "gottwall" do
user "gottwall"
group "gottwall"
virtualenv node["gottwall"]["virtualenv"]
# Settings file variables hash
settings {}
end
Create launch instance:
# Running gottwall instance
gottwall_instance "gottwall" do
virtualenv node["gottwall"]["virtualenv"]
user node["gottwall"]["user"]
group node["gottwall"]["group"]
pidfile "/var/run/gottwall-1.pid"
config node["gottwall"]["config"]
end
You can create config for gottwall need use definition gottwall_conf:
gottwall_conf "gottwall" do
user "gottwall"
group "gottwall"
virtualenv node["gottwall"]["virtualenv"]
# Settings file variables hash
settings {}
end
namename or path to config file (if config attr not used)templateconfig template file nameuseruser that own applicationgroupgtoup that own applicationconfigpath to config filesettingshash of config variables
To run gottwall instance you can user gottwall_instance resouce
nameinstance namegrouplaunch by groupuserlaunch by uservirtualenv: path to virtualenvconfig: path to config filepidfile: path to instance pidfilehost: host for bindingport: port for bingingworkers: number of workersprovider: instance porvider (default:Chef::Provider::GottwallBase)
gottwall cookbook support 3 instance providers:
-
Chef::Provider::GottwallBase- simple provider, that create init.d script and spawn instance -
Chef::Provider::GottwallRunit- provider, that spawn instance viarunit -
Chef::Provider::GottWallSupervisor- provider, that spawn instance viasupervisord
Base recipe to configure gottwall user and group
Recipe to install simple gottwall instance.