Commit 0134f194 authored by Heinz N. Gies's avatar Heinz N. Gies
Browse files

Merge

parents 93a35522 8bff6ec7
Pipeline #12948044 passed with stage
in 1 minute and 27 seconds
......@@ -27,3 +27,4 @@ TEST-*
rebar3.crashdump
apps/dalmatiner_frontend/src/event_query_lexer.xrl
apps/dalmatiner_frontend/src/event_query_parser.yrl
compile_commands.json
### Generic cli file for services
stages:
- test # run tets
- package # verify package creation
################################################################################
## helpers
################################################################################
.not_triggered: &not_triggered
except:
- pipelines
.is_triggered: &is_triggered
only:
- pipelines
################################################################################
## package stage
################################################################################
trigger_dialyzer:
<<: *is_triggered
image: erlang:19
stage: test
script:
- ./rebar3 upgrade $DOWNSTREAM_LIBRARY
- ./rebar3 dialyzer
tags:
- gitlab-org-high-cpu
trigger_xref:
<<: *is_triggered
image: erlang:19
stage: test
script:
- ./rebar3 upgrade $DOWNSTREAM_LIBRARY
- ./rebar3 xref
tags:
- gitlab-org-high-cpu
################################################################################
## package stage
################################################################################
# We make sure our package builds on both FreeBSD and SmartOS
smartos:
<<: *not_triggered
stage: package
script:
- export SUFFIX=$(if [ "$CI_BUILD_REF_NAME" = "master" ]; then echo ""; else /opt/local/bin/erl -noshell -eval '{{Y, MM, D}, {H, M, S}} = calendar:universal_time(), io:format("pre~4.10.0B~2.10.0B~2.10.0B~2.10.0B~2.10.0B~2.10.0B", [Y, MM, D, H, M, S]),init:stop()'; fi);
- export DS_VER=$(echo $CI_RUNNER_TAGS | sed 's/.*base64-\([0-9.]*\).*/\1/')
- export BRANCH=$(if [ "$CI_BUILD_REF_NAME" = "master" ]; then echo rel; else echo dev; fi)
- gmake dist
- mkdir -p rel/pkg/info
- aws s3 cp rel/pkg/*.tgz s3://release.project-fifo.net/pkg/$DS_VER/$BRANCH/
- pkg_info -X rel/pkg/*.tgz > rel/pkg/info/$(pkg_info -X rel/pkg/*.tgz | awk -F "=" '/FILE_NAME/ {print $2}')
- aws s3 cp rel/pkg/info/* s3://release-info.project-fifo.net/pkg/$DS_VER/$BRANCH/
- 'curl --request POST --form "token=$CI_JOB_TOKEN" --form "ref=master" --form "variables[DS_VER]=$DS_VER" --form "variables[BRANCH]=$BRANCH" https://gitlab.com/api/v4/projects/$REPO_PID/trigger/pipeline'
tags:
- erlang-19
- smartos
only:
refs:
- master
- dev
- /^dev-.*$/
smartos_test:
stage: test
script:
- ./rebar3 as lint lint
- ./rebar3 xref
- ./rebar3 dialyzer
tags:
- erlang-19
- smartos
except:
- pipelines
- master
- dev
- /^dev-.*$/
################################################################################
## bsd stage
################################################################################
bsd:
<<: *not_triggered
stage: package
script:
- export SUFFIX=$(if [ "$CI_BUILD_REF_NAME" = "master" ]; then echo ""; else /usr/local/bin/erl -noshell -eval '{{Y, MM, D}, {H, M, S}} = calendar:universal_time(), io:format("pre~4.10.0B~2.10.0B~2.10.0B~2.10.0B~2.10.0B~2.10.0B", [Y, MM, D, H, M, S]),init:stop()'; fi);
- export OS_VER=$(echo $CI_RUNNER_TAGS | sed 's/.*freebsd-\([0-9.]*\).*/\1/')
- export ARCH=$(uname -m)
- export BRANCH=$(if [ "$CI_BUILD_REF_NAME" = "master" ]; then echo rel; else echo dev; fi)
- gmake dist
- aws s3 cp rel/pkgng/*.txz s3://freebsd.project-fifo.net/$BRANCH/$ARCH/$OS_VER/
- 'curl --request POST --form "token=$CI_JOB_TOKEN" --form "ref=master" --form "variables[ARCH]=$ARCH" --form "variables[OS_VER]=$OS_VER" --form "variables[BRANCH]=$BRANCH" https://gitlab.com/api/v4/projects/$PKGNG_REPO_PID/trigger/pipeline'
tags:
- erlang-19
- freebsd-11.0
only:
refs:
- master
- dev
- /^dev-.*$/
......@@ -30,3 +30,6 @@ deb-prepare:
deb-package: deb-prepare
make -C rel/deb package
version_header: version
true
{application, dalmatiner_frontend,
[
{description, "Frontend server for dalmatiner DB"},
{vsn, "0.3.2p4"},
{vsn, "0.3.3"},
{registered, []},
{applications, [
kernel,
......
......@@ -56,7 +56,7 @@ encode_reply(Start, T, R2) ->
R3 = [#{name => Name,
resolution => Resolution,
values => mmath_bin:to_list(Data),
metadata => Mdata,
metadata => maps:map(fun to_null/2, Mdata),
type => <<"metrics">>}
|| #{name := Name,
data := Data,
......@@ -64,7 +64,7 @@ encode_reply(Start, T, R2) ->
metadata := Mdata,
resolution := Resolution} <- R2],
R4 = [#{name => Name,
metadata => Mdata,
metadata => maps:map(fun to_null/2, Mdata),
values => [#{timestamp => Ts, event => E}
|| {Ts, E} <- Data],
type => <<"events">>}
......@@ -83,6 +83,11 @@ encode_reply(Start, T, R2) ->
D
end.
to_null(_, undefined) ->
null;
to_null(_, V) ->
V.
content_type(Req) ->
{ok, A, Req1} = cowboy_req:parse_header(<<"accept">>, Req),
{content_type_(A), Req1}.
......
VERSION=0.3.3
COMPONENT_INTERNAL=dfe
COMPONENT=dalmatinerfe
REBAR = $(shell pwd)/rebar3
PKG_VSN = $(shell head -n1 rel/pkg/Makefile | sed 's/[^0-9.p]//g')
REBAR_VSN = $(shell erl -noshell -eval '{ok, F} = file:consult("rebar.config"), [{release, {_, Vsn}, _}] = [O || {relx, [O | _]} <- F], io:format("~s", [Vsn]), init:stop().')
VARS_VSN = $(shell grep 'bugsnag_app_version' rel/vars.config | sed -e 's/.*,//' -e 's/[^0-9.p]//g' -e 's/[.]$$//')
APP_VSN = $(shell grep vsn apps/$(APP)/src/$(APP).app.src | sed 's/[^0-9.p]//g')
include config.mk
compile: $(REBAR) .git/hooks/pre-commit
$(REBAR) compile
......@@ -31,13 +32,16 @@ $(REBAR):
cp `which rebar3` $(REBAR)
upgrade: $(REBAR)
$(REBAR) upgrade
make tree
$(REBAR) upgrade
$(MAKE) tree
update: $(REBAR)
$(REBAR) update
tree: $(REBAR)
rebar.lock: rebar.config $(REBAR)
$(REBAR) compile
tree: $(REBAR) rebar.lock
$(REBAR) tree | grep -v '=' | sed 's/ (.*//' > tree
tree-diff: tree
......@@ -46,6 +50,64 @@ tree-diff: tree
update-fifo.mk:
cp _build/default/lib/fifo_utils/priv/fifo.mk .
###
### Packaging
###
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
uname_V6 := $(shell sh -c 'uname -v 2>/dev/null | cut -c-6 || echo not')
ifeq ($(uname_S),Darwin)
PLATFORM = darwin
REBARPROFILE = darwin
export REBARPROFILE
endif
ifeq ($(uname_S),FreeBSD)
PLATFORM = freebsd
REBARPROFILE = freebsd
export REBARPROFILE
endif
ifeq ($(uname_V6),joyent)
PLATFORM = smartos
REBARPROFILE = smartos
export REBARPROFILE
endif
dist: ${PLATFORM} ;
generic/rel: version_header
$(REBAR) as ${REBARPROFILE} compile
$(REBAR) as ${REBARPROFILE} release
freebsd: ${PLATFORM}/rel
$(MAKE) -C rel/pkgng package
smartos: ${PLATFORM}/rel
$(MAKE) -C rel/pkg package
darwin: ${PLATFORM}/rel
freebsd/rel: generic/rel
smartos/rel: generic/rel
darwin/rel: generic/rel
dist-help:
@echo "FiFo dist tool"
@echo "You are running this on: ${PLATFORM}"
@echo
@echo "Currently supported platforms are: FreeBSD, SmartOS, Darwin/OSX"
@echo
@echo "SmartOS:"
@echo " rebar profile: smartos $(shell if grep profiles -A12 rebar.config | grep smartos > /dev/null; then echo OK; else echo MISSING; fi)"
@echo " packaging makefile: rel/pkg/Makefile $(shell if [ -f rel/pkg/Makefile ]; then echo OK; else echo MISSING; fi)"
@echo "FreeBSD:"
@echo " rebar profile: freebsd $(shell if grep profiles -A12 rebar.config | grep freebsd > /dev/null; then echo OK; else echo MISSING; fi)"
@echo " packaging makefile: rel/pkgng/Makefile $(shell if [ -f rel/pkgng/Makefile ]; then echo OK; else echo MISSING; fi)"
@echo "Darwin:"
@echo " rebar profile: darwin $(shell if grep profiles -A12 rebar.config | grep darwin > /dev/null; then echo OK; else echo MISSING; fi)"
@echo " packaging makefile: - no packaing -"
###
### Docs
......@@ -60,8 +122,8 @@ docs:
build-vsn:
@echo "$(REBAR_VSN)"
vsn:
@echo "## rel/pkg/Makefile"
@echo "$(PKG_VSN)"
@echo "## Config:"
@echo "$(VERSION)"
@echo "## apps/$(APP)/src/$(APP).app.src"
@echo "$(APP_VSN)"
@echo "## rebar.config"
......@@ -70,7 +132,7 @@ vsn:
@echo "$(VARS_VSN)"
test-vsn:
@echo "Testing against package version: $(REBAR_VSN)"
@[ "$(REBAR_VSN)" = "$(APP_VSN)" ] && echo " - App version ok: $(APP_VSN)" || (echo "App version out of date" && false)
@[ "$(REBAR_VSN)" = "$(PKG_VSN)" ] && echo " - Package version ok: $(PKG_VSN)" || (echo "Package version out of date" && false)
@[ "$(REBAR_VSN)" = "$(VARS_VSN)" ] && echo " - Vars version ok: $(VARS_VSN)" || (echo "Vars version out of date" && false)
@echo "Testing against package version: $(VERSION)"
@[ "$(VERSION)" = "$(APP_VSN)" ] && echo " - App version ok: $(APP_VSN)" || (echo "App version out of date" && false)
@[ "$(VERSION)" = "$(REBAR_VSN)" ] && echo " - Rebar version ok: $(REBAR_VSN)" || (echo "Package version out of date" && false)
@[ "$(VERSION)" = "$(VARS_VSN)" ] && echo " - Vars version ok: $(VARS_VSN)" || (echo "Vars version out of date" && false)
......@@ -9,14 +9,14 @@
{deps,
[
{erlware_commons, "~>1.0.0"},
{lager, "~>3.2.0"},
{lager, "~>3.5.0"},
{fifo_lager, "~>0.1.4"},
{ranch, "~>1.2.0"},
{cowboy, "~>1.0.0"},
{jsone, "~>1.2.3"},
fifo_utils,
{msgpack, "0.3.5"},
{dqe, ".*", {git, "https://github.com/dalmatinerdb/dqe.git", {tag, "v0.7.9"}}},
{dqe, ".*", {git, "https://gitlab.com/Project-FiFo/DalmatinerDB/dqe.git", {tag, "v0.7.13"}}},
{otters, "~>0.2.0"},
eper,
recon
......@@ -26,14 +26,14 @@
%% Plugins
%%-------------------------------------------------------------------
{project_plugins, [{rebar3_cuttlefish, "~>0.14.0"}]}.
{project_plugins, [{rebar3_cuttlefish, "~>0.16.0"}]}.
%%-------------------------------------------------------------------
%% Cuttlefish
%%-------------------------------------------------------------------
{cuttlefish,
[{file_name, "dalmatinerfe.conf.example"},
[{file_name, "dfe.conf"},
{schema_discovery, false}]}.
......@@ -55,7 +55,9 @@
%%-------------------------------------------------------------------
{profiles,
[{prod, [{relx, [{dev_mode, false}]}]},
[{smartos, [{relx, [{dev_mode, false}]}]},
{freebsd, [{relx, [{dev_mode, false}]}]},
{darwin, [{relx, [{dev_mode, false}]}]},
{shell, [{deps, [sync]}]},
{deb, [{relx, [{dev_mode, false}, {overlay_vars, "rel/vars/deb.config"}]}]},
{lint,
......@@ -82,7 +84,7 @@
%%-------------------------------------------------------------------
{relx,
[{release, {dalmatinerfe, "0.3.2p4"},
[{release, {dfe, "0.3.3"},
[sasl,
dalmatiner_frontend,
{runtime_tools, load}, %% for dyntrace
......
......@@ -7,33 +7,33 @@
{<<"dflow">>,{pkg,<<"dflow">>,<<"0.3.0">>},1},
{<<"dproto">>,{pkg,<<"dproto">>,<<"0.5.2">>},1},
{<<"dqe">>,
{git,"https://github.com/dalmatinerdb/dqe.git",
{ref,"061d0524d4f7efa4fa62311962a53b8a035c016a"}},
{git,"https://gitlab.com/Project-FiFo/DalmatinerDB/dqe.git",
{ref,"6d8f70fa79c6ef438cfa73fc630b86281f612053"}},
0},
{<<"dqe_fun">>,{pkg,<<"dqe_fun">>,<<"0.2.1">>},1},
{<<"dqe_idx">>,{pkg,<<"dqe_idx">>,<<"0.4.2">>},1},
{<<"dqe_idx">>,{pkg,<<"dqe_idx">>,<<"0.4.3">>},1},
{<<"dqe_idx_ddb">>,{pkg,<<"dqe_idx_ddb">>,<<"0.5.1">>},1},
{<<"dqe_idx_pg">>,{pkg,<<"dqe_idx_pg">>,<<"0.5.5">>},1},
{<<"dqe_idx_pg">>,{pkg,<<"dqe_idx_pg">>,<<"0.5.7">>},1},
{<<"dynamic_compile">>,{pkg,<<"dynamic_compile">>,<<"1.0.0">>},1},
{<<"eper">>,{pkg,<<"eper">>,<<"0.94.0">>},0},
{<<"epgsql">>,{pkg,<<"epgsql">>,<<"3.3.0">>},3},
{<<"erlware_commons">>,{pkg,<<"erlware_commons">>,<<"1.0.0">>},0},
{<<"fifo_lager">>,{pkg,<<"fifo_lager">>,<<"0.1.4">>},0},
{<<"fifo_utils">>,{pkg,<<"fifo_utils">>,<<"0.1.37">>},0},
{<<"fifo_lager">>,{pkg,<<"fifo_lager">>,<<"0.1.8">>},0},
{<<"fifo_utils">>,{pkg,<<"fifo_utils">>,<<"0.1.51">>},0},
{<<"goldrush">>,{pkg,<<"goldrush">>,<<"0.1.9">>},1},
{<<"hdr_histogram">>,{pkg,<<"hdr_histogram">>,<<"0.2.0">>},1},
{<<"hdr_histogram">>,{pkg,<<"hdr_histogram">>,<<"0.3.2">>},1},
{<<"ibrowse">>,{pkg,<<"ibrowse">>,<<"4.4.0">>},1},
{<<"jsone">>,{pkg,<<"jsone">>,<<"1.2.6">>},0},
{<<"jsx">>,{pkg,<<"jsx">>,<<"2.8.0">>},2},
{<<"jsx">>,{pkg,<<"jsx">>,<<"2.8.2">>},2},
{<<"jsxd">>,{pkg,<<"jsxd">>,<<"0.2.4">>},2},
{<<"lager">>,{pkg,<<"lager">>,<<"3.2.4">>},0},
{<<"lager_graylog">>,{pkg,<<"lager_graylog">>,<<"0.1.1">>},1},
{<<"lager">>,{pkg,<<"lager">>,<<"3.5.1">>},0},
{<<"lager_graylog">>,{pkg,<<"lager_graylog">>,<<"0.1.3">>},1},
{<<"lager_logstash_backend">>,
{pkg,<<"lager_logstash_backend">>,<<"0.1.1">>},
{pkg,<<"lager_logstash_backend">>,<<"0.1.3">>},
1},
{<<"mmath">>,{pkg,<<"mmath">>,<<"0.2.17">>},1},
{<<"mmath">>,{pkg,<<"mmath">>,<<"0.2.19">>},1},
{<<"msgpack">>,{pkg,<<"msgpack">>,<<"0.3.5">>},0},
{<<"otters">>,{pkg,<<"otters">>,<<"0.2.8">>},0},
{<<"otters">>,{pkg,<<"otters">>,<<"0.2.10">>},0},
{<<"pgapp">>,{pkg,<<"pgapp">>,<<"0.0.2">>},2},
{<<"poolboy">>,{pkg,<<"poolboy">>,<<"1.5.1">>},2},
{<<"qdate">>,
......@@ -41,12 +41,12 @@
{ref,"fcfb8105014b8bef19f50dd89647c0e58dae0903"}},
1},
{<<"qdate_localtime">>,{pkg,<<"qdate_localtime">>,<<"1.1.0">>},2},
{<<"quickrand">>,{pkg,<<"quickrand">>,<<"1.5.4">>},2},
{<<"quickrand">>,{pkg,<<"quickrand">>,<<"1.7.2">>},1},
{<<"ranch">>,{pkg,<<"ranch">>,<<"1.2.1">>},0},
{<<"recon">>,{pkg,<<"recon">>,<<"2.3.2">>},0},
{<<"snappiest">>,{pkg,<<"snappiest">>,<<"1.2.0">>},2},
{<<"sqlmig">>,{pkg,<<"sqlmig">>,<<"0.1.5">>},2},
{<<"uuid">>,{pkg,<<"uuid_erl">>,<<"1.5.4">>},1}]}.
{<<"uuid">>,{pkg,<<"uuid_erl">>,<<"1.7.2">>},1}]}.
[
{pkg_hash,[
{<<"cf">>, <<"7F2913FFF90ABCABD0F489896CFEB0B0674F6C8DF6C10B17A83175448029896C">>},
......@@ -57,34 +57,34 @@
{<<"dflow">>, <<"DA0EB8F14B01ED894BD32F1CEE3B13646DFC30FA60D59B408BFCD0653E0984D7">>},
{<<"dproto">>, <<"D1C9929353589BD395CAB3E5C6E1CFC4DC8B0660527145E2DD221771D4467ABD">>},
{<<"dqe_fun">>, <<"6A634A0DC40D82365C7DE8BFEE6485E1A64770E6568497DEA70926DF46CE9B7C">>},
{<<"dqe_idx">>, <<"AF85F48FE83D023DFDA84BEE5BB5273B4A37C4A3DC4252FF4D0B5C39625833CE">>},
{<<"dqe_idx">>, <<"275F45869B1791BE6679D6B4A250C72CF43636CB4B3F2213E5D4AA6F8E0F1CF2">>},
{<<"dqe_idx_ddb">>, <<"8E0F6034A3890293A620293BC384BF1DDC8D9124985F56B304D6996603483EF2">>},
{<<"dqe_idx_pg">>, <<"1E96BE0F0FCAB1E64BBB6802393A0AA134B2EEDFACBCEB08EC3D2B4CB69F1C81">>},
{<<"dqe_idx_pg">>, <<"E6B24FEF5DD8F323FA14F67DB76DE15C0636B579E0CE6C5A3968CAD5EC3C0712">>},
{<<"dynamic_compile">>, <<"8171B2CB4953EA3ED2EF63F5B26ABF677ACD0CA32210C2A08A7A8406A743F76B">>},
{<<"eper">>, <<"F5FB2DAA0DF8878748E1C598428EDA942A173E5121FF35C1D632129B84593A3A">>},
{<<"epgsql">>, <<"974A578340E52012CBAB820CE756E7ED1DF1BAF0110C59A6753D8337A2CF9454">>},
{<<"erlware_commons">>, <<"087467DE5833C0BB5B3CCDD387F9E9C1FB816A75B7A709629BF24B5ED3246C51">>},
{<<"fifo_lager">>, <<"9374233205CFC02F837FEFA28209673D7DAD1BC2ADE8534742951C34B6278817">>},
{<<"fifo_utils">>, <<"34EC0F222281449D7BE9B057DC0D53258DB477DC9A3D33DD1BD1766479E90010">>},
{<<"fifo_lager">>, <<"037C26D77A5E27ECC158889A73CE745111B9291A0DE32CCD0A69E8C1514586A9">>},
{<<"fifo_utils">>, <<"2E1DA92C4C63CB36CF1325FBCF16F20B9781FCBA362CD86CAD300F35628D5E00">>},
{<<"goldrush">>, <<"F06E5D5F1277DA5C413E84D5A2924174182FB108DABB39D5EC548B27424CD106">>},
{<<"hdr_histogram">>, <<"95A7EC3C8FA354E4CFBFC8F4168EE8F07BD3965CA22B9C45B2A2C9D13B03DCEC">>},
{<<"hdr_histogram">>, <<"11F4DB284E254614A2164EEF0BFCAB70F9F053481DB428D65E0ACB4B71DB2E4F">>},
{<<"ibrowse">>, <<"2D923325EFE0D2CB09B9C6A047B2835A5EDA69D8A47ED6FF8BC03628B764E991">>},
{<<"jsone">>, <<"3EED1BC3F34D5727A011AB84A20230F4BDD8BB2B9C07C3AD0DCF412410231A74">>},
{<<"jsx">>, <<"749BEC6D205C694AE1786D62CEA6CC45A390437E24835FD16D12D74F07097727">>},
{<<"jsx">>, <<"7ACC7D785B5ABE8A6E9ADBDE926A24E481F29956DD8B4DF49E3E4E7BCC92A018">>},
{<<"jsxd">>, <<"C14114AFCA463F2D03D3FB6CC81FD51CDA8CA86A47E5AC3ABDF0CA572A73A413">>},
{<<"lager">>, <<"A6DEB74DAE7927F46BD13255268308EF03EB206EC784A94EAF7C1C0F3B811615">>},
{<<"lager_graylog">>, <<"2C3C11A7BCAB6135F0113DF71E26742B8A301AD2D2A67917526CDD20F90898F9">>},
{<<"lager_logstash_backend">>, <<"66405FEC3223C13D94C3112933D4234FC7BF8C7DB77A1C9C162183AB5C044F73">>},
{<<"mmath">>, <<"DFD52637B19F1EEF6B0AAAC473CAC2FC27A7190B6A6420454A917423527F3030">>},
{<<"lager">>, <<"63897A61AF646C59BB928FEE9756CE8BDD02D5A1A2F3551D4A5E38386C2CC071">>},
{<<"lager_graylog">>, <<"B81F6CC71198F0CF113E74395A12F9C87E22F7B57F5E484A4802413E2A5B8F2C">>},
{<<"lager_logstash_backend">>, <<"86E7FBE08B34DAF9341E9FC397EADFCD7C1ABA0A0EA901FA7A4C454A3C4C335C">>},
{<<"mmath">>, <<"8549F4A2A9C5239323A252974DAE8B40B61BE88826A0EF7E8077900DE943F9E6">>},
{<<"msgpack">>, <<"1C46114241011452DEEC8145851745A0BB5B637CEE028D4D4ADB9DC3527AF06A">>},
{<<"otters">>, <<"4D28D810E3311E9BC845FBA20EBBE88CFF4AC26320B56A277603DDE134F24DC1">>},
{<<"otters">>, <<"31A7B47D50E14B15CAE380D060F666A54A2D79688BCC29D4CCB70E2FE05B0EA8">>},
{<<"pgapp">>, <<"3E104BB777C8455D8B26D1538B67ABE0188EE97B1DF973FD936C2204CB316196">>},
{<<"poolboy">>, <<"6B46163901CFD0A1B43D692657ED9D7E599853B3B21B95AE5AE0A777CF9B6CA8">>},
{<<"qdate_localtime">>, <<"5F6C3ACF10ECC5A7E2EFA3DCD2C863102B962188DBD9E086EC01D29FE029DA29">>},
{<<"quickrand">>, <<"47ADD4755CC5F209CBEFFD6F47C84061196CD7FAD99FD8FD12418EB0D06B939D">>},
{<<"quickrand">>, <<"E856F3C69FEC00D1ACCA8E56CB452B650E838D3A9720811410F439121EFAFE59">>},
{<<"ranch">>, <<"A6FB992C10F2187B46FFD17CE398DDF8A54F691B81768F9EF5F461EA7E28C762">>},
{<<"recon">>, <<"4444C879BE323B1B133EEC5241CB84BD3821EA194C740D75617E106BE4744318">>},
{<<"snappiest">>, <<"25706FEBB5ECAEA900D879A89C6D967C8D1BF700F8546BEBD0DEA514A8CCBFB7">>},
{<<"sqlmig">>, <<"8208D222A9335C1B1171F4FD1CE4150CF28B1FDF37CA9A66715AC434ED9B9AF4">>},
{<<"uuid">>, <<"06240EFF3EAF013CC22274689B0C1FF6345645EE5D47A9E4ED7545EEB7698B23">>}]}
{<<"uuid">>, <<"D596C8DD01A4AE48B9D8D51832CCC8F8302BF67ACD01336AEC3FCFAE6B9D2BC2">>}]}
].
No preview for this file type
......@@ -13,7 +13,7 @@ if [[ $(id dalmatinerfe 2>/dev/null) ]] ;then
chown -R dalmatinerfe:dalmatinerfe /data/dalmatinerfe
fi
CONFFILE=/data/dalmatinerfe/etc/dalmatinerfe.conf
CONFFILE=/data/dalmatinerfe/etc/dfe.conf
if [ ! -f "${CONFFILE}" ]
then
......
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: dalmatinerfe
# REQUIRE: LOGIN
# KEYWORD: shutdown
. /etc/rc.subr
name="dalmatinerfe"
rcvar=dalmatinerfe_enable
load_rc_config $name
: ${dalmatinerfe="NO"}
start_cmd="${name}_start"
stop_cmd="${name}_stop"
dalmatinerfe_start()
{
if checkyesno ${rcvar}; then
echo "* starting dalmatiner db... "
/usr/local/bin/sudo -u dalmatinerfe /usr/local/lib/dfe/bin/dfe start
fi
}
dalmatinerfe_stop()
{
if checkyesno ${rcvar}; then
echo "* stopping dalmatiner db... "
/usr/local/bin/sudo -u dalmatinerfe /usr/local/lib/dfe/bin/dfe stop
fi
}
run_rc_command "$1"
%%
%% etc/vm.args
%%
{run_user, "dalmatinerfe"}.
VERSION=0.3.2p4
COMPONENT_INTERNAL=dalmatinerfe
COMPONENT=dalmatinerfe
DEPS="erlang" "coreutils" "sudo"
DEPS="erlang" "coreutils" "sudo" "grep" "zlib" "bzip2" "gcc49-libs"
include ../../_build/default/lib/fifo_utils/priv/pkg.mk
include ../../config.mk
include ../../_build/${REBARPROFILE}/lib/fifo_utils/priv/pkg.mk
.PHONY: prepare
.PHONY: package prepare clean
prepare:
-rm -r $(STAGE_DIR)/$(COMPONENT)
cp -r ../../_build/prod/rel/$(COMPONENT_INTERNAL) $(STAGE_DIR)/$(COMPONENT)
cp -r ../../_build/${REBARPROFILE}/rel/$(COMPONENT_INTERNAL) $(STAGE_DIR)/$(COMPONENT)
rm -rf $(STAGE_DIR)/$(COMPONENT)/lib/*/c_src
package: prepare $(FILE).tgz
clean: clean-pkg
-rm *.tgz
......@@ -5,7 +5,7 @@
| |
| Please have a look at the configuraiton files: |
| |
| * /data/dalmatinerfe/etc/dalmatinerfe.conf |
| * /data/dalmatinerfe/etc/dfe.conf |
| |
| Note: To enable DalmatinerFE you first need to enable the epmd service. |
| |
......
......@@ -40,8 +40,8 @@ case $2 in
echo Trying to guess configuration ...
IP=`ifconfig net0 | grep inet | $AWK '{print $2}'`
CONFFILE=/data/dalmatinerfe/etc/dalmatinerfe.conf
cp /opt/local/dalmatinerfe/etc/dalmatinerfe.conf.example ${CONFFILE}.example
CONFFILE=/data/dalmatinerfe/etc/dfe.conf
cp /opt/local/dalmatinerfe/etc/dfe.conf ${CONFFILE}.example
if [ ! -f "${CONFFILE}" ]
then
......
name: dalmatinerfe
version: "__VNS__"
origin: projectfifo/dalmatinerfe
comment: "Dalmatiner TS Frontend"
desc: "Dalmatiner TS Frontend"
maintainer: info@project-fifo.net
www: https://project-fifo.net
prefix: /
#!/usr/bin/bash
USER=dalmatinerfe
GROUP=$USER
echo Creating group ...
getent group $GROUP >/dev/null 2>&1 || pw groupadd $GROUP
echo Creating user ...
id $USER >/dev/null 2>&1 || pw useradd $USER -g $GROUP -d /data/$USER -s /usr/sbin/nologin
echo Creating directories ...
mkdir -p /data/$USER/fe/ring
mkdir -p /data/$USER/etc
mkdir -p /data/$USER/log/sasl
chown -R $USER:$GROUP /data/$USER
mkdir -p /tmp/$USER
chown -R $USER:$GROUP /tmp/$USER/
echo Trying to guess configuration ...
IP=$(ifconfig $(netstat -r | grep default | awk '{ print $4 }') | grep 'inet' | awk -F ' ' '{ print $2 }')
DISTCONFFILE=/usr/local/lib/dfe/etc/dfe.conf
CONFFILE=/data/dalmatinerfe/etc/dfe.conf
if [ ! -f "${CONFFILE}" ]
then
echo "Creating new configuration from example file."
cp ${DISTCONFFILE} ${CONFFILE}.example
cp ${CONFFILE}.example ${CONFFILE}
/usr/bin/sed -i bak -e "s/127.0.0.1/${IP}/g" ${CONFFILE}
else
echo "Please make sure you update your config according to the update manual!"
fi
OT=/data/dalmatinerfe/etc/rules.ot
if [ ! -f "${OT}" ]
then
echo "none() -> drop." > ${OT}
fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment