diff options
author | Haralds | 2017-03-02 02:20:23 +0000 |
---|---|---|
committer | Haralds | 2017-03-02 02:20:23 +0000 |
commit | d438813c861f105507ae620ce1e752b28080e3d8 (patch) | |
tree | 7a7688501876992958effaee7bc543d5b3fee995 | |
download | aur-d438813c861f105507ae620ce1e752b28080e3d8.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 32 | ||||
-rw-r--r-- | 3rdparty-build.patch | 11 | ||||
-rw-r--r-- | PKGBUILD | 80 | ||||
-rw-r--r-- | aurora-env.sh | 23 | ||||
-rw-r--r-- | aurora-startup.sh | 3 | ||||
-rw-r--r-- | aurora.service | 15 | ||||
-rw-r--r-- | thermos-env.sh | 5 | ||||
-rw-r--r-- | thermos-startup.sh | 3 | ||||
-rw-r--r-- | thermos.service | 16 |
9 files changed, 188 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..225f34137276 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,32 @@ +pkgbase = apache-aurora + pkgdesc = Aurora scheduler for mesos + pkgver = 0.17.0 + pkgrel = 1 + url = http://aurora.apache.org/ + arch = x86_64 + groups = science + license = Apache + makedepends = mesos>=1.1.0-2 + makedepends = patch + makedepends = python2 + makedepends = java-environment + depends = mesos>=1.1.0-2 + depends = python2 + depends = java-environment + source = http://www.apache.org/dist/aurora/0.17.0/apache-aurora-0.17.0.tar.gz + source = aurora.service + source = thermos.service + source = aurora-env.sh + source = aurora-startup.sh + source = thermos-env.sh + source = thermos-startup.sh + sha512sums = 1fb01dbd8c66fd99fc151ea5d265fd518b5807014099567ab6440553d66f344830a4a30d4ab8d00e13189fa83d38260abea6ada82acf4d490b72afa9e71b5c94 + sha512sums = 7f7978d979cddd87bd1c494f4e452ff5388b51d9f2bb7a7aa100ab14ac10ca3639e2f52b930680c9cd70e4f9dc34a82c84ce765ee3a8fbd3ee8f32804c6ec4f2 + sha512sums = 81e042940d9b6269b2a2a1258e32c6c7d3216c3174dfa3210a27b075b96f5dedfd2a06cd5e91bd8cc658985605d392283adde79d96aab8ae8c593aa20be7db75 + sha512sums = ac99a7ab12a6c92ea7ad325c462ff6abd74be1ad6996d997f9e69cd2435c839c731efebda8895b770c1a2316343a01e0851c5f1e6176b4eb7897e8e1fbece096 + sha512sums = a4aa8abb820e2158c6e9a343ddf59dd38cd64c2c6a087a2ab2fa8fec828f5574d031e649eb1934a645c533624c64f6c9fc4c8d173d9aa8f9aaee32ef94b54698 + sha512sums = 8553d5bde35c706e03c209963b3348a4b0e049e35d646079b7284f43b76de8db535ecd1be632726bc27f24e410fcf1962301de3798ef8958659ae4389d2f4113 + sha512sums = 9ebd9f9679bf133e22b00546dc6527d351d8a64ef578dd75dbf557530be88a27ba71580bef6bd7f6c731e9eee8545d89ad085531e90a9e78d24118d2be191702 + +pkgname = apache-aurora + diff --git a/3rdparty-build.patch b/3rdparty-build.patch new file mode 100644 index 000000000000..02400b33653a --- /dev/null +++ b/3rdparty-build.patch @@ -0,0 +1,11 @@ +--- BUILD 2017-02-01 08:16:11.000000000 +0000 ++++ BUILD_new 2017-03-01 19:23:04.089109757 +0000 +@@ -30,7 +30,7 @@ + # This native executor egg must currently be fetched out-of-band. + # See build-support/packer/build.sh which fetches to third_party/ and uses mesos.executor to + # enable a running cluster inside the root Vagrant machine. +- repository = '%s/third_party' % get_buildroot(), ++ repository = '/usr/share/mesos/python-eggs/', + ) + ] + ) diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..21e7ef7b0741 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,80 @@ +# Maintainer: Haralds Ulmanis <ezh@evilezh.net> +pkgname=apache-aurora +pkgver=0.17.0 +pkgrel=1 +pkgdesc="Aurora scheduler for mesos" +arch=('x86_64') +url=http://aurora.apache.org/ +license=('Apache') +groups=('science') + +depends=('mesos>=1.1.0-2' 'python2' 'java-environment' ) +makedepends=('mesos>=1.1.0-2' 'patch' 'python2' 'java-environment' ) + +source=("http://www.apache.org/dist/aurora/$pkgver/$pkgname-${pkgver}.tar.gz" + "aurora.service" + "thermos.service" + "aurora-env.sh" + "aurora-startup.sh" + "thermos-env.sh" + "thermos-startup.sh") + +sha512sums=('1fb01dbd8c66fd99fc151ea5d265fd518b5807014099567ab6440553d66f344830a4a30d4ab8d00e13189fa83d38260abea6ada82acf4d490b72afa9e71b5c94' + '7f7978d979cddd87bd1c494f4e452ff5388b51d9f2bb7a7aa100ab14ac10ca3639e2f52b930680c9cd70e4f9dc34a82c84ce765ee3a8fbd3ee8f32804c6ec4f2' + '81e042940d9b6269b2a2a1258e32c6c7d3216c3174dfa3210a27b075b96f5dedfd2a06cd5e91bd8cc658985605d392283adde79d96aab8ae8c593aa20be7db75' + 'ac99a7ab12a6c92ea7ad325c462ff6abd74be1ad6996d997f9e69cd2435c839c731efebda8895b770c1a2316343a01e0851c5f1e6176b4eb7897e8e1fbece096' + 'a4aa8abb820e2158c6e9a343ddf59dd38cd64c2c6a087a2ab2fa8fec828f5574d031e649eb1934a645c533624c64f6c9fc4c8d173d9aa8f9aaee32ef94b54698' + '8553d5bde35c706e03c209963b3348a4b0e049e35d646079b7284f43b76de8db535ecd1be632726bc27f24e410fcf1962301de3798ef8958659ae4389d2f4113' + '9ebd9f9679bf133e22b00546dc6527d351d8a64ef578dd75dbf557530be88a27ba71580bef6bd7f6c731e9eee8545d89ad085531e90a9e78d24118d2be191702') + +prepare() { + build_dir="$srcdir/$pkgname-$pkgver" + cd "$build_dir/3rdparty/python" + patch < "${srcdir}/../3rdparty-build.patch" + cd "$build_dir" + wget https://services.gradle.org/distributions/gradle-3.1-bin.zip + unzip gradle-3.1-bin.zip + rm gradle-3.1-bin.zip + if [ ! -d build ]; then + mkdir build + fi +} + +build() { + cd "$srcdir/$pkgname-$pkgver" + ./gradle-3.1/bin/gradle installDist + ./pants binary src/main/python/apache/aurora/kerberos:kaurora + ./pants binary src/main/python/apache/aurora/kerberos:kaurora_admin + ./pants binary src/main/python/apache/aurora/executor:thermos_executor + ./pants binary src/main/python/apache/aurora/tools:thermos + ./pants binary src/main/python/apache/aurora/tools:thermos_observer + ./pants binary src/main/python/apache/thermos/runner:thermos_runner + build-support/embed_runner_in_executor.py +} + +check() { + msg "Skipping 'check'." +} + +package() { + build_dir="$srcdir/$pkgname-$pkgver" + lib_dir="$pkgdir/usr/lib/$pkgname" + + mkdir -p $lib_dir + cp -r $build_dir/dist/install/aurora-scheduler/* $lib_dir + mkdir -p -m755 $pkgdir/usr/bin + install -m755 $build_dir/dist/kaurora_admin.pex $pkgdir/usr/bin/aurora_admin + install -m755 $build_dir/dist/kaurora.pex $pkgdir/usr/bin/aurora + install -m755 $build_dir/dist/thermos_executor.pex $pkgdir/usr/bin/thermos_executor + install -m755 $build_dir/dist/thermos_observer.pex $pkgdir/usr/bin/thermos_observer + install -m755 $build_dir/dist/thermos.pex $pkgdir/usr/bin/thermos + install -m755 $build_dir/dist/thermos_runner.pex $pkgdir/usr/bin/thermos_runner + + mkdir -p -m755 $pkgdir/etc/aurora + install -m755 aurora-startup.sh $pkgdir/usr/bin/aurora-startup.sh + install -m755 thermos-startup.sh $pkgdir/usr/bin/thermos-startup.sh + install -m644 aurora-env.sh $pkgdir/etc/aurora/aurora-env.sh + install -m644 thermos-env.sh $pkgdir/etc/aurora/thermos-env.sh + mkdir -p -m755 $pkgdir/usr/lib/systemd/system + install -m644 $srcdir/{aurora,thermos}.service $pkgdir/usr/lib/systemd/system +} diff --git a/aurora-env.sh b/aurora-env.sh new file mode 100644 index 000000000000..61e745cb6e16 --- /dev/null +++ b/aurora-env.sh @@ -0,0 +1,23 @@ +#!/bin/bash +AURORA_HOME=/usr/lib/apache-aurora + +# Flags controlling the JVM. +JAVA_OPTS=( + -Xmx2g + -Xms2g + # GC tuning, etc. +) + +# Flags controlling the scheduler. +AURORA_FLAGS=( + # Port for client RPCs and the web UI + -http_port=8081 + # Log configuration, etc. +) + +# Environment variables controlling libmesos +export JAVA_HOME=... +export GLOG_v=1 +# Port and public ip used to communicate with the Mesos master and for the replicated log +export LIBPROCESS_PORT=8083 +export LIBPROCESS_IP=192.168.33.7 diff --git a/aurora-startup.sh b/aurora-startup.sh new file mode 100644 index 000000000000..ca3939eecaf0 --- /dev/null +++ b/aurora-startup.sh @@ -0,0 +1,3 @@ +#!/bin/bash +source /etc/aurora-env.sh +JAVA_OPTS="${JAVA_OPTS[*]}" exec "$AURORA_HOME/bin/aurora-scheduler" "${AURORA_FLAGS[@]}" diff --git a/aurora.service b/aurora.service new file mode 100644 index 000000000000..3086b8a1cdfe --- /dev/null +++ b/aurora.service @@ -0,0 +1,15 @@ +[Unit] +Description=Aurora Scheduler +After=network.target +Wants=network.target + +[Service] +ExecStart=/usr/bin/aurora-startup.sh +#User=aurora +#Group=aurora +LimitNOFILE=16384 +Restart=always +RestartSec=20 + +[Install] +WantedBy=multi-user.target diff --git a/thermos-env.sh b/thermos-env.sh new file mode 100644 index 000000000000..928b07720578 --- /dev/null +++ b/thermos-env.sh @@ -0,0 +1,5 @@ +OBSERVER_ARGS=( + --port=1338 + --log_to_disk=NONE + --log_to_stderr=google:INFO +) diff --git a/thermos-startup.sh b/thermos-startup.sh new file mode 100644 index 000000000000..096d2923672d --- /dev/null +++ b/thermos-startup.sh @@ -0,0 +1,3 @@ +source /etc/aurora/thermos-env.sh + +exec /usr/bin/thermos_observer "${OBSERVER_ARGS[@]}" diff --git a/thermos.service b/thermos.service new file mode 100644 index 000000000000..09f4915e2ee2 --- /dev/null +++ b/thermos.service @@ -0,0 +1,16 @@ +[Unit] +Description=Thermos Observer +After=network.target +Wants=network.target + +[Service] +ExecStart=/usr/bin/thermos-startup.sh +#User=root +#Group=root +LimitNOFILE=16384 +Restart=always +RestartSec=20 +LimitNOFILE=16384 + +[Install] +WantedBy=multi-user.target |