Skip to content

Commit

Permalink
Merge pull request #22 from esl/otp24
Browse files Browse the repository at this point in the history
Update amoc-arsenal
  • Loading branch information
DenysGonchar authored Jul 16, 2021
2 parents d3d0228 + d4cabe7 commit 28c5117
Show file tree
Hide file tree
Showing 9 changed files with 117 additions and 88 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,28 @@
name: OTP ${{matrix.otp}}
strategy:
matrix:
otp: ['22.3', '21.3']
otp: ['24.0', '23.3.1']
runs-on: 'ubuntu-20.04'
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: ErlGang/setup-erlang@v1.0.0
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otp }}
rebar3-version: '3.16.1'
- name: Compile project
run: ./rebar3 compile
run: rebar3 compile
- name: run xref check
run: ./rebar3 xref
run: rebar3 xref
- name: run dialyzer check
run: ./rebar3 dialyzer
run: rebar3 dialyzer

integration_test:
name: docker container test with OTP ${{matrix.otp}}
strategy:
matrix:
otp: ['22.3', '21.3']
otp: ['24.0', '23.3.1']
runs-on: 'ubuntu-20.04'
env:
OTP_RELEASE: ${{ matrix.otp }}
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/)

## [1.1.0](https://github.com/esl/amoc/compare/1.0.0-beta...1.0.0) - 2021-07-16

### Changed:
- Migrated to OTP24
- Updated dependencies
- Updated AMOC REST API

## [1.0.0](https://github.com/esl/amoc/compare/1.0.0-beta...1.0.0) - 2019-12-05

### Changed:
Expand Down
31 changes: 15 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@

FROM phusion/baseimage:bionic-1.0.0 as base

FROM base AS builder
FROM phusion/baseimage:focal-1.0.0 as builder

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install -y gnupg2
RUN apt-get update && \
apt-get install -y git g++ make openssl libssl-dev gnupg2 wget

ADD https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb /tmp/
RUN dpkg -i /tmp/erlang-solutions_2.0_all.deb
RUN apt-get update
ARG otp_vsn=24.0-1

## to get the list of all available versions for your distro run:
## apt-cache policy esl-erlang
ARG otp_vsn=1:22.3-1
RUN apt-get install -y esl-erlang=${otp_vsn}
RUN wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb && \
dpkg -i erlang-solutions_2.0_all.deb && \
apt-get update && \
apt-get install -y esl-erlang=1:${otp_vsn}

RUN apt-get install -y git g++ openssl libssl-dev
ARG REBAR3_VERSION="3.16.1"
RUN set -xe \
&& REBAR3_DOWNLOAD_URL="https://github.com/erlang/rebar3/releases/download/${REBAR3_VERSION}/rebar3" \
&& curl -fSL -o rebar3 "$REBAR3_DOWNLOAD_URL" \
&& install -v ./rebar3 /usr/local/bin/

COPY . /amoc_arsenal_build
WORKDIR /amoc_arsenal_build
RUN git clean -ffxd
RUN ./rebar3 release
RUN rebar3 release

FROM base
FROM builder
MAINTAINER Erlang Solutions <mongoose-im@erlang-solutions.com>

RUN useradd -ms /bin/bash amoc
Expand Down
2 changes: 1 addition & 1 deletion ci/build_docker_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Get current repo version
version="$(git rev-parse --short HEAD)"
otp_vsn="1:${OTP_RELEASE:-22.3}-1"
otp_vsn="${OTP_RELEASE:-24.0}-1"
echo "ERLANG/OTP ${otp_vsn}"
echo "AMOC-ARSENAL-XMPP ${version}"

Expand Down
2 changes: 1 addition & 1 deletion ci/test_docker_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ done

for i in $(seq 1 "$number_of_nodes"); do
name="amoc-arsenal-$i"
output="$(docker exec -t "$name" "$path_to_exec" eval "nodes()")"
output="$(docker exec -t "$name" "$path_to_exec" eval "nodes().")"
echo "container == '${name}', nodes() == ${output}"
for j in $(seq 1 "$number_of_nodes"); do
if [ "$j" -ne "$i" ]; then
Expand Down
14 changes: 6 additions & 8 deletions rebar.config
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{ erl_opts, [
debug_info,
{parse_transform, lager_transform}
debug_info
]}.

