You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by ahgittin <gi...@git.apache.org> on 2016/10/31 16:16:46 UTC

[GitHub] brooklyn-dist pull request #56: [DO NOT MERGE] docker image, for standalone ...

GitHub user ahgittin opened a pull request:

    https://github.com/apache/brooklyn-dist/pull/56

    [DO NOT MERGE] docker image, for standalone or quick-launch

    see the README
    
    super-easy way to launch brooklyn or even package a special brooklyn for a specific blueprint
    
    everything seems to be working except the HL blueprint needs to refer to the single cluster example
    
    note this is already pushed to docker hub so you can experiment on the runs without checking anything out :)
    
    @grkvlt @mikezaccardo @shartzel welcome any comments

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ahgittin/brooklyn-dist docker

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/brooklyn-dist/pull/56.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #56
    
----

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist pull request #56: [READY FOR REVIEW] docker image, for standal...

Posted by andreaturli <gi...@git.apache.org>.
Github user andreaturli commented on a diff in the pull request:

    https://github.com/apache/brooklyn-dist/pull/56#discussion_r87079319
  
    --- Diff: docker/Dockerfile ---
    @@ -0,0 +1,68 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one
    +# or more contributor license agreements.  See the NOTICE file
    +# distributed with this work for additional information
    +# regarding copyright ownership.  The ASF licenses this file
    +# 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.
    +#
    +
    +
    +FROM openjdk:8-jre-alpine
    +MAINTAINER Alex Heneveld "alex@cloudsoft.io"
    +
    +RUN apk add --update --no-cache bash openssh ; \
    --- End diff --
    
    sorry I forgot to say `wget`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist issue #56: [DO NOT MERGE] docker image, for standalone or quic...

Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on the issue:

    https://github.com/apache/brooklyn-dist/pull/56
  
    @andreaturli @m4rkmckenna @mikezaccardo fixed HL issue, and addressed comments.  6a47cf2 shows the difference in filesize w alpine (huge!)
    
    updating issue title; ready for review
    
    re https://github.com/fabric8io/docker-maven-plugin the makefile is there as documentation more than anything.  it would be nice to have this part of the build but it would require docker be installed in the target system so i've held off for now.
    
    cool things to try...
    
    deploy **hyperledger blockchain**:
    
        docker run -d -p 8081:8081
          brooklyncentral:brooklyn-hyperledger \
          --username brooklyn --password S3CR3T \
          CLOUD_USER_ACCESS_ID:CLOUD_SECRET@aws-ec2:us-west-1 > /tmp/last_container
        docker logs -f `cat /tmp/last_container`
    
    then play with it at localhost:8081 or:
    
        export BR="docker -i exec `cat /tmp/last_container` br"
        $BR apps
    
    (and the nicest thing is that you don't need anything installed or built locally, as long as you've got docker)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist pull request #56: [READY FOR REVIEW] docker image, for standal...

