diff --git a/mesos-base/cdh.repo b/mesos-base/cdh.repo deleted file mode 100644 index 7b1fcc9..0000000 --- a/mesos-base/cdh.repo +++ /dev/null @@ -1,6 +0,0 @@ -[cloudera-cdh5] -# Packages for Cloudera's Distribution for Hadoop, Version 5, on RedHat or CentOS 7 x86_64 -name=Cloudera's Distribution for Hadoop, Version 5 -baseurl=https://archive.cloudera.com/cdh5/redhat/7/x86_64/cdh/5/ -gpgkey =https://archive.cloudera.com/cdh5/redhat/7/x86_64/cdh/RPM-GPG-KEY-cloudera -gpgcheck = 1 diff --git a/mesos-base/docker.repo b/mesos-base/docker.repo deleted file mode 100644 index 8fbc280..0000000 --- a/mesos-base/docker.repo +++ /dev/null @@ -1,6 +0,0 @@ -[dockerrepo] -name=Docker Repository -baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/ -enabled=1 -gpgcheck=1 -gpgkey=https://yum.dockerproject.org/gpg diff --git a/mesos-base/packer.json b/mesos-base/packer.json deleted file mode 100644 index 3f58fc0..0000000 --- a/mesos-base/packer.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "_comment": "Build a Mesos base image", - "variables": { - "centos_major": "7", - "centos_minor": "2", - "mesos_version": "1.0.1", - "docker_version": "1.11.2", - "DOCKER_HUB_REPO": "aliswdev" - }, - "builders": [ - { - "type": "docker", - "image": "centos:centos{{user `centos_major`}}", - "commit": true - } - ], - "provisioners": [ - { - "type": "file", - "source": "docker.repo", - "destination": "/etc/yum.repos.d/docker.repo" - }, - { - "type": "file", - "source": "cdh.repo", - "destination": "/etc/yum.repos.d/cdh.repo" - }, - { - "type": "shell", - "inline": ["rpm -Uvh http://repos.mesosphere.com/el/{{user `centos_major`}}/noarch/RPMS/mesosphere-el-repo-{{user `centos_major`}}-{{user `centos_minor`}}.noarch.rpm", - "rpm --import https://archive.cloudera.com/cdh5/redhat/{{user `centos_major`}}/x86_64/cdh/RPM-GPG-KEY-cloudera", - "yum update -y && yum install -y mesos-{{user `mesos_version`}} docker-engine-{{user `docker_version`}} ", - "yum clean all -y"] - } - ], - "post-processors": [ - [ - { - "type": "docker-tag", - "repository": "{{user `DOCKER_HUB_REPO`}}/mesos-base", - "tag": "{{user `mesos_version`}}" - }, - "docker-push" - ] - ] -} diff --git a/mesos-dns/packer.json b/mesos-dns/packer.json deleted file mode 100644 index c79a077..0000000 --- a/mesos-dns/packer.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "_comment": "Mesos DNS image", - "variables": { - "centos_major": "7", - "MESOS_DNS_TAG": "0.6.0", - "DOCKER_HUB_REPO": "aliswdev", - "MESOS_DNS_REPO": "mesosphere" - }, - "builders": [ - { - "type": "docker", - "image": "centos:centos{{user `centos_major`}}", - "commit": true - } - ], - "provisioners": [ - { - "type": "file", - "source": "run.sh", - "destination": "/run.sh" - }, - { - "type": "shell", - "inline": ["yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm", - "yum install -y golang git", - "yum clean all", - "GOPATH=/usr/local/go go get github.com/miekg/dns", - "GOPATH=/usr/local/go go get github.com/{{user `MESOS_DNS_REPO`}}/mesos-dns", - "export GOPATH=/usr/local/go ; cd /usr/local/go/src/github.com/{{user `MESOS_DNS_REPO`}}/mesos-dns && git reset --hard v{{user `MESOS_DNS_TAG`}} && git show && go build -o mesos-dns" - ] - } - ], - "post-processors": [ - [ - { - "type": "docker-tag", - "repository": "{{user `DOCKER_HUB_REPO`}}/mesos-dns", - "tag": "{{user `MESOS_DNS_TAG`}}" - }, - "docker-push" - ] - ] -} diff --git a/mesos-dns/run.sh b/mesos-dns/run.sh deleted file mode 100755 index 8fa896b..0000000 --- a/mesos-dns/run.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -e - -# Creates the config and runs mesos-dns. - -for x in `echo ${MESOS_DNS_MASTERS-127.0.0.1:5050} | tr , \\ `; do - MASTERS="$MASTERS, \"$x\"" -done -MASTERS=`echo $MASTERS | sed -e 's/^, //'` - -for x in `echo ${MESOS_DNS_RESOLVERS-8.8.8.8} | tr , \\ `; do - RESOLVERS="$RESOLVERS, \"$x\"" -done -RESOLVERS=`echo $RESOLVERS | sed -e 's/^, //'` - -ZK="\"zk\": \"$MESOS_DNS_ZK\"," - -cat << EOF > /config.json -{ - ${MESOS_DNS_ZK+$ZK} - "refreshSeconds": ${MESOS_DNS_REFRESH-60}, - "ttl": ${MESOS_DNS_TTL-60}, - "domain": "${MESOS_DNS_DOMAIN-mesos}", - "port": ${MESOS_DNS_PORT-53}, - "resolvers": [${RESOLVERS}], - "email": "${MESOS_DNS_EMAIL-root.mesos-dns.mesos}", - "timeout": ${MESOS_DNS_TIMEOUT-5}, - "IPSources": ["host", "mesos", "netinfo"] -} -EOF - -export GOPATH=/usr/local/go -/usr/local/go/bin/mesos-dns ${VERBOSE+-v} -config /config.json diff --git a/mesos-master/packer.json b/mesos-master/packer.json deleted file mode 100644 index e87f3e7..0000000 --- a/mesos-master/packer.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "_comment": "Build a Mesos master image", - "variables": { - "centos_major": "7", - "centos_minor": "2", - "mesos_version": "1.0.1", - "docker_version": "1.11.2", - "DOCKER_HUB_REPO": "aliswdev" - }, - "builders": [ - { - "type": "docker", - "image": "{{user `DOCKER_HUB_REPO`}}/mesos-base:{{user `mesos_version`}}", - "commit": true - } - ], - "provisioners": [ - { - "type": "file", - "source": "run.sh", - "destination": "/run.sh" - }, - { - "type": "shell", - "inline": [ - "yum install -y iptables ca-certificates lxc e2fsprogs openssl && yum clean all -y", - "mkdir -p /etc/grid-security && openssl req -x509 -newkey rsa:4096 -keyout /etc/grid-security/hostkey.pem -out /etc/grid-security/hostcert.pem -days 365 -nodes -subj '/CN=localhost'" - ] - } - ], - "post-processors": [ - [ - { - "type": "docker-tag", - "repository": "{{user `DOCKER_HUB_REPO`}}/mesos-master", - "tag": "{{user `mesos_version`}}" - }, - "docker-push" - ] - ] -} diff --git a/mesos-master/run.sh b/mesos-master/run.sh deleted file mode 100644 index 2f3fc73..0000000 --- a/mesos-master/run.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -e -x -mesos-master --zk=${MESOS_MASTER_ZK-zk://localhost:2181/mesos} \ - --quorum=${QUORUM-1} \ - --work_dir=${MESOS_MASTER_WORKDIR-/var/lib/mesos} \ - --log_dir=${MESOS_LOG_DIR-/var/log/mesos} \ - --port=${MESOS_MASTER_PORT-5050} \ - --cluster=${MESOS_CLUSTER-mesos} diff --git a/mesos-slave/packer.json b/mesos-slave/packer.json deleted file mode 100644 index c1f2c9e..0000000 --- a/mesos-slave/packer.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "_comment": "Build a Mesos slave image", - "variables": { - "centos_major": "7", - "centos_minor": "2", - "mesos_version": "1.0.1", - "docker_version": "1.11.2", - "aurora_version": "0.16.0", - "DOCKER_HUB_REPO": "aliswdev" - }, - "builders": [ - { - "type": "docker", - "image": "{{user `DOCKER_HUB_REPO`}}/mesos-base:{{user `mesos_version`}}", - "commit": true - } - ], - "provisioners": [ - { - "type": "file", - "source": "run.sh", - "destination": "/run.sh" - }, - { - "type": "shell", - "inline": [ - "groupadd -g 980 mesosalien", - "useradd -u 980 -g 980 mesosalien", - "groupadd -g 981 mesosci", - "useradd -u 981 -g 981 mesosci", - "groupadd -g 982 mesosdaq", - "useradd -u 982 -g 982 mesosdaq", - "groupadd -g 983 mesosuser", - "useradd -u 983 -g 983 mesosuser", - "groupadd -g 984 mesostest", - "useradd -u 984 -g 984 mesostest", - "yum install -y cyrus-sasl", - "rpm -Uvh https://bintray.com/apache/aurora/download_file?file_path=centos-7%2Faurora-executor-{{user `aurora_version`}}-1.el7.centos.aurora.x86_64.rpm", - "yum install -y iptables ca-certificates lxc e2fsprogs openssl && yum clean all -y", - "mkdir -p /etc/grid-security && openssl req -x509 -newkey rsa:4096 -keyout /etc/grid-security/hostkey.pem -out /etc/grid-security/hostcert.pem -days 365 -nodes -subj '/CN=localhost'" - ] - } - ], - "post-processors": [ - [ - { - "type": "docker-tag", - "repository": "{{user `DOCKER_HUB_REPO`}}/mesos-slave", - "tag": "{{user `mesos_version`}}" - }, - "docker-push" - ] - ] -} diff --git a/mesos-slave/run.sh b/mesos-slave/run.sh deleted file mode 100755 index 75800a5..0000000 --- a/mesos-slave/run.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh -e -x - -# Simply starts the mesos slave. -# -# Notice that in case of a frontend, we expose port 53 as well -# as a valid resource. -groupadd -g ${JENKINS_GID:-2000} jenkins || true -useradd -u ${JENKINS_UID:-501} -g ${JENKINS_GID:-2000} jenkins || true - -# Creates a modules configuration file which can be used to overestimate -# the available CPU resources and to remove the oversubscribed tasks -# when the load becomes too high. -cat < /etc/mesos-slave/modules -{ - "libraries": - [ - { - "file": "/usr/lib/libfixed_resource_estimator.so", - "modules": { - "name": "org_apache_mesos_FixedResourceEstimator", - "parameters": { - "key": "resources", - "value": "cpus:$((`nproc` + ${MESOS_EXTRA_CPUS:-0}))" - } - } - }, - { - "file": "/usr/lib/libload_qos_controller.so", - "modules": { - "name": "org_apache_mesos_LoadQoSController", - "parameters": [ - { - "key": "load_threshold_5min", - "value": "$((`nproc` + ${MESOS_EXTRA_CPUS:-0} + 3))" - }, - { - "key": "load_threshold_15min", - "value": "$((`nproc` + ${MESOS_EXTRA_CPUS:-0} + 2))" - } - ] - } - } - ] -} -EOF - -mesos-slave --master=${MESOS_MASTER_ZK-zk://localhost:2181/mesos} \ - --work_dir=${MESOS_MASTER_WORKDIR-/var/lib/mesos} \ - ${MESOS_SLAVE_FRONTEND+--resources='ports(*):[31000-32000, 53-53]'} \ - --containerizers=docker,mesos