{ deps, [
{escalus, {git, "https://github.com/esl/escalus.git", {branch, "master"}}},
{amoc, {git, "https://github.com/esl/amoc", {ref, "f02a1f7"}}},
{lager, "3.6.8"}
{amoc, {git, "https://github.com/esl/amoc", {tag, "2.2.0"}}},
{escalus, "4.2.2"},
{jiffy, "1.0.8"}
]}.

{ xref_checks, [
Expand All @@ -16,10 +15,9 @@
]}.

{ relx, [
{release, {amoc_arsenal_xmpp, {git, short}}, [amoc_arsenal_xmpp]},
{release, {amoc_arsenal_xmpp, {git, short}}, [amoc_arsenal_xmpp, amoc]},
{debug_info, keep},
{dev_mode, false},
{include_src, false},
{include_erts, true},
{extended_start_script, true},
{sys_config, "rel/app.config"}
]}.
Expand Down
133 changes: 78 additions & 55 deletions rebar.lock
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
{"1.1.0",
{"1.2.0",
[{<<"amoc">>,
{git,"https://github.com/esl/amoc",
{ref,"f02a1f7b052ed02e9a5ef5db93e10bf33bb05b9c"}},
{ref,"44fc97e34b9911c012945dfe041104f32e16ed06"}},
0},
{<<"amoc_rest">>,
{git,"https://github.com/esl/amoc_rest.git",
{ref,"59ccffad8fa3662bde44f54772a01c60192f8b04"}},
1},
{<<"base16">>,{pkg,<<"base16">>,<<"1.0.0">>},1},
{<<"bbmustache">>,{pkg,<<"bbmustache">>,<<"1.10.0">>},1},
{<<"cowboy">>,{pkg,<<"cowboy">>,<<"2.8.0">>},2},
{<<"cowlib">>,{pkg,<<"cowlib">>,<<"2.6.0">>},2},
{<<"escalus">>,
{git,"https://github.com/esl/escalus.git",
{ref,"a59a834ef8ef8f47ee2e1339c1471dd207a4cdb3"}},
0},
{<<"exml">>,
{git,"https://github.com/esl/exml.git",
{ref,"078499f8b2d36ba9957bc931321f41c0a48c4a05"}},
{ref,"103c3123a8cf0464b9c3f9392af6a396673f67bd"}},
1},
{<<"base16">>,{pkg,<<"base16">>,<<"2.0.0">>},1},
{<<"bbmustache">>,{pkg,<<"bbmustache">>,<<"1.12.1">>},1},
{<<"cowboy">>,{pkg,<<"cowboy">>,<<"2.9.0">>},2},
{<<"cowlib">>,{pkg,<<"cowlib">>,<<"2.7.3">>},2},
{<<"docsh">>,{pkg,<<"docsh">>,<<"0.7.2">>},1},
{<<"escalus">>,{pkg,<<"escalus">>,<<"4.2.2">>},0},
{<<"exml">>,{pkg,<<"hexml">>,<<"3.0.5">>},1},
{<<"exometer_core">>,
{git,"https://github.com/esl/exometer_core.git",
{ref,"979ff04bcabc276c122b47fb7e6b54fbded62576"}},
Expand All @@ -27,50 +22,78 @@
{git,"https://github.com/esl/exometer_report_graphite.git",
{ref,"264dd7bcbadbd7febcd43917302251286c88b681"}},
1},
{<<"fast_scram">>,{pkg,<<"fast_scram">>,<<"0.2.0">>},1},
{<<"fast_tls">>,
{git,"https://github.com/processone/fast_tls.git",
{ref,"f91cc81075f320d260655bc92799d50d87b4afe9"}},
1},
{<<"fusco">>,
{git,"https://github.com/esl/fusco.git",
{ref,"de08adef32d12f0984d6d1c6fec28be207db2e7e"}},
1},
{<<"goldrush">>,{pkg,<<"goldrush">>,<<"0.1.9">>},1},
{<<"gun">>,{pkg,<<"gun">>,<<"1.3.2">>},1},
{<<"fast_pbkdf2">>,{pkg,<<"fast_pbkdf2">>,<<"1.0.1">>},2},
{<<"fast_scram">>,{pkg,<<"fast_scram">>,<<"0.4.1">>},1},
{<<"fast_tls">>,{pkg,<<"fast_tls">>,<<"1.1.12">>},1},
{<<"fusco">>,{pkg,<<"fusco">>,<<"0.1.1">>},1},
{<<"getopt">>,{pkg,<<"getopt">>,<<"1.0.1">>},3},
{<<"gun">>,{pkg,<<"gun">>,<<"1.3.3">>},1},
{<<"hut">>,{pkg,<<"hut">>,<<"1.2.1">>},2},
{<<"jesse">>,{pkg,<<"jesse">>,<<"1.5.5">>},2},
{<<"jsx">>,{pkg,<<"jsx">>,<<"2.11.0">>},2},
{<<"lager">>,{pkg,<<"lager">>,<<"3.6.8">>},0},
{<<"meck">>,{pkg,<<"meck">>,<<"0.8.13">>},1},
{<<"p1_utils">>,{pkg,<<"p1_utils">>,<<"1.0.21">>},2},
{<<"jesse">>,{pkg,<<"jesse">>,<<"1.5.6">>},2},
{<<"jiffy">>,{pkg,<<"jiffy">>,<<"1.0.8">>},0},
{<<"jsx">>,{pkg,<<"jsx">>,<<"3.1.0">>},2},
{<<"meck">>,{pkg,<<"meck">>,<<"0.9.2">>},1},
{<<"p1_utils">>,{pkg,<<"p1_utils">>,<<"1.0.22">>},2},
{<<"parse_trans">>,{pkg,<<"parse_trans">>,<<"3.3.0">>},2},
{<<"quickrand">>,{pkg,<<"quickrand">>,<<"1.8.0">>},2},
{<<"ranch">>,{pkg,<<"ranch">>,<<"1.7.1">>},3},
{<<"rfc3339">>,
{git,"https://github.com/talentdeficit/rfc3339.git",
{ref,"31716adecb4b405b1f5ef80b9f3fa50f39b26af8"}},
2},
{<<"uuid">>,{pkg,<<"uuid_erl">>,<<"1.8.0">>},1},
{<<"worker_pool">>,{pkg,<<"worker_pool">>,<<"3.2.0">>},1}]}.
{<<"providers">>,{pkg,<<"providers">>,<<"1.8.1">>},2},
{<<"quickrand">>,{pkg,<<"quickrand">>,<<"2.0.2">>},2},
{<<"ranch">>,{pkg,<<"ranch">>,<<"1.8.0">>},3},
{<<"rfc3339">>,{pkg,<<"rfc3339">>,<<"0.9.0">>},2},
{<<"uuid">>,{pkg,<<"uuid_erl">>,<<"2.0.2">>},1},
{<<"worker_pool">>,{pkg,<<"worker_pool">>,<<"4.0.3">>},1}]}.
[
{pkg_hash,[
{<<"base16">>, <<"283644E2B21BD5915ACB7178BED7851FB07C6E5749B8FAD68A53C501092176D9">>},
{<<"bbmustache">>, <<"DDC927463F0E95D66CDAC889153AF08015D609124D6D79006C248AD2DE7F6ECD">>},
{<<"cowboy">>, <<"F3DC62E35797ECD9AC1B50DB74611193C29815401E53BAC9A5C0577BD7BC667D">>},
{<<"cowlib">>, <<"8AA629F81A0FC189F261DC98A42243FA842625FEEA3C7EC56C48F4CCDB55490F">>},
{<<"fast_scram">>, <<"1F8F467D34374D00CE4AB8D6F78430EA8ADCCD2DA6D5BA0069B9EA8A1CAC6DE1">>},
{<<"goldrush">>, <<"F06E5D5F1277DA5C413E84D5A2924174182FB108DABB39D5EC548B27424CD106">>},
{<<"gun">>, <<"542064CBB9F613650B8A8100B3A927505F364FBE198B7A5A112868FF43F3E477">>},
{<<"base16">>, <<"9DA694FA0778DF31522A1B9EB349BA4AC9063B497234DC49509C1F5C37F336A2">>},
{<<"bbmustache">>, <<"857FBDF86BDA46D07201B0E7A969820CB763A7C174C485FD0780D7E033EFE9F0">>},
{<<"cowboy">>, <<"865DD8B6607E14CF03282E10E934023A1BD8BE6F6BACF921A7E2A96D800CD452">>},
{<<"cowlib">>, <<"A7FFCD0917E6D50B4D5FB28E9E2085A0CEB3C97DEA310505F7460FF5ED764CE9">>},
{<<"docsh">>, <<"F893D5317A0E14269DD7FE79CF95FB6B9BA23513DA0480EC6E77C73221CAE4F2">>},
{<<"escalus">>, <<"C0F5A9D05C4C10BCE5A77F1FDD35E5BA467D2C00C803AFCE7061518B36D058A5">>},
{<<"exml">>, <<"2A79262A744A9B100A9A27A8E76EADCF146F17653DABA2A88A74C8CF5B06ADF3">>},
{<<"fast_pbkdf2">>, <<"E63454F7FAA6D6E43751DD44EB7C287EB3509DA92CE7F4AE00661AC580A96100">>},
{<<"fast_scram">>, <<"592E7943028EE86284EAAE5EA868545ACEB4A5CC7EF77829E2E54F19F57FAD7E">>},
{<<"fast_tls">>, <<"B11997D96D4306ABCD4CDB9FFA77CCFC0F826F64BED77ECACEB48B2DC46B9202">>},
{<<"fusco">>, <<"3DD6A90151DFEF30EA1937CC44E9A59177C0094918388D9BCAA2F2DC5E2AE4AA">>},
{<<"getopt">>, <<"C73A9FA687B217F2FF79F68A3B637711BB1936E712B521D8CE466B29CBF7808A">>},
{<<"gun">>, <<"CF8B51BEB36C22B9C8DF1921E3F2BC4D2B1F68B49AD4FBC64E91875AA14E16B4">>},
{<<"hut">>, <<"08D46679523043424870723923971889E8A34D63B2F946A35B46CF921D1236E7">>},
{<<"jesse">>, <<"ECFD2C1634C49052CA907B4DFDE1D1F44B7FD7862D933F4590807E42759B8072">>},
{<<"jsx">>, <<"08154624050333919B4AC1B789667D5F4DB166DC50E190C4D778D1587F102EE0">>},
{<<"lager">>, <<"897EFC7679BB82383448646C96768CDC4E747464DD18B999C7AACA485686B0DA">>},
{<<"meck">>, <<"FFEDB39F99B0B99703B8601C6F17C7F76313EE12DE6B646E671E3188401F7866">>},
{<<"p1_utils">>, <<"9D6244BBD4AF881E85AF71655E8BE5720B5B965B1BDD51A35C7871FD4142AF9A">>},
{<<"jesse">>, <<"593B8CAD26AF3CC0E44C727BD8CBDE56E2B0DE4C8D2738B1C258B6936A40A6A3">>},
{<<"jiffy">>, <<"60E36F00BE35E5AC6E6CF2D4CAF3BDF3103D4460AFF385F543A8D7DF2D6D9613">>},
{<<"jsx">>, <<"D12516BAA0BB23A59BB35DCCAF02A1BD08243FCBB9EFE24F2D9D056CCFF71268">>},
{<<"meck">>, <<"85CCBAB053F1DB86C7CA240E9FC718170EE5BDA03810A6292B5306BF31BAE5F5">>},
{<<"p1_utils">>, <<"10A70FAA665D1F8F6995FA100D068B4D910EE2A0111FA3567E9D6232CBB86F21">>},
{<<"parse_trans">>, <<"09765507A3C7590A784615CFD421D101AEC25098D50B89D7AA1D66646BC571C1">>},
{<<"quickrand">>, <<"E47CE597FF067385FF5836C8C7706AC7F8AA7B47DD90C6417E05B64696F872FA">>},
{<<"ranch">>, <<"6B1FAB51B49196860B733A49C07604465A47BDB78AA10C1C16A3D199F7F8C881">>},
{<<"uuid">>, <<"280014F8FF57FCE36EE6E91C3ECF21CBFCE78AAE9854C09597BB4C11E27B66D6">>},
{<<"worker_pool">>, <<"54DD752BA4CA4B702124C45803AA958B36BCE77D683B87886606F1AADA3E124D">>}]}
{<<"providers">>, <<"70B4197869514344A8A60E2B2A4EF41CA03DEF43CFB1712ECF076A0F3C62F083">>},
{<<"quickrand">>, <<"1D73FAA52E0C149FCBC72A63C26135FF68BE8FA7870675C73645896788A7540C">>},
{<<"ranch">>, <<"8C7A100A139FD57F17327B6413E4167AC559FBC04CA7448E9BE9057311597A1D">>},
{<<"rfc3339">>, <<"2075653DC9407541C84B1E15F8BDA2ABE95FB17C9694025E079583F2D19C1060">>},
{<<"uuid">>, <<"0D1CA9D94CA3B058467BCE20B7706CC816A2BDBBE0574DD008936AE97EA4EBE7">>},
{<<"worker_pool">>, <<"729D98AF0EEF31D10A6027C5AF2EDD4EA7D6CF91E96B03C189BB47F6FDE9667C">>}]},
{pkg_hash_ext,[
{<<"base16">>, <<"63067A9F73D2422F15344A1EAF7033C3B339DC64DA0229DE3DF26F0F6F1E4F82">>},
{<<"bbmustache">>, <<"F4320778C31A821A2A664DB8894618ABB79C1AF7BBF7C03C703C8868D9BB09FE">>},
{<<"cowboy">>, <<"2C729F934B4E1AA149AFF882F57C6372C15399A20D54F65C8D67BEF583021BDE">>},
{<<"cowlib">>, <<"1E1A3D176D52DAEBBECBBCDFD27C27726076567905C2A9D7398C54DA9D225761">>},
{<<"docsh">>, <<"4E7DB461BB07540D2BC3D366B8513F0197712D0495BB85744F367D3815076134">>},
{<<"escalus">>, <<"AA931EC978309378C3C2552D7DCDDBEC57FC8B56DEF2AC92B489A20C14801983">>},
{<<"exml">>, <<"426B50FA455C95760BA4F7C75ED76F90A58837742CBE38A86C6A75BEFA383907">>},
{<<"fast_pbkdf2">>, <<"CF834AB70270C628C8A37E9BFA4D7282AD6FF0C5DE6C8EB6A2F88C09F890857B">>},
{<<"fast_scram">>, <<"7948D5B2D09C30463620F52AEA5865BE954E3AD0230E267DE2D34C5C3F110291">>},
{<<"fast_tls">>, <<"C3D80828F5D985CBA4C93660FFBF2C9B9CD831303382B97832DD66429FB16F8A">>},
{<<"fusco">>, <<"6343551BD1E824F2A6CA85E1158C5B37C320FD449FBFEC7450A73F192AAF9022">>},
{<<"getopt">>, <<"53E1AB83B9CEB65C9672D3E7A35B8092E9BDC9B3EE80721471A161C10C59959C">>},
{<<"gun">>, <<"3106CE167F9C9723F849E4FB54EA4A4D814E3996AE243A1C828B256E749041E0">>},
{<<"hut">>, <<"953FC447514BAF9CC79FA147D66469243C94DFA1593779614E070C692D0BF0F3">>},
{<<"jesse">>, <<"3F9475B0C5B242E09592604AABB03328501D7E3D8A528173B5A75396EEDB0060">>},
{<<"jiffy">>, <<"F9AE986BA5A0854EB48CF6A76192D9367086DA86C20197DA430630BE7C087A4E">>},
{<<"jsx">>, <<"0C5CC8FDC11B53CC25CF65AC6705AD39E54ECC56D1C22E4ADB8F5A53FB9427F3">>},
{<<"meck">>, <<"81344F561357DC40A8344AFA53767C32669153355B626EA9FCBC8DA6B3045826">>},
{<<"p1_utils">>, <<"0E49FF5586515E3C44901D6FB06B1473BDA492D749F0B1705CBF9D96D4CD5A38">>},
{<<"parse_trans">>, <<"17EF63ABDE837AD30680EA7F857DD9E7CED9476CDD7B0394432AF4BFC241B960">>},
{<<"providers">>, <<"E45745ADE9C476A9A469EA0840E418AB19360DC44F01A233304E118A44486BA0">>},
{<<"quickrand">>, <<"E21C6C7F29CA995468662085CA54D7D09E861C180A9DFEC2CF4A2E75364A16D6">>},
{<<"ranch">>, <<"49FBCFD3682FAB1F5D109351B61257676DA1A2FDBE295904176D5E521A2DDFE5">>},
{<<"rfc3339">>, <<"182314DE35C9F4180B22EB5F22916D8D7A799C1109A060C752970273A9332AD6">>},
{<<"uuid">>, <<"4866CA7B3BD0265BC371590DCD0FE2832FC08588A071B72D07E09E23F163D0D6">>},
{<<"worker_pool">>, <<"2F2ABFD3F64931B8DF345D7EFE80A357EDC785848C39319225CA328F44BC7192">>}]}
].
Binary file removed rebar3
Binary file not shown.
3 changes: 2 additions & 1 deletion src/amoc_arsenal_xmpp.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
amoc,
escalus,
mnesia,
ssl
ssl,
jiffy
]},
{env, [
{predefined_metrics, [{times, connection},
Expand Down

0 comments on commit 28c5117

Please sign in to comment.