Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support apache, fix upstart script, improve settings.json and manage user and database #8

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.DS_Store
*.swp
28 changes: 17 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,37 +18,43 @@ Attributes
The following attributes should be set based on your specific deployment, see the
`attributes/default.rb` file for default values. All values should be strings unless otherwise specified.

* `node['etherpad-lite']['service_name']` = Name of service
* `node['etherpad-lite']['service_user']` - user to run etherpad
* `node['etherpad-lite']['service_user_group']` - group to run etherpad
* `node['etherpad-lite']['service_user_home']`- home dir
* `node['etherpad-lite']['etherpad_git_repo_url']` = set this to the git repo of your fork of etherpad-lite, or leave as default
* `node['etherpad-lite']['etherpad_api_key']` = sets the API key for the HTTP API (APIKEY.txt), if you leave it blank it will be generated for you by the app on first launch
* `node['etherpad-lite']['logs_dir']` = Path to logs directory

* `node['etherpad-lite']['title']` - Name your instance!
* `node['etherpad-lite']['favicon_url']` - favicon_url favicon default name, alternatively, set up a fully specified Url to your own favicon
* `node['etherpad-lite']['default_text']` - the default text of a pad

* `node['etherpad-lite']['domain']` = Domain where it is running
* `node['etherpad-lite']['ip_address']` - IP address to bind
* `node['etherpad-lite']['port_number']` - (number) port number to bind

* `node['etherpad-lite']['ssl_enabled']` - (boolean) make sure to have the minimum and correct file access permissions set so that the Etherpad server can access them
* `node['etherpad-lite']['ssl_key_path']` - ssl key path
* `node['etherpad-lite']['ssl_cert_path']` - ssl cert path

* `node['etherpad-lite']['db_type']` - postgres, sqlite or mysql
* `node['etherpad-lite']['db_user']` - db user
* `node['etherpad-lite']['db_host']` - db host
* `node['etherpad-lite']['db_password']` - db password
* `node['etherpad-lite']['db_name']` - db name
* `node['etherpad-lite']['default_text']` - the default text of a pad

