> On April 28, 2016, 10:02 a.m., John Sirois wrote:
> > build-support/packer/build.sh, line 44
> > <https://reviews.apache.org/r/46786/diff/1/?file=1364773#file1364773line44>
> >
> >     I'm missing how this is needed too.
> 
> Joshua Cohen wrote:
>     If I remove this we don't have a jdk in the vagrant image and therefore 
> can't build the scheduler. I.e., I guess default-jre-headless brings in only 
> the JRE but not the JDK?
> 
> John Sirois wrote:
>     Backing up - were you anticipating the mesos upgrade issue linked or did 
> you hit a different real issue that prompted this change?  If the former, 
> JDKs include JREs in their jre subdir and the fact we have a direct 
> dependency on a jdk means no upgrade will magically remove it.
> 
> John Sirois wrote:
>     TLDR; the mesos thread could be said to be warning for all non-JRE-using 
> frameworks only.
> 
> Joshua Cohen wrote:
>     I'm trying to build a new base box in another branch for the unified 
> container changes and it was failing on the `install_mesos` step due to 
> java-runtime-headless not being found. After ruling out my changes by running 
> the script on master and getting the same results, I happened across that 
> thread on mesos-users that described the problem. I'll confess to being 
> unfamiliar with the internals of all this packaging.
>     
>     You should be able to replicate the original problem fairly trivially by 
> running the packer build command on master. If there's a better/cleaner 
> solution than adding this dependency (or getting mesosphere to publish a new 
> deb), I'm open to it!
> 
> John Sirois wrote:
>     I think 1 dep on https://launchpad.net/ubuntu/+source/openjdk-8 with a 
> note why - ie we need its transitive dep on jdk for aurora builds + jre for 
> mesos deb package constraints.
>     Or else - preferrable I think for being explicit - the existing dep on 
> openjdk-8-jdk-headless paired with a dep on openjdk-8-jre-headless and a 
> comment on why the latter.  The mesos thread comment could be removed since 
> its not at play here fwict - ie we are not worried about magic removal, just 
> trying to satisfy a deb logical dep fwict.
>     
>     These take me a while on my slow link, but I'm trying this out now.

This works for me:
```diff
$ git diff -U1
diff --git a/build-support/packer/build.sh b/build-support/packer/build.sh
index 658dbc4..57279c8 100644
--- a/build-support/packer/build.sh
+++ b/build-support/packer/build.sh
@@ -19,3 +19,3 @@ set -o verbose
 
-readonly MESOS_VERSION=0.27.2
+readonly MESOS_VERSION=0.28.0
 
@@ -29,3 +29,3 @@ function remove_unused {
 function install_base_packages {
-  add-apt-repository ppa:openjdk-r/ppa -y
+  add-apt-repository -y ppa:openjdk-r/ppa
   apt-get update
@@ -40,3 +40,3 @@ function install_base_packages {
       libsvn-dev \
-      openjdk-8-jdk \
+      openjdk-8-jdk-headless \
       python-dev
@@ -44,3 +44,3 @@ function install_base_packages {
   # Installing zookeeperd as a separate command, as otherwise openjdk-7-jdk is 
also installed.
-  apt-get install -y zookeeperd
+  apt-get -y install zookeeperd
 }
@@ -49,3 +49,3 @@ function install_docker {
   # Instructions from 
https://docs.docker.com/engine/installation/linux/ubuntulinux/
-  apt-get install -y apt-transport-https ca-certificates
+  apt-get -y install apt-transport-https ca-certificates
   apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 \
@@ -62,8 +62,9 @@ function install_docker {
 function install_mesos {
-  URL_BASE='http://repos.mesosphere.com/ubuntu/pool/main/m/mesos'
-  DEB_URL="$URL_BASE/mesos_${MESOS_VERSION}-2.0.15.ubuntu1404_amd64.deb"
-  deb=$(basename $DEB_URL)
-  wget -c "$DEB_URL"
-  dpkg --install $deb
-  rm $deb
+  sudo apt-key adv --keyserver keyserver.ubuntu.com --recv E56151BF
+  DISTRO=$(lsb_release -is | tr '[:upper:]' '[:lower:]')
+  CODENAME=$(lsb_release -cs)
+  echo "deb http://repos.mesosphere.io/${DISTRO} ${CODENAME} main" \
+    > /etc/apt/sources.list.d/mesosphere.list
+  apt-get update
+  apt-get -y install mesos=${MESOS_VERSION}*
 }
@@ -77,3 +78,3 @@ function install_thrift {
   apt-get update
-  apt-get install thrift-compiler=0.9.1
+  apt-get -y install thrift-compiler=0.9.1
 }
```

The jdk is slimmed to headless, no explicit jre added - and the lynchpin is the 
use of apt-get to install mesos.


- John


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46786/#review130929
-----------------------------------------------------------


On April 28, 2016, 11:08 a.m., Joshua Cohen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46786/
> -----------------------------------------------------------
> 
> (Updated April 28, 2016, 11:08 a.m.)
> 
> 
> Review request for Aurora, John Sirois and Stephan Erb.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> See http://markmail.org/message/rofuiaclgkesfx3o for full details.
> 
> 
> Diffs
> -----
> 
>   build-support/packer/build.sh 658dbc4bc5ae0dd1cfa69abd8fdf6119c3ccf8c9 
> 
> Diff: https://reviews.apache.org/r/46786/diff/
> 
> 
> Testing
> -------
> 
> Successfully built base box with these changes.
> 
> 
> Thanks,
> 
> Joshua Cohen
> 
>

Reply via email to