Posted by mikezaccardo <gi...@git.apache.org>.
Github user mikezaccardo commented on a diff in the pull request:

    https://github.com/apache/brooklyn-dist/pull/56#discussion_r86363116
  
    --- Diff: docker/Dockerfile ---
    @@ -0,0 +1,59 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one
    +# or more contributor license agreements.  See the NOTICE file
    +# distributed with this work for additional information
    +# regarding copyright ownership.  The ASF licenses this file
    +# 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.
    +#
    +
    +
    +FROM openjdk:8-jre-alpine
    +MAINTAINER Alex Heneveld "alex@cloudsoft.io"
    +
    +RUN apk add --update bash openssh && rm -rf /var/cache/apk/*
    +RUN adduser -D brooklyn
    +WORKDIR /home/brooklyn
    +
    +# now install software brooklyn
    +COPY target/files/ .
    +RUN \
    +  # remove option not relevan for java v8 \
    +  sed -i.bk "s/ -XX:MaxPermSize=256m//" bin/brooklyn ; \
    +  # install br for global use \
    +  cp ./bin/br /usr/bin/br ; \
    +  # and fix perms (irritating that docker won't do this) \
    +  chown -R brooklyn:brooklyn .
    +
    +USER brooklyn
    +
    +# handle customisation, including passing args through to the container script and installing boms
    --- End diff --
    
    Funny coming from me, given that I pushed for HL-specificity for the first release, but I agree that the app-agnostic work should live here and the HL-specific child `Dockerfile` should live elsewhere.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist issue #56: [READY FOR REVIEW] docker image, for standalone or ...

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on the issue:

    https://github.com/apache/brooklyn-dist/pull/56
  
    rat check failing with:
    ```
    Unapproved licenses:
    
      docker/README.md
      docker/Makefile
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist issue #56: [READY FOR REVIEW] docker image, for standalone or ...

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on the issue:

    https://github.com/apache/brooklyn-dist/pull/56
  
    thanks @ahgittin, merging


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist pull request #56: [READY FOR REVIEW] docker image, for standal...

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on a diff in the pull request:

    https://github.com/apache/brooklyn-dist/pull/56#discussion_r86750524
  
    --- Diff: docker/Dockerfile ---
    @@ -0,0 +1,59 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one
    +# or more contributor license agreements.  See the NOTICE file
    +# distributed with this work for additional information
    +# regarding copyright ownership.  The ASF licenses this file
    +# 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.
    +#
    +
    +
    +FROM openjdk:8-jre-alpine
    +MAINTAINER Alex Heneveld "alex@cloudsoft.io"
    +
    +RUN apk add --update bash openssh && rm -rf /var/cache/apk/*
    --- End diff --
    
    Use `--no-cache` instead of `rm`-ing the cache.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist issue #56: [DO NOT MERGE] docker image, for standalone or quic...

Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on the issue:

    https://github.com/apache/brooklyn-dist/pull/56
  
    build failure looks unrelated:
    
    ```
    GitHub pull request #56 to apache/brooklyn-dist
    [EnvInject] - Loading node environment variables.
    ERROR: SEVERE ERROR occurs
    org.jenkinsci.lib.envinject.EnvInjectException: hudson.remoting.ChannelClosedException: channel is already closed
    	at org.jenkinsci.plugins.envinject.service.EnvironmentVariablesNodeLoader.gatherEnvironmentVariablesNode(EnvironmentVariablesNodeLoader.java:75)
    ```



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist pull request #56: [DO NOT MERGE] docker image, for standalone ...

Posted by m4rkmckenna <gi...@git.apache.org>.
Github user m4rkmckenna commented on a diff in the pull request:

    https://github.com/apache/brooklyn-dist/pull/56#discussion_r85938600
  
    --- Diff: docker/Dockerfile ---
    @@ -0,0 +1,68 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one
    +# or more contributor license agreements.  See the NOTICE file
    +# distributed with this work for additional information
    +# regarding copyright ownership.  The ASF licenses this file
    +# 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.
    +#
    +
    +
    +FROM ubuntu:latest
    +MAINTAINER Alex Heneveld "alex@cloudsoft.io"
    +
    +RUN apt-get update
    +
    +# pre-reqs for Brooklyn
    +RUN apt-get install -y default-jre
    +
    +# and for the script
    +RUN apt-get install -y ssh
    +
    +ARG debug
    +
    +# admin tools (optional)
    +RUN if [ -n "${debug}" ] ; then apt-get install -y vim ; fi
    +RUN if [ -n "${debug}" ] ; then apt-get install -y zip tar less curl ; fi
    +RUN if [ -n "${debug}" ] ; then apt-get install -y sudo ; fi
    +
    +RUN adduser brooklyn
    --- End diff --
    
    [Good practice](https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/) is to not add multiple fs layers 
    
    Why not combine all the run commands into one
    ```
    RUN if [ -n "${debug}" ] ; then apt-get install -y vim ; fi \
            if [ -n "${debug}" ] ; then apt-get install -y zip tar less curl ; fi \
           if [ -n "${debug}" ] ; then apt-get install -y sudo ; fi \
           adduser brooklyn
    ```
    
    
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist issue #56: [READY FOR REVIEW] docker image, for standalone or ...

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on the issue:

    https://github.com/apache/brooklyn-dist/pull/56
  
    Thanks for the updates, merging.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist issue #56: [READY FOR REVIEW] docker image, for standalone or ...

Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on the issue:

    https://github.com/apache/brooklyn-dist/pull/56
  
    Thanks @neykov -- changes addressed


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist pull request #56: [READY FOR REVIEW] docker image, for standal...

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on a diff in the pull request:

    https://github.com/apache/brooklyn-dist/pull/56#discussion_r99371541
  
    --- Diff: docker/Makefile ---
    @@ -0,0 +1,76 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one
    +# or more contributor license agreements.  See the NOTICE file
    +# distributed with this work for additional information
    +# regarding copyright ownership.  The ASF licenses this file
    +# 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.
    +#
    +
    +BROOKLYN_VERSION=0.10.0-SNAPSHOT
    --- End diff --
    
    bump @ahgittin 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist pull request #56: [READY FOR REVIEW] docker image, for standal...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/brooklyn-dist/pull/56


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist pull request #56: [READY FOR REVIEW] docker image, for standal...

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on a diff in the pull request:

    https://github.com/apache/brooklyn-dist/pull/56#discussion_r87073572
  
    --- Diff: docker/Dockerfile ---
    @@ -0,0 +1,60 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one
    +# or more contributor license agreements.  See the NOTICE file
    +# distributed with this work for additional information
    +# regarding copyright ownership.  The ASF licenses this file
    +# 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.
    +#
    +
    +
    +FROM openjdk:8-jre-alpine
    +MAINTAINER Alex Heneveld "alex@cloudsoft.io"
    +
    +RUN apk add --update --no-cache bash openssh ; \
    +    mv /dev/random /dev/random-real && ln -s /dev/urandom /dev/random
    --- End diff --
    
    Don't think this will work, have you checked?
    Shouldn't be needed for docker anyway as it's using hosts entropy unlike VMs.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist pull request #56: [READY FOR REVIEW] docker image, for standal...

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on a diff in the pull request:

    https://github.com/apache/brooklyn-dist/pull/56#discussion_r95362056
  
    --- Diff: docker/Makefile ---
    @@ -0,0 +1,76 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one
    +# or more contributor license agreements.  See the NOTICE file
    +# distributed with this work for additional information
    +# regarding copyright ownership.  The ASF licenses this file
    +# 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.
    +#
    +
    +BROOKLYN_VERSION=0.10.0-SNAPSHOT
    --- End diff --
    
    Just saw that - can you update and add `BROOKLYN_VERSION` tag.
    Also do we need to keep `Dockerfile-debug-ubuntu`? It will get out of sync sooner or later so better remove it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist pull request #56: [READY FOR REVIEW] docker image, for standal...

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on a diff in the pull request:

    https://github.com/apache/brooklyn-dist/pull/56#discussion_r86189594
  
    --- Diff: docker/Dockerfile ---
    @@ -0,0 +1,59 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one
    +# or more contributor license agreements.  See the NOTICE file
    +# distributed with this work for additional information
    +# regarding copyright ownership.  The ASF licenses this file
    +# 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.
    +#
    +
    +
    +FROM openjdk:8-jre-alpine
    +MAINTAINER Alex Heneveld "alex@cloudsoft.io"
    +
    +RUN apk add --update bash openssh && rm -rf /var/cache/apk/*
    +RUN adduser -D brooklyn
    +WORKDIR /home/brooklyn
    +
    +# now install software brooklyn
    +COPY target/files/ .
    +RUN \
    +  # remove option not relevan for java v8 \
    +  sed -i.bk "s/ -XX:MaxPermSize=256m//" bin/brooklyn ; \
    +  # install br for global use \
    +  cp ./bin/br /usr/bin/br ; \
    +  # and fix perms (irritating that docker won't do this) \
    +  chown -R brooklyn:brooklyn .
    +
    +USER brooklyn
    +
    +# handle customisation, including passing args through to the container script and installing boms
    --- End diff --
    
    Could split the `Dockerfile` in two parts - up to here a generic docker image and the rest customizing it for hyperledger.
    This will let us reuse the brooklyn overlay for a lot of app-specific images which would just customize the `default.catalog.bom` file.
    Could even integrate it with the community catalog and generate an overlay for each entry.
    
    Probably best left for another PR when we really need it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] brooklyn-dist issue #56: [DO NOT MERGE] docker image, for standalone or quic...

Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on the issue:

    https://github.com/apache/brooklyn-dist/pull/56
  
    great comments -- will update to use alpine and cut down fs layers


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---