* `node['etherpad-lite']['require_session']` - (boolean) Users must have a session to access pads. This effectively allows only group pads to be accessed.
* `node['etherpad-lite']['edit_only']` - (boolean) Users may edit pads but not create new ones. Pad creation is only via the API. This applies both to group pads and regular pads.
* `node['etherpad-lite']['minify']` - if true, all css & js will be minified before sending to the client. This will improve the loading performance massivly, but makes it impossible to debug the javascript/css
* `node['etherpad-lite']['max_age']` - How long may clients use served javascript code (in seconds)? Without versioning this may cause problems during deployment. Set to 0 to disable caching
* `node['etherpad-lite']['abiword_path']` - This is the path to the Abiword executable. Setting it to null, disables abiword. Abiword is needed to advanced import/export features of pads
* `node['etherpad-lite']['use_abiword']` - Set to false to disable. Default is true
* `node['etherpad-lite']['abiword_path']` - This is the path to the Abiword executable. Abiword is needed to advanced import/export features of pads
* `node['etherpad-lite']['require_authentication']` - This setting is used if you require authentication of all users. Note: /admin always requires authentication.
* `node['etherpad-lite']['require_authorization']` - Require authorization by a module, or a user with is_admin set, see below.
* `node['etherpad-lite']['admin_enabled']` - Enable the admin interface
* `node['etherpad-lite']['admin_password']` - Password for "admin" user.
* `node['etherpad-lite']['log_level']` - The log level we are using, can be: DEBUG, INFO, WARN, ERROR
* `node['etherpad-lite']['service_user']` - user to run etherpad
* `node['etherpad-lite']['service_user_gid']` - group to run etherpad
* `node['etherpad-lite']['service_user_home']`- home dir
* `node['etherpad-lite']['etherpad_git_repo_url']` = set this to the git repo of your fork of etherpad-lite, or leave as default
* `node['etherpad-lite']['etherpad_api_key']` = sets the API key for the HTTP API (APIKEY.txt), if you leave it blank it will be generated for you by the app on first launch
* `node['etherpad-lite']['service_name']` = Name of service
* `node['etherpad-lite']['logs_dir']` = Path to logs directory
* `node['etherpad-lite']['domain']` = Domain where it is running
* `node['etherpad-lite']['plugins']` = An array of plugins to install. These should be strings of the plugin name, without the ep_ prefix (as seen in the etherpad-lite admin's plugin manager).

Usage
Expand Down Expand Up @@ -88,4 +94,4 @@ Authors:

* OpenWatch FPC
* @computerlyrik original version (https://github.com/computerlyrik/chef-etherpad)
* @reidab
* @reidab
51 changes: 32 additions & 19 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,42 +9,55 @@

# Defaults based on https://github.com/ether/etherpad-lite/blob/develop/settings.json.template

default['etherpad-lite']['service_name'] = node['etherpad-lite']['service_user']
default['etherpad-lite']['service_user'] = 'etherpad'
default['etherpad-lite']['service_group'] = node['etherpad-lite']['service_user']

default['etherpad-lite']['service_user_home'] = "/home/#{node['etherpad-lite']['service_user']}"
default['etherpad-lite']['project_path'] = "#{node['etherpad-lite']['service_user_home']}/etherpad-lite"
default['etherpad-lite']['node_modules'] = "#{node['etherpad-lite']['project_path']}/node_modules"

default['etherpad-lite']['log_level'] = "INFO"
default['etherpad-lite']['logs_dir'] = "#{node['etherpad-lite']['service_user_home']}/etherpad-lite/log"

default['etherpad-lite']['etherpad_git_repo_url'] = 'git://github.com/ether/etherpad-lite.git'
default['etherpad-lite']['etherpad_api_key'] = ''

default['etherpad-lite']['title'] = "Etherpad"
default['etherpad-lite']['favicon_url'] = "favicon.ico"
default['etherpad-lite']['default_text'] = "Welcome to Etherpad!\\n\\nThis pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!\\n\\nGet involved with Etherpad at http:\/\/etherpad.org\\n"

default['etherpad-lite']['domain'] = "example.com"
default['etherpad-lite']['ip_address'] = "0.0.0.0"
default['etherpad-lite']['port_number'] = 9001
default['etherpad-lite']['session_key'] = ""

default['etherpad-lite']['ssl_enabled'] = false
default['etherpad-lite']['ssl_key_path'] = ""
default['etherpad-lite']['ssl_cert_path'] = ""

default['etherpad-lite']['proxy_server'] = "nginx"

default['etherpad-lite']['db_type'] = "postgres"
default['etherpad-lite']['db_user'] = "postgres"
default['etherpad-lite']['db_host'] = "localhost"
default['etherpad-lite']['db_port'] = nil
default['etherpad-lite']['db_password'] = ""
default['etherpad-lite']['db_name'] = "etherpad"
default['etherpad-lite']['default_text'] = "Welcome to Etherpad!\\n\\nThis pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!\\n\\nGet involved with Etherpad at http:\/\/etherpad.org\\n"
default['etherpad-lite']['require_session'] = "false"
default['etherpad-lite']['edit_only'] = "false"
default['etherpad-lite']['minify'] = "true"
default['etherpad-lite']['max_age'] = 21600 # // 60 * 60 * 6 = 6 hours
default['etherpad-lite']['abiword_path'] = "null"
default['etherpad-lite']['require_authentication'] = "false"
default['etherpad-lite']['require_authorization'] = "false"

default['etherpad-lite']['admin_enabled'] = false
default['etherpad-lite']['admin_password'] = ""
default['etherpad-lite']['log_level'] = "INFO"

service_user = "etherpad-user"

default['etherpad-lite']['service_user'] = service_user
default['etherpad-lite']['service_user_gid'] = 500
default['etherpad-lite']['service_user_home'] = "/home/#{service_user}"
default['etherpad-lite']['service_name'] = "etherpad"
default['etherpad-lite']['logs_dir'] = "/var/logs/etherpad"
default['etherpad-lite']['domain'] = "example.com"
default['etherpad-lite']['require_session'] = false
default['etherpad-lite']['require_authentication'] = false
default['etherpad-lite']['require_authorization'] = false
default['etherpad-lite']['edit_only'] = false

default['etherpad-lite']['use_abiword'] = true
default['etherpad-lite']['abiword_path'] = "/usr/bin/abiword"

default['etherpad-lite']['etherpad_git_repo_url'] = 'git://github.com/ether/etherpad-lite.git'
default['etherpad-lite']['etherpad_api_key'] = ''
default['etherpad-lite']['minify'] = true
default['etherpad-lite']['max_age'] = 21600 # // 60 * 60 * 6 = 6 hours
default['etherpad-lite']['socketTransportProtocols'] = ["websocket", "xhr-polling", "jsonp-polling", "htmlfile"]

default['etherpad-lite']['plugins'] = []
33 changes: 0 additions & 33 deletions metadata.json

This file was deleted.

5 changes: 4 additions & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
version '0.1.2'

depends 'nodejs'

depends 'postgresql'
depends 'npm'
depends 'database'

depends 'nginx'
depends 'apache2'

# Check README.md for attributes
Loading