aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wfar...@apache.org
Subject aurora-packaging git commit: Add test environments for RPMs and debs.
Date Wed, 09 Sep 2015 22:19:40 GMT
Repository: aurora-packaging
Updated Branches:
  refs/heads/master 119949f68 -> efd0edb08


Add test environments for RPMs and debs.

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


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

Branch: refs/heads/master
Commit: efd0edb08930a617d6ec130a9a0e0d153024ebf4
Parents: 119949f
Author: Bill Farner <wfarner@apache.org>
Authored: Wed Sep 9 15:19:36 2015 -0700
Committer: Bill Farner <wfarner@apache.org>
Committed: Wed Sep 9 15:19:36 2015 -0700

----------------------------------------------------------------------
 .gitignore                          |  1 +
 test/deb/ubuntu-trusty/README.md    | 36 ++++++++++++++++++++++++++++++++
 test/deb/ubuntu-trusty/Vagrantfile  | 11 ++++++++++
 test/deb/ubuntu-trusty/provision.sh | 11 ++++++++++
 test/rpm/centos-7/README.md         | 32 ++++++++++++++++++++++++++++
 test/rpm/centos-7/Vagrantfile       | 11 ++++++++++
 test/rpm/centos-7/provision.sh      | 10 +++++++++
 7 files changed, 112 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/efd0edb0/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 849ddff..8174623 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 dist/
+.vagrant

http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/efd0edb0/test/deb/ubuntu-trusty/README.md
----------------------------------------------------------------------
diff --git a/test/deb/ubuntu-trusty/README.md b/test/deb/ubuntu-trusty/README.md
new file mode 100644
index 0000000..72f4476
--- /dev/null
+++ b/test/deb/ubuntu-trusty/README.md
@@ -0,0 +1,36 @@
+# Installing Aurora
+## Fetch and install packages
+
+    version=0.9.0
+    pkg_root="http://people.apache.org/~wfarner/aurora/distributions/$version/deb/ubuntu-trusty"
+    for deb in \
+        aurora-scheduler_${version}_amd64.deb \
+        aurora-executor_${version}_amd64.deb \
+        aurora-tools_${version}_amd64.deb; do
+      wget $pkg_root/$deb
+      sudo dpkg -i $deb
+    done
+
+The scheduler and observer will automatically start when installed.
+
+## Initialize scheduler's replicated log
+
+    sudo stop aurora-scheduler
+    sudo -u aurora mkdir -p /var/lib/aurora/scheduler/db
+    sudo -u aurora mesos-log initialize --path=/var/lib/aurora/scheduler/db
+    sudo start aurora-scheduler
+
+## Create a job
+
+    echo "
+    task = SequentialTask(
+      processes = [Process(name = 'hello', cmdline = 'echo hello')],
+      resources = Resources(cpu = 1.0, ram = 128*MB, disk = 128*MB))
+
+    jobs = [Service(
+      task = task, cluster = 'example', role = 'www-data', environment = 'prod', name = 'hello')]"
> hello_world.aurora
+    aurora job create example/www-data/prod/hello hello_world.aurora
+
+## Logs
+* scheduler: `/var/log/upstart/aurora-scheduler.log`
+* observer: `/var/log/upstart/thermos.log`

http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/efd0edb0/test/deb/ubuntu-trusty/Vagrantfile
----------------------------------------------------------------------
diff --git a/test/deb/ubuntu-trusty/Vagrantfile b/test/deb/ubuntu-trusty/Vagrantfile
new file mode 100644
index 0000000..3d241eb
--- /dev/null
+++ b/test/deb/ubuntu-trusty/Vagrantfile
@@ -0,0 +1,11 @@
+Vagrant.require_version ">= 1.5.0"
+
+Vagrant.configure(2) do |config|
+  config.vm.box = "ubuntu/trusty64"
+
+  config.vm.provider :virtualbox do |vb|
+    vb.customize ["modifyvm", :id, "--memory", "4096"]
+    vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
+  end
+  config.vm.provision "shell", path: "provision.sh"
+end

http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/efd0edb0/test/deb/ubuntu-trusty/provision.sh
----------------------------------------------------------------------
diff --git a/test/deb/ubuntu-trusty/provision.sh b/test/deb/ubuntu-trusty/provision.sh
new file mode 100644
index 0000000..60629f7
--- /dev/null
+++ b/test/deb/ubuntu-trusty/provision.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+add-apt-repository ppa:openjdk-r/ppa -y
+apt-get update
+apt-get install -y openjdk-8-jre libsvn1 zookeeperd
+
+update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
+
+wget -c https://downloads.mesosphere.io/master/ubuntu/14.04/mesos_0.22.0-1.0.ubuntu1404_amd64.deb
+dpkg -i mesos_0.22.0-1.0.ubuntu1404_amd64.deb
+start mesos-master

http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/efd0edb0/test/rpm/centos-7/README.md
----------------------------------------------------------------------
diff --git a/test/rpm/centos-7/README.md b/test/rpm/centos-7/README.md
new file mode 100644
index 0000000..a246fcf
--- /dev/null
+++ b/test/rpm/centos-7/README.md
@@ -0,0 +1,32 @@
+# Installing Aurora
+
+## Install packages
+### Point to wfarner's test yum repo
+
+    echo '[apache-aurora-wfarner]
+    name=Apache Aurora distribution maintained by wfarner
+    baseurl=http://people.apache.org/~wfarner/aurora/distributions/0.9.0/rpm/centos-7/x86_64/
+    gpgcheck = 0' | sudo tee /etc/yum.repos.d/apache-aurora-wfarner.repo > /dev/null
+
+## Install
+
+    sudo yum install -y aurora aurora-client aurora-thermos
+
+### Initialize and start
+
+    sudo -u aurora mesos-log initialize --path=/var/lib/aurora/db
+    sudo sed -i 's|zk://127.0.0.1:2181/mesos/master|zk://127.0.0.1:2181/mesos|g' /etc/sysconfig/aurora
+    sudo systemctl start aurora
+
+The second command alters the ZooKeeper path that the mesos distribution registers at.
+
+## Create a job
+
+    echo "
+    task = SequentialTask(
+      processes = [Process(name = 'hello', cmdline = 'echo hello')],
+      resources = Resources(cpu = 1.0, ram = 128*MB, disk = 128*MB))
+
+    jobs = [Service(
+      task = task, cluster = 'main', role = 'www-data', environment = 'prod', name = 'hello')]"
> hello_world.aurora
+    aurora job create main/www-data/prod/hello hello_world.aurora

http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/efd0edb0/test/rpm/centos-7/Vagrantfile
----------------------------------------------------------------------
diff --git a/test/rpm/centos-7/Vagrantfile b/test/rpm/centos-7/Vagrantfile
new file mode 100644
index 0000000..4d34b66
--- /dev/null
+++ b/test/rpm/centos-7/Vagrantfile
@@ -0,0 +1,11 @@
+Vagrant.require_version ">= 1.5.0"
+
+Vagrant.configure(2) do |config|
+  config.vm.box = "bento/centos-7.1"
+
+  config.vm.provider :virtualbox do |vb|
+    vb.customize ["modifyvm", :id, "--memory", "4096"]
+    vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
+  end
+  config.vm.provision "shell", path: "provision.sh"
+end

http://git-wip-us.apache.org/repos/asf/aurora-packaging/blob/efd0edb0/test/rpm/centos-7/provision.sh
----------------------------------------------------------------------
diff --git a/test/rpm/centos-7/provision.sh b/test/rpm/centos-7/provision.sh
new file mode 100644
index 0000000..fbd2419
--- /dev/null
+++ b/test/rpm/centos-7/provision.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+rpm -Uvh https://archive.cloudera.com/cdh4/one-click-install/redhat/6/x86_64/cloudera-cdh-4-0.x86_64.rpm
+yum -y install zookeeper-server
+service zookeeper-server init
+systemctl start zookeeper-server
+
+rpm -Uvh https://repos.mesosphere.io/el/7/noarch/RPMS/mesosphere-el-repo-7-1.noarch.rpm
+yum -y install mesos-0.22.0
+systemctl start mesos-slave mesos-master


Mime
View raw message