diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fb8cb85..d8a9b3c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,44 @@ CHANGELOG ========= +0.16.8 (Dec 12, 2013) +===================== + +* Improved + * [#109](https://github.com/leo-project/leofs/issues/109) Moved to "ini-file" configuration, which no longer use Erlang-specific syntax. Using [cuttlefish](https://github.com/basho/cuttlefish) to realize this function. + * [#110](https://github.com/leo-project/leofs/issues/110) Supported [erlcloud](https://github.com/gleber/erlcloud) for Erlang users + * [Supported Mac OS X](https://github.com/leo-project/libcutil/pull/2) which was contributed from Jeff Li +* Fixed Bugs + * [#102](https://github.com/leo-project/leofs/issues/102) Happened timeout when uploading a large object + * [#108](https://github.com/leo-project/leofs/issues/108) Happened not relocation of object(s) when removing a node and executing rebalance then add same node + * [#111](https://github.com/leo-project/leofs/issues/111) Could not upload large size file + * Fixed that not migrated "Bucket Table" + +* Used libraries + * leo project + * [leo_backend-db v0.14.2](https://github.com/leo-project/leo_backend_db.git) + * [leo_cache v0.4.16](https://github.com/leo-project/leo_cache.git) + * [leo_commons v0.14.9](https://github.com/leo-project/leo_commons.git) + * [leo_dcerl v0.2.7](https://github.com/leo-project/leo_dcerl.git) + * [leo_logger v0.12.6](https://github.com/leo-project/leo_logger.git) + * [leo_mcerl v0.2.9](https://github.com/leo-project/leo_mcerl.git) + * [leo_mq v0.12.22](https://github.com/leo-project/leo_mq.git) + * [leo_object_storage v0.14.8](https://github.com/leo-project/leo_object_storage.git) + * [leo_ordning_reda v0.8.18](https://github.com/leo-project/leo_ordning_reda.git) + * [leo_redundant_manager v1.2.5](https://github.com/leo-project/leo_redundant_manager.git) + * [leo_s3_libs v0.12.24](https://github.com/leo-project/leo_s3_libs.git) + * [leo_statistics v0.14.7](https://github.com/leo-project/leo_statistics.git) + * [leo_gateway v0.16.8](https://github.com/leo-project/leo_gateway.git) + * [leo_manager v0.16.8](https://github.com/leo-project/leo_manager.git) + * [leo_storage v0.16.8](https://github.com/leo-project/leo_storage.git) + * others + * [bitcask v1.6.4](https://github.com/basho/bitcask.git) + * [cowboy v0.8.6](https://github.com/extend/cowboy.git) + * [folsom](https://github.com/boundary/folsom.git) + * [jiffy](https://github.com/davisp/jiffy.git) + * [lz4 v0.1.1](https://github.com/leo-project/erlang-lz4.git) - forked from [szktty/erlang-lz4](https://github.com/szktty/erlng-lz4) + + 0.16.5 (Nov 26, 2013) ===================== diff --git a/Makefile b/Makefile index d7bc7ba5..090b60aa 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ release: ## rm -rf rel/leo_manager/leo_manager/ mkdir -p package/leo_manager_0 - cp rel/leo_manager/vars/manager_master_vars.config rel/leo_manager/vars.config + cp deps/leo_manager/priv/leo_manager_0.conf rel/leo_manager/files/leo_manager.conf (cd rel/leo_manager && ../../rebar generate) cp -r rel/leo_manager/leo_manager/* package/leo_manager_0/ ## @@ -41,7 +41,7 @@ release: ## rm -rf rel/leo_manager/leo_manager/ mkdir -p package/leo_manager_1 - cp rel/leo_manager/vars/manager_slave_vars.config rel/leo_manager/vars.config + cp deps/leo_manager/priv/leo_manager_1.conf rel/leo_manager/files/leo_manager.conf (cd rel/leo_manager && ../../rebar generate) cp -r rel/leo_manager/leo_manager/* package/leo_manager_1/ ## diff --git a/THANKS b/THANKS index 01dc2018..013ebaa0 100644 --- a/THANKS +++ b/THANKS @@ -13,3 +13,4 @@ Heinz N. Gies Hiroki Matsue Yoshinori Oe Satoshi Egi +Jeff Li diff --git a/bootstrap.sh b/bootstrap.sh index 3246a3d2..5199be83 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -60,16 +60,11 @@ cp -r package/leo_gateway package/leo_gateway_0 rm -rf package/leo_storage rm -rf package/leo_gateway -cp priv/test/app-m0.config package/leo_manager_0/etc/app.config -cp priv/test/app-s0.config package/leo_storage_0/etc/app.config -cp priv/test/app-s1.config package/leo_storage_1/etc/app.config -cp priv/test/app-s2.config package/leo_storage_2/etc/app.config -cp priv/test/app-s3.config package/leo_storage_3/etc/app.config - -cp priv/test/vm-s0.config package/leo_storage_0/etc/vm.args -cp priv/test/vm-s1.config package/leo_storage_1/etc/vm.args -cp priv/test/vm-s2.config package/leo_storage_2/etc/vm.args -cp priv/test/vm-s3.config package/leo_storage_3/etc/vm.args +cp priv/test/app-m0.conf package/leo_manager_0/etc/leo_manager.conf +cp priv/test/app-s0.conf package/leo_storage_0/etc/leo_storage.conf +cp priv/test/app-s1.conf package/leo_storage_1/etc/leo_storage.conf +cp priv/test/app-s2.conf package/leo_storage_2/etc/leo_storage.conf +cp priv/test/app-s3.conf package/leo_storage_3/etc/leo_storage.conf ## launch if [ $1 = "build" ]; then diff --git a/priv/test/app-g0.config b/priv/test/app-g0.config deleted file mode 100644 index bfcbf1eb..00000000 --- a/priv/test/app-g0.config +++ /dev/null @@ -1,146 +0,0 @@ -%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*- -%%====================================================================== -%% -%% LeoFS Gateway -%% -%% Copyright (c) 2012-2013 Rakuten, Inc. -%% -%% This file is provided to you 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. -%% -%%====================================================================== -[ - {sasl, [ - {sasl_error_logger, {file, "./log/sasl/sasl-error.log"}}, - {errlog_type, error}, - {error_logger_mf_dir, "./log/sasl"}, - {error_logger_mf_maxbytes, 10485760}, % 10 MB max file size - {error_logger_mf_maxfiles, 5} % 5 files max - ]}, - - {leo_gateway, [ - %% System Ver - {system_version, "0.16.5" }, - - %% Gateway Properties: - {http, [ - %% http-handler: - %% [rest | s3 | embed] - {handler, s3}, - %% Gateway port number: - {port, 8080 }, - %% # of acceptors: - {num_of_acceptors, 128 }, - %% max # of layer of directories: - {layer_of_dirs, {1, 12} }, - %% ssl related: - {ssl_port, 8443 }, - {ssl_certfile, "./etc/server_cert.pem" }, - {ssl_keyfile, "./etc/server_key.pem" } - ]}, - - %% Large-object-related properties: - {large_object, [ - {max_chunked_objs, 1000 }, - {max_len_for_obj, 524288000 }, - {chunked_obj_len, 5242880 }, - {threshold_obj_len, 5767168 } - ]}, - - %% Cache-related properties: - {cache, [ - %% Use HTTP-cache ? - {http_cache, false}, - %% # of Cache workers - {cache_workers, 128 }, - - %% RAM-cache capacity - {cache_ram_capacity, 1073741824 }, - %% Disc-cache capacity - {cache_disc_capacity, 0 }, - - %% Disc-cache's threshold length which value is exceeded - %% when an object is stored into the disc - {cache_disc_threshold_len, 1048576 }, - %% Disc-cache's directory - {cache_disc_dir_data, "./cache/data" }, - {cache_disc_dir_journal, "./cache/journal" }, - - %% Cache expire time. (sec) - {cache_expire, 300 }, - %% Acceptable maximum content length (MB) - {cache_max_content_len, 1048576 }, - %% Acceptable content-type(s) - {cachable_content_type, [] }, - %% Acceptable URL-Pattern(s) - {cachable_path_pattern, [] } - ]}, - - %% Timeout when request from gateway to storage == - {timeout, [ - {level_1, 5000}, - {level_2, 7000}, - {level_3, 10000}, - {level_4, 20000}, - {level_5, 30000} - ]}, - - %% Manager - leo-manager's nodes - {managers, ["manager_0@127.0.0.1", "manager_1@127.0.0.1"] }, - - %% Log-specific properties - %% - Log output level - %% 0: debug - %% 1: info - %% 2: warning - %% 3: error - {log_level, 1 }, - - %% Output Access-log? - {is_enable_access_log, false }, - {is_enable_esearch, false }, - {esearch_host, "127.0.0.1" }, - {esearch_port, 9200 }, - {esearch_timeout, 10000 }, - {esearch_bulk_duration, 3000 }, - - %% Log appender - [file] - {log_appender, [ - {file, [{path, "./log/app"}]} - ]}, - - %% Directory of log output - {log_dir, "./log"}, - %% Directory of mq's db-files - {queue_dir, "./work/queue"}, - %% Directory of snmp-agent - {snmp_agent, "./snmp/snmpa_gateway_0/LEO-GATEWAY"} - ]}, - - {ecache, [{profile, false}]}, - {leo_backend_db, [{profile, false}]}, - {leo_logger, [{profile, false}]}, - {leo_mq, [{profile, false}, - {backend_db, 'bitcask'} - ]}, - {leo_object_storage, [{profile, false}]}, - {leo_ordning_reda, [{profile, false}, - {send_after_interval, 100} - ]}, - {leo_redundant_manager, [{profile, false}, - {notify_mf, [leo_manager_api, notify]}, - {sync_mf, [leo_manager_api, synchronize]} - ]}, - {leo_statistics, [{profile, false}]} -]. diff --git a/priv/test/app-g1.config b/priv/test/app-g1.config deleted file mode 100644 index 36d88013..00000000 --- a/priv/test/app-g1.config +++ /dev/null @@ -1,169 +0,0 @@ -%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*- -%%====================================================================== -%% -%% LeoFS Gateway -%% -%% Copyright (c) 2012-2013 Rakuten, Inc. -%% -%% This file is provided to you 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. -%% -%%====================================================================== -[ - {sasl, [ - {sasl_error_logger, {file, "./log/sasl/sasl-error.log"}}, - {errlog_type, error}, - {error_logger_mf_dir, "./log/sasl"}, - {error_logger_mf_maxbytes, 10485760}, % 10 MB max file size - {error_logger_mf_maxfiles, 5} % 5 files max - ]}, - - {leo_gateway, [ - %% System Ver - {system_version, "0.16.5" }, - - %% Gateway Properties: - {http, [ - %% http-handler: - %% [rest | s3 | swift] - {handler, s3}, - %% Gateway port number: - {port, 8080 }, - %% # of acceptors: - {num_of_acceptors, 128 }, - %% max # of layer of directories: - {layer_of_dirs, {1, 12} }, - %% ssl related: - {ssl_port, 8443 }, - {ssl_certfile, "./etc/server_cert.pem" }, - {ssl_keyfile, "./etc/server_key.pem" } - ]}, - - %% Large-object-related properties: - {large_object, [ - {max_chunked_objs, 1000 }, - {max_len_for_obj, 524288000 }, - {chunked_obj_len, 5242880 }, - {threshold_obj_len, 5767168 } - ]}, - - %% Cache-related properties: - {cache, [ - %% Use HTTP-cache ? - {http_cache, false}, - %% # of Cache workers - {cache_workers, 128 }, - - %% RAM-cache capacity - {cache_ram_capacity, 1073741824 }, - %% Disc-cache capacity - {cache_disc_capacity, 0 }, - - %% Disc-cache's threshold length which value is exceeded - %% when an object is stored into the disc - {cache_disc_threshold_len, 1048576 }, - %% Disc-cache's directory - {cache_disc_dir_data, "./cache/data" }, - {cache_disc_dir_journal, "./cache/journal" }, - - %% Cache expire time. (sec) - {cache_expire, 300 }, - %% Acceptable maximum content length (MB) - {cache_max_content_len, 1048576 }, - %% Acceptable content-type(s) - {cachable_content_type, [] }, - %% Acceptable URL-Pattern(s) - {cachable_path_pattern, [] } - ]}, - - %% QoS-related properties: - {qos, [ - {is_enable_qos, false }, - {elkdb_conns, [ - [{pool_size, 16}, - {pool_buffer, 16}, - {host, "127.0.0.1"}, - {port, 5555} - ], - [{pool_size, 16}, - {pool_buffer, 16}, - {host, "127.0.0.1"}, - {port, 5556} - ], - [{pool_size, 16}, - {pool_buffer, 16}, - {host, "127.0.0.1"}, - {port, 5557} - ] - ]} - ] - }, - - %% Timeout when request from gateway to storage == - {timeout, [ - {level_1, 5000}, - {level_2, 7000}, - {level_3, 10000}, - {level_4, 20000}, - {level_5, 30000} - ]}, - - %% Manager - leo-manager's nodes - {managers, ["manager_0@127.0.0.1", "manager_1@127.0.0.1"] }, - - %% Log-specific properties - %% - Log output level - %% 0: debug - %% 1: info - %% 2: warning - %% 3: error - {log_level, 1 }, - - %% Output Access-log? - {is_enable_access_log, false }, - {is_enable_esearch, false }, - {esearch_host, "127.0.0.1" }, - {esearch_port, 9200 }, - {esearch_timeout, 10000 }, - {esearch_bulk_duration, 3000 }, - - %% Log appender - [file] - {log_appender, [ - {file, [{path, "./log/app"}]} - ]}, - - %% Directory of log output - {log_dir, "./log"}, - %% Directory of mq's db-files - {queue_dir, "./work/queue"}, - %% Directory of snmp-agent - {snmp_agent, "./snmp/snmpa_gateway_1/LEO-GATEWAY"} - ]}, - - {ecache, [{profile, false}]}, - {leo_backend_db, [{profile, false}]}, - {leo_logger, [{profile, false}]}, - {leo_mq, [{profile, false}, - {backend_db, 'bitcask'} - ]}, - {leo_object_storage, [{profile, false}]}, - {leo_ordning_reda, [{profile, false}, - {send_after_interval, 100} - ]}, - {leo_redundant_manager, [{profile, false}, - {notify_mf, [leo_manager_api, notify]}, - {sync_mf, [leo_manager_api, synchronize]} - ]}, - {leo_statistics, [{profile, false}]} -]. diff --git a/priv/test/app-m0.conf b/priv/test/app-m0.conf new file mode 100644 index 00000000..ccd6a9a2 --- /dev/null +++ b/priv/test/app-m0.conf @@ -0,0 +1,151 @@ +#====================================================================== +# LeoFS - Manager Configuration +# +# See: http://www.leofs.org/docs/configuration.html#leofs-manager-master +# See: http://www.leofs.org/docs/configuration.html#leofs-manager-slave +#====================================================================== +## -------------------------------------------------------------------- +## SASL +## -------------------------------------------------------------------- +## See: http://www.erlang.org/doc/man/sasl_app.html +## +## The following configuration parameters are defined for +## the SASL application. See app(4) for more information +## about configuration parameters + +## SASL error log path +## sasl.sasl_error_log = ./log/sasl/sasl-error.log + +## Restricts the error logging performed by the specified sasl_error_logger +## to error reports, progress reports, or both. +## errlog_type = [error | progress | all] +## sasl.errlog_type = error + +## Specifies in which directory the files are stored. +## If this parameter is undefined or false, the error_logger_mf_h is not installed. +# sasl.error_logger_mf_dir = ./log/sasl + +## Specifies how large each individual file can be. +## If this parameter is undefined, the error_logger_mf_h is not installed. +## sasl.error_logger_mf_maxbytes = 10485760 + +## Specifies how many files are used. +## If this parameter is undefined, the error_logger_mf_h is not installed. +## sasl.error_logger_mf_maxfiles = 5 + +## -------------------------------------------------------------------- +## MANAGER +## -------------------------------------------------------------------- +## LeoFS version +system_version = 0.16.8 + +## Mode of Manager: [master, slave] +manager.mode = master + +## Partner of manager's alias +manager.partner = manager_1@127.0.0.1 + +## Manager-console accepatable port number +console.port.cui = 10010 +console.port.json = 10020 + +## Manager-console's number of acceptors +console.acceptors.cui = 3 +console.acceptors.json = 16 + + +## -------------------------------------------------------------------- +## MANAGER - Consistency Level +## * Only set its configurations to **Manager-master** +## * See: http://www.leofs.org/docs/configuration.html#the-consistency-level +## -------------------------------------------------------------------- +## A number of replicas +consistency.num_of_replicas = 2 + +## A number of replicas needed for a successful WRITE operation +consistency.write = 1 + +## A number of replicas needed for a successful READ operation +consistency.read = 1 + +## A number of replicas needed for a successful DELETE operation +consistency.delete = 1 + +## A number of rack-aware replicas +## consistency.rack_aware_replicas = 0 + + +## -------------------------------------------------------------------- +## MANAGER - Mnesia +## * Store the info storage-cluster and the info of gateway(s) +## * Store the RING and the command histories +## -------------------------------------------------------------------- +## Mnesia dir +mnesia.dir = ./work/mnesia/127.0.0.1 + +## The write threshold for transaction log dumps +## as the number of writes to the transaction log +mnesia.dump_log_write_threshold = 50000 + +## Controls how often disc_copies tables are dumped from memory +mnesia.dc_dump_limit = 40 + + +## -------------------------------------------------------------------- +## MANAGER - Log +## -------------------------------------------------------------------- +## Log level: [0:debug, 1:info, 2:warn, 3:error] +## log.log_level = 1 + +## Output log file(s) - Erlang's log +## log.erlang = ./log/erlang + +## Output log file(s) - app +## log.app = ./log/app + +## Output log file(s) - members of storage-cluster +## log.member_dir = ./log/ring + +## Output log file(s) - ring +## log.ring_dir = ./log/ring + + +## -------------------------------------------------------------------- +## MANAGER - Other Directories +## -------------------------------------------------------------------- +## Directory of queue for monitoring "RING" +## queue_dir = ./work/queue + +## Directory of SNMP agent configuration +## snmp_agent = ./snmp/snmpa_manager_0/LEO-MANAGER + +#====================================================================== +# For vm.args +#====================================================================== +## Name of the leofs-gateway node +nodename = manager_0@127.0.0.1 + +## Cookie for distributed node communication. All nodes in the same cluster +## should use the same cookie or they will not be able to communicate. +distributed_cookie = 401321b4 + +## Enable kernel poll +erlang.kernel_poll = true + +## Number of async threads +erlang.asyc_threads = 32 + +## Increase number of concurrent ports/sockets +erlang.max_ports = 64000 + +## Set the location of crash dumps +erlang.crash_dump = ./log/erl_crash.dump + +## Raise the ETS table limit +erlang.max_ets_tables = 256000 + +## Raise the default erlang process limit +process_limit = 1048576 + +## Path of SNMP-agent configuration +##snmp_conf = ./snmp/snmpa_manager_0/leo_maanager_snmp diff --git a/priv/test/app-m0.config b/priv/test/app-m0.config deleted file mode 100644 index 3fdc9616..00000000 --- a/priv/test/app-m0.config +++ /dev/null @@ -1,108 +0,0 @@ -%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*- -%%====================================================================== -%% -%% LeoFS Manager -%% -%% Copyright (c) 2012-2013 Rakuten, Inc. -%% -%% This file is provided to you 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. -%% -%%====================================================================== -[ - {sasl, [ - {sasl_error_logger, {file, "./log/sasl/sasl-error.log"}}, - {errlog_type, error}, - {error_logger_mf_dir, "./log/sasl"}, - {error_logger_mf_maxbytes, 10485760}, % 10 MB max file size - {error_logger_mf_maxfiles, 5} % 5 files max - ]}, - {mnesia, [ - {dir, "./work/mnesia/127.0.0.1"}, - {dump_log_write_threshold, 50000}, - {dc_dump_limit, 40} - ]}, - {leo_manager, [ - %% == System Ver == - {system_version, "0.16.5" }, - - %% == System Configuration == - %% - %% n: # of replicated files - %% w: # of successes of write-operation - %% r: # of successes of read-operation - %% d: # of successes of delete-operation - %% bit_of_ring: Ring size - 128 = 2^128 - {system, [{n, 2 }, - {w, 1 }, - {r, 1 }, - {d, 1 }, - {bit_of_ring, 128}, - {level_1, 0}, - {level_2, 0} - ]}, - - %% == Available Commands == - {available_commands, all }, - - %% == Manager Properties == - %% Mode of server - [master|slave] - {manager_mode, master }, - %% Partner of manager's alias - {manager_partners, ["manager_1@127.0.0.1"] }, - %% Manager accepatable port number - {port_cui, 10010 }, - {port_json, 10020 }, - - %% # of acceptors - {num_of_acceptors_cui, 3}, - {num_of_acceptors_json, 16}, - - %% Compaction: # of execution of conncurrent - {num_of_compact_proc, 3 }, - - %% == Log-specific properties == - %% - %% Log output level - %% 0: debug - %% 1: info - %% 2: warning - %% 3: error - {log_level, 1 }, - %% Log appender - [file] - {log_appender, [ - {file, [{path, "./log/app"}]} - ]}, - - %% == Directories == - %% - %% Directory of log output - {log_dir, "./log"}, - %% Directory of mq's db-file - {queue_dir, "./work/queue"}, - %% Directory of snmp-agent - {snmp_agent, "./snmp/snmpa_manager_0/LEO-MANAGER"} - ]}, - {leo_backend_db, [{profile, false}]}, - {leo_logger, [{profile, false}]}, - {leo_mq, [{profile, false}, - {backend_db, 'bitcask'} - ]}, - {leo_object_storage, [{profile, false}]}, - {leo_redundant_manager, [{profile, false}, - {notify_mf, [leo_manager_api, notify]}, - {sync_mf, [leo_manager_api, synchronize]} - ]}, - {leo_statistics, [{profile, false}]} -]. diff --git a/priv/test/app-s0.conf b/priv/test/app-s0.conf new file mode 100644 index 00000000..f4388d7c --- /dev/null +++ b/priv/test/app-s0.conf @@ -0,0 +1,158 @@ +#====================================================================== +# LeoFS - Storage Configuration +# +# See: http://www.leofs.org/docs/configuration.html#leofs-storage +#====================================================================== +## -------------------------------------------------------------------- +## SASL +## -------------------------------------------------------------------- +## See: http://www.erlang.org/doc/man/sasl_app.html +## +## The following configuration parameters are defined for +## the SASL application. See app(4) for more information +## about configuration parameters + +## SASL error log path +## sasl.sasl_error_log = ./log/sasl/sasl-error.log + +## Restricts the error logging performed by the specified sasl_error_logger +## to error reports, progress reports, or both. +## errlog_type = [error | progress | all] +## sasl.errlog_type = error + +## Specifies in which directory the files are stored. +## If this parameter is undefined or false, the error_logger_mf_h is not installed. +# sasl.error_logger_mf_dir = ./log/sasl + +## Specifies how large each individual file can be. +## If this parameter is undefined, the error_logger_mf_h is not installed. +## sasl.error_logger_mf_maxbytes = 10485760 + +## Specifies how many files are used. +## If this parameter is undefined, the error_logger_mf_h is not installed. +## sasl.error_logger_mf_maxfiles = 5 + +## -------------------------------------------------------------------- +## Manager's Node(s) +## -------------------------------------------------------------------- +## Name of Manager node(s) +managers = [manager_0@127.0.0.1, manager_1@127.0.0.1] + +## -------------------------------------------------------------------- +## STORAGE +## -------------------------------------------------------------------- +## LeoFS version +system_version = 0.16.8 + +## Object container +obj_containers.path = [./avs] +obj_containers.num_of_containers = [8] + + +## A number of virtual-nodes for the redundant-manager +## num_of_vnodes = 168 + + +## -------------------------------------------------------------------- +## STORAGE - MQ +## -------------------------------------------------------------------- +## A number of mq-server's processes +mq.num_of_mq_procs = 8 + +## MQ recover per_object +mq.recover_per_object.num_of_batch_process = 1 +mq.recover_per_object.interval_min = 1 +mq.recover_per_object.interval_max = 1 + +## MQ synchronize objects by vnode-id +mq.sync_by_vnode_id.num_of_batch_process = 1 +mq.sync_by_vnode_id.interval_min = 8 +mq.sync_by_vnode_id.interval_max = 32 + +## MQ rebalance objects +mq.rebalance.num_of_batch_process = 1 +mq.rebalance.interval_min = 1 +mq.rebalance.interval_max = 1 + +## MQ delete objects +mq.delete_object.num_of_batch_process = 1 +mq.delete_object.interval_min = 1 +mq.delete_object.interval_max = 1 + +## MQ recover a node's object +mq.recovery_node.num_of_batch_process = 1 +mq.recovery_node.interval_min = 8 +mq.recovery_node.interval_max = 32 + + +## -------------------------------------------------------------------- +## STORAGE - Replication/Recovery object(s) +## -------------------------------------------------------------------- +## Rack-id for the rack-awareness replica placement +## replication.rack_awareness.rack_id = "" + +## Size of stacked objects (bytes) +## replication.recovery.size_of_stacked_objs = 67108864 + +## Stacking timeout (msec) +## replication.recovery.stacking_timeout = 5000 + + +## -------------------------------------------------------------------- +## STORAGE - Log +## -------------------------------------------------------------------- +## Log level: [0:debug, 1:info, 2:warn, 3:error] +## log.log_level = 1 + +## Output log file(s) - Erlang's log +## log.erlang = ./log/erlang + +## Output log file(s) - app +## log.app = ./log/app + +## Output log file(s) - members of storage-cluster +## log.member_dir = ./log/ring + +## Output log file(s) - ring +## log.ring_dir = ./log/ring + + +## -------------------------------------------------------------------- +## STORAGE - Other Directories +## -------------------------------------------------------------------- +## Directory of queue for monitoring "RING" +## queue_dir = ./work/queue + +## Directory of SNMP agent configuration +snmp_agent = ./snmp/snmpa_storage_0/LEO-STORAGE + +#====================================================================== +# For vm.args +#====================================================================== +## Name of the leofs-gateway node +nodename = storage_0@127.0.0.1 + +## Cookie for distributed node communication. All nodes in the same cluster +## should use the same cookie or they will not be able to communicate. +distributed_cookie = 401321b4 + +## Enable kernel poll +erlang.kernel_poll = true + +## Number of async threads +erlang.asyc_threads = 32 + +## Increase number of concurrent ports/sockets +erlang.max_ports = 64000 + +## Set the location of crash dumps +erlang.crash_dump = ./log/erl_crash.dump + +## Raise the ETS table limit +erlang.max_ets_tables = 256000 + +## Raise the default erlang process limit +process_limit = 1048576 + +## Path of SNMP-agent configuration +snmp_conf = ./snmp/snmpa_storage_0/leo_storage_snmp diff --git a/priv/test/app-s0.config b/priv/test/app-s0.config deleted file mode 100644 index 1dfdc9c2..00000000 --- a/priv/test/app-s0.config +++ /dev/null @@ -1,124 +0,0 @@ -%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*- -%%====================================================================== -%% -%% LeoFS Storage -%% -%% Copyright (c) 2012-2013 Rakuten, Inc. -%% -%% This file is provided to you 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. -%% -%%====================================================================== -[ - {sasl, [ - {sasl_error_logger, {file, "./log/sasl/sasl-error.log"}}, - {errlog_type, error}, - {error_logger_mf_dir, "./log/sasl"}, - {error_logger_mf_maxbytes, 10485760}, % 10 MB max file size - {error_logger_mf_maxfiles, 5} % 5 files max - ]}, - - {leo_storage, [ - %% == System Ver == - {system_version, "0.16.5" }, - - %% == Storage Configuration == - %% - %% Object containers properties: - %% @param path - Directory of object-containers - %% @param num_of_containers - # of object-containers - %% - %% Notes: - %% If you set up LeoFS on 'development', default value - "./avs" - is OK. - %% If you set up LeoFS on 'production' or 'staging', You should need to change "volume", - %% And We recommend volume's partition is XFS. - %% - {obj_containers, [[{path, "./avs"}, {num_of_containers, 8}]] }, - - %% leo-manager's nodes - {managers, ["manager_0@127.0.0.1", "manager_1@127.0.0.1"] }, - - %% # of virtual-nodes - {num_of_vnodes, 168 }, - - %% # of mq-server's processes - {num_of_mq_procs, 8 }, - - %% mq - queues cosumption's intervals - %% - per_object - {cns_interval_per_object_min, 0 }, - {cns_interval_per_object_max, 16 }, - %% - sync_by_vnode_id - {cns_interval_sync_by_vnode_id_min, 0 }, - {cns_interval_sync_by_vnode_id_max, 16 }, - %% - for rebalance - {cns_interval_rebalance_min, 0 }, - {cns_interval_rebalance_max, 16 }, - %% - async deletion objects (after remove a bucket) - {cns_interval_async_deletion_min, 0 }, - {cns_interval_async_deletion_max, 16 }, - %% - recovery node - {cns_interval_recovery_node_min, 0 }, - {cns_interval_recovery_node_max, 16 }, - - %% cluster group - level_1 - %% - Able to use from ver 1.0.0) - %% - ex: {grp_level_1, "DC_0001"}. - {grp_level_1, ""}, - - %% cluster group - level_2 - %% - Able to use from ver 0.14.2) - %% - ex: {grp_level_2, "RACK_0001"}. - {grp_level_2, ""}, - - %% == For Ordning-Reda == - %% Size of stacked objects (bytes) - {size_of_stacked_objs, 67108864 }, - %% Stacking timeout (msec) - {stacking_timeout, 5000 }, - - %% == Log-specific properties == - %% - {log_level, 1 }, - {log_appender, [ - {file, [{path, "./log/app"}]} - ]}, - - %% == Directories == - %% - %% Directory of log output - {log_dir, "./log"}, - %% Directory of mq's db-files - {queue_dir, "./work/queue"}, - %% Directory of SNMP-Agent - {snmp_agent, "./snmp/snmpa_storage_0/LEO-STORAGE"} - ]}, - - {leo_backend_db, [{profile, false}]}, - {leo_logger, [{profile, false}]}, - {leo_mq, [{profile, false}, - {backend_db, 'bitcask'} - ]}, - {leo_object_storage, [{profile, false}, - {metadata_storage, 'bitcask'} - ]}, - {leo_ordning_reda, [{profile, false}, - {send_after_interval, 100} - ]}, - {leo_redundant_manager, [{profile, false}, - {notify_mf, [leo_manager_api, notify]}, - {sync_mf, [leo_manager_api, synchronize]} - ]}, - {leo_statistics, [{profile, false}]} -]. diff --git a/priv/test/app-s1.conf b/priv/test/app-s1.conf new file mode 100644 index 00000000..938e9a55 --- /dev/null +++ b/priv/test/app-s1.conf @@ -0,0 +1,158 @@ +#====================================================================== +# LeoFS - Storage Configuration +# +# See: http://www.leofs.org/docs/configuration.html#leofs-storage +#====================================================================== +## -------------------------------------------------------------------- +## SASL +## -------------------------------------------------------------------- +## See: http://www.erlang.org/doc/man/sasl_app.html +## +## The following configuration parameters are defined for +## the SASL application. See app(4) for more information +## about configuration parameters + +## SASL error log path +## sasl.sasl_error_log = ./log/sasl/sasl-error.log + +## Restricts the error logging performed by the specified sasl_error_logger +## to error reports, progress reports, or both. +## errlog_type = [error | progress | all] +## sasl.errlog_type = error + +## Specifies in which directory the files are stored. +## If this parameter is undefined or false, the error_logger_mf_h is not installed. +# sasl.error_logger_mf_dir = ./log/sasl + +## Specifies how large each individual file can be. +## If this parameter is undefined, the error_logger_mf_h is not installed. +## sasl.error_logger_mf_maxbytes = 10485760 + +## Specifies how many files are used. +## If this parameter is undefined, the error_logger_mf_h is not installed. +## sasl.error_logger_mf_maxfiles = 5 + +## -------------------------------------------------------------------- +## Manager's Node(s) +## -------------------------------------------------------------------- +## Name of Manager node(s) +managers = [manager_0@127.0.0.1, manager_1@127.0.0.1] + +## -------------------------------------------------------------------- +## STORAGE +## -------------------------------------------------------------------- +## LeoFS version +system_version = 0.16.8 + +## Object container +obj_containers.path = [./avs] +obj_containers.num_of_containers = [8] + + +## A number of virtual-nodes for the redundant-manager +## num_of_vnodes = 168 + + +## -------------------------------------------------------------------- +## STORAGE - MQ +## -------------------------------------------------------------------- +## A number of mq-server's processes +mq.num_of_mq_procs = 8 + +## MQ recover per_object +mq.recover_per_object.num_of_batch_process = 1 +mq.recover_per_object.interval_min = 1 +mq.recover_per_object.interval_max = 1 + +## MQ synchronize objects by vnode-id +mq.sync_by_vnode_id.num_of_batch_process = 1 +mq.sync_by_vnode_id.interval_min = 8 +mq.sync_by_vnode_id.interval_max = 32 + +## MQ rebalance objects +mq.rebalance.num_of_batch_process = 1 +mq.rebalance.interval_min = 1 +mq.rebalance.interval_max = 1 + +## MQ delete objects +mq.delete_object.num_of_batch_process = 1 +mq.delete_object.interval_min = 1 +mq.delete_object.interval_max = 1 + +## MQ recover a node's object +mq.recovery_node.num_of_batch_process = 1 +mq.recovery_node.interval_min = 8 +mq.recovery_node.interval_max = 32 + + +## -------------------------------------------------------------------- +## STORAGE - Replication/Recovery object(s) +## -------------------------------------------------------------------- +## Rack-id for the rack-awareness replica placement +## replication.rack_awareness.rack_id = "" + +## Size of stacked objects (bytes) +## replication.recovery.size_of_stacked_objs = 67108864 + +## Stacking timeout (msec) +## replication.recovery.stacking_timeout = 5000 + + +## -------------------------------------------------------------------- +## STORAGE - Log +## -------------------------------------------------------------------- +## Log level: [0:debug, 1:info, 2:warn, 3:error] +## log.log_level = 1 + +## Output log file(s) - Erlang's log +## log.erlang = ./log/erlang + +## Output log file(s) - app +## log.app = ./log/app + +## Output log file(s) - members of storage-cluster +## log.member_dir = ./log/ring + +## Output log file(s) - ring +## log.ring_dir = ./log/ring + + +## -------------------------------------------------------------------- +## STORAGE - Other Directories +## -------------------------------------------------------------------- +## Directory of queue for monitoring "RING" +## queue_dir = ./work/queue + +## Directory of SNMP agent configuration +snmp_agent = ./snmp/snmpa_storage_1/LEO-STORAGE + +#====================================================================== +# For vm.args +#====================================================================== +## Name of the leofs-gateway node +nodename = storage_1@127.0.0.1 + +## Cookie for distributed node communication. All nodes in the same cluster +## should use the same cookie or they will not be able to communicate. +distributed_cookie = 401321b4 + +## Enable kernel poll +erlang.kernel_poll = true + +## Number of async threads +erlang.asyc_threads = 32 + +## Increase number of concurrent ports/sockets +erlang.max_ports = 64000 + +## Set the location of crash dumps +erlang.crash_dump = ./log/erl_crash.dump + +## Raise the ETS table limit +erlang.max_ets_tables = 256000 + +## Raise the default erlang process limit +process_limit = 1048576 + +## Path of SNMP-agent configuration +snmp_conf = ./snmp/snmpa_storage_1/leo_storage_snmp diff --git a/priv/test/app-s1.config b/priv/test/app-s1.config deleted file mode 100644 index 17993716..00000000 --- a/priv/test/app-s1.config +++ /dev/null @@ -1,124 +0,0 @@ -%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*- -%%====================================================================== -%% -%% LeoFS Storage -%% -%% Copyright (c) 2012-2013 Rakuten, Inc. -%% -%% This file is provided to you 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. -%% -%%====================================================================== -[ - {sasl, [ - {sasl_error_logger, {file, "./log/sasl/sasl-error.log"}}, - {errlog_type, error}, - {error_logger_mf_dir, "./log/sasl"}, - {error_logger_mf_maxbytes, 10485760}, % 10 MB max file size - {error_logger_mf_maxfiles, 5} % 5 files max - ]}, - - {leo_storage, [ - %% == System Ver == - {system_version, "0.16.5" }, - - %% == Storage Configuration == - %% - %% Object containers properties: - %% @param path - Directory of object-containers - %% @param num_of_containers - # of object-containers - %% - %% Notes: - %% If you set up LeoFS on 'development', default value - "./avs" - is OK. - %% If you set up LeoFS on 'production' or 'staging', You should need to change "volume", - %% And We recommend volume's partition is XFS. - %% - {obj_containers, [[{path, "./avs"}, {num_of_containers, 8}]] }, - - %% leo-manager's nodes - {managers, ["manager_0@127.0.0.1", "manager_1@127.0.0.1"] }, - - %% # of virtual-nodes - {num_of_vnodes, 168 }, - - %% # of mq-server's processes - {num_of_mq_procs, 8 }, - - %% mq - queues cosumption's intervals - %% - per_object - {cns_interval_per_object_min, 0 }, - {cns_interval_per_object_max, 16 }, - %% - sync_by_vnode_id - {cns_interval_sync_by_vnode_id_min, 0 }, - {cns_interval_sync_by_vnode_id_max, 16 }, - %% - for rebalance - {cns_interval_rebalance_min, 0 }, - {cns_interval_rebalance_max, 16 }, - %% - async deletion objects (after remove a bucket) - {cns_interval_async_deletion_min, 0 }, - {cns_interval_async_deletion_max, 16 }, - %% - recovery node - {cns_interval_recovery_node_min, 0 }, - {cns_interval_recovery_node_max, 16 }, - - %% cluster group - level_1 - %% - Able to use from ver 1.0.0) - %% - ex: {grp_level_1, "DC_0001"}. - {grp_level_1, ""}, - - %% cluster group - level_2 - %% - Able to use from ver 0.14.2) - %% - ex: {grp_level_2, "RACK_0001"}. - {grp_level_2, ""}, - - %% == For Ordning-Reda == - %% Size of stacked objects (bytes) - {size_of_stacked_objs, 67108864 }, - %% Stacking timeout (msec) - {stacking_timeout, 5000 }, - - %% == Log-specific properties == - %% - {log_level, 1 }, - {log_appender, [ - {file, [{path, "./log/app"}]} - ]}, - - %% == Directories == - %% - %% Directory of log output - {log_dir, "./log"}, - %% Directory of mq's db-files - {queue_dir, "./work/queue"}, - %% Directory of SNMP-Agent - {snmp_agent, "./snmp/snmpa_storage_1/LEO-STORAGE"} - ]}, - - {leo_backend_db, [{profile, false}]}, - {leo_logger, [{profile, false}]}, - {leo_mq, [{profile, false}, - {backend_db, 'bitcask'} - ]}, - {leo_object_storage, [{profile, false}, - {metadata_storage, 'bitcask'} - ]}, - {leo_ordning_reda, [{profile, false}, - {send_after_interval, 100} - ]}, - {leo_redundant_manager, [{profile, false}, - {notify_mf, [leo_manager_api, notify]}, - {sync_mf, [leo_manager_api, synchronize]} - ]}, - {leo_statistics, [{profile, false}]} -]. diff --git a/priv/test/app-s2.conf b/priv/test/app-s2.conf new file mode 100644 index 00000000..17d1589b --- /dev/null +++ b/priv/test/app-s2.conf @@ -0,0 +1,158 @@ +#====================================================================== +# LeoFS - Storage Configuration +# +# See: http://www.leofs.org/docs/configuration.html#leofs-storage +#====================================================================== +## -------------------------------------------------------------------- +## SASL +## -------------------------------------------------------------------- +## See: http://www.erlang.org/doc/man/sasl_app.html +## +## The following configuration parameters are defined for +## the SASL application. See app(4) for more information +## about configuration parameters + +## SASL error log path +## sasl.sasl_error_log = ./log/sasl/sasl-error.log + +## Restricts the error logging performed by the specified sasl_error_logger +## to error reports, progress reports, or both. +## errlog_type = [error | progress | all] +## sasl.errlog_type = error + +## Specifies in which directory the files are stored. +## If this parameter is undefined or false, the error_logger_mf_h is not installed. +# sasl.error_logger_mf_dir = ./log/sasl + +## Specifies how large each individual file can be. +## If this parameter is undefined, the error_logger_mf_h is not installed. +## sasl.error_logger_mf_maxbytes = 10485760 + +## Specifies how many files are used. +## If this parameter is undefined, the error_logger_mf_h is not installed. +## sasl.error_logger_mf_maxfiles = 5 + +## -------------------------------------------------------------------- +## Manager's Node(s) +## -------------------------------------------------------------------- +## Name of Manager node(s) +managers = [manager_0@127.0.0.1, manager_1@127.0.0.1] + +## -------------------------------------------------------------------- +## STORAGE +## -------------------------------------------------------------------- +## LeoFS version +system_version = 0.16.8 + +## Object container +obj_containers.path = [./avs] +obj_containers.num_of_containers = [8] + + +## A number of virtual-nodes for the redundant-manager +## num_of_vnodes = 168 + + +## -------------------------------------------------------------------- +## STORAGE - MQ +## -------------------------------------------------------------------- +## A number of mq-server's processes +mq.num_of_mq_procs = 8 + +## MQ recover per_object +mq.recover_per_object.num_of_batch_process = 1 +mq.recover_per_object.interval_min = 1 +mq.recover_per_object.interval_max = 1 + +## MQ synchronize objects by vnode-id +mq.sync_by_vnode_id.num_of_batch_process = 1 +mq.sync_by_vnode_id.interval_min = 8 +mq.sync_by_vnode_id.interval_max = 32 + +## MQ rebalance objects +mq.rebalance.num_of_batch_process = 1 +mq.rebalance.interval_min = 1 +mq.rebalance.interval_max = 1 + +## MQ delete objects +mq.delete_object.num_of_batch_process = 1 +mq.delete_object.interval_min = 1 +mq.delete_object.interval_max = 1 + +## MQ recover a node's object +mq.recovery_node.num_of_batch_process = 1 +mq.recovery_node.interval_min = 8 +mq.recovery_node.interval_max = 32 + + +## -------------------------------------------------------------------- +## STORAGE - Replication/Recovery object(s) +## -------------------------------------------------------------------- +## Rack-id for the rack-awareness replica placement +## replication.rack_awareness.rack_id = "" + +## Size of stacked objects (bytes) +## replication.recovery.size_of_stacked_objs = 67108864 + +## Stacking timeout (msec) +## replication.recovery.stacking_timeout = 5000 + + +## -------------------------------------------------------------------- +## STORAGE - Log +## -------------------------------------------------------------------- +## Log level: [0:debug, 1:info, 2:warn, 3:error] +## log.log_level = 1 + +## Output log file(s) - Erlang's log +## log.erlang = ./log/erlang + +## Output log file(s) - app +## log.app = ./log/app + +## Output log file(s) - members of storage-cluster +## log.member_dir = ./log/ring + +## Output log file(s) - ring +## log.ring_dir = ./log/ring + + +## -------------------------------------------------------------------- +## STORAGE - Other Directories +## -------------------------------------------------------------------- +## Directory of queue for monitoring "RING" +## queue_dir = ./work/queue + +## Directory of SNMP agent configuration +snmp_agent = ./snmp/snmpa_storage_2/LEO-STORAGE + +#====================================================================== +# For vm.args +#====================================================================== +## Name of the leofs-gateway node +nodename = storage_2@127.0.0.1 + +## Cookie for distributed node communication. All nodes in the same cluster +## should use the same cookie or they will not be able to communicate. +distributed_cookie = 401321b4 + +## Enable kernel poll +erlang.kernel_poll = true + +## Number of async threads +erlang.asyc_threads = 32 + +## Increase number of concurrent ports/sockets +erlang.max_ports = 64000 + +## Set the location of crash dumps +erlang.crash_dump = ./log/erl_crash.dump + +## Raise the ETS table limit +erlang.max_ets_tables = 256000 + +## Raise the default erlang process limit +process_limit = 1048576 + +## Path of SNMP-agent configuration +snmp_conf = ./snmp/snmpa_storage_2/leo_storage_snmp diff --git a/priv/test/app-s2.config b/priv/test/app-s2.config deleted file mode 100644 index 97b3d53e..00000000 --- a/priv/test/app-s2.config +++ /dev/null @@ -1,124 +0,0 @@ -%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*- -%%====================================================================== -%% -%% LeoFS Storage -%% -%% Copyright (c) 2012-2013 Rakuten, Inc. -%% -%% This file is provided to you 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. -%% -%%====================================================================== -[ - {sasl, [ - {sasl_error_logger, {file, "./log/sasl/sasl-error.log"}}, - {errlog_type, error}, - {error_logger_mf_dir, "./log/sasl"}, - {error_logger_mf_maxbytes, 10485760}, % 10 MB max file size - {error_logger_mf_maxfiles, 5} % 5 files max - ]}, - - {leo_storage, [ - %% == System Ver == - {system_version, "0.16.5" }, - - %% == Storage Configuration == - %% - %% Object containers properties: - %% @param path - Directory of object-containers - %% @param num_of_containers - # of object-containers - %% - %% Notes: - %% If you set up LeoFS on 'development', default value - "./avs" - is OK. - %% If you set up LeoFS on 'production' or 'staging', You should need to change "volume", - %% And We recommend volume's partition is XFS. - %% - {obj_containers, [[{path, "./avs"}, {num_of_containers, 8}]] }, - - %% leo-manager's nodes - {managers, ["manager_0@127.0.0.1", "manager_1@127.0.0.1"] }, - - %% # of virtual-nodes - {num_of_vnodes, 168 }, - - %% # of mq-server's processes - {num_of_mq_procs, 8 }, - - %% mq - queues cosumption's intervals - %% - per_object - {cns_interval_per_object_min, 0 }, - {cns_interval_per_object_max, 16 }, - %% - sync_by_vnode_id - {cns_interval_sync_by_vnode_id_min, 0 }, - {cns_interval_sync_by_vnode_id_max, 16 }, - %% - for rebalance - {cns_interval_rebalance_min, 0 }, - {cns_interval_rebalance_max, 16 }, - %% - async deletion objects (after remove a bucket) - {cns_interval_async_deletion_min, 0 }, - {cns_interval_async_deletion_max, 16 }, - %% - recovery node - {cns_interval_recovery_node_min, 0 }, - {cns_interval_recovery_node_max, 16 }, - - %% cluster group - level_1 - %% - Able to use from ver 1.0.0) - %% - ex: {grp_level_1, "DC_0001"}. - {grp_level_1, ""}, - - %% cluster group - level_2 - %% - Able to use from ver 0.14.2) - %% - ex: {grp_level_2, "RACK_0001"}. - {grp_level_2, ""}, - - %% == For Ordning-Reda == - %% Size of stacked objects (bytes) - {size_of_stacked_objs, 67108864 }, - %% Stacking timeout (msec) - {stacking_timeout, 5000 }, - - %% == Log-specific properties == - %% - {log_level, 1 }, - {log_appender, [ - {file, [{path, "./log/app"}]} - ]}, - - %% == Directories == - %% - %% Directory of log output - {log_dir, "./log"}, - %% Directory of mq's db-files - {queue_dir, "./work/queue"}, - %% Directory of SNMP-Agent - {snmp_agent, "./snmp/snmpa_storage_2/LEO-STORAGE"} - ]}, - - {leo_backend_db, [{profile, false}]}, - {leo_logger, [{profile, false}]}, - {leo_mq, [{profile, false}, - {backend_db, 'bitcask'} - ]}, - {leo_object_storage, [{profile, false}, - {metadata_storage, 'bitcask'} - ]}, - {leo_ordning_reda, [{profile, false}, - {send_after_interval, 100} - ]}, - {leo_redundant_manager, [{profile, false}, - {notify_mf, [leo_manager_api, notify]}, - {sync_mf, [leo_manager_api, synchronize]} - ]}, - {leo_statistics, [{profile, false}]} -]. diff --git a/priv/test/app-s3.conf b/priv/test/app-s3.conf new file mode 100644 index 00000000..02ab7cd1 --- /dev/null +++ b/priv/test/app-s3.conf @@ -0,0 +1,162 @@ +#====================================================================== +# LeoFS - Storage Configuration +# +# See: http://www.leofs.org/docs/configuration.html#leofs-storage +#====================================================================== +## -------------------------------------------------------------------- +## SASL +## -------------------------------------------------------------------- +## See: http://www.erlang.org/doc/man/sasl_app.html +## +## The following configuration parameters are defined for +## the SASL application. See app(4) for more information +## about configuration parameters + +## SASL error log path +## sasl.sasl_error_log = ./log/sasl/sasl-error.log + +## Restricts the error logging performed by the specified sasl_error_logger +## to error reports, progress reports, or both. +## errlog_type = [error | progress | all] +## sasl.errlog_type = error + +## Specifies in which directory the files are stored. +## If this parameter is undefined or false, the error_logger_mf_h is not installed. +# sasl.error_logger_mf_dir = ./log/sasl + +## Specifies how large each individual file can be. +## If this parameter is undefined, the error_logger_mf_h is not installed. +## sasl.error_logger_mf_maxbytes = 10485760 + +## Specifies how many files are used. +## If this parameter is undefined, the error_logger_mf_h is not installed. +## sasl.error_logger_mf_maxfiles = 5 + +## -------------------------------------------------------------------- +## Manager's Node(s) +## -------------------------------------------------------------------- +## Name of Manager node(s) +managers = [manager_0@127.0.0.1, manager_1@127.0.0.1] + +## -------------------------------------------------------------------- +## STORAGE +## -------------------------------------------------------------------- +## LeoFS version +system_version = 0.16.8 + +## Object container +obj_containers.path = [./avs] +obj_containers.num_of_containers = [8] + + +## obj_containers.path.2 = ./path/to +## obj_containers.num_of_containers.2 = 16 + + +## A number of virtual-nodes for the redundant-manager +## num_of_vnodes = 168 + + +## -------------------------------------------------------------------- +## STORAGE - MQ +## -------------------------------------------------------------------- +## A number of mq-server's processes +mq.num_of_mq_procs = 8 + +## MQ recover per_object +mq.recover_per_object.num_of_batch_process = 1 +mq.recover_per_object.interval_min = 1 +mq.recover_per_object.interval_max = 1 + +## MQ synchronize objects by vnode-id +mq.sync_by_vnode_id.num_of_batch_process = 1 +mq.sync_by_vnode_id.interval_min = 8 +mq.sync_by_vnode_id.interval_max = 32 + +## MQ rebalance objects +mq.rebalance.num_of_batch_process = 1 +mq.rebalance.interval_min = 1 +mq.rebalance.interval_max = 1 + +## MQ delete objects +mq.delete_object.num_of_batch_process = 1 +mq.delete_object.interval_min = 1 +mq.delete_object.interval_max = 1 + +## MQ recover a node's object +mq.recovery_node.num_of_batch_process = 1 +mq.recovery_node.interval_min = 8 +mq.recovery_node.interval_max = 32 + + +## -------------------------------------------------------------------- +## STORAGE - Replication/Recovery object(s) +## -------------------------------------------------------------------- +## Rack-id for the rack-awareness replica placement +## replication.rack_awareness.rack_id = "" + +## Size of stacked objects (bytes) +## replication.recovery.size_of_stacked_objs = 67108864 + +## Stacking timeout (msec) +## replication.recovery.stacking_timeout = 5000 + + +## -------------------------------------------------------------------- +## STORAGE - Log +## -------------------------------------------------------------------- +## Log level: [0:debug, 1:info, 2:warn, 3:error] +## log.log_level = 1 + +## Output log file(s) - Erlang's log +## log.erlang = ./log/erlang + +## Output log file(s) - app +## log.app = ./log/app + +## Output log file(s) - members of storage-cluster +## log.member_dir = ./log/ring + +## Output log file(s) - ring +## log.ring_dir = ./log/ring + + +## -------------------------------------------------------------------- +## STORAGE - Other Directories +## -------------------------------------------------------------------- +## Directory of queue for monitoring "RING" +## queue_dir = ./work/queue + +## Directory of SNMP agent configuration +snmp_agent = ./snmp/snmpa_storage_3/LEO-STORAGE + +#====================================================================== +# For vm.args +#====================================================================== +## Name of the leofs-gateway node +nodename = storage_3@127.0.0.1 + +## Cookie for distributed node communication. All nodes in the same cluster +## should use the same cookie or they will not be able to communicate. +distributed_cookie = 401321b4 + +## Enable kernel poll +erlang.kernel_poll = true + +## Number of async threads +erlang.asyc_threads = 32 + +## Increase number of concurrent ports/sockets +erlang.max_ports = 64000 + +## Set the location of crash dumps +erlang.crash_dump = ./log/erl_crash.dump + +## Raise the ETS table limit +erlang.max_ets_tables = 256000 + +## Raise the default erlang process limit +process_limit = 1048576 + +## Path of SNMP-agent configuration +snmp_conf = ./snmp/snmpa_storage_3/leo_storage_snmp diff --git a/priv/test/app-s3.config b/priv/test/app-s3.config deleted file mode 100644 index 145c80ac..00000000 --- a/priv/test/app-s3.config +++ /dev/null @@ -1,124 +0,0 @@ -%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*- -%%====================================================================== -%% -%% LeoFS Storage -%% -%% Copyright (c) 2012-2013 Rakuten, Inc. -%% -%% This file is provided to you 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. -%% -%%====================================================================== -[ - {sasl, [ - {sasl_error_logger, {file, "./log/sasl/sasl-error.log"}}, - {errlog_type, error}, - {error_logger_mf_dir, "./log/sasl"}, - {error_logger_mf_maxbytes, 10485760}, % 10 MB max file size - {error_logger_mf_maxfiles, 5} % 5 files max - ]}, - - {leo_storage, [ - %% == System Ver == - {system_version, "0.16.5" }, - - %% == Storage Configuration == - %% - %% Object containers properties: - %% @param path - Directory of object-containers - %% @param num_of_containers - # of object-containers - %% - %% Notes: - %% If you set up LeoFS on 'development', default value - "./avs" - is OK. - %% If you set up LeoFS on 'production' or 'staging', You should need to change "volume", - %% And We recommend volume's partition is XFS. - %% - {obj_containers, [[{path, "./avs"}, {num_of_containers, 8}]] }, - - %% leo-manager's nodes - {managers, ["manager_0@127.0.0.1", "manager_1@127.0.0.1"] }, - - %% # of virtual-nodes - {num_of_vnodes, 168 }, - - %% # of mq-server's processes - {num_of_mq_procs, 8 }, - - %% mq - queues cosumption's intervals - %% - per_object - {cns_interval_per_object_min, 0 }, - {cns_interval_per_object_max, 16 }, - %% - sync_by_vnode_id - {cns_interval_sync_by_vnode_id_min, 0 }, - {cns_interval_sync_by_vnode_id_max, 16 }, - %% - for rebalance - {cns_interval_rebalance_min, 0 }, - {cns_interval_rebalance_max, 16 }, - %% - async deletion objects (after remove a bucket) - {cns_interval_async_deletion_min, 0 }, - {cns_interval_async_deletion_max, 16 }, - %% - recovery node - {cns_interval_recovery_node_min, 0 }, - {cns_interval_recovery_node_max, 16 }, - - %% cluster group - level_1 - %% - Able to use from ver 1.0.0) - %% - ex: {grp_level_1, "DC_0001"}. - {grp_level_1, ""}, - - %% cluster group - level_2 - %% - Able to use from ver 0.14.2) - %% - ex: {grp_level_2, "RACK_0001"}. - {grp_level_2, ""}, - - %% == For Ordning-Reda == - %% Size of stacked objects (bytes) - {size_of_stacked_objs, 67108864 }, - %% Stacking timeout (msec) - {stacking_timeout, 5000 }, - - %% == Log-specific properties == - %% - {log_level, 1 }, - {log_appender, [ - {file, [{path, "./log/app"}]} - ]}, - - %% == Directories == - %% - %% Directory of log output - {log_dir, "./log"}, - %% Directory of mq's db-files - {queue_dir, "./work/queue"}, - %% Directory of SNMP-Agent - {snmp_agent, "./snmp/snmpa_storage_3/LEO-STORAGE"} - ]}, - - {leo_backend_db, [{profile, false}]}, - {leo_logger, [{profile, false}]}, - {leo_mq, [{profile, false}, - {backend_db, 'bitcask'} - ]}, - {leo_object_storage, [{profile, false}, - {metadata_storage, 'bitcask'} - ]}, - {leo_ordning_reda, [{profile, false}, - {send_after_interval, 100} - ]}, - {leo_redundant_manager, [{profile, false}, - {notify_mf, [leo_manager_api, notify]}, - {sync_mf, [leo_manager_api, synchronize]} - ]}, - {leo_statistics, [{profile, false}]} -]. diff --git a/priv/test/vm-g0.config b/priv/test/vm-g0.config deleted file mode 100644 index 7b4b8e9c..00000000 --- a/priv/test/vm-g0.config +++ /dev/null @@ -1,28 +0,0 @@ -## Name of the node --name gateway_0@127.0.0.1 - -## Cookie for distributed erlang --setcookie 401321b4 - -## Heartbeat management; auto-restarts VM if it dies or becomes unresponsive -## (Disabled by default..use with caution!) -##-heart - -## Enable kernel poll and a few async threads -+K true -+A 32 - -## Increase number of concurrent ports/sockets -##-env ERL_MAX_PORTS 4096 - -## Tweak GC to run more often -##-env ERL_FULLSWEEP_AFTER 10 - -## SNMP Config file --config ./snmp/snmpa_gateway_0/leo_gateway_snmp - -## Sets the maximum number of concurrent processes for this system -+P 1048576 - -## set up the node with the -hidden flag --hidden diff --git a/priv/test/vm-g1.config b/priv/test/vm-g1.config deleted file mode 100644 index 3cfc73af..00000000 --- a/priv/test/vm-g1.config +++ /dev/null @@ -1,28 +0,0 @@ -## Name of the node --name gateway_1@127.0.0.1 - -## Cookie for distributed erlang --setcookie 401321b4 - -## Heartbeat management; auto-restarts VM if it dies or becomes unresponsive -## (Disabled by default..use with caution!) -##-heart - -## Enable kernel poll and a few async threads -+K true -+A 32 - -## Increase number of concurrent ports/sockets -##-env ERL_MAX_PORTS 4096 - -## Tweak GC to run more often -##-env ERL_FULLSWEEP_AFTER 10 - -## SNMP Config file --config ./snmp/snmpa_gateway_1/leo_gateway_snmp - -## Sets the maximum number of concurrent processes for this system -+P 1048576 - -## set up the node with the -hidden flag --hidden diff --git a/priv/test/vm-s0.config b/priv/test/vm-s0.config deleted file mode 100644 index 7b0a18bc..00000000 --- a/priv/test/vm-s0.config +++ /dev/null @@ -1,28 +0,0 @@ -## Name of the node --name storage_0@127.0.0.1 - -## Cookie for distributed erlang --setcookie 401321b4 - -## Heartbeat management; auto-restarts VM if it dies or becomes unresponsive -## (Disabled by default..use with caution!) -##-heart - -## Enable kernel poll and a few async threads -+K true -+A 32 - -## Increase number of concurrent ports/sockets -##-env ERL_MAX_PORTS 4096 - -## Tweak GC to run more often -##-env ERL_FULLSWEEP_AFTER 10 - -## SNMP Config file --config ./snmp/snmpa_storage_0/leo_storage_snmp - -## Sets the maximum number of concurrent processes for this system -+P 1048576 - -## set up the node with the -hidden flag --hidden diff --git a/priv/test/vm-s1.config b/priv/test/vm-s1.config deleted file mode 100644 index b86a86eb..00000000 --- a/priv/test/vm-s1.config +++ /dev/null @@ -1,28 +0,0 @@ -## Name of the node --name storage_1@127.0.0.1 - -## Cookie for distributed erlang --setcookie 401321b4 - -## Heartbeat management; auto-restarts VM if it dies or becomes unresponsive -## (Disabled by default..use with caution!) -##-heart - -## Enable kernel poll and a few async threads -+K true -+A 32 - -## Increase number of concurrent ports/sockets -##-env ERL_MAX_PORTS 4096 - -## Tweak GC to run more often -##-env ERL_FULLSWEEP_AFTER 10 - -## SNMP Config file --config ./snmp/snmpa_storage_1/leo_storage_snmp - -## Sets the maximum number of concurrent processes for this system -+P 1048576 - -## set up the node with the -hidden flag --hidden diff --git a/priv/test/vm-s2.config b/priv/test/vm-s2.config deleted file mode 100644 index 96f12aea..00000000 --- a/priv/test/vm-s2.config +++ /dev/null @@ -1,28 +0,0 @@ -## Name of the node --name storage_2@127.0.0.1 - -## Cookie for distributed erlang --setcookie 401321b4 - -## Heartbeat management; auto-restarts VM if it dies or becomes unresponsive -## (Disabled by default..use with caution!) -##-heart - -## Enable kernel poll and a few async threads -+K true -+A 32 - -## Increase number of concurrent ports/sockets -##-env ERL_MAX_PORTS 4096 - -## Tweak GC to run more often -##-env ERL_FULLSWEEP_AFTER 10 - -## SNMP Config file --config ./snmp/snmpa_storage_2/leo_storage_snmp - -## Sets the maximum number of concurrent processes for this system -+P 1048576 - -## set up the node with the -hidden flag --hidden diff --git a/priv/test/vm-s3.config b/priv/test/vm-s3.config deleted file mode 100644 index e28fe119..00000000 --- a/priv/test/vm-s3.config +++ /dev/null @@ -1,28 +0,0 @@ -## Name of the node --name storage_3@127.0.0.1 - -## Cookie for distributed erlang --setcookie 401321b4 - -## Heartbeat management; auto-restarts VM if it dies or becomes unresponsive -## (Disabled by default..use with caution!) -##-heart - -## Enable kernel poll and a few async threads -+K true -+A 32 - -## Increase number of concurrent ports/sockets -##-env ERL_MAX_PORTS 4096 - -## Tweak GC to run more often -##-env ERL_FULLSWEEP_AFTER 10 - -## SNMP Config file --config ./snmp/snmpa_storage_3/leo_storage_snmp - -## Sets the maximum number of concurrent processes for this system -+P 1048576 - -## set up the node with the -hidden flag --hidden diff --git a/rebar.config b/rebar.config index c5aa7920..84346c88 100644 --- a/rebar.config +++ b/rebar.config @@ -20,12 +20,12 @@ %% under the License. %% %%====================================================================== -{require_otp_vsn, "R15B03|R16B|R16B01|R16B02"}. +{require_otp_vsn, "R15B03|R16B|R16B01|R16B02|R16B03"}. {deps, [ - {leo_manager, ".*", {git, "https://github.com/leo-project/leo_manager.git", {tag, "0.16.5"}}}, - {leo_storage, ".*", {git, "https://github.com/leo-project/leo_storage.git", {tag, "0.16.5"}}}, - {leo_gateway, ".*", {git, "https://github.com/leo-project/leo_gateway.git", {tag, "0.16.5"}}} + {leo_manager, ".*", {git, "https://github.com/leo-project/leo_manager.git", {tag, "0.16.8"}}}, + {leo_storage, ".*", {git, "https://github.com/leo-project/leo_storage.git", {tag, "0.16.8"}}}, + {leo_gateway, ".*", {git, "https://github.com/leo-project/leo_gateway.git", {tag, "0.16.8"}}} ]}. {sub_dirs, [ diff --git a/rel/leo_gateway/files/app.config b/rel/leo_gateway/files/app.config index df1f82eb..a4eae75f 100644 --- a/rel/leo_gateway/files/app.config +++ b/rel/leo_gateway/files/app.config @@ -20,136 +20,8 @@ %% under the License. %% %%====================================================================== -[ - {sasl, [ - {sasl_error_logger, {file, "{{platform_log_dir}}/sasl/sasl-error.log"}}, - {errlog_type, error}, - {error_logger_mf_dir, "{{platform_log_dir}}/sasl"}, - {error_logger_mf_maxbytes, 10485760}, % 10 MB max file size - {error_logger_mf_maxfiles, 5} % 5 files max - ]}, - {leo_gateway, [ - %% System Ver - {system_version, "{{system_version}}" }, - - %% Gateway Properties: - {http, [ - %% http-handler: - %% [rest | s3 | embed] - {handler, s3}, - %% Gateway port number: - {port, {{gateway_port}} }, - %% # of acceptors: - {num_of_acceptors, {{num_of_acceptors}} }, - %% # of max keepalive - {max_keepalive, {{max_keepalive}} }, - %% max # of layer of directories: - {layer_of_dirs, {{layer_of_dirs}} }, - %% ssl related: - {ssl_port, {{ssl_port}} }, - {ssl_certfile, "{{ssl_certfile}}" }, - {ssl_keyfile, "{{ssl_keyfile}}" } - ]}, - - %% S3-API Properties: - {bucket_prop_sync_interval, {{{bucket_prop_sync_interval}} }, - - %% Large-object-related properties: - {large_object, [ - {max_chunked_objs, {{max_chunked_objs}} }, - {max_len_for_obj, {{max_len_for_obj}} }, - {chunked_obj_len, {{chunked_obj_len}} }, - {threshold_obj_len, {{threshold_obj_len}} } - ]}, - - %% Cache-related properties: - {cache, [ - %% Use HTTP-cache ? - {http_cache, false}, - %% # of Cache workers - {cache_workers, {{cache_num_of_workers}} }, - - %% RAM-cache capacity - {cache_ram_capacity, {{cache_ram_capacity}} }, - %% Disc-cache capacity - {cache_disc_capacity, {{cache_disc_capacity}} }, - - %% Disc-cache's threshold length which value is exceeded - %% when an object is stored into the disc - {cache_disc_threshold_len, {{cache_disc_threshold_len}} }, - %% Disc-cache's directory - {cache_disc_dir_data, "{{cache_disc_dir_data}}" }, - {cache_disc_dir_journal, "{{cache_disc_dir_journal}}" }, - - %% Cache expire time. (sec) - {cache_expire, {{cache_expire}} }, - %% Acceptable maximum content length (MB) - {cache_max_content_len, {{cache_max_content_len}} }, - %% Acceptable content-type(s) - {cachable_content_type, {{cachable_content_type}} }, - %% Acceptable URL-Pattern(s) - {cachable_path_pattern, {{cachable_path_pattern}} } - ]}, - - %% Timeout when requesting to a storage == - {timeout, [ - {level_1, 5000}, %% 0 .. 65535 bytes - {level_2, 7000}, %% 65536 .. 131071 bytes - {level_3, 10000}, %% 131072 .. 524287 bytes - {level_4, 20000}, %% 524288 .. 1048576 bytes - {level_5, 30000} %% over 1048577 bytes - ]}, - - %% Manager - leo-manager's nodes - {managers, {{managers}} }, - - %% Log-specific properties - %% - Log output level - %% 0: debug - %% 1: info - %% 2: warning - %% 3: error - {log_level, {{log_level}} }, - - %% Output Access-log? - {is_enable_access_log, {{is_enable_access_log}} }, - {is_enable_esearch, {{is_enable_esearch}} }, - {esearch_host, "{{esearch_host}}" }, - {esearch_port, {{esearch_port}} }, - {esearch_timeout, {{esearch_timeout}} }, - {esearch_bulk_duration, {{esearch_bulk_duration}} }, - - %% Log appender - [file] - {log_appender, [ - {file, [{path, "{{app_log_dir}}" }]} - ]}, - - %% Directory of log output - {log_dir, "{{platform_log_dir}}"}, - %% Directory of mq's db-files - {queue_dir, "{{queue_dir}}"}, - %% Directory of snmp-agent - {snmp_agent, "{{snmp_agent_dir}}"}, - - {profile, false} - ]}, - - {ecache, [{profile, false}]}, - {leo_backend_db, [{profile, false}]}, - {leo_logger, [{profile, false}]}, - {leo_mq, [{profile, false}, - {backend_db, 'bitcask'} - ]}, - {leo_object_storage, [{profile, false}]}, - {leo_ordning_reda, [{profile, false}, - {send_after_interval, 100} - ]}, - {leo_redundant_manager, [{profile, false}, - {notify_mf, [leo_manager_api, notify]}, - {sync_mf, [leo_manager_api, synchronize]}, - {log_dir_member, "{{ring_log_dir}}" }, - {log_dir_ring, "{{ring_log_dir}}" } - ]}, - {leo_statistics, [{profile, false}]} -]. +%% We move from this configuration to like ini-file configuration, +%% which is using "basho/cuttlefish" +%% See: leofs/deps/leo_gateway/priv/leo_gateway.conf +[]. diff --git a/rel/leo_gateway/files/leo_gateway b/rel/leo_gateway/files/leo_gateway index 13abffac..f0258874 100755 --- a/rel/leo_gateway/files/leo_gateway +++ b/rel/leo_gateway/files/leo_gateway @@ -30,18 +30,47 @@ ERTS_VSN=${START_ERL% *} APP_VSN=${START_ERL#* } # Use releases/VSN/vm.args if it exists otherwise use etc/vm.args -if [ -e "$RUNNER_BASE_DIR/releases/$APP_VSN/vm.args" ]; then - VMARGS_PATH="$RUNNER_BASE_DIR/releases/$APP_VSN/vm.args" -else - VMARGS_PATH="$RUNNER_ETC_DIR/vm.args" -fi +# if [ -e "$RUNNER_BASE_DIR/releases/$APP_VSN/vm.args" ]; then +# VMARGS_PATH="$RUNNER_BASE_DIR/releases/$APP_VSN/vm.args" +# else +# VMARGS_PATH="$RUNNER_ETC_DIR/vm.args" +# fi +VMARGS_PATH="$RUNNER_ETC_DIR/vm.args" # Use releases/VSN/sys.config if it exists otherwise use etc/app.config -if [ -e "$RUNNER_BASE_DIR/releases/$APP_VSN/sys.config" ]; then - CONFIG_PATH="$RUNNER_BASE_DIR/releases/$APP_VSN/sys.config" -else - CONFIG_PATH="$RUNNER_ETC_DIR/app.config" -fi +# if [ -e "$RUNNER_BASE_DIR/releases/$APP_VSN/sys.config" ]; then +# CONFIG_PATH="$RUNNER_BASE_DIR/releases/$APP_VSN/sys.config" +# else +# CONFIG_PATH="$RUNNER_ETC_DIR/app.config" +# fi +CONFIG_PATH="$RUNNER_ETC_DIR/app.config" + + +# +# Generate conf files - [app.config, vm.args] +# +gen_config() { + rm -f $RUNNER_BASE_DIR/etc/app.*.config + rm -f $RUNNER_BASE_DIR/etc/vm.*.args + RES_CUTTLEFISH=`$RUNNER_BASE_DIR/bin/cuttlefish -i $RUNNER_BASE_DIR/etc/leo_gateway.schema -c $RUNNER_BASE_DIR/etc/leo_gateway.conf -d $RUNNER_BASE_DIR/etc/` + + APP_CONFIG=`find $RUNNER_BASE_DIR/etc -type f | grep app.*[0-9].config` + mv $APP_CONFIG $RUNNER_BASE_DIR/etc/app.config + + VM_ARGS=`find $RUNNER_BASE_DIR/etc -type f | grep vm.*[0-9].args` + mv $VM_ARGS $RUNNER_BASE_DIR/etc/vm.args +} +case "$1" in + start) + gen_config + ;; + console) + gen_config + ;; + *) + ;; +esac + # Extract the target node name from node.args NAME_ARG=`egrep '^-s?name' $VMARGS_PATH` @@ -93,6 +122,7 @@ case "$1" in exit 1 fi + # Launch the application HEART_COMMAND="$RUNNER_BASE_DIR/bin/$SCRIPT start" export HEART_COMMAND mkdir -p $PIPE_DIR diff --git a/rel/leo_gateway/reltool.config b/rel/leo_gateway/reltool.config index 323e6d12..4f85c34a 100644 --- a/rel/leo_gateway/reltool.config +++ b/rel/leo_gateway/reltool.config @@ -98,13 +98,11 @@ %% make directories {mkdir, "work/mnesia"}, {mkdir, "work/queue"}, - {mkdir, "{{platform_log_dir}}/app"}, - {mkdir, "{{platform_log_dir}}/ring"}, - {mkdir, "{{platform_log_dir}}/sasl"}, - {mkdir, "{{platform_snmp_dir}}/snmpa_gateway_0/db"}, - {mkdir, "{{platform_snmp_dir}}/snmpa_gateway_0/agent/conf"}, - {mkdir, "{{platform_snmp_dir}}/snmpa_gateway_1/db"}, - {mkdir, "{{platform_snmp_dir}}/snmpa_gateway_1/agent/conf"}, + {mkdir, "log/sasl"}, + {mkdir, "snmp/snmpa_gateway_0/db"}, + {mkdir, "snmp/snmpa_gateway_0/agent/conf"}, + {mkdir, "snmp/snmpa_gateway_1/db"}, + {mkdir, "snmp/snmpa_gateway_1/agent/conf"}, %% copy and create files {copy, "files/erl", "\{\{erts_vsn\}\}/bin/erl"}, {copy, "files/nodetool", "\{\{erts_vsn\}\}/bin/nodetool"}, @@ -113,24 +111,26 @@ {copy, "files/start_erl.cmd", "bin/start_erl.cmd"}, {copy, "files/server_cert.pem", "etc/server_cert.pem"}, {copy, "files/server_key.pem", "etc/server_key.pem"}, - {template, "files/vm.args", "etc/vm.args"}, - {template, "files/app.config", "etc/app.config"}, + %% cuttlefish-related + {copy, "../../deps/leo_gateway/cuttlefish", "bin/cuttlefish"}, + {copy, "../../deps/leo_gateway/priv/leo_gateway.conf", "etc/leo_gateway.conf"}, + {copy, "../../deps/leo_gateway/priv/leo_gateway.schema", "etc/leo_gateway.schema"}, %% snmp-related - {copy, "../../deps/leo_gateway/snmp/snmpa_gateway_0/LEO-GATEWAY.bin", "{{platform_snmp_dir}}/snmpa_gateway_0/LEO-GATEWAY.bin"}, - {copy, "../../deps/leo_gateway/snmp/snmpa_gateway_0/LEO-GATEWAY.mib", "{{platform_snmp_dir}}/snmpa_gateway_0/LEO-GATEWAY.mib"}, - {copy, "../../deps/leo_gateway/snmp/snmpa_gateway_0/leo_gateway_snmp.config", "{{platform_snmp_dir}}/snmpa_gateway_0/leo_gateway_snmp.config"}, - {copy, "../../deps/leo_gateway/snmp/snmpa_gateway_0/agent/conf/agent.conf", "{{platform_snmp_dir}}/snmpa_gateway_0/agent/conf/agent.conf"}, - {copy, "../../deps/leo_gateway/snmp/snmpa_gateway_0/agent/conf/community.conf", "{{platform_snmp_dir}}/snmpa_gateway_0/agent/conf/community.conf"}, - {copy, "../../deps/leo_gateway/snmp/snmpa_gateway_0/agent/conf/context.conf", "{{platform_snmp_dir}}/snmpa_gateway_0/agent/conf/context.conf"}, - {copy, "../../deps/leo_gateway/snmp/snmpa_gateway_0/agent/conf/standard.conf", "{{platform_snmp_dir}}/snmpa_gateway_0/agent/conf/standard.conf"}, - {copy, "../../deps/leo_gateway/snmp/snmpa_gateway_0/agent/conf/vacm.conf", "{{platform_snmp_dir}}/snmpa_gateway_0/agent/conf/vacm.conf"}, + {copy, "../../deps/leo_gateway/snmp/snmpa_gateway_0/LEO-GATEWAY.bin", "snmp/snmpa_gateway_0/LEO-GATEWAY.bin"}, + {copy, "../../deps/leo_gateway/snmp/snmpa_gateway_0/LEO-GATEWAY.mib", "snmp/snmpa_gateway_0/LEO-GATEWAY.mib"}, + {copy, "../../deps/leo_gateway/snmp/snmpa_gateway_0/leo_gateway_snmp.config", "snmp/snmpa_gateway_0/leo_gateway_snmp.config"}, + {copy, "../../deps/leo_gateway/snmp/snmpa_gateway_0/agent/conf/agent.conf", "snmp/snmpa_gateway_0/agent/conf/agent.conf"}, + {copy, "../../deps/leo_gateway/snmp/snmpa_gateway_0/agent/conf/community.conf", "snmp/snmpa_gateway_0/agent/conf/community.conf"}, + {copy, "../../deps/leo_gateway/snmp/snmpa_gateway_0/agent/conf/context.conf", "snmp/snmpa_gateway_0/agent/conf/context.conf"}, + {copy, "../../deps/leo_gateway/snmp/snmpa_gateway_0/agent/conf/standard.conf", "snmp/snmpa_gateway_0/agent/conf/standard.conf"}, + {copy, "../../deps/leo_gateway/snmp/snmpa_gateway_0/agent/conf/vacm.conf", "snmp/snmpa_gateway_0/agent/conf/vacm.conf"}, - {copy, "../../deps/leo_gateway/snmp/snmpa_gateway_1/LEO-GATEWAY.bin", "{{platform_snmp_dir}}/snmpa_gateway_1/LEO-GATEWAY.bin"}, - {copy, "../../deps/leo_gateway/snmp/snmpa_gateway_1/LEO-GATEWAY.mib", "{{platform_snmp_dir}}/snmpa_gateway_1/LEO-GATEWAY.mib"}, - {copy, "../../deps/leo_gateway/snmp/snmpa_gateway_1/leo_gateway_snmp.config", "{{platform_snmp_dir}}/snmpa_gateway_1/leo_gateway_snmp.config"}, - {copy, "../../deps/leo_gateway/snmp/snmpa_gateway_1/agent/conf/agent.conf", "{{platform_snmp_dir}}/snmpa_gateway_1/agent/conf/agent.conf"}, - {copy, "../../deps/leo_gateway/snmp/snmpa_gateway_1/agent/conf/community.conf", "{{platform_snmp_dir}}/snmpa_gateway_1/agent/conf/community.conf"}, - {copy, "../../deps/leo_gateway/snmp/snmpa_gateway_1/agent/conf/context.conf", "{{platform_snmp_dir}}/snmpa_gateway_1/agent/conf/context.conf"}, - {copy, "../../deps/leo_gateway/snmp/snmpa_gateway_1/agent/conf/standard.conf", "{{platform_snmp_dir}}/snmpa_gateway_1/agent/conf/standard.conf"}, - {copy, "../../deps/leo_gateway/snmp/snmpa_gateway_1/agent/conf/vacm.conf", "{{platform_snmp_dir}}/snmpa_gateway_1/agent/conf/vacm.conf"} + {copy, "../../deps/leo_gateway/snmp/snmpa_gateway_1/LEO-GATEWAY.bin", "snmp/snmpa_gateway_1/LEO-GATEWAY.bin"}, + {copy, "../../deps/leo_gateway/snmp/snmpa_gateway_1/LEO-GATEWAY.mib", "snmp/snmpa_gateway_1/LEO-GATEWAY.mib"}, + {copy, "../../deps/leo_gateway/snmp/snmpa_gateway_1/leo_gateway_snmp.config", "snmp/snmpa_gateway_1/leo_gateway_snmp.config"}, + {copy, "../../deps/leo_gateway/snmp/snmpa_gateway_1/agent/conf/agent.conf", "snmp/snmpa_gateway_1/agent/conf/agent.conf"}, + {copy, "../../deps/leo_gateway/snmp/snmpa_gateway_1/agent/conf/community.conf", "snmp/snmpa_gateway_1/agent/conf/community.conf"}, + {copy, "../../deps/leo_gateway/snmp/snmpa_gateway_1/agent/conf/context.conf", "snmp/snmpa_gateway_1/agent/conf/context.conf"}, + {copy, "../../deps/leo_gateway/snmp/snmpa_gateway_1/agent/conf/standard.conf", "snmp/snmpa_gateway_1/agent/conf/standard.conf"}, + {copy, "../../deps/leo_gateway/snmp/snmpa_gateway_1/agent/conf/vacm.conf", "snmp/snmpa_gateway_1/agent/conf/vacm.conf"} ]}. diff --git a/rel/leo_gateway/vars.config b/rel/leo_gateway/vars.config index eac54e20..7f47e327 100644 --- a/rel/leo_gateway/vars.config +++ b/rel/leo_gateway/vars.config @@ -20,131 +20,7 @@ %% under the License. %% %%====================================================================== -%% LeoFS system's version" -{system_version, "0.16.5"}. - -%% Node alias name -{node_alias, "gateway_0"}. -{node_ip, "127.0.0.1"}. - -%% Cookie -{cookie, "401321b4"}. - -%% Platform-specific installation paths -{platform_bin_dir, "./bin"}. -{platform_etc_dir, "./etc"}. -{platform_lib_dir, "./lib"}. -{platform_log_dir, "./log"}. -{platform_snmp_dir, "./snmp"}. -{platform_work_dir, "./work"}. - -%% == Gateway Properties == -%% -%% Gateway's port number -{gateway_port, 8080}. - -%% # of acceptors -{num_of_acceptors, 128}. - -%% # of max keepalive -{max_keepalive, 4096}. - -%% Range of layers of directories -{layer_of_dirs, '{1, 12}'}. - -%% ssl related -{ssl_port, 8443}. -{ssl_certfile, "{{platform_etc_dir}}/server_cert.pem"}. -{ssl_keyfile, "{{platform_etc_dir}}/server_key.pem"}. - -%% large-object related -{max_chunked_objs, 1000}. %% 1000 chuked-objs -{max_len_for_obj, 524288000}. %% 500.0MB (max len for multipart:500MB * 1000 = 500GB) -{chunked_obj_len, 5242880}. %% 5.0MB -{threshold_obj_len, 5767168}. %% 5.5MB - -%% leo-manager's nodes -{managers, '["manager_0@127.0.0.1", "manager_1@127.0.0.1"]'}. - -%% == S3-API properties == -%% -{bucket_prop_sync_interval, 300}. %% 300sec/5min - -%% == Cache-related properties == -%% -%% Total of cache-size (capacity) -%% Unit is byte - 1073741824 = 1GB -{cache_ram_capacity, 1073741824}. %% for RAM-cache (1GB) -{cache_disc_capacity, 524288000}. %% for DISC-cache (500MB) - -%% # of cache worker processes -{cache_num_of_workers, 16}. - -%% When a length of object exceed this value, the object is stored into the disc -%% ram-cache =< ${cache_disc_threshold_len} < disc-cache (1MB) -{cache_disc_threshold_len, 1048576}. - -%% Disc cache - stored directory for data - storing destination SSD (or HDD) -{cache_disc_dir_data, "./cache/data"}. -%% Disc cache - stored directory for journal -{cache_disc_dir_journal, "./cache/journal"}. - -%% Cache expire time. Unit is minutes. -%% Unit is minutes - 300 = 5min -{cache_expire, 300}. - -%% Acceptable maximum content length -%% Unit is bytes - 1048576 = 1MB -{cache_max_content_len, 1048576}. - -%% Acceptable content-type(s) -{cachable_content_type, '[]'}. - -%% Acceptable URL-Pattern(s) -{cachable_path_pattern, '[]'}. - - -%% == Directories == -%% -{snmp_conf_dir, "snmpa_gateway_0"}. -{snmp_agent_dir, "{{platform_snmp_dir}}/{{snmp_conf_dir}}/LEO-GATEWAY"}. - -%% Directory of Mmneisa -{mnesia_dir, "{{platform_work_dir}}/mnesia"}. -%% Directory of mq's db-file -{queue_dir, "{{platform_work_dir}}/queue"}. -%% Directory of log output -{sasl_log_dir, "{{platform_log_dir}}/sasl"}. -%% Directory of sasl-log output -{sasl_error_log, "{{platform_log_dir}}/sasl/sasl-error.log"}. - -%% Application log directory -{app_log_dir, "{{platform_log_dir}}/app"}. -%% Directory of ring and cluster-members log directory -{ring_log_dir, "{{platform_log_dir}}/ring"}. -{members_log_dir, "{{platform_log_dir}}/ring"}. - - -%% Log output level -%% 0: debug -%% 1: info -%% 2: warning -%% 3: error -{log_level, 1}. - -%% Access-log -{is_enable_access_log, true}. - -{is_enable_esearch, false}. -{esearch_host, "127.0.0.1"}. -{esearch_port, 9200}. -{esearch_timeout, 10000}. -{esearch_bulk_duration, 3000}. - - -%% -%% etc/vm.args -%% -{node, "{{node_alias}}@{{node_ip}}"}. -{crash_dump, "{{platform_log_dir}}/erl_crash.dump"}. +%% We move from this configuration to like ini-file configuration, +%% which is using "basho/cuttlefish" +%% See: leofs/deps/leo_gateway/priv/leo_gateway.conf diff --git a/rel/leo_manager/files/app.config b/rel/leo_manager/files/app.config index 4ea97c95..1965a466 100644 --- a/rel/leo_manager/files/app.config +++ b/rel/leo_manager/files/app.config @@ -20,93 +20,8 @@ %% under the License. %% %%====================================================================== -[ - {sasl, [ - {sasl_error_logger, {file, "{{platform_log_dir}}/sasl/sasl-error.log"}}, - {errlog_type, error}, - {error_logger_mf_dir, "{{platform_log_dir}}/sasl"}, - {error_logger_mf_maxbytes, 10485760}, % 10 MB max file size - {error_logger_mf_maxfiles, 5} % 5 files max - ]}, - {mnesia, [ - {dir, "{{mnesia_dir}}/{{node_ip}}"}, - {dump_log_write_threshold, 50000}, - {dc_dump_limit, 40} - ]}, - {leo_manager, [ - %% == System Ver == - {system_version, "{{system_version}}" }, - %% == System Configuration == - %% - %% n: # of replicated files - %% w: # of successes of write-operation - %% r: # of successes of read-operation - %% d: # of successes of delete-operation - %% bit_of_ring: Ring size - 128 = 2^128 - %% level_1: # of DC-awareness replicas - %% level_2: # of Rack-awareness replicas - {system, [{n, {{num_of_replicas}} }, - {w, {{num_of_successes_of_write}} }, - {r, {{num_of_successes_of_read}} }, - {d, {{num_of_successes_of_delete}} }, - {bit_of_ring, 128}, - {level_1, {{num_of_awareness_L1}} }, - {level_2, {{num_of_awareness_L2}} } - ]}, - - %% == Available Commands == - {available_commands, {{available_commands}} }, - - %% == Manager Properties == - %% Mode of server - [master|slave] - {manager_mode, {{manager_mode}} }, - %% Partner of manager's alias - {manager_partners, {{manager_partners}} }, - %% Manager acceptable port number - {port_cui, {{manager_port_cui}} }, - {port_json, {{manager_port_json}} }, - - %% # of acceptors - {num_of_acceptors_cui, 3}, - {num_of_acceptors_json, 16}, - - %% Compaction: # of execution of concurrent - {num_of_compact_proc, {{num_of_compact_proc}} }, - - %% == Log-specific properties == - %% - %% Log output level - %% 0: debug - %% 1: info - %% 2: warning - %% 3: error - {log_level, {{log_level}} }, - %% Log appender - [file] - {log_appender, [ - {file, [{path, "{{app_log_dir}}" }]} - ]}, - - %% == Directories == - %% - %% Directory of log output - {log_dir, "{{platform_log_dir}}"}, - %% Directory of mq's db-file - {queue_dir, "{{queue_dir}}"}, - %% Directory of snmp-agent - {snmp_agent, "{{snmp_agent_dir}}"} - ]}, - {leo_backend_db, [{profile, false}]}, - {leo_logger, [{profile, false}]}, - {leo_mq, [{profile, false}, - {backend_db, 'bitcask'} - ]}, - {leo_object_storage, [{profile, false}]}, - {leo_redundant_manager, [{profile, false}, - {notify_mf, [leo_manager_api, notify]}, - {sync_mf, [leo_manager_api, synchronize]}, - {log_dir_member, "{{ring_log_dir}}" }, - {log_dir_ring, "{{ring_log_dir}}" } - ]}, - {leo_statistics, [{profile, false}]} -]. +%% We move from this configuration to like ini-file configuration, +%% which is using "basho/cuttlefish" +%% See: leofs/deps/leo_manager/priv/leo_manager_*.conf +[]. diff --git a/rel/leo_manager/files/leo_manager b/rel/leo_manager/files/leo_manager index 2271f185..d61907f4 100755 --- a/rel/leo_manager/files/leo_manager +++ b/rel/leo_manager/files/leo_manager @@ -30,18 +30,47 @@ ERTS_VSN=${START_ERL% *} APP_VSN=${START_ERL#* } # Use releases/VSN/vm.args if it exists otherwise use etc/vm.args -if [ -e "$RUNNER_BASE_DIR/releases/$APP_VSN/vm.args" ]; then - VMARGS_PATH="$RUNNER_BASE_DIR/releases/$APP_VSN/vm.args" -else - VMARGS_PATH="$RUNNER_ETC_DIR/vm.args" -fi +# if [ -e "$RUNNER_BASE_DIR/releases/$APP_VSN/vm.args" ]; then +# VMARGS_PATH="$RUNNER_BASE_DIR/releases/$APP_VSN/vm.args" +# else +# VMARGS_PATH="$RUNNER_ETC_DIR/vm.args" +# fi +VMARGS_PATH="$RUNNER_ETC_DIR/vm.args" # Use releases/VSN/sys.config if it exists otherwise use etc/app.config -if [ -e "$RUNNER_BASE_DIR/releases/$APP_VSN/sys.config" ]; then - CONFIG_PATH="$RUNNER_BASE_DIR/releases/$APP_VSN/sys.config" -else - CONFIG_PATH="$RUNNER_ETC_DIR/app.config" -fi +# if [ -e "$RUNNER_BASE_DIR/releases/$APP_VSN/sys.config" ]; then +# CONFIG_PATH="$RUNNER_BASE_DIR/releases/$APP_VSN/sys.config" +# else +# CONFIG_PATH="$RUNNER_ETC_DIR/app.config" +# fi +CONFIG_PATH="$RUNNER_ETC_DIR/app.config" + + +# +# Generate conf files - [app.config, vm.args] +# +gen_config() { + rm -f $RUNNER_BASE_DIR/etc/app.*.config + rm -f $RUNNER_BASE_DIR/etc/vm.*.args + RES_CUTTLEFISH=`$RUNNER_BASE_DIR/bin/cuttlefish -i $RUNNER_BASE_DIR/etc/leo_manager.schema -c $RUNNER_BASE_DIR/etc/leo_manager.conf -d $RUNNER_BASE_DIR/etc/` + + APP_CONFIG=`find $RUNNER_BASE_DIR/etc -type f | grep app.*[0-9].config` + mv $APP_CONFIG $RUNNER_BASE_DIR/etc/app.config + + VM_ARGS=`find $RUNNER_BASE_DIR/etc -type f | grep vm.*[0-9].args` + mv $VM_ARGS $RUNNER_BASE_DIR/etc/vm.args +} +case "$1" in + start) + gen_config + ;; + console) + gen_config + ;; + *) + ;; +esac + # Extract the target node name from node.args NAME_ARG=`egrep '^-s?name' $VMARGS_PATH` diff --git a/rel/leo_manager/reltool.config b/rel/leo_manager/reltool.config index 38537927..5c6ae118 100644 --- a/rel/leo_manager/reltool.config +++ b/rel/leo_manager/reltool.config @@ -83,37 +83,37 @@ %% make directories {mkdir, "work/mnesia"}, {mkdir, "work/queue"}, - {mkdir, "{{platform_log_dir}}/app"}, - {mkdir, "{{platform_log_dir}}/ring"}, - {mkdir, "{{platform_log_dir}}/sasl"}, - {mkdir, "{{platform_snmp_dir}}/snmpa_manager_0/db"}, - {mkdir, "{{platform_snmp_dir}}/snmpa_manager_0/agent/conf"}, - {mkdir, "{{platform_snmp_dir}}/snmpa_manager_1/db"}, - {mkdir, "{{platform_snmp_dir}}/snmpa_manager_1/agent/conf"}, + {mkdir, "log/sasl"}, + {mkdir, "snmp/snmpa_manager_0/db"}, + {mkdir, "snmp/snmpa_manager_0/agent/conf"}, + {mkdir, "snmp/snmpa_manager_1/db"}, + {mkdir, "snmp/snmpa_manager_1/agent/conf"}, %% copy and create files {copy, "files/erl", "\{\{erts_vsn\}\}/bin/erl"}, {copy, "files/nodetool", "\{\{erts_vsn\}\}/bin/nodetool"}, {copy, "files/leo_manager", "bin/leo_manager"}, {copy, "files/leo_manager.cmd", "bin/leo_manager.cmd"}, {copy, "files/start_erl.cmd", "bin/start_erl.cmd"}, - {template, "files/vm.args", "etc/vm.args"}, - {template, "files/app.config", "etc/app.config"}, + %% cuttlefish-related + {copy, "../../deps/leo_manager/cuttlefish", "bin/cuttlefish"}, + {copy, "files/leo_manager.conf","etc/leo_manager.conf"}, + {copy, "../../deps/leo_manager/priv/leo_manager.schema", "etc/leo_manager.schema"}, %% snmp-related - {copy, "../../deps/leo_manager/snmp/snmpa_manager_0/LEO-MANAGER.bin", "{{platform_snmp_dir}}/snmpa_manager_0/LEO-MANAGER.bin"}, - {copy, "../../deps/leo_manager/snmp/snmpa_manager_0/LEO-MANAGER.bin", "{{platform_snmp_dir}}/snmpa_manager_0/LEO-MANAGER.mib"}, - {copy, "../../deps/leo_manager/snmp/snmpa_manager_0/leo_manager_snmp.config", "{{platform_snmp_dir}}/snmpa_manager_0/leo_manager_snmp.config"}, - {copy, "../../deps/leo_manager/snmp/snmpa_manager_0/agent/conf/agent.conf", "{{platform_snmp_dir}}/snmpa_manager_0/agent/conf/agent.conf"}, - {copy, "../../deps/leo_manager/snmp/snmpa_manager_0/agent/conf/community.conf", "{{platform_snmp_dir}}/snmpa_manager_0/agent/conf/community.conf"}, - {copy, "../../deps/leo_manager/snmp/snmpa_manager_0/agent/conf/context.conf", "{{platform_snmp_dir}}/snmpa_manager_0/agent/conf/context.conf"}, - {copy, "../../deps/leo_manager/snmp/snmpa_manager_0/agent/conf/standard.conf", "{{platform_snmp_dir}}/snmpa_manager_0/agent/conf/standard.conf"}, - {copy, "../../deps/leo_manager/snmp/snmpa_manager_0/agent/conf/vacm.conf", "{{platform_snmp_dir}}/snmpa_manager_0/agent/conf/vacm.conf"}, + {copy, "../../deps/leo_manager/snmp/snmpa_manager_0/LEO-MANAGER.bin", "snmp/snmpa_manager_0/LEO-MANAGER.bin"}, + {copy, "../../deps/leo_manager/snmp/snmpa_manager_0/LEO-MANAGER.bin", "snmp/snmpa_manager_0/LEO-MANAGER.mib"}, + {copy, "../../deps/leo_manager/snmp/snmpa_manager_0/leo_manager_snmp.config", "snmp/snmpa_manager_0/leo_manager_snmp.config"}, + {copy, "../../deps/leo_manager/snmp/snmpa_manager_0/agent/conf/agent.conf", "snmp/snmpa_manager_0/agent/conf/agent.conf"}, + {copy, "../../deps/leo_manager/snmp/snmpa_manager_0/agent/conf/community.conf", "snmp/snmpa_manager_0/agent/conf/community.conf"}, + {copy, "../../deps/leo_manager/snmp/snmpa_manager_0/agent/conf/context.conf", "snmp/snmpa_manager_0/agent/conf/context.conf"}, + {copy, "../../deps/leo_manager/snmp/snmpa_manager_0/agent/conf/standard.conf", "snmp/snmpa_manager_0/agent/conf/standard.conf"}, + {copy, "../../deps/leo_manager/snmp/snmpa_manager_0/agent/conf/vacm.conf", "snmp/snmpa_manager_0/agent/conf/vacm.conf"}, - {copy, "../../deps/leo_manager/snmp/snmpa_manager_1/LEO-MANAGER.bin", "{{platform_snmp_dir}}/snmpa_manager_1/LEO-MANAGER.bin"}, - {copy, "../../deps/leo_manager/snmp/snmpa_manager_1/LEO-MANAGER.bin", "{{platform_snmp_dir}}/snmpa_manager_1/LEO-MANAGER.mib"}, - {copy, "../../deps/leo_manager/snmp/snmpa_manager_1/leo_manager_snmp.config", "{{platform_snmp_dir}}/snmpa_manager_1/leo_manager_snmp.config"}, - {copy, "../../deps/leo_manager/snmp/snmpa_manager_1/agent/conf/agent.conf", "{{platform_snmp_dir}}/snmpa_manager_1/agent/conf/agent.conf"}, - {copy, "../../deps/leo_manager/snmp/snmpa_manager_1/agent/conf/community.conf", "{{platform_snmp_dir}}/snmpa_manager_1/agent/conf/community.conf"}, - {copy, "../../deps/leo_manager/snmp/snmpa_manager_1/agent/conf/context.conf", "{{platform_snmp_dir}}/snmpa_manager_1/agent/conf/context.conf"}, - {copy, "../../deps/leo_manager/snmp/snmpa_manager_1/agent/conf/standard.conf", "{{platform_snmp_dir}}/snmpa_manager_1/agent/conf/standard.conf"}, - {copy, "../../deps/leo_manager/snmp/snmpa_manager_1/agent/conf/vacm.conf", "{{platform_snmp_dir}}/snmpa_manager_1/agent/conf/vacm.conf"} + {copy, "../../deps/leo_manager/snmp/snmpa_manager_1/LEO-MANAGER.bin", "snmp/snmpa_manager_1/LEO-MANAGER.bin"}, + {copy, "../../deps/leo_manager/snmp/snmpa_manager_1/LEO-MANAGER.bin", "snmp/snmpa_manager_1/LEO-MANAGER.mib"}, + {copy, "../../deps/leo_manager/snmp/snmpa_manager_1/leo_manager_snmp.config", "snmp/snmpa_manager_1/leo_manager_snmp.config"}, + {copy, "../../deps/leo_manager/snmp/snmpa_manager_1/agent/conf/agent.conf", "snmp/snmpa_manager_1/agent/conf/agent.conf"}, + {copy, "../../deps/leo_manager/snmp/snmpa_manager_1/agent/conf/community.conf", "snmp/snmpa_manager_1/agent/conf/community.conf"}, + {copy, "../../deps/leo_manager/snmp/snmpa_manager_1/agent/conf/context.conf", "snmp/snmpa_manager_1/agent/conf/context.conf"}, + {copy, "../../deps/leo_manager/snmp/snmpa_manager_1/agent/conf/standard.conf", "snmp/snmpa_manager_1/agent/conf/standard.conf"}, + {copy, "../../deps/leo_manager/snmp/snmpa_manager_1/agent/conf/vacm.conf", "snmp/snmpa_manager_1/agent/conf/vacm.conf"} ]}. diff --git a/rel/leo_manager/vars.config b/rel/leo_manager/vars.config index 88a12fb8..6233b835 100644 --- a/rel/leo_manager/vars.config +++ b/rel/leo_manager/vars.config @@ -20,92 +20,7 @@ %% under the License. %% %%====================================================================== -%% LeoFS system's version" -{system_version, "0.16.5"}. - -%% Node alias name -{node_alias, "manager_1"}. -{node_ip, "127.0.0.1"}. - -%% Cookie -{cookie, "401321b4"}. - -%% == LeoFS-specific redundant/quorum properties == -%% -%% # of replicated files -{num_of_replicas, 1}. -%% # of successes of write-operation -{num_of_successes_of_write, 1}. -%% # of successes of read-operation -{num_of_successes_of_read, 1}. -%% # of successes of delete-operation -{num_of_successes_of_delete, 1}. - -%% # of DC-awareness replicas -{num_of_awareness_L1, 0}. -%% # of Rack-awareness replicas -{num_of_awareness_L2, 0}. - -%% == LeoFS available-commads == -{available_commands, all}. - -%% == Platform-specific installation paths == -{platform_bin_dir, "./bin"}. -{platform_etc_dir, "./etc"}. -{platform_lib_dir, "./lib"}. -{platform_log_dir, "./log"}. -{platform_snmp_dir, "./snmp"}. -{platform_work_dir, "./work"}. - - -%% == Manaegr's properties == -%% -%% Manager acceptable port number -{manager_port_cui, 10011}. -{manager_port_json, 10021}. - -%% Mode of server - [master|slave] -{manager_mode, 'slave'}. -%% Partner of manager's alias -{manager_partners, '["manager_0@127.0.0.1"]'}. - - -%% == Directories == -%% -%% SNMP configured directory -{snmp_conf_dir, "snmpa_manager_1"}. -%% Directory of SNMP-Agent -{snmp_agent_dir, "{{platform_snmp_dir}}/{{snmp_conf_dir}}/LEO-MANAGER"}. - -%% Directory of Mnesia -{mnesia_dir, "{{platform_work_dir}}/mnesia"}. -%% Directory of mq's db-file -{queue_dir, "{{platform_work_dir}}/queue"}. -%% SASL log related -{sasl_log_dir, "{{platform_log_dir}}/sasl"}. -{sasl_error_log, "{{platform_log_dir}}/sasl/sasl-error.log"}. - -%% Application log directory -{app_log_dir, "{{platform_log_dir}}/app"}. -%% Directory of ring and cluster-members log directory -{ring_log_dir, "{{platform_log_dir}}/ring"}. -{members_log_dir, "{{platform_log_dir}}/ring"}. - -%% Log output level -%% 0: debug -%% 1: info -%% 2: warning -%% 3: error -{log_level, 1}. - -%% == Compaction-related for storage(s) == -%% -%% # of execution of concurrent -{num_of_compact_proc, 1}. - -%% -%% etc/vm.args -%% -{node, "{{node_alias}}@{{node_ip}}"}. -{crash_dump, "{{platform_log_dir}}/erl_crash.dump"}. +%% We move from this configuration to like ini-file configuration, +%% which is using "basho/cuttlefish" +%% See: leofs/deps/leo_manager/priv/leo_manager_*.conf diff --git a/rel/leo_manager/vars/manager_master_vars.config b/rel/leo_manager/vars/manager_master_vars.config deleted file mode 100644 index f3cbac3a..00000000 --- a/rel/leo_manager/vars/manager_master_vars.config +++ /dev/null @@ -1,112 +0,0 @@ -%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*- -%%====================================================================== -%% -%% LeoFS Manager -%% -%% Copyright (c) 2012-2013 Rakuten, Inc. -%% -%% This file is provided to you 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. -%% -%%====================================================================== -%% LeoFS system's version" -{system_version, "0.16.5"}. - -%% Node alias name -{node_alias, "manager_0"}. -{node_ip, "127.0.0.1"}. - -%% Cookie -{cookie, "401321b4"}. - -%% == LeoFS-specific redundant/quorum properties == -%% -%% # of replicated files -{num_of_replicas, 1}. -%% # of successes of write-operation -{num_of_successes_of_write, 1}. -%% # of successes of read-operation -{num_of_successes_of_read, 1}. -%% # of successes of delete-operation -{num_of_successes_of_delete, 1}. - -%% # of DC-awareness replicas -{num_of_awareness_L1, 0}. -%% # of Rack-awareness replicas -{num_of_awareness_L2, 0}. - -%% == LeoFS available-commads == -{available_commands, all}. - -%% == Platform-specific installation paths == -{platform_bin_dir, "./bin"}. -{platform_etc_dir, "./etc"}. -{platform_lib_dir, "./lib"}. -{platform_log_dir, "./log"}. -{platform_snmp_dir, "./snmp"}. -{platform_work_dir, "./work"}. - - -%% == Manaegr's properties == -%% -%% Manager acceptable port number -{manager_port_cui, 10010}. -{manager_port_json, 10020}. - -%% Mode of server - [master|slave] -{manager_mode, 'master'}. -%% Partner of manager's alias -{manager_partners, '["manager_1@127.0.0.1"]'}. - - -%% == Directories == -%% -%% SNMP configured directory -{snmp_conf_dir, "snmpa_manager_0"}. -%% Directory of SNMP-Agent -{snmp_agent_dir, "{{platform_snmp_dir}}/{{snmp_conf_dir}}/LEO-MANAGER"}. - -%% Directory of Mnesia -{mnesia_dir, "{{platform_work_dir}}/mnesia"}. -%% Directory of mq's db-file -{queue_dir, "{{platform_work_dir}}/queue"}. -%% SASL log related -{sasl_log_dir, "{{platform_log_dir}}/sasl"}. -{sasl_error_log, "{{platform_log_dir}}/sasl/sasl-error.log"}. - -%% Application log directory -{app_log_dir, "{{platform_log_dir}}/app"}. -%% Directory of ring and cluster-members log directory -{ring_log_dir, "{{platform_log_dir}}/ring"}. -{members_log_dir, "{{platform_log_dir}}/ring"}. - - -%% Log output level -%% 0: debug -%% 1: info -%% 2: warning -%% 3: error -{log_level, 1}. - -%% == Compaction-related for storage(s) == -%% -%% # of execution of concurrent -{num_of_compact_proc, 1}. - -%% -%% etc/vm.args -%% -{node, "{{node_alias}}@{{node_ip}}"}. -{crash_dump, "{{platform_log_dir}}/erl_crash.dump"}. - diff --git a/rel/leo_manager/vars/manager_slave_vars.config b/rel/leo_manager/vars/manager_slave_vars.config deleted file mode 100644 index 88a12fb8..00000000 --- a/rel/leo_manager/vars/manager_slave_vars.config +++ /dev/null @@ -1,111 +0,0 @@ -%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*- -%%====================================================================== -%% -%% LeoFS Manager -%% -%% Copyright (c) 2012-2013 Rakuten, Inc. -%% -%% This file is provided to you 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. -%% -%%====================================================================== -%% LeoFS system's version" -{system_version, "0.16.5"}. - -%% Node alias name -{node_alias, "manager_1"}. -{node_ip, "127.0.0.1"}. - -%% Cookie -{cookie, "401321b4"}. - -%% == LeoFS-specific redundant/quorum properties == -%% -%% # of replicated files -{num_of_replicas, 1}. -%% # of successes of write-operation -{num_of_successes_of_write, 1}. -%% # of successes of read-operation -{num_of_successes_of_read, 1}. -%% # of successes of delete-operation -{num_of_successes_of_delete, 1}. - -%% # of DC-awareness replicas -{num_of_awareness_L1, 0}. -%% # of Rack-awareness replicas -{num_of_awareness_L2, 0}. - -%% == LeoFS available-commads == -{available_commands, all}. - -%% == Platform-specific installation paths == -{platform_bin_dir, "./bin"}. -{platform_etc_dir, "./etc"}. -{platform_lib_dir, "./lib"}. -{platform_log_dir, "./log"}. -{platform_snmp_dir, "./snmp"}. -{platform_work_dir, "./work"}. - - -%% == Manaegr's properties == -%% -%% Manager acceptable port number -{manager_port_cui, 10011}. -{manager_port_json, 10021}. - -%% Mode of server - [master|slave] -{manager_mode, 'slave'}. -%% Partner of manager's alias -{manager_partners, '["manager_0@127.0.0.1"]'}. - - -%% == Directories == -%% -%% SNMP configured directory -{snmp_conf_dir, "snmpa_manager_1"}. -%% Directory of SNMP-Agent -{snmp_agent_dir, "{{platform_snmp_dir}}/{{snmp_conf_dir}}/LEO-MANAGER"}. - -%% Directory of Mnesia -{mnesia_dir, "{{platform_work_dir}}/mnesia"}. -%% Directory of mq's db-file -{queue_dir, "{{platform_work_dir}}/queue"}. -%% SASL log related -{sasl_log_dir, "{{platform_log_dir}}/sasl"}. -{sasl_error_log, "{{platform_log_dir}}/sasl/sasl-error.log"}. - -%% Application log directory -{app_log_dir, "{{platform_log_dir}}/app"}. -%% Directory of ring and cluster-members log directory -{ring_log_dir, "{{platform_log_dir}}/ring"}. -{members_log_dir, "{{platform_log_dir}}/ring"}. - -%% Log output level -%% 0: debug -%% 1: info -%% 2: warning -%% 3: error -{log_level, 1}. - -%% == Compaction-related for storage(s) == -%% -%% # of execution of concurrent -{num_of_compact_proc, 1}. - -%% -%% etc/vm.args -%% -{node, "{{node_alias}}@{{node_ip}}"}. -{crash_dump, "{{platform_log_dir}}/erl_crash.dump"}. - diff --git a/rel/leo_storage/files/app.config b/rel/leo_storage/files/app.config index c9219d76..5827e6a9 100644 --- a/rel/leo_storage/files/app.config +++ b/rel/leo_storage/files/app.config @@ -20,114 +20,8 @@ %% under the License. %% %%====================================================================== -[ - {sasl, [ - {sasl_error_logger, {file, "{{platform_log_dir}}/sasl/sasl-error.log"}}, - {errlog_type, error}, - {error_logger_mf_dir, "{{platform_log_dir}}/sasl"}, - {error_logger_mf_maxbytes, 10485760}, % 10 MB max file size - {error_logger_mf_maxfiles, 5} % 5 files max - ]}, - {leo_storage, [ - %% == System Ver == - {system_version, "{{system_version}}" }, - - %% == Storage Configuration == - %% - %% Object containers properties: - %% @param path - Directory of object-containers - %% @param num_of_containers - # of object-containers - %% - %% Notes: - %% If you set up LeoFS on 'development', default value - "./avs" - is OK. - %% If you set up LeoFS on 'production' or 'staging', You should need to change "volume", - %% And We recommend volume's partition is XFS. - %% - {obj_containers, {{obj_containers}} }, - - %% leo-manager's nodes - {managers, {{managers}} }, - - %% # of virtual-nodes - {num_of_vnodes, {{num_of_vnodes}} }, - - %% # of mq-server's processes - {num_of_mq_procs, {{num_of_mq_procs}} }, - - %% mq - queues consumption's intervals - %% - per_object - {cns_num_of_batch_process_per_object, {{cns_num_of_batch_process_per_object}} }, - {cns_interval_per_object_min, {{cns_interval_per_object_min}} }, - {cns_interval_per_object_max, {{cns_interval_per_object_max}} }, - %% - sync_by_vnode_id - {cns_num_of_batch_process_sync_by_vnode_id, {{cns_num_of_batch_process_sync_by_vnode_id}} }, - {cns_interval_sync_by_vnode_id_min, {{cns_interval_sync_by_vnode_id_min}} }, - {cns_interval_sync_by_vnode_id_max, {{cns_interval_sync_by_vnode_id_max}} }, - %% - for rebalance - {cns_num_of_batch_process_rebalance, {{cns_num_of_batch_process_rebalance}} }, - {cns_interval_rebalance_min, {{cns_interval_rebalance_min}} }, - {cns_interval_rebalance_max, {{cns_interval_rebalance_max}} }, - %% - async deletion objects (after remove a bucket) - {cns_num_of_batch_process_async_deletion, {{cns_num_of_batch_process_async_deletion}} }, - {cns_interval_async_deletion_min, {{cns_interval_async_deletion_min}} }, - {cns_interval_async_deletion_max, {{cns_interval_async_deletion_max}} }, - %% - recovery node - {cns_num_of_batch_process_recovery_node, {{cns_num_of_batch_process_recovery_node}} }, - {cns_interval_recovery_node_min, {{cns_interval_recovery_node_min}} }, - {cns_interval_recovery_node_max, {{cns_interval_recovery_node_max}} }, - - %% cluster group - level_1 - %% - Able to use from ver 1.0.0) - %% - ex: {grp_level_1, "DC_0001"}. - {grp_level_1, "{{grp_level_1}}"}, - - %% cluster group - level_2 - %% - Able to use from ver 0.14.2) - %% - ex: {grp_level_2, "RACK_0001"}. - {grp_level_2, "{{grp_level_2}}"}, - - %% == For Ordning-Reda == - %% Size of stacked objects (bytes) - {size_of_stacked_objs, {{size_of_stacked_objs}} }, - %% Stacking timeout (msec) - {stacking_timeout, {{stacking_timeout}} }, - - %% == Log-specific properties == - %% - {log_level, {{log_level}} }, - {log_appender, [ - {file, [{path, "{{app_log_dir}}" }]} - ]}, - - %% == Directories == - %% - %% Directory of log output - {log_dir, "{{platform_log_dir}}"}, - %% Directory of mq's db-files - {queue_dir, "{{queue_dir}}"}, - %% Directory of SNMP-Agent - {snmp_agent, "{{snmp_agent_dir}}"} - ]}, - - {leo_backend_db, [{profile, false}]}, - {leo_logger, [{profile, false}]}, - {leo_mq, [{profile, false}, - {backend_db, 'bitcask'} - ]}, - {leo_object_storage, [{profile, false}, - {metadata_storage, 'bitcask'}, - %% Strict comparison of object's checksum with its metadata - {is_strict_check, {{is_strict_check}} } - ]}, - {leo_ordning_reda, [{profile, false}, - {send_after_interval, 100} - ]}, - {leo_redundant_manager, [{profile, false}, - {notify_mf, [leo_manager_api, notify]}, - {sync_mf, [leo_manager_api, synchronize]}, - {log_dir_member, "{{ring_log_dir}}" }, - {log_dir_ring, "{{ring_log_dir}}" } - ]}, - {leo_statistics, [{profile, false}]} -]. +%% We move from this configuration to like ini-file configuration, +%% which is using "basho/cuttlefish" +%% See: leofs/deps/leo_storage/priv/leo_storage.conf +[]. diff --git a/rel/leo_storage/files/leo_storage b/rel/leo_storage/files/leo_storage index a62ff29b..8cd78c97 100755 --- a/rel/leo_storage/files/leo_storage +++ b/rel/leo_storage/files/leo_storage @@ -30,18 +30,47 @@ ERTS_VSN=${START_ERL% *} APP_VSN=${START_ERL#* } # Use releases/VSN/vm.args if it exists otherwise use etc/vm.args -if [ -e "$RUNNER_BASE_DIR/releases/$APP_VSN/vm.args" ]; then - VMARGS_PATH="$RUNNER_BASE_DIR/releases/$APP_VSN/vm.args" -else - VMARGS_PATH="$RUNNER_ETC_DIR/vm.args" -fi +# if [ -e "$RUNNER_BASE_DIR/releases/$APP_VSN/vm.args" ]; then +# VMARGS_PATH="$RUNNER_BASE_DIR/releases/$APP_VSN/vm.args" +# else +# VMARGS_PATH="$RUNNER_ETC_DIR/vm.args" +# fi +VMARGS_PATH="$RUNNER_ETC_DIR/vm.args" # Use releases/VSN/sys.config if it exists otherwise use etc/app.config -if [ -e "$RUNNER_BASE_DIR/releases/$APP_VSN/sys.config" ]; then - CONFIG_PATH="$RUNNER_BASE_DIR/releases/$APP_VSN/sys.config" -else - CONFIG_PATH="$RUNNER_ETC_DIR/app.config" -fi +# if [ -e "$RUNNER_BASE_DIR/releases/$APP_VSN/sys.config" ]; then +# CONFIG_PATH="$RUNNER_BASE_DIR/releases/$APP_VSN/sys.config" +# else +# CONFIG_PATH="$RUNNER_ETC_DIR/app.config" +# fi +CONFIG_PATH="$RUNNER_ETC_DIR/app.config" + + +# +# Generate conf files - [app.config, vm.args] +# +gen_config() { + rm -f $RUNNER_BASE_DIR/etc/app.*.config + rm -f $RUNNER_BASE_DIR/etc/vm.*.args + RES_CUTTLEFISH=`$RUNNER_BASE_DIR/bin/cuttlefish -i $RUNNER_BASE_DIR/etc/leo_storage.schema -c $RUNNER_BASE_DIR/etc/leo_storage.conf -d $RUNNER_BASE_DIR/etc/` + + APP_CONFIG=`find $RUNNER_BASE_DIR/etc -type f | grep app.*[0-9].config` + mv $APP_CONFIG $RUNNER_BASE_DIR/etc/app.config + + VM_ARGS=`find $RUNNER_BASE_DIR/etc -type f | grep vm.*[0-9].args` + mv $VM_ARGS $RUNNER_BASE_DIR/etc/vm.args +} +case "$1" in + start) + gen_config + ;; + console) + gen_config + ;; + *) + ;; +esac + # Extract the target node name from node.args NAME_ARG=`egrep '^-s?name' $VMARGS_PATH` @@ -93,6 +122,7 @@ case "$1" in exit 1 fi + # Launch the application HEART_COMMAND="$RUNNER_BASE_DIR/bin/$SCRIPT start" export HEART_COMMAND mkdir -p $PIPE_DIR diff --git a/rel/leo_storage/reltool.config b/rel/leo_storage/reltool.config index c60e2e55..d4489bc3 100644 --- a/rel/leo_storage/reltool.config +++ b/rel/leo_storage/reltool.config @@ -87,59 +87,59 @@ %% make directories {mkdir, "work/mnesia"}, {mkdir, "work/queue"}, - {mkdir, "{{platform_log_dir}}/app"}, - {mkdir, "{{platform_log_dir}}/ring"}, - {mkdir, "{{platform_log_dir}}/sasl"}, - {mkdir, "{{platform_snmp_dir}}/snmpa_storage_0/db"}, - {mkdir, "{{platform_snmp_dir}}/snmpa_storage_0/agent/conf"}, - {mkdir, "{{platform_snmp_dir}}/snmpa_storage_1/db"}, - {mkdir, "{{platform_snmp_dir}}/snmpa_storage_1/agent/conf"}, - {mkdir, "{{platform_snmp_dir}}/snmpa_storage_2/db"}, - {mkdir, "{{platform_snmp_dir}}/snmpa_storage_2/agent/conf"}, - {mkdir, "{{platform_snmp_dir}}/snmpa_storage_3/db"}, - {mkdir, "{{platform_snmp_dir}}/snmpa_storage_3/agent/conf"}, + {mkdir, "log/sasl"}, + {mkdir, "snmp/snmpa_storage_0/db"}, + {mkdir, "snmp/snmpa_storage_0/agent/conf"}, + {mkdir, "snmp/snmpa_storage_1/db"}, + {mkdir, "snmp/snmpa_storage_1/agent/conf"}, + {mkdir, "snmp/snmpa_storage_2/db"}, + {mkdir, "snmp/snmpa_storage_2/agent/conf"}, + {mkdir, "snmp/snmpa_storage_3/db"}, + {mkdir, "snmp/snmpa_storage_3/agent/conf"}, %% copy and create files {copy, "files/erl", "\{\{erts_vsn\}\}/bin/erl"}, {copy, "files/nodetool", "\{\{erts_vsn\}\}/bin/nodetool"}, {copy, "files/leo_storage", "bin/leo_storage"}, {copy, "files/leo_storage.cmd", "bin/leo_storage.cmd"}, {copy, "files/start_erl.cmd", "bin/start_erl.cmd"}, - {template, "files/vm.args", "etc/vm.args"}, - {template, "files/app.config", "etc/app.config"}, + %% cuttlefish-related + {copy, "../../deps/leo_storage/cuttlefish", "bin/cuttlefish"}, + {copy, "../../deps/leo_storage/priv/leo_storage.conf", "etc/leo_storage.conf"}, + {copy, "../../deps/leo_storage/priv/leo_storage.schema", "etc/leo_storage.schema"}, %% snmp-related - {copy, "../../deps/leo_storage/snmp/snmpa_storage_0/LEO-STORAGE.bin", "{{platform_snmp_dir}}/snmpa_storage_0/LEO-STORAGE.bin"}, - {copy, "../../deps/leo_storage/snmp/snmpa_storage_0/LEO-STORAGE.bin", "{{platform_snmp_dir}}/snmpa_storage_0/LEO-STORAGE.mib"}, - {copy, "../../deps/leo_storage/snmp/snmpa_storage_0/leo_storage_snmp.config", "{{platform_snmp_dir}}/snmpa_storage_0/leo_storage_snmp.config"}, - {copy, "../../deps/leo_storage/snmp/snmpa_storage_0/agent/conf/agent.conf", "{{platform_snmp_dir}}/snmpa_storage_0/agent/conf/agent.conf"}, - {copy, "../../deps/leo_storage/snmp/snmpa_storage_0/agent/conf/community.conf", "{{platform_snmp_dir}}/snmpa_storage_0/agent/conf/community.conf"}, - {copy, "../../deps/leo_storage/snmp/snmpa_storage_0/agent/conf/context.conf", "{{platform_snmp_dir}}/snmpa_storage_0/agent/conf/context.conf"}, - {copy, "../../deps/leo_storage/snmp/snmpa_storage_0/agent/conf/standard.conf", "{{platform_snmp_dir}}/snmpa_storage_0/agent/conf/standard.conf"}, - {copy, "../../deps/leo_storage/snmp/snmpa_storage_0/agent/conf/vacm.conf", "{{platform_snmp_dir}}/snmpa_storage_0/agent/conf/vacm.conf"}, + {copy, "../../deps/leo_storage/snmp/snmpa_storage_0/LEO-STORAGE.bin", "snmp/snmpa_storage_0/LEO-STORAGE.bin"}, + {copy, "../../deps/leo_storage/snmp/snmpa_storage_0/LEO-STORAGE.bin", "snmp/snmpa_storage_0/LEO-STORAGE.mib"}, + {copy, "../../deps/leo_storage/snmp/snmpa_storage_0/leo_storage_snmp.config", "snmp/snmpa_storage_0/leo_storage_snmp.config"}, + {copy, "../../deps/leo_storage/snmp/snmpa_storage_0/agent/conf/agent.conf", "snmp/snmpa_storage_0/agent/conf/agent.conf"}, + {copy, "../../deps/leo_storage/snmp/snmpa_storage_0/agent/conf/community.conf", "snmp/snmpa_storage_0/agent/conf/community.conf"}, + {copy, "../../deps/leo_storage/snmp/snmpa_storage_0/agent/conf/context.conf", "snmp/snmpa_storage_0/agent/conf/context.conf"}, + {copy, "../../deps/leo_storage/snmp/snmpa_storage_0/agent/conf/standard.conf", "snmp/snmpa_storage_0/agent/conf/standard.conf"}, + {copy, "../../deps/leo_storage/snmp/snmpa_storage_0/agent/conf/vacm.conf", "snmp/snmpa_storage_0/agent/conf/vacm.conf"}, - {copy, "../../deps/leo_storage/snmp/snmpa_storage_1/LEO-STORAGE.bin", "{{platform_snmp_dir}}/snmpa_storage_1/LEO-STORAGE.bin"}, - {copy, "../../deps/leo_storage/snmp/snmpa_storage_1/LEO-STORAGE.bin", "{{platform_snmp_dir}}/snmpa_storage_1/LEO-STORAGE.mib"}, - {copy, "../../deps/leo_storage/snmp/snmpa_storage_1/leo_storage_snmp.config", "{{platform_snmp_dir}}/snmpa_storage_1/leo_storage_snmp.config"}, - {copy, "../../deps/leo_storage/snmp/snmpa_storage_1/agent/conf/agent.conf", "{{platform_snmp_dir}}/snmpa_storage_1/agent/conf/agent.conf"}, - {copy, "../../deps/leo_storage/snmp/snmpa_storage_1/agent/conf/community.conf", "{{platform_snmp_dir}}/snmpa_storage_1/agent/conf/community.conf"}, - {copy, "../../deps/leo_storage/snmp/snmpa_storage_1/agent/conf/context.conf", "{{platform_snmp_dir}}/snmpa_storage_1/agent/conf/context.conf"}, - {copy, "../../deps/leo_storage/snmp/snmpa_storage_1/agent/conf/standard.conf", "{{platform_snmp_dir}}/snmpa_storage_1/agent/conf/standard.conf"}, - {copy, "../../deps/leo_storage/snmp/snmpa_storage_1/agent/conf/vacm.conf", "{{platform_snmp_dir}}/snmpa_storage_1/agent/conf/vacm.conf"}, + {copy, "../../deps/leo_storage/snmp/snmpa_storage_1/LEO-STORAGE.bin", "snmp/snmpa_storage_1/LEO-STORAGE.bin"}, + {copy, "../../deps/leo_storage/snmp/snmpa_storage_1/LEO-STORAGE.bin", "snmp/snmpa_storage_1/LEO-STORAGE.mib"}, + {copy, "../../deps/leo_storage/snmp/snmpa_storage_1/leo_storage_snmp.config", "snmp/snmpa_storage_1/leo_storage_snmp.config"}, + {copy, "../../deps/leo_storage/snmp/snmpa_storage_1/agent/conf/agent.conf", "snmp/snmpa_storage_1/agent/conf/agent.conf"}, + {copy, "../../deps/leo_storage/snmp/snmpa_storage_1/agent/conf/community.conf", "snmp/snmpa_storage_1/agent/conf/community.conf"}, + {copy, "../../deps/leo_storage/snmp/snmpa_storage_1/agent/conf/context.conf", "snmp/snmpa_storage_1/agent/conf/context.conf"}, + {copy, "../../deps/leo_storage/snmp/snmpa_storage_1/agent/conf/standard.conf", "snmp/snmpa_storage_1/agent/conf/standard.conf"}, + {copy, "../../deps/leo_storage/snmp/snmpa_storage_1/agent/conf/vacm.conf", "snmp/snmpa_storage_1/agent/conf/vacm.conf"}, - {copy, "../../deps/leo_storage/snmp/snmpa_storage_2/LEO-STORAGE.bin", "{{platform_snmp_dir}}/snmpa_storage_2/LEO-STORAGE.bin"}, - {copy, "../../deps/leo_storage/snmp/snmpa_storage_2/LEO-STORAGE.bin", "{{platform_snmp_dir}}/snmpa_storage_2/LEO-STORAGE.mib"}, - {copy, "../../deps/leo_storage/snmp/snmpa_storage_2/leo_storage_snmp.config", "{{platform_snmp_dir}}/snmpa_storage_2/leo_storage_snmp.config"}, - {copy, "../../deps/leo_storage/snmp/snmpa_storage_2/agent/conf/agent.conf", "{{platform_snmp_dir}}/snmpa_storage_2/agent/conf/agent.conf"}, - {copy, "../../deps/leo_storage/snmp/snmpa_storage_2/agent/conf/community.conf", "{{platform_snmp_dir}}/snmpa_storage_2/agent/conf/community.conf"}, - {copy, "../../deps/leo_storage/snmp/snmpa_storage_2/agent/conf/context.conf", "{{platform_snmp_dir}}/snmpa_storage_2/agent/conf/context.conf"}, - {copy, "../../deps/leo_storage/snmp/snmpa_storage_2/agent/conf/standard.conf", "{{platform_snmp_dir}}/snmpa_storage_2/agent/conf/standard.conf"}, - {copy, "../../deps/leo_storage/snmp/snmpa_storage_2/agent/conf/vacm.conf", "{{platform_snmp_dir}}/snmpa_storage_2/agent/conf/vacm.conf"}, + {copy, "../../deps/leo_storage/snmp/snmpa_storage_2/LEO-STORAGE.bin", "snmp/snmpa_storage_2/LEO-STORAGE.bin"}, + {copy, "../../deps/leo_storage/snmp/snmpa_storage_2/LEO-STORAGE.bin", "snmp/snmpa_storage_2/LEO-STORAGE.mib"}, + {copy, "../../deps/leo_storage/snmp/snmpa_storage_2/leo_storage_snmp.config", "snmp/snmpa_storage_2/leo_storage_snmp.config"}, + {copy, "../../deps/leo_storage/snmp/snmpa_storage_2/agent/conf/agent.conf", "snmp/snmpa_storage_2/agent/conf/agent.conf"}, + {copy, "../../deps/leo_storage/snmp/snmpa_storage_2/agent/conf/community.conf", "snmp/snmpa_storage_2/agent/conf/community.conf"}, + {copy, "../../deps/leo_storage/snmp/snmpa_storage_2/agent/conf/context.conf", "snmp/snmpa_storage_2/agent/conf/context.conf"}, + {copy, "../../deps/leo_storage/snmp/snmpa_storage_2/agent/conf/standard.conf", "snmp/snmpa_storage_2/agent/conf/standard.conf"}, + {copy, "../../deps/leo_storage/snmp/snmpa_storage_2/agent/conf/vacm.conf", "snmp/snmpa_storage_2/agent/conf/vacm.conf"}, - {copy, "../../deps/leo_storage/snmp/snmpa_storage_3/LEO-STORAGE.bin", "{{platform_snmp_dir}}/snmpa_storage_3/LEO-STORAGE.bin"}, - {copy, "../../deps/leo_storage/snmp/snmpa_storage_3/LEO-STORAGE.bin", "{{platform_snmp_dir}}/snmpa_storage_3/LEO-STORAGE.mib"}, - {copy, "../../deps/leo_storage/snmp/snmpa_storage_3/leo_storage_snmp.config", "{{platform_snmp_dir}}/snmpa_storage_3/leo_storage_snmp.config"}, - {copy, "../../deps/leo_storage/snmp/snmpa_storage_3/agent/conf/agent.conf", "{{platform_snmp_dir}}/snmpa_storage_3/agent/conf/agent.conf"}, - {copy, "../../deps/leo_storage/snmp/snmpa_storage_3/agent/conf/community.conf", "{{platform_snmp_dir}}/snmpa_storage_3/agent/conf/community.conf"}, - {copy, "../../deps/leo_storage/snmp/snmpa_storage_3/agent/conf/context.conf", "{{platform_snmp_dir}}/snmpa_storage_3/agent/conf/context.conf"}, - {copy, "../../deps/leo_storage/snmp/snmpa_storage_3/agent/conf/standard.conf", "{{platform_snmp_dir}}/snmpa_storage_3/agent/conf/standard.conf"}, - {copy, "../../deps/leo_storage/snmp/snmpa_storage_3/agent/conf/vacm.conf", "{{platform_snmp_dir}}/snmpa_storage_3/agent/conf/vacm.conf"} + {copy, "../../deps/leo_storage/snmp/snmpa_storage_3/LEO-STORAGE.bin", "snmp/snmpa_storage_3/LEO-STORAGE.bin"}, + {copy, "../../deps/leo_storage/snmp/snmpa_storage_3/LEO-STORAGE.bin", "snmp/snmpa_storage_3/LEO-STORAGE.mib"}, + {copy, "../../deps/leo_storage/snmp/snmpa_storage_3/leo_storage_snmp.config", "snmp/snmpa_storage_3/leo_storage_snmp.config"}, + {copy, "../../deps/leo_storage/snmp/snmpa_storage_3/agent/conf/agent.conf", "snmp/snmpa_storage_3/agent/conf/agent.conf"}, + {copy, "../../deps/leo_storage/snmp/snmpa_storage_3/agent/conf/community.conf", "snmp/snmpa_storage_3/agent/conf/community.conf"}, + {copy, "../../deps/leo_storage/snmp/snmpa_storage_3/agent/conf/context.conf", "snmp/snmpa_storage_3/agent/conf/context.conf"}, + {copy, "../../deps/leo_storage/snmp/snmpa_storage_3/agent/conf/standard.conf", "snmp/snmpa_storage_3/agent/conf/standard.conf"}, + {copy, "../../deps/leo_storage/snmp/snmpa_storage_3/agent/conf/vacm.conf", "snmp/snmpa_storage_3/agent/conf/vacm.conf"} ]}. diff --git a/rel/leo_storage/vars.config b/rel/leo_storage/vars.config index 638ef6d5..2769cbde 100644 --- a/rel/leo_storage/vars.config +++ b/rel/leo_storage/vars.config @@ -20,122 +20,7 @@ %% under the License. %% %%====================================================================== -%% LeoFS system's version" -{system_version, "0.16.5"}. - -%% Node alias name -{node_alias, "storage_0"}. -{node_ip, "127.0.0.1"}. - -%% Cookie -{cookie, "401321b4"}. - -%% == Platform-specific installation paths == -{platform_bin_dir, "./bin"}. -{platform_etc_dir, "./etc"}. -{platform_lib_dir, "./lib"}. -{platform_log_dir, "./log"}. -{platform_snmp_dir, "./snmp"}. -{platform_work_dir, "./work"}. - -%% == Directories == -%% -%% SNMP configured directory -{snmp_conf_dir, "snmpa_storage_0"}. -%% Directory of SNMP-Agent -{snmp_agent_dir, "{{platform_snmp_dir}}/{{snmp_conf_dir}}/LEO-STORAGE"}. - -%% Directory of mq's db-file -{queue_dir, "{{platform_work_dir}}/queue"}. - -%% SASL log related -{sasl_log_dir, "{{platform_log_dir}}/sasl"}. -{sasl_error_log, "{{platform_log_dir}}/sasl/sasl-error.log"}. - -%% Application log directory -{app_log_dir, "{{platform_log_dir}}/app"}. -%% Directory of ring and cluster-members log directory -{ring_log_dir, "{{platform_log_dir}}/ring"}. -{members_log_dir, "{{platform_log_dir}}/ring"}. - -%% Log output level -%% 0: debug -%% 1: info -%% 2: warning -%% 3: error -{log_level, 1}. - - -%% == Storage - Object-container's path == -%% @param path - Directory of object-containers -%% @param num_of_containers - # of object-containers -%% -%% Notes: -%% If you set up LeoFS on 'development', default value - "./avs" - is OK. -%% If you set up LeoFS on 'production' or 'staging', You should need to change "volume", -%% And We recommend volume's partition is XFS. -%% -{obj_containers, '[[{path, "./avs"}, {num_of_containers, 8}]]'}. - - -%% == Storage properties == -%% leo-manager nodes -{managers, '["manager_0@127.0.0.1", "manager_1@127.0.0.1"]'}. - -%% # of virtual-nodes -{num_of_vnodes, 168}. - -%% # of mq processes -{num_of_mq_procs, 8}. - -%% mq - queues consumption's intervals -%% - per_object -{cns_num_of_batch_process_per_object, 1}. -{cns_interval_per_object_min, 1}. -{cns_interval_per_object_max, 1}. -%% - sync_by_vnode_id -{cns_num_of_batch_process_sync_by_vnode_id, 1}. -{cns_interval_sync_by_vnode_id_min, 8}. -{cns_interval_sync_by_vnode_id_max, 32}. -%% - for rebalance -{cns_num_of_batch_process_rebalance, 60}. -{cns_interval_rebalance_min, 1}. -{cns_interval_rebalance_max, 1}. -%% - async deletion objects (after remove a bucket) -{cns_num_of_batch_process_async_deletion, 1}. -{cns_interval_async_deletion_min, 1}. -{cns_interval_async_deletion_max, 1}. -%% - recovery node -{cns_num_of_batch_process_recovery_node, 1}. -{cns_interval_recovery_node_min, 1}. -{cns_interval_recovery_node_max, 16}. - - -%% cluster group - level_1 (able to use from ver 1.0.0) -%% ex. {grp_level_1, "DC_0001"}. -{grp_level_1, ""}. - -%% cluster group - level_2 (able to use from ver 0.14.2) -%% ex. {grp_level_2, "RACK_0001"}. -{grp_level_2, ""}. - -%% == For Ordning-Reda == -%% -%% Size of stacked objects (bytes) -{size_of_stacked_objs, 67108864}. %% 64MB -%% Stacking timeout (msec) -{stacking_timeout, 5000}. %% 5sec - - -%% == For Object-Storage == -%% -%% Strict comparison of object's checksum with its metadata -{is_strict_check, false}. - - -%% -%% etc/vm.args -%% -{node, "{{node_alias}}@{{node_ip}}"}. -{crash_dump, "{{platform_log_dir}}/erl_crash.dump"}. +%% We move from this configuration to like ini-file configuration, +%% which is using "basho/cuttlefish" +%% See: leofs/deps/leo_storage/priv/leo_storage.conf diff --git a/releasenotes/leofs-0.16.md b/releasenotes/leofs-0.16.md index 0ab27c9a..136437af 100644 --- a/releasenotes/leofs-0.16.md +++ b/releasenotes/leofs-0.16.md @@ -1,3 +1,48 @@ +leofs-0.16.8 +============== + +Features and Improvements for LeoFS +----------------------------------- + +* Improved + * [#109](https://github.com/leo-project/leofs/issues/109) Moved to "ini-file" configuration, which no longer use Erlang-specific syntax. Using [cuttlefish](https://github.com/basho/cuttlefish) to realize this function. + * [#110](https://github.com/leo-project/leofs/issues/110) Supported [erlcloud](https://github.com/gleber/erlcloud) for Erlang users + * [Supported Mac OS X](https://github.com/leo-project/libcutil/pull/2) which was contributed from Jeff Li + +Bugs Fixed +----------- + +* [#102](https://github.com/leo-project/leofs/issues/102) Happened timeout when uploading a large object +* [#108](https://github.com/leo-project/leofs/issues/108) Happened not relocation of object(s) when removing a node and executing rebalance then add same node +* [#111](https://github.com/leo-project/leofs/issues/111) Could not upload large size file +* Fixed that not migrated "Bucket Table" + +Used Libraries +--------------- + +* leo project + * [leo_backend-db v0.14.2](https://github.com/leo-project/leo_backend_db.git) + * [leo_cache v0.4.16](https://github.com/leo-project/leo_cache.git) + * [leo_commons v0.14.9](https://github.com/leo-project/leo_commons.git) + * [leo_dcerl v0.2.7](https://github.com/leo-project/leo_dcerl.git) + * [leo_logger v0.12.6](https://github.com/leo-project/leo_logger.git) + * [leo_mcerl v0.2.9](https://github.com/leo-project/leo_mcerl.git) + * [leo_mq v0.12.22](https://github.com/leo-project/leo_mq.git) + * [leo_object_storage v0.14.8](https://github.com/leo-project/leo_object_storage.git) + * [leo_ordning_reda v0.8.18](https://github.com/leo-project/leo_ordning_reda.git) + * [leo_redundant_manager v1.2.5](https://github.com/leo-project/leo_redundant_manager.git) + * [leo_s3_libs v0.12.24](https://github.com/leo-project/leo_s3_libs.git) + * [leo_statistics v0.14.7](https://github.com/leo-project/leo_statistics.git) + * [leo_gateway v0.16.8](https://github.com/leo-project/leo_gateway.git) + * [leo_manager v0.16.8](https://github.com/leo-project/leo_manager.git) + * [leo_storage v0.16.8](https://github.com/leo-project/leo_storage.git) +* others + * [bitcask v1.6.4](https://github.com/basho/bitcask.git) + * [cowboy v0.8.6](https://github.com/extend/cowboy.git) + * [folsom](https://github.com/boundary/folsom.git) + * [jiffy](https://github.com/davisp/jiffy.git) + * [lz4 v0.1.1](https://github.com/leo-project/erlang-lz4.git) - forked from [szktty/erlang-lz4](https://github.com/szktty/erlng-lz4) + leofs-0.16.5 ============== diff --git a/replace_otp_vsn.sh b/replace_otp_vsn.sh index fa10d32d..81d4a590 100755 --- a/replace_otp_vsn.sh +++ b/replace_otp_vsn.sh @@ -1,2 +1,2 @@ #!/bin/sh -find . -name rebar.config|xargs sed -i 's/require_otp_vsn,\s\+"\(.\+\)"/require_otp_vsn, "R15B03|R16B|R16B01|R16B02"/g' +find . -name rebar.config|xargs sed -i 's/require_otp_vsn,\s\+"\(.\+\)"/require_otp_vsn, "R15B03|R16B|R16B01|R16B02|R16B03"/g'