Skip to content

Instantly share code, notes, and snippets.

@yosukehara
Created May 27, 2014 04:42
Show Gist options
  • Save yosukehara/b33ef3c88227d872d878 to your computer and use it in GitHub Desktop.
Save yosukehara/b33ef3c88227d872d878 to your computer and use it in GitHub Desktop.
%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
%%======================================================================
%%
%% LeoFS Gateway
%%
%% Copyright (c) 2012-2013 Rekuten, 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_gateway", "1",
[
kernel,
stdlib,
sasl,
leo_gateway
]},
{rel, "start_clean", "",
[
kernel,
stdlib
]},
{boot_rel, "leo_gateway"},
{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, asn1, [{incl_cond, include}]},
{app, compiler, [{incl_cond, include}]},
{app, crypto, [{incl_cond, include}]},
{app, eunit, [{incl_cond, include}]},
{app, gs, [{incl_cond, include}]},
{app, inets, [{incl_cond, include}]},
{app, kernel, [{incl_cond, include}]},
{app, mnesia, [{incl_cond, include}]},
{app, observer, [{incl_cond, include}]},
{app, public_key, [{incl_cond, include}]},
{app, sasl, [{incl_cond, include}]},
{app, snmp, [{incl_cond, include}]},
{app, ssl, [{incl_cond, include}]},
{app, stdlib, [{incl_cond, include}]},
{app, syntax_tools, [{incl_cond, include}]},
{app, tools, [{incl_cond, include}]},
{app, tv, [{incl_cond, include}]},
{app, xmerl, [{incl_cond, include}]},
%% LeoFS-related
{app, leo_gateway, [{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, ranch, [{incl_cond, include}]},
{app, leo_backend_db, [{incl_cond, include}]},
{app, leo_cache, [{incl_cond, include}]},
{app, leo_commons, [{incl_cond, include}]},
{app, leo_dcerl, [{incl_cond, include}]},
{app, leo_logger, [{incl_cond, include}]},
{app, leo_mcerl, [{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_s3_libs, [{incl_cond, include}]},
{app, leo_statistics, [{incl_cond, include}]},
{app, cowboy, [{incl_cond, include}]}
]}.
{target_dir, "leo_gateway"}.
{overlay_vars, "vars.config"}.
{overlay, [
%% make directories
{mkdir, "work/mnesia"},
{mkdir, "work/queue"},
{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"},
{copy, "files/leo_gateway", "bin/leo_gateway"},
{copy, "files/leo_gateway.cmd", "bin/leo_gateway.cmd"},
{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"},
%% 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", "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", "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"}
]}.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment