You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by sv...@apache.org on 2017/02/14 17:05:31 UTC

[07/12] brooklyn-dist git commit: add support for specifying dropins

add support for specifying dropins

and tweak arg names


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/commit/53119381
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/tree/53119381
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/diff/53119381

Branch: refs/heads/master
Commit: 53119381e0561bf63efe08300189945426feeba8
Parents: 15cd83f
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Tue Nov 8 20:29:10 2016 +0000
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Tue Nov 8 20:58:21 2016 +0000

----------------------------------------------------------------------
 docker/Dockerfile              | 18 +++++++++++++-----
 docker/Dockerfile-debug-ubuntu | 17 +++++++++++++----
 docker/Makefile                |  2 +-
 docker/README.md               |  3 ++-
 4 files changed, 29 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/53119381/docker/Dockerfile
----------------------------------------------------------------------
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 0b17c72..d5d8d67 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -21,7 +21,7 @@
 FROM openjdk:8-jre-alpine
 MAINTAINER Alex Heneveld "alex@cloudsoft.io"
 
-RUN apk add --update --no-cache bash openssh ; \
+RUN apk add --update --no-cache bash openssh wget ; \
     mv /dev/random /dev/random-real && ln -s /dev/urandom /dev/random
 RUN adduser -D brooklyn
 WORKDIR /home/brooklyn
@@ -40,17 +40,25 @@ USER brooklyn
 
 # handle customisation, including passing args through to the container script and installing boms
 ARG application
-ARG install_bom
+ARG install_boms
+ARG dropins_jars
 RUN \
   if [ -n "${debug}" ] ; then echo debug=true >> brooklyn-docker-start.opts ; fi ; \
   if [ -n "${application}" ] ; then echo application=${application} >> brooklyn-docker-start.opts ; fi ; \
-  if [ -n "${install_bom}" ] ; then \
+  if [ -n "${install_boms}" ] ; then \
     echo "brooklyn.catalog:" > conf/brooklyn/default.catalog.bom ; \
     echo "  items:" >> conf/brooklyn/default.catalog.bom ; \
-    for x in ${install_bom} ; do \
+    for x in ${install_boms} ; do \
       echo Installing $x to catalog ; \
       echo "  - "$x >> conf/brooklyn/default.catalog.bom ; \
-    done \
+    done ; \
+  fi ; \
+  if [ -n "${dropins_jars}" ] ; then \
+    cd lib/dropins/ ; \
+    for x in ${dropins_jars} ; do \
+      echo Download $x to lib/dropins ; \
+      wget -q --trust-server-names $x ; \
+    done ; \
   fi
 
 # and start

http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/53119381/docker/Dockerfile-debug-ubuntu
----------------------------------------------------------------------
diff --git a/docker/Dockerfile-debug-ubuntu b/docker/Dockerfile-debug-ubuntu
index 683a90e..b129897 100644
--- a/docker/Dockerfile-debug-ubuntu
+++ b/docker/Dockerfile-debug-ubuntu
@@ -55,20 +55,29 @@ USER brooklyn
 
 # handle customisation, including passing args through to the container script and installing boms
 ARG application
-ARG install_bom
+ARG install_boms
+ARG dropins_jars
 RUN \
   if [ -n "${debug}" ] ; then echo debug=true >> brooklyn-docker-start.opts ; fi ; \
   if [ -n "${application}" ] ; then echo application=${application} >> brooklyn-docker-start.opts ; fi ; \
-  if [ -n "${install_bom}" ] ; then \
+  if [ -n "${install_boms}" ] ; then \
     echo "brooklyn.catalog:" > conf/brooklyn/default.catalog.bom ; \
     echo "  items:" >> conf/brooklyn/default.catalog.bom ; \
-    for x in ${install_bom} ; do \
+    for x in ${install_boms} ; do \
       echo Installing $x to catalog ; \
       echo "  - "$x >> conf/brooklyn/default.catalog.bom ; \
-    done \
+    done ; \
+  fi ; \
+  if [ -n "${dropins_jars}" ] ; then \
+    cd lib/dropins/ ; \
+    for x in ${dropins_jars} ; do \
+      echo Download $x to lib/dropins ; \
+      wget -q --trust-server-names $x ; \
+    done ; \
   fi
 
 # and start
+EXPOSE 8081
 ENTRYPOINT ["bin/brooklyn-docker-start"]
 CMD []
 

http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/53119381/docker/Makefile
----------------------------------------------------------------------
diff --git a/docker/Makefile b/docker/Makefile
index 9cdd87c..2f0957a 100644
--- a/docker/Makefile
+++ b/docker/Makefile
@@ -55,7 +55,7 @@ run-shell:
 
 example-image-hyperledger: prep
 	docker build -t brooklyncentral/brooklyn-hyperledger \
-	  --build-arg install_bom="https://raw.githubusercontent.com/cloudsoft/brooklyn-hyperledger/master/docker.bom https://raw.githubusercontent.com/cloudsoft/brooklyn-hyperledger/master/catalog.bom" \
+	  --build-arg install_boms="https://raw.githubusercontent.com/cloudsoft/brooklyn-hyperledger/master/docker.bom https://raw.githubusercontent.com/cloudsoft/brooklyn-hyperledger/master/catalog.bom" \
           --build-arg application=hyperledger-fabric-single-cluster-application \
 	  .
 

http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/53119381/docker/README.md
----------------------------------------------------------------------
diff --git a/docker/README.md b/docker/README.md
index bec5a9a..273fdb7 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -8,7 +8,8 @@ When building, you can use:
 
 * `--build-arg debug=true` to install extra tools on the VM and show debug output from our script when booting the container
 * `--build-arg application=my-app` to create a container which boots `my-app` by default
-* `--build-arg install_bom="http://path/to/file.bom http://path/to/another.bom"` to replace the default catalog with one or more BOM files (useful with `application` above)
+* `--build-arg install_boms="http://path/to/file.bom http://path/to/another.bom"` to replace the default catalog with one or more BOM files (useful with `application` above)
+* `--build-arg dropins_jars="http://path/to/file.jar http://path/to/another.jar"` to add JARs in the dropins dir (useful with `application` and `install_boms` above)
 
 See examples in the `Makefile`.