From 2c28eaa42db36901421727c57b1450c29d49fbf8 Mon Sep 17 00:00:00 2001 From: Tommy Carpenter Date: Wed, 4 Oct 2017 12:08:53 +0000 Subject: Eliminate entry.sh using latest BEAM Issue-ID: DCAEGEN2-126 Change-Id: I45e6eec9df7aa02edc7efcbc0df0e862e3e4474d Signed-off-by: Tommy Carpenter --- Changelog.md | 3 +++ Dockerfile | 6 ++++-- README.md | 5 +++-- entry.sh | 20 -------------------- pom.xml | 7 ++++--- rebar.config | 4 ++-- src/cdapbroker.app.src | 2 +- swagger/swagger.yaml | 2 +- version.properties | 6 +++--- 9 files changed, 21 insertions(+), 34 deletions(-) delete mode 100755 entry.sh diff --git a/Changelog.md b/Changelog.md index 14ad272..96bc922 100644 --- a/Changelog.md +++ b/Changelog.md @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [4.0.10] - Oct 4 2017 +* Finally eliminate entry.sh after help from a relx engineer, BEAM is now PID 1 + ## [4.0.9] - Sep 26 2017 * Add unit tests for consul_interface, 32% now diff --git a/Dockerfile b/Dockerfile index 727ffa6..f13eb6b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,6 @@ ENV TERM=xterm ADD src /tmp/src ADD test /tmp/test ADD rebar.config /tmp -ADD entry.sh /tmp ADD config /tmp/config WORKDIR /tmp @@ -27,4 +26,7 @@ ENV BROKER_TEST_TYPE=DOCKER #run EXPOSE 7777 -ENTRYPOINT ["/tmp/entry.sh"] + +#see https://github.com/erlang/rebar3/issues/1593 +ENTRYPOINT ["./_build/default/rel/cdapbroker/bin/cdapbroker"] +CMD ["foreground"] diff --git a/README.md b/README.md index 32a8f25..9130fcd 100644 --- a/README.md +++ b/README.md @@ -123,8 +123,9 @@ This leaves the question of who/what/when/where/why/how streams and datasets sho For now, this is an open question. It can always be done on the CDAP management interface by an operations team in the meantime. # On Version Bumping (Development) -Currently the CDAP Broker Version is in three places in this repo.. +Currently the CDAP Broker Version is in four places in this repo.. 1. rebar.config 2. src/cdapbroker.app.src -3. swagger spec +3. swagger/swagger.yaml +4. pom.xml If you make a developmemt change, please bump in all places diff --git a/entry.sh b/entry.sh deleted file mode 100755 index 2b60caf..0000000 --- a/entry.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash -echo "if testing locally send SIGTERM to $$" - -term_handler() { - echo "Stopping the Erlang VM gracefully" - #/usr/local/Cellar/erlang/19.1/lib/erlang/lib/erl_interface-3.9.1/bin/erl_call -c cdapbroker -s -a 'init stop' -n 'cdapbroker@localhost' - /usr/local/lib/erlang/lib/erl_interface-3.9.2/bin/erl_call -c cdapbroker -s -a 'init stop' -n 'cdapbroker@localhost' - echo "Erlang VM Stopped" -} - -trap term_handler SIGQUIT SIGINT SIGTERM - -./_build/default/rel/cdapbroker/bin/cdapbroker & -PID=$! - -echo "Erlang VM Started" -#wait $PID -while kill -0 $PID ; do wait $PID ; EXIT_STATUS=$? ; done -echo "Exiting Wrapper." -exit $EXIT_STATUS diff --git a/pom.xml b/pom.xml index 87d7cf7..2fef4ac 100644 --- a/pom.xml +++ b/pom.xml @@ -21,15 +21,16 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property. 4.0.0 - org.onap.oparent - oparent + org.onap.dcaegen2 + dcaegen2 1.0.0-SNAPSHOT + org.onap.dcaegen2.platform cdapbroker dcaegen2-platform-cdapbroker - 1.0.0-SNAPSHOT + 4.0.10 http://maven.apache.org UTF-8 diff --git a/rebar.config b/rebar.config index 7b57ec3..3325fe8 100644 --- a/rebar.config +++ b/rebar.config @@ -1,9 +1,9 @@ {relx, [ {release, - {cdapbroker,"4.0.9"}, + {cdapbroker,"4.0.10"}, [cdapbroker] }, - %{extend_start_script,true}, + {extended_start_script, true}, % %for the following two fancyiness see https://www.rebar3.org/docs/releases %Supply our own vm.args diff --git a/src/cdapbroker.app.src b/src/cdapbroker.app.src index 08fc59d..7a1cebd 100644 --- a/src/cdapbroker.app.src +++ b/src/cdapbroker.app.src @@ -1,6 +1,6 @@ {application, cdapbroker, [{description, "Interface between Consul and CDAP in DCAE"}, - {vsn, "4.0.9"}, + {vsn, "4.0.10"}, {registered, []}, {mod, { cdapbroker_app, []}}, {applications, diff --git a/swagger/swagger.yaml b/swagger/swagger.yaml index 0e40d74..41ba163 100644 --- a/swagger/swagger.yaml +++ b/swagger/swagger.yaml @@ -5,7 +5,7 @@ swagger: '2.0' # This is your document metadata info: - version: "4.0.9" + version: "4.0.10" title: CDAP Broker API paths: diff --git a/version.properties b/version.properties index 7b8b963..26af12a 100644 --- a/version.properties +++ b/version.properties @@ -1,6 +1,6 @@ -major=1 -minor=1 -patch=0 +major=4 +minor=0 +patch=10 base_version=${major}.${minor}.${patch} release_version=${base_version} snapshot_version=${base_version}-SNAPSHOT -- cgit 1.2.3-korg