Install/configure Noosfero social-economic network (see http://noosfero.org)
The default recipe runs others recipes according to the settings
Attribute | Description | Default |
---|---|---|
node[:noosfero][:service_name] | The Noosfero's service name, which defines the init.d script name and paths | "noosfero" |
node[:noosfero][:rails_env] | The Rails environment to be used | "production" |
node[:noosfero][:rvm_load] | The ruby string to be load (e.g. "ree@noosfero") | "system" |
Attribute | Description | Default |
---|---|---|
node[:noosfero][:install_from] | What is used to install noosfero: "git" (default) to fetch code from git and "package" to install noosfero from debian repository | "git" |
Attribute | Description | Default |
---|---|---|
node[:noosfero][:user] | The user to create and to run noosfero | default[:noosfero][:service_name] |
node[:noosfero][:group] | The group to create and to run noosfero | default[:noosfero][:service_name] |
node[:noosfero][:git_url] | The git repo containing Noosfero to be used | https://gitlab.com/noosfero/noosfero.git |
node[:noosfero][:git_revision] | The branch, tag or commit to be used | "stable" |
node[:noosfero][:upgrade_script] | A script to be run on git sync | '' |
Paths | ||
node[:noosfero][:path] | Set the path to clone the git repo to be the base path for code, log, tmp and others noosfero directories | nil (use default system dirs, see below) |
node[:noosfero][:code_path] | Overwrite the code's path | node[:noosfero][:path] (with node[:noosfero][:path]) or "/usr/share/#{service_name}" (without node[:noosfero][:path]) |
node[:noosfero][:data_path] | Overwrite the data path | node[:noosfero][:path] (with node[:noosfero][:path]) or "/var/lib/#{service_name}" (without node[:noosfero][:path]) |
node[:noosfero][:config_path] | Overwrite the config path | "#{node[:noosfero][:path]}/config" (with node[:noosfero][:path]) or "/etc/#{service_name}" (without node[:noosfero][:path]) |
node[:noosfero][:log_path] | Overwrite the log path | "#{node[:noosfero][:path]}/log" (with node[:noosfero][:path]) or "/var/log/#{service_name}" (without node[:noosfero][:path]) |
node[:noosfero][:run_path] | Overwrite the run path | "#{node[:noosfero][:path]}/run" (with node[:noosfero][:path]) or "/var/run/#{service_name}" (without node[:noosfero][:path]) |
node[:noosfero][:tmp_path] | Overwrite the tmp path | "#{node[:noosfero][:path]}/tmp" (with node[:noosfero][:path]) or "/var/tmp/#{service_name}" (without node[:noosfero][:path]) |
Install noosfero using the Colivre's apt repository
Attribute | Description | Default |
---|---|---|
Attribute | Description | Default |
---|---|---|
node[:noosfero][:dependencies_with] | How to install dependencies: "quick_start", "bundler" or "packages" | "quick_start" |
Generate Rails' database.yml
Attribute | Description | Default |
---|---|---|
node[:noosfero][:db][:name] | Database name | node[:noosfero][:service_name] |
node[:noosfero][:db][:hostname] | Database hostname | "locahost" |
node[:noosfero][:db][:port] | Database port | "" |
node[:noosfero][:db][:username] | Database username | node[:noosfero][:user] |
node[:noosfero][:db][:password] | Database password | nil |
node[:noosfero][:db][:create_from_dump] | Load speficied dump file after database creation (if it don't exist yet) | nil |
Create, if there isn't any default yet, a default Noosfero Environment, after database creation.
Attribute | Description | Default |
---|---|---|
node[:noosfero][:environment] | A hash with the config of the default environment. If nil, skip environment check and creation | nil |
node[:noosfero][:environment][:name] | The name of the environment. This is used in all pages' <title> | - |
node[:noosfero][:environment][:domain] | The default domain associated with the environment. | - |
node[:noosfero][:environment][:default_language] | Set default language | - |
Write noosfero.yml settings file. Use key/value pairs from node[:noosfero][:settings]
hash.
Enable and configure plugins.
Attribute | Description | Default |
---|---|---|
node[:noosfero][:plugins] | An array of plugins to enable with script/noosfero-plugins | [] |
node[:noosfero][:plugins_settings] | Configure each plugin' settings | See attributes/default.rb |
Configure proxy and backend (rails app) servers
Attribute | Description | Default |
---|---|---|
node[:noosfero][:server][:proxy] | Proxy server to use. Choose between nginx or apache | nginx |
node[:noosfero][:server][:backend] | Rails application server. Choose between unicorn and thin | thin |
node[:noosfero][:server][:workers] | Number of workers to start | 4 |
node[:noosfero][:server][:port] | Backend port | 50000 |
node[:noosfero][:server][:timeout] | Backend timeout | 60 if backend is nginx and 1200 if apache is used |
node[:noosfero][:server][:proxy_port] | Proxy port to listen | node[:nginx][:listen_ports].first or node[:apache][:listen_ports].first |
Configure cache options
Attribute | Description | Default |
---|---|---|
node[:noosfero][:cache][:server] | Cache server to use. Supports varnish or set to empty to disable |
varnish |
node[:noosfero][:cache][:backend_port] | Backend port | node[:noosfero][:server][:proxy_port] |
Rotate logs
Attribute | Description | Default |
---|---|---|
node[:noosfero][:logrotate][:rotate] | Number of maximum rotated logs | 100_000 |
node[:noosfero][:logrotate][:frequency] | Frequency to rotate logs | daily |
Just include noosfero
in your node's run_list
, the below configuration is an example:
{
"rvm": {
"user_installs": [
{
"user": "noosfero",
"rubies": [ "ree" ],
"default_ruby": "ree",
"gems": {
"ree@noosfero": []
}
}
]
},
"postgresql": {
"version": "9.3",
"password": {
// needed for chef-solo
"postgres": "iqHDDo1o"
},
},
"memcached": {
"memory": 128,
"listen": "127.0.0.1"
},
"varnish": {
"version": "2.1",
"listen_address": "0.0.0.0",
"listen_port": 80,
"storage": "file",
"storage_size": "1G",
"vcl_cookbook": "noosfero"
},
"nginx": {
"listen_ports": [81],
"keepalive_timeout": 20,
"default_site_enabled": false
},
"apache": {
"version": "2.4",
"listen_addresses": ["127.0.0.1"],
"listen_ports": [82],
"keepalivetimeout": 20,
"keepaliverequests": 1000
},
"noosfero": {
"service_name": "noosfero",
"path": "/home/braulio/escambo.org.br",
"user": "braulio",
"group": "braulio",
"git_url": "https://github.com/ESCAMBO/noosfero-ecosol.git",
"git_revision": "master",
"dependencies_with": "bundler",
"rvm_load": "ree@noosfero",
"server_name": "escambo.org.br",
"custom_domains": [
"escambo.org"
],
"server": {
"proxy": "nginx",
"backend": "unicorn",
"workers": 1
},
"cache": {
"server": "varnish"
},
"db": {
"name": "noosfero_escambo.org.br_production",
"port": 5433
},
"environment": {
"name": "ESCAMBO",
"domain": "escambo.org.br"
},
"plugins": ["cms_learning", "currency", "escambo", "evaluation", "exchange", "sniffer", "solr"],
"settings": {
"exception_recipients": ["[email protected]", "[email protected]"]
},
"plugin_settings": {
"solr": {
"port": 8983,
"memory": 128
}
}
}
"run_list": [
"recipe[noosfero]"
]
}
- Fork the repository on Github
- Create a named feature branch (like
add_component_x
) - Write your change
- Write tests for your change (if applicable)
- Run the tests, ensuring they all pass
- Submit a Pull Request using Github
After 3 consistent patches you become a commiter :)