Skip to content

Instantly share code, notes, and snippets.

@yosukehara
Created May 27, 2014 04:46
Show Gist options
  • Save yosukehara/709479a9ba5ff9494305 to your computer and use it in GitHub Desktop.
Save yosukehara/709479a9ba5ff9494305 to your computer and use it in GitHub Desktop.
%% -*- 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.
%%
%%======================================================================
{sys, [
{lib_dirs, ["../../deps"]},
{erts, [{mod_cond, derived}, {app_file, strip}]},
{app_file, strip},
{rel, "leo_storage", "1",
[
kernel,
stdlib,
sasl,
os_mon,
leo_storage
]},
{rel, "start_clean", "",
[
kernel,
stdlib
]},
{boot_rel, "leo_storage"},
{profile, embedded},
{incl_cond, exclude},
{excl_archive_filters, [".*"]}, %% Do not archive built libs
{excl_sys_filters, ["^bin/.*", "^erts.*/bin/(dialyzer|typer)",
"^erts.*/(doc|info|include|lib|man|src)"]},
{excl_app_filters, ["\.gitignore"]},
%% Erlang existing libs
{app, appmon, [{incl_cond, include}]},
{app, crypto, [{incl_cond, include}]},
{app, eunit, [{incl_cond, include}]},
{app, gs, [{incl_cond, include}]},
{app, kernel, [{incl_cond, include}]},
{app, mnesia, [{incl_cond, include}]},
{app, observer, [{incl_cond, include}]},
{app, tools, [{incl_cond, include}]},
{app, tv, [{incl_cond, include}]},
{app, sasl, [{incl_cond, include}]},
{app, snmp, [{incl_cond, include}]},
{app, stdlib, [{incl_cond, include}]},
{app, os_mon, [{incl_cond, include}]},
{app, syntax_tools, [{incl_cond, include}]},
%% LeoFS-related
{app, leo_storage, [{incl_cond, include}]},
{app, bear, [{incl_cond, include}]},
{app, bitcask, [{incl_cond, include}]},
{app, folsom, [{incl_cond, include}]},
{app, jiffy, [{incl_cond, include}]},
{app, lz4, [{incl_cond, include}]},
{app, leo_backend_db, [{incl_cond, include}]},
{app, leo_commons, [{incl_cond, include}]},
{app, leo_logger, [{incl_cond, include}]},
{app, leo_mq, [{incl_cond, include}]},
{app, leo_object_storage, [{incl_cond, include}]},
{app, leo_ordning_reda, [{incl_cond, include}]},
{app, leo_redundant_manager, [{incl_cond, include}]},
{app, leo_statistics, [{incl_cond, include}]}
]}.
{target_dir, "leo_storage"}.
{overlay_vars, "vars.config"}.
{overlay, [
%% make directories
{mkdir, "work/mnesia"},
{mkdir, "work/queue"},
{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"},
%% 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", "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", "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", "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", "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"}
]}.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment