Permalink
Browse files

add release example & README

  • Loading branch information...
benoitc committed Mar 22, 2012
1 parent b6cbc0e commit 0705b1f82124c28f885131430dcf6942cfc8fdda
View
@@ -18,10 +18,7 @@ build-aux
*.dSYM
*.sw*
*.gz
-
-# relase
-rel/couch
-dev
+*.beam
# couch
apps/couch/couchjs
@@ -32,7 +29,11 @@ apps/couch/priv/couchspawnkillable
apps/couch/libs
apps/couch/share/server/main.js
apps/couch/share/server/main-coffee.js
+apps/couch_index/ebin
+apps/couch_replicator/ebin
+apps/couch_mrview/ebin
+apps/couch_changes/ebin
# other
deps
-ebin
+ebin/*.beam
View
15 LICENSE
@@ -0,0 +1,15 @@
+2011 (c) Benoît Chesneau <benoitc@e-engura.org>
+2011 (c) Nicolas R Dufour <nrdufour@gmail.com>
+
+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.
+
View
17 NOTICE
@@ -0,0 +1,17 @@
+refuge
+------
+
+2011 (c) Benoît Chesneau <benoitc@e-engura.org>
+2011 (c) Nicolas R Dufour <nrdufour@gmail.com>
+
+refuge is released under the Apache 2 license. See the LICENSE file for
+the complete license.
+
+third parties attributions
+--------------------------
+
+- packages/*
+ under Apache 2 license
+ 2010 (c) Basho Technologies
+
+
@@ -0,0 +1,68 @@
+couch_core
+----------
+
+couch_core is a static distribution of couchdb using rebar. It aims to be
+embed in your applications or be part of custom distribution of couchdb.
+
+couch_core is brought you by the [Refugre project](http://refuge.io)/
+
+Based on the couchdb code it is tagged from time to time for stability
+purpose. At some point some supported branch may appear.
+
+couch_core differs from refuge by only focusing on Apache CouchDB. It won't
+contain any of the refuge features like P2P nodes handling, ... .
+Internally we are using it to test couchdb and as an example on how to
+embed couchdb in your own applications. A working release example is
+provided.
+
+## Features:
+
+- Apache CouchDB based
+- rebar
+- relocatable
+- Fully opensource. All the sources are on refuge GIT repository
+ (http://github.com/refuge) under Apache License 2.
+
+## Requirements
+
+- OS supported: Linux, OSX, BSDs (windows support is coming)
+- Erlang R14
+- Curl
+- ICU (if not built statically)
+- Latest version of [rebar](http://github.com/basho/rebar) installed on
+ your system.
+
+An example of release file is provided in the `example` folder.
+
+
+##Notes on building a truly distributable package
+
+The package built above will still depend on some libraries from your
+system, so additional work has to be done to distribute it to
+older/newer systems.
+
+1. CouchDB will depend on the ICU library version that was present in
+ your system at build time. To easily bundle this library with the
+ package, build with:
+
+ $ make rel USE_STATIC_ICU=1
+
+1. Check whether your package depends on Ncurses:
+
+ $ ldd ./rel/couch/erts-*/bin/erlexec|grep ncurses
+
+ If it does, copy the .so file to ./rel/myapp/lib/ or rebuild Erlang
+ without this dependency.
+
+1. Decide whether you need SSL support in your package and check whether it
+ depends on OpenSSL:
+
+ $ ldd ./rel/couch/lib/ssl-*/priv/bin/ssl_esock|grep 'libcrypto\|libssl'
+
+ If it does, copy the .so file to ./rel/couch/lib/ or rebuild Erlang
+ without this dependency.
+
+If you copied any .so files in the last 2 steps, run this command, so
+that your app can find the libraries:
+
+ $ sed -i '/^RUNNER_USER=/a\\nexport LD_LIBRARY_PATH="$RUNNER_BASE_DIR/lib"' ./rel/couch/bin/couch
@@ -1,11 +0,0 @@
-%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
-%% ex: ft=erlang ts=4 sw=4 et
-
-{cover_enabled, true}.
-{eunit_opts, [{report,{eunit_surefire,[{dir,"."}]}}]}.
-{erl_opts, [debug_info]}.
-{require_otp_vsn, "R14|R15"}.
-
-{deps, [
- {couch, ".*", {git, "git://github.com/refuge/couch.git", "master"}}
-]}.
@@ -1,11 +0,0 @@
-%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
-%% ex: ft=erlang ts=4 sw=4 et
-
-{cover_enabled, true}.
-{eunit_opts, [{report,{eunit_surefire,[{dir,"."}]}}]}.
-{erl_opts, [debug_info]}.
-{require_otp_vsn, "R14|R15"}.
-
-{deps, [
- {couch_index, ".*", {git, "git://github.com/benoitc/couch_index.git", "master"}}
-]}.
@@ -1,11 +0,0 @@
-%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
-%% ex: ft=erlang ts=4 sw=4 et
-
-{cover_enabled, true}.
-{eunit_opts, [{report,{eunit_surefire,[{dir,"."}]}}]}.
-{erl_opts, [debug_info]}.
-{require_otp_vsn, "R14|R15"}.
-
-{deps, [
- {couch, ".*", {git, "git://github.com/refuge/couch.git", "master"}}
-]}.
View
@@ -0,0 +1,5 @@
+{application, couch_core, [
+ {vsn, "0.1"},
+ {description, "CouchDB core."},
+ {modules, []}
+]}.
View
@@ -0,0 +1,33 @@
+%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
+%% ex: ft=erlang ts=4 sw=4 et
+
+%% Platform-specific installation paths
+{platform_bin_dir, "./bin"}.
+{platform_data_dir, "./data"}.
+{platform_view_dir, "./data"}.
+{platform_etc_dir, "./etc"}.
+{platform_lib_dir, "./lib"}.
+{platform_log_dir, "./log"}.
+{platform_run_dir, "./run"}.
+{platform_share_dir, "./share"}.
+
+%% vendor info
+{vendor_name, "refuge"}.
+
+%% app config
+{couchdb_ip, "127.0.0.1"}.
+{couchdb_port, 5984}.
+{ssl_port, 6986}.
+{sasl_error_log, "log/sasl-error.log"}.
+{sasl_log_dir, "log/sasl"}.
+
+%% node
+{node, "couch@127.0.0.1"}.
+{crash_dump, "log/erl_crash.dump"}.
+
+{runner_script_dir, "$(cd ${0%/*} && pwd)"}.
+{runner_base_dir, "${RUNNER_SCRIPT_DIR%/*}"}.
+{runner_etc_dir, "$RUNNER_BASE_DIR/etc"}.
+{runner_log_dir, "$RUNNER_BASE_DIR/log"}.
+{pipe_dir, "/tmp/$RUNNER_BASE_DIR/"}.
+{runner_user, ""}.
@@ -0,0 +1,27 @@
+%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
+%% ex: ft=erlang ts=4 sw=4 et
+
+[
+
+ {couch, [
+ {config_dir, "{{platform_etc_dir}}"}
+ ]},
+
+ %% os_mon config
+ {os_mon, [
+ {start_memsup, false},
+ {start_cpu_sup, false},
+ {disk_space_check_interval, 1},
+ {disk_almost_full_thresold, 1}
+ ]},
+
+ %% SASL config
+ {sasl, [
+ {sasl_error_logger, {file, "{{sasl_error_log}}"}},
+ {errlog_type, error},
+ {error_logger_mf_dir, "{{sasl_log_dir}}"}, % Log directory
+ {error_logger_mf_maxbytes, 10485760}, % 10 MB max file size
+ {error_logger_mf_maxfiles, 5} % 5 files max
+ ]}
+].
+
Oops, something went wrong.

0 comments on commit 0705b1f

Please sign in to comment.