You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aurora.apache.org by zm...@apache.org on 2016/10/05 19:57:00 UTC

aurora git commit: Build Debian Jessie and Ubuntu Xenial specific mesos eggs

Repository: aurora
Updated Branches:
  refs/heads/master 251ef5a56 -> 640f07bab


Build Debian Jessie and Ubuntu Xenial specific mesos eggs

Support for making mesos native python eggs for Debian Jessie and Ubuntu Xenial.

Testing Done:
./make-mesos-native-egg jessie64 1.0.0 $(pwd)/test
./make-mesos-native-egg xenial64 1.0.0 $(pwd)/test

*NOTE: Have not tried installing the python eggs generated.

Bugs closed: AURORA-1712

Reviewed at https://reviews.apache.org/r/52531/


Project: http://git-wip-us.apache.org/repos/asf/aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/aurora/commit/640f07ba
Tree: http://git-wip-us.apache.org/repos/asf/aurora/tree/640f07ba
Diff: http://git-wip-us.apache.org/repos/asf/aurora/diff/640f07ba

Branch: refs/heads/master
Commit: 640f07babdf6307a6371f04b777209a1c9eca5ce
Parents: 251ef5a
Author: Renan DelValle <rd...@binghamton.edu>
Authored: Wed Oct 5 12:56:44 2016 -0700
Committer: Zameer Manji <zm...@apache.org>
Committed: Wed Oct 5 12:56:44 2016 -0700

----------------------------------------------------------------------
 build-support/python/make-mesos-native-egg | 71 ++++++++++++++++++++++++-
 1 file changed, 69 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aurora/blob/640f07ba/build-support/python/make-mesos-native-egg
----------------------------------------------------------------------
diff --git a/build-support/python/make-mesos-native-egg b/build-support/python/make-mesos-native-egg
index 9387496..bcc6e85 100755
--- a/build-support/python/make-mesos-native-egg
+++ b/build-support/python/make-mesos-native-egg
@@ -12,7 +12,7 @@ Usage: make-mesos-native-egg.sh TARGET_DISTRIBUTION MESOS_VERSION AURORA_3RDPART
 
 Build a mesos Python egg in a pristine Vagrant environment.
 
-TARGET_DISTRIBUTION is one of (trusty64, centos6, centos7).
+TARGET_DISTRIBUTION is one of (centos6, centos7, jessie64, trusty64, xenial64).
 MESOS_VERSION is a released version of mesos available on archive.apache.org.
 AURORA_3RDPARTY_ROOT is the path to a sparse checkout of the Aurora 3rdparty repo.
 EOF
@@ -54,12 +54,43 @@ fetch_and_build_mesos() {
       wget --progress=dot "$MESOS_BASEURL/$mesos_version/mesos-${mesos_version}.tar.gz"
       tar zxvf mesos-${mesos_version}.tar.gz
       cd mesos-$mesos_version
-      ./configure --disable-java
+      ./configure --disable-java --enable-optimize
       make
       find . -name '*.egg' -exec cp -v {} /vagrant \\;
 EOF
 }
 
+DEBIAN_JESSIE64_DEPENDENCIES=(
+  g++
+  make
+  libapr1-dev
+  libcurl4-nss-dev
+  libsasl2-dev
+  libsvn-dev
+  python-dev
+  python-virtualenv
+  zlib1g-dev
+)
+build_debian_jessie64() {
+  local mesos_version=$1 output_basedir=$2
+  local python_outdir=$output_basedir/debian/jessie64/python
+  pushd "$TMPDIR"
+    # Using bento debian box due to debian/jessie64 not having
+    # guest additions installed. No guest additions = no /vagrant.
+    init_vagrant_box bento/debian-8.6
+    vagrant up
+    vagrant ssh <<EOF
+      set -e -u
+
+      sudo apt-get update
+      sudo apt-get -y install ${DEBIAN_JESSIE64_DEPENDENCIES[*]}
+      $(fetch_and_build_mesos "$mesos_version")
+EOF
+    mkdir -pv "$python_outdir"
+    cp -v mesos.executor*.egg "$python_outdir"
+  popd
+}
+
 UBUNTU_TRUSTY64_DEPENDENCIES=(
   g++-4.8
   libapr1-dev
@@ -88,6 +119,36 @@ EOF
   popd
 }
 
+UBUNTU_XENIAL64_DEPENDENCIES=(
+  g++
+  libapr1-dev
+  libcurl4-nss-dev
+  libsasl2-dev
+  libsvn-dev
+  python-dev
+  python-virtualenv
+  zlib1g-dev
+)
+build_ubuntu_xenial64() {
+  local mesos_version=$1 output_basedir=$2
+  local python_outdir=$output_basedir/ubuntu/xenial64/python
+  pushd "$TMPDIR"
+    # Using bento box due to ubuntu/xenial64
+    # not being configured properly for Vagrant
+    init_vagrant_box bento/ubuntu-16.04
+    vagrant up
+    vagrant ssh <<EOF
+      set -e -u
+
+      sudo apt-get update
+      sudo apt-get -y install ${UBUNTU_XENIAL64_DEPENDENCIES[*]}
+      $(fetch_and_build_mesos "$mesos_version")
+EOF
+    mkdir -pv "$python_outdir"
+    cp -v mesos.executor*.egg "$python_outdir"
+  popd
+}
+
 CENTOS6_X86_64_DEPENDENCIES=(
   apr-devel
   cyrus-sasl-devel
@@ -171,9 +232,15 @@ main() {
   setup_tempdir
   pushd "$TMPDIR"
     case "$target_distribution" in
+      jessie64)
+        build_debian_jessie64 "$mesos_version" "$output_basedir"
+        ;;
       trusty64)
         build_ubuntu_trusty64 "$mesos_version" "$output_basedir"
         ;;
+      xenial64)
+        build_ubuntu_xenial64 "$mesos_version" "$output_basedir"
+        ;;
       centos6)
         build_centos6 "$mesos_version" "$output_basedir"
         ;;